1 2008-11-22 Robert Millan <rmh@aybabtu.com>
3 Fix breakage on coreboot due to declaration missmatch.
4 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
5 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
8 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
9 comments. Avoid copiing one more byte than necessary (just in case).
11 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
12 to 0x200000 (avoids trouble with some OFW implementations, and matches
13 with the one in Yaboot).
14 Reported by Manoel Abranches
16 2008-11-20 Robert Millan <rmh@aybabtu.com>
18 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
19 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
21 * util/grub-mkconfig_lib.in (grub_warn): New function.
22 (convert_system_path_to_grub_path): Use grub_warn() when issuing
23 warnings, to obtain consistent formatting.
24 * util/grub.d/00_header.in: Likewise.
25 * util/update-grub_lib.in: Likewise.
27 * loader/i386/linux.c (allocate_pages): Fix a warning.
28 Move comment text to `#error' stanza.
30 Harmonize ieee1275's grub_available_iterate() with the generic
31 grub_machine_mmap_iterate() interface (fixes a recently-introduced
32 build problem on i386-ieee1275):
33 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
34 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
35 parameter `type'. Update all users of this function.
36 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
37 `kern/ieee1275/mmap.c'.
38 * kern/ieee1275/init.c
39 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
41 (grub_machine_mmap_iterate): ... this.
42 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
43 return type to `grub_err_t'. Update all implementations of this
45 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
48 Add `lsmmap' command (lists firmware-provided memory map):
49 * commands/lsmmap.c: New file.
50 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
51 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
53 * conf/powerpc-ieee1275.rmk: Likewise.
54 * conf/i386-coreboot.rmk: Likewise.
55 * conf/i386-ieee1275.rmk: Likewise.
57 2008-11-19 Robert Millan <rmh@aybabtu.com>
59 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
60 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
61 constraints to initrd allocation (based on code from
62 loader/i386/pc/linux.c). Without them, initrd was allocated too high
65 2008-11-14 Robert Millan <rmh@aybabtu.com>
67 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
68 order to cope with duplicate slashes.
70 2008-11-14 Robert Millan <rmh@aybabtu.com>
72 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
73 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
74 don't want to mess with lower memory, because it is used in the Linux
77 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
78 an appropiate place in lower memory, between 0x10000 and 0x90000,
79 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
80 is in our heap (probably as a result of it being corrupted during
81 decompression). Add #error instance with comment to explain why this
82 loader isn't currently usable on PC/BIOS.
84 2008-11-14 Robert Millan <rmh@aybabtu.com>
86 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
87 (GRUB_SERIAL_PORT_NUM): Fix misscalculation.
89 2008-11-12 Robert Millan <rmh@aybabtu.com>
91 Make loader/i386/linux.c buildable on i386-pc (although disabled).
93 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
94 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
96 * include/grub/i386/pc/memory.h: ... to here.
98 2008-11-12 Robert Millan <rmh@aybabtu.com>
100 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
103 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
104 (grub_console_cur_color, grub_console_real_putchar)
105 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
106 (grub_console_setcolorstate, grub_console_setcolor)
107 (grub_console_getcolor): Move from here ...
108 * include/grub/i386/vga_common.h: ... to here (new file).
110 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
111 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
113 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
114 `<grub/i386/vga_common.h>'.
116 2008-11-12 Robert Millan <rmh@aybabtu.com>
118 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
119 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
120 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
122 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
123 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
125 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
126 grub_console_init() with call to grub_vga_text_init().
127 (grub_machine_fini): Replace call to
128 grub_console_fini() with call to grub_vga_text_fini() and
129 grub_at_keyboard_fini().
131 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
132 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
133 (grub_console_setcolorstate, grub_console_setcolor)
134 (grub_console_getcolor): New function prototypes.
136 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
137 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
138 (grub_vga_text_setcursor): Static-ize.
139 (grub_vga_text_term): New structure.
140 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
142 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
143 (grub_console_cur_color, grub_console_standard_color)
144 (grub_console_normal_color, grub_console_highlight_color)
145 (map_char, grub_console_putchar, grub_console_getcharwidth)
146 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
147 (grub_console_getcolor): Move from here ...
148 * term/i386/vga_common.c: ... to here (same function names).
150 2008-11-12 Robert Millan <rmh@aybabtu.com>
152 Use newly-added Multiboot support in coreboot.
154 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
155 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
157 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
158 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
159 (codestart): Store the MBI in `startup_multiboot_info' when we're
160 being loaded using Multiboot.
162 * kern/i386/coreboot/init.c (grub_machine_init): Move
163 grub_at_keyboard_init() call to beginning of function (useful for
164 debugging). Call grub_machine_mmap_init() before attempting to use
165 grub_machine_mmap_iterate().
166 (grub_lower_mem, grub_upper_mem): Move from here ...
167 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
170 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
173 2008-11-12 Robert Millan <rmh@aybabtu.com>
175 Fix a regression introduced by the at_keyboard.mod split. Because
176 some terminals are default on some platforms and non-default on
177 others, the first terminal being registered determines which is
180 * kern/term.c (grub_term_register_input): If this is the first
181 terminal being registered, set it as the current one.
182 (grub_term_register_output): Likewise.
184 * term/efi/console.c (grub_console_init): Do not call
185 grub_term_set_current_output() or grub_term_set_current_input().
186 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
187 * term/i386/pc/console.c (grub_console_init): Likewise.
188 (grub_console_fini): Do not call grub_term_set_current_input()
189 (but leave grub_term_set_current_output() to restore text mode).
191 2008-11-10 Robert Millan <rmh@aybabtu.com>
193 * util/grub.d/00_header.in: Add backward compatibility check for
194 versions of terminal.mod that don't understand `terminal_input' or
197 2008-11-09 Robert Millan <rmh@aybabtu.com>
199 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
200 `terminal_input' / `terminal_output', not `terminal'.
202 2008-11-08 Robert Millan <rmh@aybabtu.com>
204 * Makefile.in (include_DATA): Fix srcdir=. assumption.
205 (DISTCLEANFILES): Add `build_env.mk'.
207 2008-11-08 Robert Millan <rmh@aybabtu.com>
209 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
210 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
211 members. Update all users.
212 * util/console.c (grub_ncurses_term): Split in ...
213 (grub_ncurses_term_input): ... this, and ...
214 (grub_ncurses_term_output): ... this. Update all users.
215 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
217 2008-11-08 Robert Millan <rmh@aybabtu.com>
219 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
220 (PKGDATA): Add $(pkgdata_SRCDIR).
221 (pkglib_BUILDDIR): New variable.
222 (pkgdata_SRCDIR): New variable.
223 (build_env.mk): New target.
224 (include_DATA): New variable.
225 (install-local): Install $(include_DATA) files in $(includedir).
227 2008-11-07 Pavel Roskin <proski@gnu.org>
229 * gendistlist.sh: Use C locale for sorting to ensure consistent
230 output on all systems.
232 * util/grub.d/00_header.in: Remove incorrect space before
235 2008-11-07 Robert Millan <rmh@aybabtu.com>
237 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
239 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
240 * loader/multiboot_loader.c (find_multi_boot2_header): New function
241 (based on find_multi_boot1_header).
242 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
243 using find_multi_boot2_header(), and abort if neither Multiboot or
244 Multiboot headers were found.
246 2008-11-07 Robert Millan <rmh@aybabtu.com>
248 Modularize at_keyboard.mod:
250 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
251 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
252 (at_keyboard_mod_LDFLAGS): New variables.
254 Actual terminal split:
256 * include/grub/term.h (struct grub_term): Split in ...
257 (struct grub_term_input): ... this, and ...
258 (struct grub_term_output): ... this. Update all users.
259 (grub_term_set_current): Split in ...
260 (grub_term_set_current_input): ... this, and ...
261 (grub_term_set_current_output): ... this.
262 (grub_term_get_current): Split in ...
263 (grub_term_get_current_input): ... this, and ...
264 (grub_term_get_current_output): ... this.
265 (grub_term_register): Split in ...
266 (grub_term_register_input): ... this, and ...
267 (grub_term_register_output): ... this.
268 (grub_term_unregister): Split in ...
269 (grub_term_unregister_input): ... this, and ...
270 (grub_term_unregister_output): ... this.
271 (grub_term_iterate): Split in ...
272 (grub_term_iterate_input): ... this, and ...
273 (grub_term_iterate_output): ... this.
275 * kern/term.c (grub_term_list): Split in ...
276 (grub_term_list_input): ... this, and ...
277 (grub_term_list_output): ... this. Update all users.
278 (grub_cur_term): Split in ...
279 (grub_cur_term_input): ... this, and ...
280 (grub_cur_term_output): ... this. Update all users.
281 (grub_term_set_current): Split in ...
282 (grub_term_set_current_input): ... this, and ...
283 (grub_term_set_current_output): ... this.
284 (grub_term_get_current): Split in ...
285 (grub_term_get_current_input): ... this, and ...
286 (grub_term_get_current_output): ... this.
287 (grub_term_register): Split in ...
288 (grub_term_register_input): ... this, and ...
289 (grub_term_register_output): ... this.
290 (grub_term_unregister): Split in ...
291 (grub_term_unregister_input): ... this, and ...
292 (grub_term_unregister_output): ... this.
293 (grub_term_iterate): Split in ...
294 (grub_term_iterate_input): ... this, and ...
295 (grub_term_iterate_output): ... this.
297 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
298 a check for input and one for output (and only attempt to get keys
299 from user when input works).
301 * util/grub-probe.c (grub_term_get_current): Split in ...
302 (grub_term_get_current_input): ... this, and ...
303 (grub_term_get_current_output): ... this.
304 * util/grub-fstest.c: Likewise.
305 * util/i386/pc/grub-setup.c: Likewise.
306 * util/grub-editenv.c: Likewise.
308 Portability adjustments:
310 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
311 `term/i386/pc/at_keyboard.c'.
312 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
313 grub_keyboard_controller_init() (now handled by terminal .init).
314 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
315 grub_at_keyboard_init().
316 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
317 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
318 at_keyboard.mod via input terminal interface).
319 * include/grub/i386/coreboot/console.h: Convert into a stub for
320 `<grub/i386/pc/console.h>'.
322 Migrate full terminals to new API:
324 * term/efi/console.c (grub_console_term): Split into ...
325 (grub_console_term_input): ... this, and ...
326 (grub_console_term_output): ... this. Update all users.
327 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
328 (grub_ofconsole_init): Split into ...
329 (grub_ofconsole_init_input): ... this, and ...
330 (grub_ofconsole_init_output): ... this.
331 (grub_ofconsole_term): Split into ...
332 (grub_ofconsole_term_input): ... this, and ...
333 (grub_ofconsole_term_output): ... this. Update all users.
334 * term/i386/pc/serial.c (grub_serial_term): Split into ...
335 (grub_serial_term_input): ... this, and ...
336 (grub_serial_term_output): ... this. Update all users.
337 * term/i386/pc/console.c (grub_console_term): Split into ...
338 (grub_console_term_input): ... this, and ...
339 (grub_console_term_output): ... this. Update all users.
340 (grub_console_term_input): Only enable it on PC/BIOS platform.
341 (grub_console_init): Remove grub_keyboard_controller_init() call.
343 Migrate input terminals to new API:
345 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
346 `i386' and `i386/pc' to enable build on x86_64 (this driver is
347 i386-specific anyway).
348 (grub_console_checkkey): Rename to ...
349 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
351 (grub_keyboard_controller_orig): New variable.
352 (grub_console_getkey): Rename to ...
353 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
355 (grub_keyboard_controller_init): Static-ize. Save original
356 controller value so that it can be restored ...
357 (grub_keyboard_controller_fini): ... here (new function).
358 (grub_at_keyboard_term): New structure.
359 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
362 Migrate output terminals to new API:
364 * term/i386/pc/vga.c (grub_vga_term): Change type to
365 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
366 members. Update all users.
367 * term/gfxterm.c (grub_video_term): Change type to
368 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
369 members. Update all users.
370 * include/grub/i386/pc/console.h (grub_console_checkkey)
371 (grub_console_getkey): Do not export (no longer needed by gfxterm,
374 Migrate `terminal' command and userland tools to new API:
376 * commands/terminal.c (grub_cmd_terminal): Split into ...
377 (grub_cmd_terminal_input): ... this, and ...
378 (grub_cmd_terminal_output): ... this.
379 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
380 `terminal_input' and `terminal_output'.
381 * util/grub.d/00_header.in: Adjust `terminal' calls to new
382 `terminal_input' / `terminal_output' API.
383 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
384 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
385 provided ${GRUB_TERMINAL}, convert it).
387 2008-11-04 Robert Millan <rmh@aybabtu.com>
389 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
391 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
393 2008-11-03 Bean <bean123ch@gmail.com>
395 * kern/elf.c (grub_elf32_load): Revert to previous code.
396 (grub_elf64_load): Likewise.
398 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
400 2008-11-01 Robert Millan <rmh@aybabtu.com>
402 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
403 (TARGET_CPPFLAGS): Likewise.
404 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
406 2008-11-01 Carles Pina i Estany <carles@pina.cat>
408 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
410 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
412 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
413 addition of objects until the code is not going to be able to fail.
415 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
417 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
418 (add a missing NULL check, and correct them by moving the pointer
419 operations after the actual check).
421 2008-10-29 Robert Millan <rmh@aybabtu.com>
423 * util/i386/pc/grub-install.in: Handle empty string as output from
424 make_system_path_relative_to_its_root().
426 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
428 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
429 circular metadata worst case scenario. If the metadata is circular
430 then copy the wrap in place.
431 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
432 project lib/format_text/layout.h
433 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
435 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
437 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
439 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
441 * util/update-grub_lib.in: Mention filename in warning message.
443 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
445 * NEWS: Update for rename of update-grub to grub-mkconfig.
447 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
449 * util/update-grub_lib.in: Copy to ...
450 * util/grub-mkconfig_lib.in: ... this. Update all users.
451 * util/update-grub_lib.in: Make it a stub to `grub-mkconfigig_lib.in'.
452 * util/update-grub.in: Rename to ...
453 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
454 option. Add `--output' option to allow users to specify the generated
455 configuration file. Default to stdout.
456 (update_grub_dir): Rename to ...
457 (grub_mkconfig_dir): ... this.
458 (grub_cfg): Default to an empty string.
459 * conf/common.rmk (update-grub): Rename to ...
460 (grub-mkconfig): ... this.
461 (update-grub_lib): Copy to ...
462 (grub-mkconfig_lib): ... this.
463 (update-grub_SCRIPTS): Copy to ...
464 (grub-mkconfig_SCRIPTS): ... this. Update all users.
465 (update-grub_DATA): Rename to ...
466 (grub-mkconfig_DATA): ... this.
468 2008-09-28 Robert Millan <rmh@aybabtu.com>
470 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
471 to `modified'. Add the real `created' field.
472 (grub_iso9660_uuid): Use `modified' rather than `created' for
473 constructing the UUID.
475 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
477 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
478 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
480 2008-09-28 Bean <bean123ch@gmail.com>
482 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
483 Thanks to Christian Franke for finding this bug.
485 2008-09-25 Robert Millan <rmh@aybabtu.com>
487 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
488 instances of grub_util_get_disk_name() (see previous commit).
490 2008-09-25 Robert Millan <rmh@aybabtu.com>
492 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
493 `util/i386/get_disk_name.c'.
494 * conf/i386-efi.rmk: Likewise.
495 * conf/x86_64-efi.rmk: Likewise.
496 * conf/i386-coreboot.rmk: Likewise.
497 * conf/i386-ieee1275.rmk: Likewise.
498 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
499 `util/ieee1275/get_disk_name.c'.
500 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
501 * util/ieee1275/get_disk_name.c: Remove file.
502 * util/i386/get_disk_name.c: Remove file.
503 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
504 "hd%d" for device.map entries, rather than using
505 grub_util_get_disk_name().
507 2008-09-24 Carles Pina i Estany <carles@pina.cat>
509 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
511 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
513 2008-09-24 Carles Pina i Estany <carles@pina.cat>
515 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
517 (GRUB_TERM_PPAGE): Changed to 0x4900.
519 2008-09-24 Robert Millan <rmh@aybabtu.com>
521 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
522 macros (they were i386-pc specific).
523 * include/grub/sparc64/ieee1275/console.h: Likewise.
524 * include/grub/efi/console.h: Likewise.
526 2008-09-22 Bean <bean123ch@gmail.com>
528 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
529 resident and in attribute list.
531 * include/grub/ntfs.h (BMP_LEN): Removed.
533 2008-09-22 Bean <bean123ch@gmail.com>
535 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
536 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
538 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
539 error occurs, as grub_disk_open will call grub_disk_close, which will
540 call p->close (scsi).
542 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
544 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
545 (AC_PREREQ): Bumped to 2.59.
546 (AC_TRY_COMPILE): Replace obsolete macro with ...
547 (AC_COMPILE_IFELSE): ... this.
548 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
549 (AC_LINK_IFELSE): ... this.
551 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
553 * autogen.sh: Add a call to `gendistlist.sh'.
555 2008-09-19 Christian Franke <franke@computer.org>
557 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
558 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
559 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
560 Export __enable_execute_stack() to modules.
561 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
564 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
566 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
569 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
571 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
572 #include <grub/util/hostdisk.h>.
574 2008-09-08 Robert Millan <rmh@aybabtu.com>
576 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
577 segments when their filesz is zero (grub_file_read() interprets
578 zero-size as "read until EOF", which results in memory corruption).
579 Use `lowest_segment' rather than 0 for calculating the current
580 segment load address.
582 2008-09-08 Robert Millan <rmh@aybabtu.com>
584 * util/hostdisk.c (open_device): Replace a grub_util_info() call
585 with grub_dprintf("hostdisk", ...), as it was so verbose that it
586 clobbered useful information.
588 2008-09-08 Robert Millan <rmh@aybabtu.com>
590 * include/grub/util/biosdisk.h: Move to ...
591 * include/grub/util/hostdisk.h: ... here. Update all users.
592 * util/biosdisk.c: Move to ...
593 * util/hostdisk.c: ... here. Update all users.
595 2008-09-07 Robert Millan <rmh@aybabtu.com>
597 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
599 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
600 and length can be stored directly in the `mbi->mmap_addr' and
601 `mbi->mmap_length' struct fields.
603 2008-09-07 Robert Millan <rmh@aybabtu.com>
605 * conf/i386.rmk: New file. Provides declaration for building
607 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
608 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
610 Include `conf/i386.mk'.
611 * conf/i386-efi.rmk: Likewise.
612 * conf/x86_64-efi.rmk: Likewise.
613 * conf/i386-coreboot.rmk: Likewise.
614 * conf/i386-ieee1275.rmk: Likewise.
616 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
618 Based on patch created by Colin D Bennett <colin@gibibit.com>.
619 Adds optimization support for BGR based modes.
621 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
622 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
623 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
624 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
625 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
626 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
627 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
628 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
629 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
630 (grub_video_i386_vbeblit_index_index): Likewise.
631 (grub_video_i386_vbeblit_replace_directN): Added.
632 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
633 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
634 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
635 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
636 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
637 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
638 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
639 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
640 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
641 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
642 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
643 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
644 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
646 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
647 (grub_video_i386_vbefill_R8G8B8): Likewise.
648 (grub_video_i386_vbefill_index): Likewise.
649 (grub_video_i386_vbefill_direct32): Added.
650 (grub_video_i386_vbefill_direct24): Likewise.
651 (grub_video_i386_vbefill_direct16): Likewise.
652 (grub_video_i386_vbefill_direct8): Likewise.
654 * include/grub/video.h (grub_video_blit_format): Removed
655 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
656 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
657 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
658 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
659 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
661 * video/video.c (grub_video_get_blit_format): Updated to use new
662 blit formats. Added handling for 16 bit color modes.
664 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
666 (common_blitter): Updated to use new blitters.
668 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
670 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
671 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
672 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
673 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
674 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
675 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
676 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
677 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
678 (grub_video_i386_vbeblit_index_index): Likewise.
679 (grub_video_i386_vbeblit_replace_directN): Added.
680 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
681 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
682 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
683 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
684 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
685 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
686 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
687 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
688 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
689 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
690 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
691 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
692 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
694 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
695 (grub_video_i386_vbefill_R8G8B8): Likewise.
696 (grub_video_i386_vbefill_index): Likewise.
697 (grub_video_i386_vbefill_direct32): Added.
698 (grub_video_i386_vbefill_direct24): Likewise.
699 (grub_video_i386_vbefill_direct16): Likewise.
700 (grub_video_i386_vbefill_direct8): Likewise.
702 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
705 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
708 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
711 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
714 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
716 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
719 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
721 * fs/iso9660.c (grub_iso9660_date): New structure.
722 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
723 (grub_iso9660_uuid): New function.
725 2008-09-05 Bean <bean123ch@gmail.com>
727 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
729 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
730 insensitive bit for names in Win32 and Win32 & DOS namespace.
732 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
734 * include/grub/types.h (LONG_MAX): Likewise.
736 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
738 * util/getroot.c: Include <config.h>.
739 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
740 add support for /dev/md/N devices and handle LVM double dash escaping.
742 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
744 * config.guess: Update to latest version from config git.
745 * config.sub: Likewise.
747 2008-09-03 Robert Millan <rmh@aybabtu.com>
749 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
750 `disk->total_sectors'.
752 2008-09-01 Colin D Bennett <colin@gibibit.com>
754 * include/grub/normal.h: Fixed incorrect comment for
755 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
757 2008-09-01 Colin D Bennett <colin@gibibit.com>
759 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
762 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
763 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
764 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
765 (GRUB_VBE_MODEATTR_COLOR): Likewise.
766 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
767 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
768 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
769 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
770 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
771 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
772 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
773 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
774 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
775 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
776 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
777 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
778 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
779 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
780 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
782 2008-08-31 Robert Millan <rmh@aybabtu.com>
784 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
786 (grub_multiboot): Fix a few warnings.
788 2008-08-31 Robert Millan <rmh@aybabtu.com>
790 * loader/i386/pc/multiboot.c: Update comment not to say that
791 boot_device support is unimplemented.
793 2008-08-31 Robert Millan <rmh@aybabtu.com>
795 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
796 or memory map support are unimplemented.
798 2008-08-31 Colin D Bennett <colin@gibibit.com>
800 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
802 2008-08-31 Colin D Bennett <colin@gibibit.com>
804 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
805 total video memory in 'vbeinfo' output; show color format details for
808 2008-08-30 Pavel Roskin <proski@gnu.org>
810 * util/genmoddep.c: Remove for real this time.
811 * DISTLIST: Remove util/genmoddep.c.
813 2008-08-30 Robert Millan <rmh@aybabtu.com>
815 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
816 as required by Multiboot spec (it was already 4-byte aligned, but
819 2008-08-29 Pavel Roskin <proski@gnu.org>
821 * kern/powerpc/ieee1275/crt0.S: Rename to ...
822 * kern/powerpc/ieee1275/startup.S: ... this.
823 * conf/powerpc-ieee1275.rmk: Adjust for the above.
824 * DISTLIST: Likewise.
826 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
827 grub/cpu/kernel.h. Add start label for consistency with other
828 platforms. Add grub_prefix immediately after start. Add jump
829 to the code after grub_prefix.
830 * include/grub/powerpc/kernel.h: Provide valid values for
831 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
833 2008-08-29 Bean <bean123ch@gmail.com>
835 * configure.ac: Change host_os to cygwin for mingw.
836 (asprintf): New check for function.
838 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
839 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
841 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
842 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
843 sync, sleep and grub_util_get_disk_size for mingw.
845 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
846 to get size in mingw.
847 (open_device): Use flag O_BINARY if it's defined.
848 (find_root_device): Add dummy code for mingw.
850 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
851 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
852 (get_scsi_disk_name): Return 0 for mingw.
854 * util/hostfs.c: #include <grub/util/misc.h>.
855 (grub_hostfs_open): Use "rb" flag to open file, use
856 grub_util_get_disk_size to get disk size for mingw.
858 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
859 (asprintf): New function if HAVE_ASPRINTF is not set.
860 (sync): New function for mingw.
862 (grub_util_get_disk_size): Likewise.
864 2008-08-28 Pavel Roskin <proski@gnu.org>
866 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
869 2008-08-28 Robert Millan <rmh@aybabtu.com>
871 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
873 2008-08-28 Robert Millan <rmh@aybabtu.com>
875 Change find_grub_drive() syntax so it doesn't prevent it from
876 detecting NULL names as errors.
878 * util/biosdisk.c (find_grub_drive): Move free slot search code
880 (find_free_slot): ... to here.
881 (read_device_map): Use find_free_slot() to search for free slots.
883 2008-08-27 Marco Gerards <marco@gnu.org>
885 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
886 (scsi_mod_SOURCES): New variable.
887 (scsi_mod_CFLAGS): Likewise
888 (scsi_mod_LDFLAGS): Likewise.
890 * disk/scsi.c: New file.
892 * include/grub/scsi.h: Likewise.
894 * include/grub/scsicmd.h: Likewise.
896 * disk/ata.c: Include <grub/scsi.h>.
897 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
899 (grub_ata_iterate): Skip ATAPI devices.
900 (grub_ata_open): Only handle ATAPI devices.
901 (struct grub_atapi_read): Removed.
902 (grub_atapi_readsector): Likewise.
903 (grub_ata_read): No longer handle ATAPI devices.
904 (grub_ata_write): Likewise.
905 (grub_atapi_iterate): New function.
906 (grub_atapi_read): Likewise.
907 (grub_atapi_write): Likewise.
908 (grub_atapi_open): Likewise.
909 (grub_atapi_close): Likewise.
910 (grub_atapi_dev): New variable.
911 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
912 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
914 * include/grub/disk.h (enum grub_disk_dev_id): Add
915 `GRUB_DISK_DEVICE_SCSI_ID'.
917 2008-08-26 Robert Millan <rmh@aybabtu.com>
919 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
920 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
923 2008-08-23 Bean <bean123ch@gmail.com>
925 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
926 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
927 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
928 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
930 (raid5rec_mod_SOURCES): New macro.
931 (raid5rec_mod_CFLAGS): Likewise.
932 (raid5rec_mod_LDFLAGS): Likewise.
933 (raid6rec_mod_SOURCES): Likewise.
934 (raid6rec_mod_CFLAGS): Likewise.
935 (raid6rec_mod_LDFLAGS): Likewise.
936 (mdraid_mod_SOURCES): Likewise.
937 (mdraid_mod_CFLAGS): Likewise.
938 (mdraid_mod_LDFLAGS): Likewise.
939 (dm_nv_mod_SOURCES): Likewise.
940 (dm_nv_mod_CFLAGS): Likewise.
941 (dm_nv_mod_LDFLAGS): Likewise.
943 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
944 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
945 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
947 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
948 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
950 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
952 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
954 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
956 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
958 * disk/raid5_recover.c: New file.
960 * disk/raid6_recover.c: Likewise.
962 * disk/mdraid_linux.c: Likewise.
964 * disk/dmraid_nvidia.c: Likewise.
966 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
969 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
970 calculate the size of raid device.
971 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
972 different layout of raid5.
973 (grub_raid_scan_device): Remove code specific to mdraid.
974 (grub_raid_list): New variable.
975 (free_array): New function.
976 (grub_raid_register): Likewise.
977 (grub_raid_unregister): Likewise.
978 (grub_raid_rescan): Likewise.
979 (GRUB_MOD_INIT): Don't iterate device here.
980 (GRUB_MOD_FINI): Use free_array to release resource.
982 * include/grub/raid.h: Remove macro and structure specific to mdraid.
983 (grub_raid5_recover_func_t): New function variable type.
984 (grub_raid6_recover_func_t): Likewise.
985 (grub_raid5_recover_func): New variable.
986 (grub_raid6_recover_func): Likewise.
987 (grub_raid_register): New function.
988 (grub_raid_unregister): Likewise.
989 (grub_raid_rescan): Likewise.
990 (grub_raid_block_xor): Likewise.
992 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
993 (CMD_CRC): New macro.
995 (read_file): Handle device as well as file.
996 (cmd_crc): New function.
997 (fstest): Handle multiple disks.
998 (options): Remove part, raw and long, add root and diskcount.
999 (usage): Add crc, remove -p, -r, -l, add -r and -c.
1000 (main): Find the first non option entry and ignore subsequent options,
1001 add handling for the new options, support multiple disks.
1003 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
1005 2008-08-23 Bean <bean123ch@gmail.com>
1007 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
1009 * genfslist.sh: Ignore kernel.mod.
1011 * genpartmaplist.sh: Likewise.
1013 2008-08-23 Robert Millan <rmh@aybabtu.com>
1015 * util/getroot.c (find_root_device): Skip anything that starts with
1016 a dot, not just directories. This avoids things like /dev/.tmp.md0.
1018 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
1020 * util/update-grub.in (GRUB_GFXMODE): Export variable.
1021 * util/grub.d/00_header.in: Allow the administrator to change default
1022 gfxmode via ${GRUB_GFXMODE}.
1024 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
1026 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
1028 2008-08-21 Robert Millan <rmh@aybabtu.com>
1030 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
1032 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
1033 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
1035 2008-08-20 Carles Pina i Estany <carles@pina.cat>
1037 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
1038 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
1040 2008-08-19 Robert Millan <rmh@aybabtu.com>
1042 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
1043 (struct grub_virtual_screen): Remove `cursor_color'.
1044 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
1046 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
1048 2008-08-18 Robert Millan <rmh@aybabtu.com>
1050 Unify (identical) linux_normal.c files.
1051 * loader/i386/efi/linux_normal.c: Move from here ...
1052 * loader/linux_normal.c: ... to here. Update all users.
1053 * loader/i386/pc/linux_normal.c: Delete. Update all users.
1054 * loader/i386/ieee1275/linux_normal.c: Likewise.
1056 2008-08-18 Robert Millan <rmh@aybabtu.com>
1058 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
1059 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
1060 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
1061 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
1062 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
1064 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
1065 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
1066 (GRUB_LINUX_CL_END_OFFSET): ... to here.
1067 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
1068 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
1069 (GRUB_EFI_CL_END_OFFSET): Rename to ...
1070 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
1071 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
1072 Initialize `params->video_cursor_x' and `params->video_cursor_y'
1073 portably using grub_getxy().
1074 Replace `-EFI' with `-bzImage' in boot message.
1076 2008-08-17 Robert Millan <rmh@aybabtu.com>
1078 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
1080 2008-08-17 Robert Millan <rmh@aybabtu.com>
1082 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
1084 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
1085 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
1086 (grub_machine_mmap_iterate): New function declaration.
1087 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
1089 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
1092 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
1093 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
1094 Move e820 parsing from here ...
1095 * kern/i386/pc/mmap.c: New file.
1096 (grub_machine_mmap_iterate): ... to here.
1098 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
1099 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
1100 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
1101 (grub_available_iterate): Redeclare to return `void', and redeclare
1102 its hook to use grub_uint64_t as addr and size parameters, and rename
1104 (grub_machine_mmap_iterate): ... this. Update all users.
1106 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
1107 to make it more readable. Rename to ...
1108 (grub_machine_mmap_iterate): ... this.
1110 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
1111 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
1112 (grub_multiboot): Allocate an extra region after the payload, and fill
1113 it with a Multiboot memory map. Adjust a.out loader to calculate size
1114 with the extra space.
1115 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
1116 with the extra space.
1118 2008-08-17 Carles Pina i Estany <carles@pina.cat>
1120 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
1122 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
1124 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
1125 mdate-sh to the list `find' searches for.
1126 * DISTLIST: Regenerated.
1128 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
1130 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
1131 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
1132 genmoddep.awk, gensymlist.sh.in.
1133 (DISTDIRS): Add bus, docs, hook, lib.
1134 * DISTLIST: Regenerated.
1135 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
1137 2008-08-16 Robert Millan <rmh@aybabtu.com>
1139 * disk/raid.c (grub_raid_init): Handle/report errors set by
1140 grub_device_iterate().
1141 * disk/lvm.c (grub_lvm_init): Likewise.
1143 2008-08-15 Bean <bean123ch@gmail.com>
1145 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1147 (datetime_mod_SOURCES): New macro.
1148 (datetime_mod_CFLAGS): Likewise.
1149 (datetime_mod_LDFLAGS): Likewise.
1150 (date_mod_SOURCES): Likewise.
1151 (date_mod_CFLAGS): Likewise.
1152 (date_mod_LDFLAGS): Likewise.
1153 (datehook_mod_SOURCES): Likewise.
1154 (datehook_mod_CFLAGS): Likewise.
1155 (datehook_mod_LDFLAGS): Likewise.
1157 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1159 (datetime_mod_SOURCES): New macro.
1160 (datetime_mod_CFLAGS): Likewise.
1161 (datetime_mod_LDFLAGS): Likewise.
1162 (date_mod_SOURCES): Likewise.
1163 (date_mod_CFLAGS): Likewise.
1164 (date_mod_LDFLAGS): Likewise.
1165 (datehook_mod_SOURCES): Likewise.
1166 (datehook_mod_CFLAGS): Likewise.
1167 (datehook_mod_LDFLAGS): Likewise.
1169 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1171 (datetime_mod_SOURCES): New macro.
1172 (datetime_mod_CFLAGS): Likewise.
1173 (datetime_mod_LDFLAGS): Likewise.
1174 (date_mod_SOURCES): Likewise.
1175 (date_mod_CFLAGS): Likewise.
1176 (date_mod_LDFLAGS): Likewise.
1177 (datehook_mod_SOURCES): Likewise.
1178 (datehook_mod_CFLAGS): Likewise.
1179 (datehook_mod_LDFLAGS): Likewise.
1181 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1183 (datetime_mod_SOURCES): New macro.
1184 (datetime_mod_CFLAGS): Likewise.
1185 (datetime_mod_LDFLAGS): Likewise.
1186 (date_mod_SOURCES): Likewise.
1187 (date_mod_CFLAGS): Likewise.
1188 (date_mod_LDFLAGS): Likewise.
1189 (datehook_mod_SOURCES): Likewise.
1190 (datehook_mod_CFLAGS): Likewise.
1191 (datehook_mod_LDFLAGS): Likewise.
1193 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1195 (datetime_mod_SOURCES): New macro.
1196 (datetime_mod_CFLAGS): Likewise.
1197 (datetime_mod_LDFLAGS): Likewise.
1198 (date_mod_SOURCES): Likewise.
1199 (date_mod_CFLAGS): Likewise.
1200 (date_mod_LDFLAGS): Likewise.
1201 (datehook_mod_SOURCES): Likewise.
1202 (datehook_mod_CFLAGS): Likewise.
1203 (datehook_mod_LDFLAGS): Likewise.
1205 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
1207 * commands/date.c: New file.
1209 * hook/datehook.c: Likewise.
1211 * include/grub/lib/datetime.h: Likewise.
1213 * include/grub/i386/cmos.h: Likewise.
1215 * lib/datetime.c: Likewise.
1217 * lib/i386/datetime.c: Likewise.
1219 * lib/efi/datetime.c: Likewise.
1221 2008-08-14 Robert Millan <rmh@aybabtu.com>
1223 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
1224 (grub_mkelfimage_SOURCES): New variable.
1225 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
1227 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
1228 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
1229 * conf/powerpc-ieee1275.rmk: Likewise.
1230 * conf/i386-ieee1275.rmk: Likewise.
1232 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
1233 * kern/i386/coreboot/init.c: Likewise.
1235 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
1236 with `<grub/cpu/kernel.h>'.
1237 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
1239 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
1240 * kern/i386/coreboot/startup.S: Likewise.
1242 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
1243 (GRUB_MOD_GAP): Remove.
1244 * include/grub/powerpc/kernel.h: New file.
1245 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
1246 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1247 * include/grub/i386/kernel.h: New file.
1248 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
1249 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
1250 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1252 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
1254 Use --directory when invoking grub_mkimage.
1256 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
1257 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
1258 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
1259 and GRUB_KERNEL_CPU_PREFIX.
1261 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
1263 * include/grub/err.h (grub_err_printf): New function prototype.
1264 * util/misc.c (grub_err_printf): New function.
1265 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
1267 * kern/err.c (grub_print_error): Use grub_err_printf.
1269 2008-08-13 Robert Millan <rmh@aybabtu.com>
1271 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
1273 2008-08-13 Robert Millan <rmh@aybabtu.com>
1275 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
1278 2008-08-12 Robert Millan <rmh@aybabtu.com>
1280 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
1281 of the relocation code from here ...
1282 (grub_multiboot): ... to here.
1283 (forward_relocator, backward_relocator): Move from here ...
1284 * kern/i386/loader.S (grub_multiboot_forward_relocator)
1285 (grub_multiboot_backward_relocator): ... to here.
1286 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
1287 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
1288 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
1289 (grub_multiboot_forward_relocator_end)
1290 (grub_multiboot_backward_relocator)
1291 (grub_multiboot_backward_relocator_end): New variables.
1293 2008-08-12 Bean <bean123ch@gmail.com>
1295 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
1297 2008-08-11 Robert Millan <rmh@aybabtu.com>
1299 * kern/i386/linuxbios/startup.S: Move from here ...
1300 * kern/i386/coreboot/startup.S: ... to here.
1302 * kern/i386/linuxbios/init.c: Move from here ...
1303 * kern/i386/coreboot/init.c: ... to here.
1305 * kern/i386/linuxbios/table.c: Move from here ...
1306 * kern/i386/coreboot/mmap.c: ... to here.
1308 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
1310 2008-08-11 Robert Millan <rmh@aybabtu.com>
1312 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
1313 errors. Leave it to the upper layer to handle them.
1315 2008-08-09 Christian Franke <franke@computer.org>
1317 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
1318 * conf/common.rmk: Install `grub-pe2elf' only if requested.
1319 Install `grub.d/10_windows' only on Cygwin.
1320 * configure.ac: Add subst of `target_os'.
1321 Check `target_os' also before setting TARGET_OBJ2ELF.
1322 Add `--enable-grub-pe2elf'.
1324 2008-08-08 Robert Millan <rmh@aybabtu.com>
1326 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1327 (grub_last_time): Change type to grub_uint64_t.
1328 (grub_disk_open): Migrate code from to using grub_get_time_ms().
1329 (grub_disk_close): Likewise.
1331 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1332 (run_menu): Migrate code from to using grub_get_time_ms().
1334 * util/misc.c (grub_get_time_ms): New function.
1336 2008-08-08 Marco Gerards <marco@gnu.org>
1338 * disk/ata.c (grub_ata_regget): Change return type to
1340 (grub_ata_regget2): Likewise.
1341 (grub_ata_wait_status): New function.
1342 (grub_ata_wait_busy): Removed function, updated all users to use
1343 `grub_ata_wait_status'.
1344 (grub_ata_wait_drq): Likewise.
1345 (grub_ata_cmd): New function.
1346 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
1348 (grub_ata_pio_write): Add error handling.
1349 (grub_atapi_identify): Likewise.
1350 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
1352 (grub_ata_identify): Use `grub_ata_cmd' and improve error
1353 handling. Actually use the detected registers. Reorder the
1354 detection logic such that it is easier to read.
1355 (grub_ata_pciinit): Do not assign the same ID to each controller.
1356 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
1358 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
1360 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
1362 2008-08-08 Marco Gerards <marco@gnu.org>
1366 2008-08-07 Bean <bean123ch@gmail.com>
1368 * include/grub/x86_64/pci.h: New file.
1370 2008-08-07 Christian Franke <franke@computer.org>
1372 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
1373 (TIMER2_GATE): Likewise.
1374 (grub_pit_wait): Add enable/disable of the timer2 gate
1375 bit of port 0x61. This fixes a possible infinite loop.
1377 2008-08-07 Bean <bean123ch@gmail.com>
1379 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
1380 kern/i386/tsc.c and kern/i386/pit.c.
1382 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
1385 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
1388 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
1390 2008-08-07 Bean <bean123ch@gmail.com>
1392 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
1394 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
1396 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
1397 multiple inclusion. Add #include <grub/types.h>.
1399 2008-08-06 Christian Franke <franke@computer.org>
1401 * conf/common.rmk: Build and install `10_windows'.
1402 * util/grub.d/10_windows.in: New script.
1404 2008-08-06 Pavel Roskin <proski@gnu.org>
1406 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
1408 2008-08-06 Robert Millan <rmh@aybabtu.com>
1410 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
1411 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
1413 2008-08-06 Bean <bean123ch@gmail.com>
1415 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
1416 (grub_pxefs_fs_int): Remove dummy definition.
1417 (grub_pxefs_open): Use data->block_size to store the current block
1419 (grub_pxefs_read): Use block size stored in data->block_size. As the
1420 value of grub_pxe_blksize can be changed after the file is opened.
1422 2008-08-06 Bean <bean123ch@gmail.com>
1424 * fs/i386/pc/pxe.c (curr_file): new variable.
1425 (grub_pxefs_open): Simply the handling of pxe file system. Don't
1426 require the dummy internal file system anymore.
1427 (grub_pxefs_read): Removed.
1428 (grub_pxefs_close): Likewise.
1429 (grub_pxefs_fs_int): Likewise.
1430 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
1431 connection when we switch file.
1432 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
1434 2008-08-06 Robert Millan <rmh@aybabtu.com>
1436 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
1438 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
1439 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
1441 * kern/i386/halt.c: New file.
1442 * kern/i386/reboot.c: Likewise.
1443 * include/grub/i386/reboot.h: Likewise.
1444 * include/grub/i386/halt.h: Likewise.
1446 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
1447 Include `<grub/cpu/halt.h>'.
1448 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
1449 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
1451 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
1452 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
1453 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
1454 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
1455 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
1456 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
1458 * include/grub/i386/at_keyboard.h: ... to here.
1460 2008-08-05 Robert Millan <rmh@aybabtu.com>
1462 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
1463 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
1464 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
1465 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1466 `kern/generic/millisleep.c'.
1468 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
1469 instead of grub_get_rtc().
1470 (grub_tsc_init): Initialize `tsc_boot_time'.
1472 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
1473 (grub_machine_init): Use grub_tsc_init() rather than
1474 installing an RTC-based handler via grub_install_get_time_ms().
1476 * kern/i386/pit.c: New file.
1477 * include/grub/i386/pit.h: Likewise.
1479 2008-08-05 Bean <bean123ch@gmail.com>
1481 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
1483 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
1484 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
1485 (pxe_mod_SOURCES): New macro.
1486 (pxe_mod_CFLAGS): Likewise.
1487 (pxe_mod_LDFLAGS): Likewise.
1488 (pxecmd_mod_SOURCES): Likewise.
1489 (pxecmd_mod_CFLAGS): Likewise.
1490 (pxecmd_mod_LDFLAGS): Likewise.
1492 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
1493 (grub_pxe_call): Likewise.
1495 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
1497 * commands/i386/pc/pxecmd.c: New file.
1499 * fs/i386/pc/pxe.c: Likewise.
1501 * include/grub/i386/pc/pxe.h: Likewise.
1503 2008-08-05 Bean <bean123ch@gmail.com>
1505 * util/console.c (grub_console_cur_color): New variable.
1506 (grub_console_standard_color): Likewise.
1507 (grub_console_normal_color): Likewise.
1508 (grub_console_highlight_color): Likewise.
1509 (color_map): Likewise.
1510 (use_color): Likewise.
1511 (NUM_COLORS): New macro.
1512 (grub_ncurses_setcolorstate): Handle color properly.
1513 (grub_ncurses_setcolor): Don't change color here, just remember the
1514 settings, color will be set in grub_ncurses_setcolorstate.
1515 (grub_ncurses_getcolor): New function.
1516 (grub_ncurses_init): Initialize color pairs.
1517 (grub_ncurses_term): New member grub_ncurses_getcolor.
1519 2008-08-05 Colin D Bennett <colin@gibibit.com>
1521 High resolution timer support. Implemented for x86 CPUs using TSC.
1522 Extracted generic grub_millisleep() so it's linked in only as needed.
1523 This requires a Pentium compatible CPU; if the RDTSC instruction is
1524 not supported, then it falls back on the generic grub_get_time_ms()
1525 implementation that uses the machine's RTC.
1527 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
1528 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1529 `kern/generic/millisleep.c'.
1531 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
1532 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
1534 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
1535 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
1537 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1539 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1540 `kern/generic/millisleep.c'.
1542 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1544 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
1546 * kern/generic/rtc_get_time_ms.c: New file.
1548 * kern/generic/millisleep.c: New file.
1550 * kern/misc.c: Don't include
1551 <kern/time.h> anymore.
1552 (grub_millisleep_generic): Removed.
1554 * commands/sleep.c (grub_interruptible_millisleep): Uses
1555 grub_get_time_ms() instead of grub_get_rtc().
1557 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
1559 (grub_cpu_is_cpuid_supported): New inline function.
1560 (grub_cpu_is_tsc_supported): New inline function.
1561 (grub_tsc_init): New function prototype.
1562 (grub_tsc_get_time_ms): New function prototype.
1564 * kern/i386/tsc.c (grub_get_time_ms): New file.
1566 * include/grub/time.h: Include <grub/types.h.
1567 (grub_millisleep_generic): Removed.
1568 (grub_get_time_ms): New prototype.
1569 (grub_install_get_time_ms): New prototype.
1570 (grub_rtc_get_time_ms): New prototype.
1572 * kern/time.c (grub_get_time_ms): New function.
1573 (grub_install_get_time_ms): New function.
1575 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
1576 <grub/time.h> anymore.
1577 (grub_millisleep): Removed.
1578 (grub_machine_init): Call grub_tsc_init.
1580 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
1581 get_time_ms() implementation.
1583 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
1584 (ieee1275_get_time_ms): New function.
1585 (grub_machine_init): Install get_time_ms() implementation.
1587 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
1588 (grub_machine_init): Call grub_tsc_init().
1589 (grub_millisleep): Removed.
1591 * kern/ieee1275/init.c (grub_millisleep): Removed.
1592 (grub_machine_init): Install ieee1275_get_time_ms()
1594 (ieee1275_get_time_ms): New function.
1595 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
1598 2008-08-05 Marco Gerards <marco@gnu.org>
1600 * disk/ata.c: Include <grub/pci.h>.
1601 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
1602 (grub_ata_initialize): Rewritten.
1603 (grub_ata_device_initialize): New function.
1605 2008-08-04 Pavel Roskin <proski@gnu.org>
1607 * kern/main.c: Include grub/mm.h.
1609 2008-08-04 Robert Millan <rmh@aybabtu.com>
1611 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
1612 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
1613 corruption problem).
1615 2008-08-04 Robert Millan <rmh@aybabtu.com>
1617 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
1618 warnings introduced in my last commit.
1620 2008-08-03 Robert Millan <rmh@aybabtu.com>
1622 Make PCI available on all i386 architectures.
1624 * include/grub/i386/pc/pci.h: Move from here ...
1625 * include/grub/i386/pci.h: ... to here.
1627 * include/grub/i386/pc/pci.h: Remove.
1628 * include/grub/i386/efi/pci.h: Remove.
1629 * include/grub/x86_64/efi/pci.h: Remove.
1631 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
1634 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
1635 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
1636 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
1638 * conf/i386-ieee1275.rmk: Likewise.
1640 2008-08-03 Robert Millan <rmh@aybabtu.com>
1642 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
1643 (grub_console_setcursor): Make it possible to set cursor off.
1645 2008-08-03 Robert Millan <rmh@aybabtu.com>
1647 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
1648 of modules instead of assuming which platform provides what.
1649 * util/update-grub.in: Likewise.
1651 2008-08-03 Robert Millan <rmh@aybabtu.com>
1653 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
1654 instead of `grub_install_dos_part' to determine whether a drive needs
1655 to be prepended to prefix (`grub_install_dos_part' is not reliable,
1656 because it can be overridden when loading GRUB via Multiboot).
1658 2008-08-02 Robert Millan <rmh@aybabtu.com>
1660 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
1662 2008-08-02 Robert Millan <rmh@aybabtu.com>
1664 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
1665 of informational grub_dprintf() calls.
1667 2008-08-02 Robert Millan <rmh@aybabtu.com>
1669 * disk/memdisk.c (memdisk_size): Don't initialize.
1670 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
1672 * include/grub/i386/pc/kernel.h
1673 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
1674 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
1675 (grub_memdisk_image_size, grub_arch_memdisk_addr)
1676 (grub_arch_memdisk_size): Remove.
1678 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
1679 field (was only used to transfer a constant). Add `type' field to
1680 support multiple module types.
1681 (grub_module_iterate): New function.
1683 * kern/device.c (grub_device_open): Do not hide error messages
1684 when grub_disk_open() fails. Use grub_print_error() instead.
1686 * kern/i386/pc/init.c (grub_arch_modules_addr)
1687 (grub_arch_memdisk_size): Remove functions.
1688 (grub_arch_modules_addr): Return the module address in high memory
1689 (now that it isn't copied anymore).
1691 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
1692 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
1693 decompression routine (grub_total_module_size already includes that
1694 now). Don't copy modules back to low memory.
1696 * kern/main.c: Include `<grub/mm.h>'.
1697 (grub_load_modules): Split out (and use) ...
1698 (grub_module_iterate): ... this function, which iterates through
1699 module objects and runs a hook.
1700 Comment out grub_mm_init_region() call, as it would cause non-ELF
1701 modules to be overwritten.
1703 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
1704 the memdisk image in its own region, make it part of the module list.
1705 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
1706 (main): Parse --memdisk|-m option, and pass user-provided path as
1707 parameter to generate_image().
1708 (add_segments): Pass `memdisk_path' down to load_modules().
1709 (load_modules): Embed memdisk image in module section when requested.
1710 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
1711 `header.type' instead of `header.offset'.
1713 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
1714 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
1715 (memdisk_mod_LDFLAGS): New variables.
1716 * conf/i386-coreboot.rmk: Likewise.
1717 * conf/i386-ieee1275.rmk: Likewise.
1719 2008-08-02 Robert Millan <rmh@aybabtu.com>
1721 * loader/i386/pc/multiboot.c (playground, forward_relocator)
1722 (backward_relocator): New variables. Used to allocate and relocate
1723 the payload, respectively.
1724 (grub_multiboot_load_elf32): Load into heap instead of requested
1725 address, install the appropriate relocator code in each bound of
1726 the payload, and set the entry point such that
1727 grub_multiboot_real_boot() will jump to one of them.
1729 * kern/i386/loader.S (grub_multiboot_payload_size)
1730 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1731 (grub_multiboot_payload_entry_offset): New variables.
1732 (grub_multiboot_real_boot): Set cpu context to what the relocator
1733 expects, and jump to the relocator instead of the payload.
1735 * include/grub/i386/loader.h (grub_multiboot_payload_size)
1736 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1737 (grub_multiboot_payload_entry_offset): Export.
1739 2008-08-01 Bean <bean123ch@gmail.com>
1741 * normal/menu_entry.c (editor_getline): Don't return the original
1742 string as result, as it will be released by lexer once it has done
1745 2008-08-01 Robert Millan <rmh@aybabtu.com>
1747 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
1748 within menuentries, not before them.
1749 util/grub.d/10_hurd.in: Likewise.
1751 2008-08-01 Bean <bean123ch@gmail.com>
1753 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
1754 (bufio_mod_SOURCES): New macro.
1755 (bufio_mod_CFLAGS): Likewise.
1756 (bufio_mod_LDFLAGS): Likewise.
1758 * include/grub/bufio.h: New file.
1760 * io/bufio.c: Likewise.
1762 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
1763 (grub_video_reader_png): Use grub_buffile_open to open file.
1765 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
1766 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
1768 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
1769 (grub_video_reader_tga): Use grub_buffile_open to open file.
1771 * font/manager.c: Include <grub/bufio.h>.
1772 (add_font): Use grub_buffile_open to open file.
1774 2008-07-31 Robert Millan <rmh@aybabtu.com>
1776 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
1777 ELF segments, use a macro for arbitrarily accessing any of them instead
1778 of preparing a pointer that allows access to one at a time.
1779 (grub_multiboot_load_elf64): Likewise.
1781 2008-07-31 Bean <bean123ch@gmail.com>
1783 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
1784 GRUB_KERNEL_MACHINE_DATA_END.
1786 2008-07-30 Robert Millan <rmh@aybabtu.com>
1788 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
1789 Increase from 0x50 to 0x60.
1790 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
1791 use UUIDs to identify the root drive for them. If that's not
1793 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
1794 check, for cross-disk installs.
1796 2008-07-30 Robert Millan <rmh@aybabtu.com>
1798 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
1799 is non-empty, use it to set the `prefix' environment variable instead
1800 of the usual approach.
1801 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
1802 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
1803 environment variable instead of dummy make_install_device().
1805 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
1806 (start): Insert a data section, with `grub_prefix' variable.
1807 * kern/i386/linuxbios/startup.S: Likewise.
1809 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
1810 New variable reference.
1811 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
1812 New macro. Defines offset of `grub_prefix' within startup.S (relative
1814 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
1815 section within startup.S (relative to `start').
1816 * include/grub/i386/coreboot/kernel.h: Likewise.
1818 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
1819 Overwrite grub_prefix with its contents, at the beginning of the
1821 (main): Understand -p|--prefix.
1823 2008-07-30 Robert Millan <rmh@aybabtu.com>
1825 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
1827 2008-07-30 Robert Millan <rmh@aybabtu.com>
1829 * term/i386/pc/vga_text.c (grub_console_cls): Use
1830 grub_console_gotoxy() to go back to beginning of the screen.
1831 Found by Patrick Georgi <patrick.georgi@coresystems.de>
1833 2008-07-29 Christian Franke <franke@computer.org>
1835 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1836 Add conversion of emulated mount points on Cygwin.
1838 2008-07-29 Christian Franke <franke@computer.org>
1840 * util/update-grub.in: Add a check for admin
1842 Remove old `grub.cfg.new' before creation.
1843 Add `-f' to `mv' to handle the different filesystem
1844 semantics of Windows.
1846 2008-07-29 Bean <bean123ch@gmail.com>
1848 * normal/main.c (get_line): Fix buffer overflow bug.
1850 2008-07-28 Robert Millan <rmh@aybabtu.com>
1852 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
1853 (struct grub_apple_header): New struct. Describes the layout of
1855 (apple_partition_map_iterate): Check the header magic as well as the
1856 partition magic (which was already being checked).
1858 2008-07-28 Pavel Roskin <proski@gnu.org>
1860 * genmk.rb: Add a warning to the beginning of the output that
1861 it's a generated file and should not be edited.
1863 2008-07-28 Robert Millan <rmh@aybabtu.com>
1865 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1866 with the same number are found, just use issue a warning with
1867 grub_dprintf(), as this error has been reported to be non-fatal.
1869 2008-07-27 Robert Millan <rmh@aybabtu.com>
1871 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
1874 2008-07-27 Bean <bean123ch@gmail.com>
1876 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
1877 (grub_fat_find_dir): Ignore case when comparing filename.
1879 2008-07-27 Bean <bean123ch@gmail.com>
1881 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
1882 smallino, as it's more descriptive, and i8count can be confused with
1883 the other field count.
1884 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
1887 2008-07-27 Bean <bean123ch@gmail.com>
1889 * commands/crc.c: New file.
1891 * lib/crc.c: Likewise.
1893 * include/grub/lib/crc.h: Likewise.
1895 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
1897 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
1898 (hexdump): Move this function to ...
1900 * lib/hexdump.c: ... here.
1902 * include/grub/hexdump.h: Renamed to ...
1904 * include/grub/lib/hexdump.h: ... this.
1906 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
1908 * util/grub-editenv.c: Likewise.
1910 * include/envblk.h: Renamed to ...
1912 * include/lib/envblk.h: ... this.
1914 * util/envblk.c: Renamed to ...
1916 * lib/envblk.c: ... this.
1918 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
1920 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
1921 (pkglib_MODULES): Add crc.mod.
1922 (hexdump_mod_SOURCES): Add lib/hexdump.c.
1923 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
1924 (crc_mod_SOURCES): New macro.
1925 (crc_mod_CFLAGS): Likewise.
1926 (crc_mod_LDFLAGS): Likewise.
1928 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
1930 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1932 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1934 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1936 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1938 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
1940 * commands/help.c: Include <grub/term.h>.
1941 (TERM_WIDTH): Removed. Updated all users.
1943 2008-07-27 Pavel Roskin <proski@gnu.org>
1945 * util/getroot.c (find_root_device): Rephrase a comment to avoid
1946 spurious warnings about a comment within a comment.
1948 2008-07-25 Robert Millan <rmh@aybabtu.com>
1950 * util/getroot.c (find_root_device): Skip devices that match
1951 /dev/dm-[0-9]. This lets the real device be found for any type of
1952 abstraction (LVM, EVMS, RAID..).
1953 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
1954 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
1955 device is found first, find_root_device() will now skip it.
1957 2008-07-24 Pavel Roskin <proski@gnu.org>
1959 * include/grub/types.h: Use __builtin_bswap32() and
1960 __builtin_bswap64() with gcc 4.3 and newer.
1962 2008-07-24 Christian Franke <franke@computer.org>
1964 * util/i386/pc/grub-install.in: If `--debug' is specified,
1965 pass `--verbose' to grub-setup.
1966 Abort script if make_system_path_relative_to_its_root() fails.
1968 2008-07-24 Bean <bean123ch@gmail.com>
1970 * configure.ac: Fixed a bug caused by the previous cygwin patch,
1971 variable `target_platform' should be `platform'.
1973 2008-07-24 Bean <bean123ch@gmail.com>
1975 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
1976 (grub_png_init_fixed_block): New function.
1977 (grub_png_decode_image_data): Handle fixed huffman code compression.
1979 2008-07-24 Bean <bean123ch@gmail.com>
1981 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
1982 (grub_pe2elf_SOURCES): New macro.
1983 (CLEANFILES): Add grub-pe2elf.
1985 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
1986 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
1987 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
1988 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
1989 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
1990 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
1991 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
1992 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
1993 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
1994 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
1995 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
1996 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
1997 (GRUB_PE32_DT_FUNCTION): Likewise.
1998 (GRUB_PE32_REL_I386_DIR32): Likewise.
1999 (GRUB_PE32_REL_I386_REL32): Likewise.
2000 (grub_pe32_symbol): New structure.
2001 (grub_pe32_reloc): Likewise.
2003 * util/grub-pe2elf.c: New file.
2005 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
2006 start symbol in non pc platform.
2008 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
2010 The following patches are from Christian Franke.
2012 * include/grub/dl.h: Remove .previous, gas supports this only
2015 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
2016 Remove .type, gas supports this only for ELF format.
2018 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
2019 nullbytes in symbol table. This fixes an infinite loop if table is
2022 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
2023 TARGET_IMG_LDFLAGS and EXEEXT.
2025 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
2026 TARGET_IMG_LDFLAGS_AC.
2027 (grub_CHECK_STACK_ARG_PROBE): New function.
2029 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
2031 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
2033 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
2034 to set TARGET_IMG_LD* accordingly.
2035 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
2036 Add call to grub_CHECK_STACK_ARG_PROBE.
2037 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
2039 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
2041 * genmk.rb: Add EXEEXT to CLEANFILES.
2043 2008-07-23 Robert Millan <rmh@aybabtu.com>
2045 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
2046 define the codes for arrows and lines used for the menu).
2047 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
2050 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
2051 fonts, because the latter are too slow.
2053 2008-07-21 Bean <bean123ch@gmail.com>
2055 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
2056 a20. Run keyboard test last, as it will cause macbook to halt.
2058 2008-07-18 Pavel Roskin <proski@gnu.org>
2060 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
2061 load foreign architecture modules correctly anyway. Keep
2062 support for loading host architecture modules, whether we
2063 compile them or not.
2065 2008-07-17 Pavel Roskin <proski@gnu.org>
2067 * configure.ac: Use -m32 or -m64 regardless of whether we had to
2068 change target_cpu. The compiler default can mismatch target_cpu
2071 * disk/efi/efidisk.c: Fix format warnings on x86_64.
2072 * kern/efi/efi.c: Likewise.
2074 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
2075 target compiler is functional.
2076 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
2079 * configure.ac: Default to efi platform for x86_64-apple. Allow
2080 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
2081 adjustments from the rest, only do them if target is not
2082 explicitly given. Merge other adjustments with the final sanity
2083 check. Remove an extraneous check for supported CPU. Be
2084 specific which CPU and which platform is not supported.
2086 * configure.ac: Default to pc platform for x86_64.
2088 2008-07-17 Robert Millan <rmh@aybabtu.com>
2090 Partial LinuxBIOS -> Coreboot rename.
2092 * conf/i386-linuxbios.rmk: Renamed to ...
2093 * conf/i386-coreboot.rmk: ... this.
2094 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
2095 * configure.ac: Accept "coreboot" as input platform (but maintain
2096 compatibility with "linuxbios").
2097 * include/grub/i386/linuxbios: Renamed to ...
2098 * include/grub/i386/coreboot: ... this.
2100 2008-07-17 Bean <bean123ch@gmail.com>
2102 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
2103 (appleldr_mod_SOURCE): New variable.
2104 (appleldr_mod_CFLAGS): Likewise.
2105 (appleldr_mod_LDFLAGS): Likewise.
2106 (pci_mod_SOURCES): Likewise.
2107 (pci_mod_CFLAGS): Likewise.
2108 (pci_mod_LDFLAGS): Likewise.
2109 (lspci_mod_SOURCES): Likewise.
2110 (lspci_mod_CFLAGS): Likewise.
2111 (lspci_mod_LDFLAGS): Likewise.
2113 * conf/x86_64-efi.rmk: New file.
2115 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
2117 (grub_efidisk_write): Likewise.
2119 * include/efi/api.h (efi_call_0): New macro.
2120 (efi_call_1): Likewise.
2121 (efi_call_2): Likewise.
2122 (efi_call_3): Likewise.
2123 (efi_call_4): Likewise.
2124 (efi_call_5): Likewise.
2125 (efi_call_6): Likewise.
2127 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
2128 grub_rescue_cmd_chainloader.
2130 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
2131 (grub_pe32_optional_header): Change some fields based on i386 or
2133 (GRUB_PE32_PE32_MAGIC): Likewise.
2135 * include/grub/efi/uga_draw.h: New file.
2137 * include/grub/elf.h (STN_ABS): New constant.
2138 (R_X86_64_NONE): Relocation constant for x86_64.
2139 (R_X86_64_64): Likewise.
2140 (R_X86_64_PC32): Likewise.
2141 (R_X86_64_GOT32): Likewise.
2142 (R_X86_64_PLT32): Likewise.
2143 (R_X86_64_COPY): Likewise.
2144 (R_X86_64_GLOB_DAT): Likewise.
2145 (R_X86_64_JUMP_SLOT): Likewise.
2146 (R_X86_64_RELATIVE): Likewise.
2147 (R_X86_64_GOTPCREL): Likewise.
2148 (R_X86_64_32): Likewise.
2149 (R_X86_64_32S): Likewise.
2150 (R_X86_64_16): Likewise.
2151 (R_X86_64_PC16): Likewise.
2152 (R_X86_64_8): Likewise.
2153 (R_X86_64_PC8): Likewise.
2155 * include/grub/i386/efi/pci.h: New file.
2157 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
2158 Change it value based on platform.
2159 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
2160 (GRUB_E820_RAM): Likewise.
2161 (GRUB_E820_RESERVED): Likewise.
2162 (GRUB_E820_ACPI): Likewise.
2163 (GRUB_E820_NVS): Likewise.
2164 (GRUB_E820_EXEC_CODE): Likewise.
2165 (GRUB_E820_MAX_ENTRY): Likewise.
2166 (grub_e820_mmap): New structure.
2167 (linux_kernel_header): Change the efi field according to different
2168 kernel version, also field from linux_kernel_header.
2170 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
2172 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
2173 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
2174 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
2175 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
2176 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
2177 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
2178 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
2179 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
2180 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
2181 (GRUB_PCI_ADDR_IO_MASK): Likewise.
2183 * include/grub/x86_64/efi/kernel.h: New file.
2185 * include/grub/x86_64/efi/loader.h: Likewise.
2187 * include/grub/x86_64/efi/machine.h: Likewise.
2189 * include/grub/x86_64/efi/pci.h: Likewise.
2191 * include/grub/x86_64/efi/time.h: Likewise.
2193 * include/grub/x86_64/linux.h: Likewise.
2195 * include/grub/x86_64/setjmp.h: Likewise.
2197 * include/grub/x86_64/time.h: Likewise.
2199 * include/grub/x86_64/types.h: Likewise.
2201 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
2202 GRUB_TARGET_SIZEOF_VOID_P.
2204 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
2205 (grub_efi_locate_handle): Likewise.
2206 (grub_efi_open_protocol): Likewise.
2207 (grub_efi_set_text_mode): Likewise.
2208 (grub_efi_stall): Likewise.
2209 (grub_exit): Likewise.
2210 (grub_reboot): Likewise.
2211 (grub_halt): Likewise.
2212 (grub_efi_exit_boot_services): Likewise.
2213 (grub_get_rtc): Likewise.
2215 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
2216 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
2217 (grub_efi_allocate_pages): Wrap efi calls.
2218 (grub_efi_free_pages): Wrap efi calls.
2219 (grub_efi_get_memory_map): Wrap efi calls.
2221 * kern/x86_64/dl.c: New file.
2223 * kern/x86_64/efi/callwrap.S: Likewise.
2225 * kern/x86_64/efi/startup.S: Likewise.
2227 * loader/efi/appleloader.c: Likewise.
2229 * loader/efi/chainloader.c (cmdline): New variable.
2230 (grub_chainloader_unload): Wrap efi calls.
2231 (grub_chainloader_boot): Likewise.
2232 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
2235 * loader/efi/chainloader_normal.c (chainloader_command):
2236 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
2239 * loader/i386/efi/linux.c (allocate_pages): Change allocation
2241 (grub_e820_add_region): New function.
2242 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
2244 (grub_find_video_card): New function.
2245 (grub_linux_setup_video): New function.
2246 (grub_rescue_cmd_linux): Probe for video information.
2248 * normal/x86_64/setjmp.S: New file.
2250 * term/efi/console.c (map_char): New function.
2251 (grub_console_putchar): Map unicode char.
2252 (grub_console_checkkey): Wrap efi calls.
2253 (grub_console_getkey): Likewise.
2254 (grub_console_getwh): Likewise.
2255 (grub_console_gotoxy): Likewise.
2256 (grub_console_cls): Likewise.
2257 (grub_console_setcolorstate): Likewise.
2258 (grub_console_setcursor): Likewise.
2260 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
2262 2008-07-16 Pavel Roskin <proski@gnu.org>
2264 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
2267 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
2268 pointer, not an integer. This fixes a warning and prevents
2269 precision loss on 64-bit systems.
2270 (relocate_addresses): Remove unneeded cast.
2272 2008-07-15 Pavel Roskin <proski@gnu.org>
2274 * kern/i386/ieee1275/init.c: Include grub/cache.h.
2276 * term/ieee1275/ofconsole.c: Disable code unused on i386.
2278 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
2279 Fix comparison between signed and unsigned.
2281 * include/grub/i386/ieee1275/console.h: Declare
2282 grub_console_init() and grub_console_fini().
2284 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
2285 It's empty and unused.
2287 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
2288 beginning to avoid warnings with some compilers.
2290 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
2291 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
2293 2008-07-14 Pavel Roskin <proski@gnu.org>
2295 * kern/env.c (grub_register_variable_hook): Don't copy empty
2296 string, it leaks memory. Pass "" to grub_env_set(), it should
2297 handle constant strings.
2299 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
2300 * commands/cmp.c (grub_cmd_cmp): Likewise.
2301 * kern/dl.c (grub_dl_flush_cache): Likewise.
2302 (grub_dl_load_core): Likewise.
2303 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
2304 (grub_elf64_load_phdrs): Likewise.
2306 2008-07-13 Pavel Roskin <proski@gnu.org>
2308 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
2309 between signed and unsigned.
2310 (LzmaEnc_Finish): Fix warning about an unused parameter.
2312 2008-07-13 Bean <bean123ch@gmail.com>
2314 * Makefile.in (enable_lzo): New rule.
2316 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
2318 * configure.ac (ENABLE_LZO): New option --enable-lzo.
2320 * boot/i386/pc/lnxboot.S: #include <config.h>.
2322 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
2323 its value according to the compression algorithm used, lzo or lzma.
2325 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
2326 compression algorithm according to configure macro.
2328 * kern/i386/pc/startup.S (codestart): Likewise.
2330 * kern/i386/pc/lzma_decode.S: New file.
2332 * include/grub/lib/LzFind.h: Likewise.
2334 * include/grub/lib/LzHash.h: Likewise.
2336 * include/grub/lib/LzmaDec.h: Likewise.
2338 * include/grub/lib/LzmaEnc.h: Likewise.
2340 * include/grub/lib/LzmaTypes.h: Likewise.
2342 * lib/LzFind.c: Likewise.
2344 * lib/LzmaDec.c: Likewise.
2346 * lib/LzmaEnc.c: Likewise.
2348 2008-07-13 Bean <bean123ch@gmail.com>
2350 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
2351 (grub_ext4_extent_header): New structure.
2352 (grub_ext4_extent): Likewise.
2353 (grub_ext4_extent_idx): Likewise.
2354 (grub_ext4_find_leaf): New function.
2355 (grub_ext2_read_block): Handle extents.
2357 2008-07-12 Robert Millan <rmh@aybabtu.com>
2359 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
2361 2008-07-11 Robert Millan <rmh@aybabtu.com>
2363 * util/grub.d/40_custom.in: New file. Example on how to add custom
2364 entries to /etc/grub.d.
2365 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
2366 40_custom (implicitly, by merging all the grub.d rules).
2368 2008-07-11 Pavel Roskin <proski@gnu.org>
2370 * commands/read.c (grub_getline): Fix invalid memory access.
2371 Don't add newline to the variable value.
2373 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
2374 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
2375 (serial_hw_get_port): Check validity of the port number.
2376 (grub_cmd_serial): Check return value of serial_hw_get_port().
2378 2008-07-07 Pavel Roskin <proski@gnu.org>
2380 * boot/i386/pc/diskboot.S (notification_string): Replace
2381 "Loading kernel" with just "loading". This is shorter, less
2382 confusing and saves a few bytes for possible future changes.
2384 2008-07-05 Pavel Roskin <proski@gnu.org>
2386 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
2387 size for ATAPI devices, they are undefined. Output sector
2388 number in decimal form.
2390 * disk/ata.c: Use named constants for status bits.
2392 2008-07-04 Pavel Roskin <proski@gnu.org>
2394 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
2395 grub_addr_t before casting it to the void pointer to fix a
2396 warning. Non-addressable regions are discarded earlier.
2397 (grub_arch_modules_addr): Cast _end to grub_addr_t.
2398 * kern/i386/linuxbios/table.c: Include grub/misc.h.
2399 (check_signature): Don't shadow table_header.
2400 (grub_linuxbios_table_iterate): Cast numeric constants to
2401 grub_linuxbios_table_header_t.
2402 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
2405 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
2408 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
2409 pointer, which can cause warnings. Support 64-bit addresses.
2411 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
2412 of sizeof(long). This fixes PowerPC image generation on x86_64.
2414 2008-07-04 Robert Millan <rmh@aybabtu.com>
2416 This fixes a performance issue when pc & gpt partmap iterators
2417 didn't abort iteration even after our hook found what it was
2418 looking for (often causing expensive probes of non-existent drives).
2420 Some callers relied on previous buggy behaviour, since they would
2421 rise an error when their own hooks caused early abortion of its
2424 * kern/device.c (grub_device_open): Improve error message.
2425 * disk/lvm.c (grub_lvm_open): Likewise.
2426 * disk/raid.c (grub_raid_open): Likewise.
2428 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
2429 when hook requests it, independently of grub_errno.
2430 (pc_partition_map_probe): Do not fail when find_func() caused
2431 early abortion of pc_partition_map_iterate().
2433 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
2434 when hook requests it, independently of grub_errno.
2435 (gpt_partition_map_probe): Do not fail when find_func() caused
2436 early abortion of gpt_partition_map_iterate().
2438 * kern/partition.c (grub_partition_iterate): Abort parent iteration
2439 when hook requests it, independently of grub_errno. Do not fail when
2440 part_map_iterate_hook() caused early abortion of p->iterate().
2442 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
2443 when grub_partition_iterate() returned with non-zero.
2445 2008-07-03 Pavel Roskin <proski@gnu.org>
2447 * disk/ata.c (grub_ata_pio_write): Check status before writing,
2448 like we do in grub_ata_pio_read().
2449 (grub_ata_readwrite): Always write individual sectors. Fix the
2450 sector count for the remainder.
2451 (grub_ata_write): Enable writing to ATA devices. Correctly
2452 report error for ATAPI devices.
2454 2008-07-02 Pavel Roskin <proski@gnu.org>
2456 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
2459 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
2460 for every read sector, we already increment it for the whole
2461 batch. This fixes reading more than 256 sectors at once.
2463 * util/grub-editenv.c (cmd_info): Cast argument to long
2464 explicitly. ptrdiff_t reduces to int on i386.
2466 * util/grub-editenv.c (main): Be specific which parameter is
2469 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
2470 (memdisk): Make memdisk_orig_addr a pointer.
2472 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
2473 for file offsets, use grub_off_t instead. Fix printf format
2476 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
2477 there. Real unexpected warnings should not drown in the noise
2478 about known problems.
2480 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
2481 grub_disk_addr_t for memory addresses.
2483 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
2484 explicitly to fix a warning.
2486 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
2488 * Makefile.in (MODULE_LDFLAGS): New variable.
2489 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
2490 the linker accepts --build-id=none.
2491 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
2493 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
2495 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
2496 those in Linux XFS code. Provide a way to access 64-bit parent
2498 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
2499 the end of struct grub_xfs_dir_header.
2501 2008-07-02 Bean <bean123ch@gmail.com>
2503 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
2504 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2505 and GRUB_IEEE1275_FLAG_NO_ANSI.
2507 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
2508 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2509 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
2511 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
2512 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
2514 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
2515 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
2517 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
2518 esc sequence on non ANSI terminal.
2519 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
2521 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
2524 2008-07-02 Bean <bean123ch@gmail.com>
2526 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
2527 (grub_editenv_SOURCES): New variable.
2528 (pkglib_MODULES): Add loadenv.mod.
2529 (loadenv_mod_SOURCES): New variable.
2530 (loadenv_mod_CFLAGS): Likewise.
2531 (loadenv_mod_LDFLAGS): Likewise.
2533 * include/grub/envblk.h: New file.
2535 * util/envblk.c: New file.
2537 * util/grub-editenv.c: New file.
2539 * commands/loadenv.c: New file.
2541 2008-07-01 Pavel Roskin <proski@gnu.org>
2543 * include/multiboot2.h (struct multiboot_tag_module): Use char,
2544 not unsigned char. This fixes warnings and is consistent with
2547 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
2549 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
2551 * term/tparm.c (analyze): Always set *popcount.
2553 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
2554 cast to fix a warning.
2556 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
2557 cast to suppress a warning.
2559 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
2560 grub_fshelp_read_file() expects.
2562 * fs/fat.c: Fix UUID calculation on big-endian systems. We
2563 write uuid as a 32-bit value in CPU byte order, so declare and
2566 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
2567 long if the format specifier expects it.
2568 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
2569 * partmap/pc.c (pc_partition_map_iterate): Likewise.
2570 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
2571 long to fix a warning.
2572 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
2573 grub_dprintf() arguments to fix warnings.
2575 2008-06-30 Pavel Roskin <proski@gnu.org>
2577 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
2578 install_bsd_part immediately before core.img is embedded or
2579 modified on disk. This fixes core.img verification if core.img
2582 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
2583 core_path to calculate the blocklist.
2584 Patch from Javier MartÃn <lordhabbit@gmail.com>
2586 2008-06-29 Robert Millan <rmh@aybabtu.com>
2588 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
2589 block to disk block.
2590 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
2591 Patch from Niels Böhm <bitbucket@arcor.de>
2593 2008-06-29 Robert Millan <rmh@aybabtu.com>
2595 * util/update-grub_lib.in (font_path): Search for fonts in
2596 /boot/grub first, which is more likely to be readable (we aren't
2597 deciding where fonts live, just looking for them).
2599 2008-06-26 Pavel Roskin <proski@gnu.org>
2601 * util/biosdisk.c (read_device_map): Don't leave dead map
2602 entries for devices failing stat() check.
2604 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
2605 core_path_dev for the core.img path on the target device.
2607 2008-06-26 Robert Millan <rmh@aybabtu.com>
2609 * disk/fs_uuid.c: New file.
2610 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
2611 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
2612 (fs_uuid_mod_LDFLAGS): New variables.
2613 * include/grub/disk.h (grub_disk_dev_id): Add
2614 `GRUB_DISK_DEVICE_UUID_ID'.
2615 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
2616 implement iterate().
2618 2008-06-26 Robert Millan <rmh@aybabtu.com>
2620 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
2621 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
2622 Linux image includes no initrd.
2624 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
2626 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
2627 call to resolve the core image location that effectively appended the
2630 2008-06-21 Robert Millan <rmh@aybabtu.com>
2632 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
2635 * util/grub.d/10_hurd.in: ... to here ...
2636 * util/grub.d/10_linux.in: ... and here.
2638 2008-06-19 Robert Millan <rmh@aybabtu.com>
2640 * kern/main.c (grub_main): Export `prefix' variable immediately
2641 after it has been set by grub_machine_set_prefix().
2643 2008-06-19 Robert Millan <rmh@aybabtu.com>
2645 * commands/search.c (search_label, search_fs_uuid, search_file): Print
2646 search result when not saving to variable, not the other way around.
2647 When saving to variable, abort iteration as soon as a match is found.
2649 2008-06-19 Robert Millan <rmh@aybabtu.com>
2651 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
2652 check for partition that provides /boot/grub. Its logic is flawed,
2653 as it prevents prepare_grub_to_access_device() from being called
2656 2008-06-19 Robert Millan <rmh@aybabtu.com>
2658 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
2659 "insmod" command directly when abstraction modules are needed,
2660 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
2661 since it had already been processed).
2663 2008-06-19 Pavel Roskin <proski@gnu.org>
2665 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
2666 changed. This is needed in case GRUB_LIBDIR changes.
2667 * conf/i386-ieee1275.rmk: Likewise.
2668 * conf/i386-linuxbios.rmk: Likewise.
2669 * conf/i386-pc.rmk: Likewise.
2670 * conf/powerpc-ieee1275.rmk: Likewise.
2672 2008-06-18 Pavel Roskin <proski@gnu.org>
2674 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
2675 kernel_elf_symlist.c to symlist.c for consistency with other
2676 architectures. Update all users.
2677 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2679 2008-06-18 Robert Millan <rmh@aybabtu.com>
2681 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
2684 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
2685 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
2686 a RAID device, run setup() for all members independently on whether
2687 LVM abstraction is being used.
2688 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
2689 If grub-mkimage has set `*install_dos_part == -2', don't override this
2691 Perform *install_dos_part adjustments independently on whether
2692 we're embedding or not.
2693 Clarify error message when image is too big for embedding.
2694 Remove duplicate *install_dos_part stanza.
2696 2008-06-17 Robert Millan <rmh@aybabtu.com>
2698 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
2699 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
2701 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
2702 values in grub_ofconsole_normal_color and
2703 grub_ofconsole_highlight_color (they're not directly related to
2704 background and foreground).
2705 (grub_ofconsole_setcolorstate): Extract background and foreground
2706 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
2708 2008-06-17 Robert Millan <rmh@aybabtu.com>
2710 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
2711 /boot/grub for the check in last commit, not /boot (they could be
2712 different partitions).
2714 2008-06-16 Robert Millan <rmh@aybabtu.com>
2716 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
2717 asked to setup access for the same partition that provides /boot,
2718 don't bother using UUIDs since our root already has the value we
2721 2008-06-16 Robert Millan <rmh@aybabtu.com>
2723 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
2725 Patch from Sven Mueller <sven@debian.org>.
2727 2008-06-16 Robert Millan <rmh@aybabtu.com>
2729 * util/update-grub.in: Check for $EUID instead of $UID.
2730 Reported by Vincent Zweije.
2732 2008-06-16 Bean <bean123ch@gmail.com>
2734 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
2735 (grub_ext2_read_block): Likewise.
2736 (grub_ext2_read_inode): Likewise.
2737 (grub_ext2_mount): Likewise.
2738 (grub_ext2_close): Likewise.
2739 (grub_ext3_get_journal): Removed.
2741 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
2742 (grub_reiserfs_read_symlink): Likewise.
2743 (grub_reiserfs_mount): Likewise.
2744 (grub_reiserfs_open): Likewise.
2745 (grub_reiserfs_read): Likewise.
2746 (grub_reiserfs_close): Likewise.
2747 (grub_reiserfs_get_journal): Removed.
2749 * fs/fshelp.c (grub_fshelp_read): Removed.
2750 (grub_fshelp_map_block): Likewise.
2752 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
2753 (grub_fshelp_journal): Likewise.
2754 (grub_fshelp_read): Likewise.
2755 (grub_fshelp_map_block): Likewise.
2757 2008-06-16 Pavel Roskin <proski@gnu.org>
2759 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
2760 floating point anymore.
2761 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
2763 2008-06-15 Pavel Roskin <proski@gnu.org>
2765 * commands/ls.c (grub_ls_list_files): Use integer calculations
2766 for human readable format, avoid floating point use.
2767 * kern/misc.c (grub_ftoa): Remove.
2768 (grub_vsprintf): Remove floating point support.
2770 2008-06-15 Robert Millan <rmh@aybabtu.com>
2772 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
2774 Reported by Max Vozeler.
2776 2008-06-15 Robert Millan <rmh@aybabtu.com>
2778 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
2779 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
2781 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
2782 the beginning of the prefix.
2784 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
2785 It is assumed that if we have a memdisk, grub-mkimage has set
2786 grub_prefix to include the "(memdisk)" drive in it.
2788 2008-06-15 Robert Millan <rmh@aybabtu.com>
2790 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
2791 Initialize keyboard controller after registering the terminal, so that
2792 grub_printf() can be called from grub_keyboard_controller_init().
2794 2008-06-15 Robert Millan <rmh@aybabtu.com>
2796 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
2797 extent-btree which is written as big endian on disk.
2798 Reported by Alain Greppin <al@chilibi.org>.
2800 2008-06-14 Robert Millan <rmh@aybabtu.com>
2802 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
2803 * util/i386/pc/grub-install.in (modules): Likewise.
2805 2008-06-13 Pavel Roskin <proski@gnu.org>
2807 * commands/ls.c (grub_ls_list_files): Fix format warnings.
2809 2008-06-13 Bean <bean123ch@gmail.com>
2811 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
2813 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
2815 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
2816 to indicate sparse block.
2818 2008-06-12 Pavel Roskin <proski@gnu.org>
2820 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
2821 number, grub_fshelp_read() does it for us.
2823 * fs/fshelp.c (grub_fshelp_read): New function. Implement
2824 linear disk read with journal translation.
2825 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
2826 * include/grub/fshelp.h: Declare grub_fshelp_read().
2828 2008-06-09 Pavel Roskin <proski@gnu.org>
2830 * fs/minix.c (grub_minix_mount): Handle error reading
2833 2008-06-08 Robert Millan <rmh@aybabtu.com>
2835 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
2836 don't append the RAID prefix afterwards.
2837 Reported by Clint Adams.
2839 2008-06-08 Robert Millan <rmh@aybabtu.com>
2841 Based on description from Pavel:
2842 * kern/disk.c (grub_disk_check_range): Rename to ...
2843 (grub_disk_adjust_range): ... this. Add a comment explaining the
2844 tasks performed by this function.
2846 2008-06-08 Robert Millan <rmh@aybabtu.com>
2848 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
2849 `num_serial' (for consistency with other variables).
2850 (struct grub_ntfs_data): Add `uuid' member.
2851 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
2852 (grub_ntfs_uuid): New function.
2853 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2855 2008-06-07 Pavel Roskin <proski@gnu.org>
2857 * util/biosdisk.c (open_device): Revert last change to the
2858 function, it broke installation. The sector needs to be
2859 different dependent on which device is opened.
2861 2008-06-06 Robert Millan <rmh@aybabtu.com>
2863 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
2864 rest of GRUB, and breakage doesn't happen if its value were modified.
2866 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2867 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
2868 a constant (same value).
2869 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
2870 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
2872 2008-06-06 Robert Millan <rmh@aybabtu.com>
2874 * util/biosdisk.c (open_device): Do not modify sector offset when
2875 accessing a partition. kern/disk.c already handles this for us.
2877 2008-06-06 Robert Millan <rmh@aybabtu.com>
2879 * util/grub-emu.c (grub_machine_init): Move code in this function from
2881 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
2882 segfault in case grub_printf() is called).
2884 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
2885 grub_probe. Update all users not to explicitly add it again.
2886 (grub_device): New variable; contains corresponding device for grubdir.
2887 (fs_module, partmap_module, devabstraction_module): Pass
2888 `--device ${grub_device}' to grub_probe to avoid traversing /dev
2891 2008-06-05 Robert Millan <rmh@aybabtu.com>
2893 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
2894 is found, print it (same layout as with labels).
2896 2008-06-04 Robert Millan <rmh@aybabtu.com>
2898 * util/biosdisk.c (get_drive): Rename to ...
2899 (find_grub_drive): ... this. Update all users.
2901 (get_os_disk): Rename to ...
2902 (convert_system_partition_to_system_disk): ... this. Update all users.
2904 (find_drive): Rename to ...
2905 (find_system_device): ... this. Update all users.
2907 2008-06-04 Robert Millan <rmh@aybabtu.com>
2909 * util/biosdisk.c (get_os_disk): Handle IDA devices.
2910 * util/grub-mkdevicemap.c (get_mmc_disk_name)
2911 (make_device_map): Likewise.
2913 2008-06-01 Robert Millan <rmh@aybabtu.com>
2915 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
2916 before dereferencing it.
2918 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
2919 union with fat12/fat16-specific ones. Add some new fields, including
2920 `num_serial' for both versions.
2921 (struct grub_fat_data): Add `uuid' member.
2922 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
2923 names. Initialize `data->uuid' using `num_serial'.
2924 (grub_fat_uuid): New function.
2925 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
2927 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
2928 (grub_reiserfs_uuid): New function.
2929 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
2932 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
2933 (grub_xfs_uuid): New function.
2934 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2936 2008-06-01 Robert Millan <rmh@aybabtu.com>
2938 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
2939 code that is backward compatible with pre-uuid search command.
2941 2008-05-31 Robert Millan <rmh@aybabtu.com>
2943 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
2944 floppies after everything else, to ensure floppy drive isn't accessed
2945 unnecessarily (patch from Bean).
2947 2008-05-31 Robert Millan <rmh@aybabtu.com>
2949 * commands/search.c (search_label, search_fs_uuid, search_file): Do
2950 not print device names when we were asked to set a variable.
2952 2008-05-31 Robert Millan <rmh@aybabtu.com>
2954 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
2955 using "cursor-on" and "cursor-off" commands (understood at least by
2956 the Open Firmware flavour on OLPC).
2958 2008-05-31 Michael Gorven <michael@gorven.za.net>
2960 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
2961 on and off sequences.
2963 2008-05-31 Robert Millan <rmh@aybabtu.com>
2965 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
2966 * util/update-grub.in: Likewise.
2968 2008-05-30 Pavel Roskin <proski@gnu.org>
2970 * util/biosdisk.c (linux_find_partition): Simplify logic and
2971 make the code more universal. Keep special processing for
2972 devfs, but use a simple rule for all other devices. If the
2973 device ends with a number, append 'p' and the partition number.
2974 Otherwise, append only the partition number.
2976 2008-05-30 Robert Millan <rmh@aybabtu.com>
2978 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
2979 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
2980 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
2981 the `root' parameter to Linux.
2983 2008-05-30 Robert Millan <rmh@aybabtu.com>
2985 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
2986 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
2987 --fs_uuid with --fs-uuid.
2988 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
2989 all filesystems support them).
2991 2008-05-30 Robert Millan <rmh@aybabtu.com>
2993 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
2994 grub_printf() flags, since we're printing in units of 2 bytes.
2996 2008-05-30 Robert Millan <rmh@aybabtu.com>
2998 * util/grub.d/00_header.in: Remove obsolete comment referencing
2999 convert_system_path_to_grub_path().
3000 * util/update-grub.in: Likewise.
3001 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
3002 (convert_system_path_to_grub_path): Add a warning message explaining
3003 that this function is deprecated. Rely on is_path_readable_by_grub()
3004 for the readability checks.
3005 (font_path): Use is_path_readable_by_grub() for the readability
3006 check rather than convert_system_path_to_grub_path().
3008 2008-05-30 Robert Millan <rmh@aybabtu.com>
3010 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
3011 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
3012 converting it first.
3013 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
3014 grub.cfg for access to font file, and afterwards call it again to set
3017 2008-05-30 Robert Millan <rmh@aybabtu.com>
3019 * commands/search.c (options): Add --fs_uuid option.
3020 (search_fs_uuid): New function.
3021 (grub_cmd_search): Fix --set argument passing.
3022 Use search_fs_uuid() when requested via --fs_uuid.
3023 (grub_search_init): Update help message.
3024 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
3025 and redeclare it as an array of 16-bit words.
3026 (grub_ext2_uuid): New function.
3027 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
3028 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
3029 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
3030 (GRUB_DEVICE_BOOT_UUID): New variables.
3031 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
3032 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
3034 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
3035 just assume `root' variable has the right value.
3036 * util/grub.d/10_linux.in: Likewise.
3037 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
3039 (main): Recognise `-t fs_uuid' argument.
3041 2008-05-30 Robert Millan <rmh@aybabtu.com>
3043 * util/biosdisk.c (map): Redefine structure to hold information
3044 about GRUB drive name.
3045 (get_drive): Reimplement without assuming (and verifying) BIOS-like
3047 (call_hook): Remove.
3048 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
3049 member. Assume drive has partitions.
3050 (grub_util_biosdisk_open): Access device names via `.device' struct
3052 (open_device): Likewise.
3053 (find_drive): Likewise.
3054 (read_device_map): Adjust map[] usage to match the new struct
3055 definition. Don't check for duplicates (still possible, but not cheap
3057 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
3058 (make_device_name): Remove assumption of BIOS-like drive names.
3060 2008-05-30 Pavel Roskin <proski@gnu.org>
3062 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
3063 compiling execute.c doesn't need grub_script.tab.h anymore.
3064 (normal/command.c_DEPENDENCIES): Likewise.
3065 (normal/function.c_DEPENDENCIES): Likewise.
3066 * conf/i386-ieee1275.rmk: Likewise.
3067 * conf/i386-linuxbios.rmk: Likewise.
3068 * conf/i386-pc.rmk: Likewise.
3069 * conf/powerpc-ieee1275.rmk: Likewise.
3070 * conf/sparc64-ieee1275.rmk: Likewise.
3072 2008-05-29 Pavel Roskin <proski@gnu.org>
3074 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
3075 when scanning metadata for volume group name.
3077 * include/grub/script.h: Don't include grub_script.tab.h. It's
3078 a generated file, which may only be included from the files with
3079 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
3080 use union YYSTYPE, as the later allows forward declaration.
3081 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
3083 2008-05-29 Robert Millan <rmh@aybabtu.com>
3085 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
3086 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
3087 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
3088 (grub_console_checkkey): Add grub_dprintf() call to report unknown
3091 2008-05-29 Robert Millan <rmh@aybabtu.com>
3093 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
3094 control key combinations.
3096 2008-05-29 Robert Millan <rmh@aybabtu.com>
3098 * util/powerpc/ieee1275/grub-install.in: Move from here ...
3099 * util/ieee1275/grub-install.in: ... to here.
3100 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
3101 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
3102 (grub_install_SOURCES): Likewise.
3104 2008-05-29 Robert Millan <rmh@aybabtu.com>
3106 * fs/affs.c: Update copyright year.
3107 * fs/ext2.c: Likewise.
3108 * fs/fshelp.c: Likewise.
3109 * fs/hfsplus.c: Likewise.
3110 * fs/ntfs.c: Likewise.
3111 * fs/xfs.c: Likewise.
3112 * include/grub/fshelp.h: Likewise.
3113 * util/grub-mkdevicemap.c: Likewise.
3115 2008-05-28 Robert Millan <rmh@aybabtu.com>
3117 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
3118 might need to be fatfs to support some firmware implementations
3121 2008-05-28 Robert Millan <rmh@aybabtu.com>
3123 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
3125 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3126 (make_device_map): Likewise.
3128 2008-05-20 Bean <bean123ch@gmail.com>
3130 * fs/fshelp.c (grub_fshelp_map_block): New function.
3131 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
3132 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
3134 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
3135 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
3136 (grub_fshelp_journal): New structure.
3137 (grub_fshelp_map_block): New function prototype.
3138 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
3139 (grub_fshelp_map_block): Likewise.
3141 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
3142 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
3143 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
3144 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
3145 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
3146 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
3147 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
3148 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
3149 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
3150 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
3151 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
3152 (grub_ext2_sblock): New members for journal support.
3153 (grub_ext3_journal_header): New structure.
3154 (grub_ext3_journal_revoke_header): Likewise.
3155 (grub_ext3_journal_block_tag): Likewise.
3156 (grub_ext3_journal_sblock): Likewise.
3157 (grub_fshelp_node): New members logfile and journal.
3158 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
3159 grub_fshelp_map_block to get real block number.
3160 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
3162 (grub_ext2_read_inode): Likewise.
3163 (grub_ext3_get_journal): New function.
3164 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
3165 (grub_ext2_close): Release memory used by journal.
3167 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
3168 (REISERFS_MAGIC_DESC_BLOCK): New macro.
3169 (grub_reiserfs_transaction_header): Renamed to
3170 grub_reiserfs_description_block, replace field data with real_blocks.
3171 (grub_reiserfs_commit_block): New structure.
3172 (grub_reiserfs_data): New member journal.
3173 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
3175 (grub_reiserfs_read_symlink): Likewise.
3176 (grub_reiserfs_iterate_dir): Likewise.
3177 (grub_reiserfs_open): Likewise.
3178 (grub_reiserfs_read): Likewise.
3179 (grub_reiserfs_get_journal): New function.
3180 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
3181 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
3182 using grub_reiserfs_get_journal.
3183 (grub_reiserfs_close): Release memory used by journal.
3185 * fs/affs.c (grub_affs_read_block): Change block type to
3186 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
3188 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
3190 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
3192 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
3194 * fs/udf.c (grub_udf_read_block): Change block type to
3195 grub_disk_addr_t. Use type cast to avoid warning.
3197 * fs/xfs.c (grub_xfs_read_block): Likewise.
3199 2008-05-16 Christian Franke <franke@computer.org>
3201 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
3202 to ensure that break with ESC will always work.
3203 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
3204 Remove ESC from keyboard queue.
3206 2008-05-16 Christian Franke <franke@computer.org>
3208 * util/biosdisk.c: [__CYGWIN__] Add includes.
3209 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
3210 (get_os_disk): Move variable declarations to OS specific
3211 parts to avoid warning.
3212 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
3213 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
3214 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
3216 * util/getroot.c: [__CYGWIN__] Add includes.
3217 (strip_extra_slashes): Fix "/" case.
3218 [__CYGWIN__] (get_win32_path): New function.
3219 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
3220 [__CYGWIN__] (find_root_device): Disable.
3221 [__CYGWIN__] (get_bootsec_serial): New function.
3222 [__CYGWIN__] (find_cygwin_root_device): Likewise.
3223 [__linux__] (grub_guess_root_device): Add early returns to simplify
3225 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
3226 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
3227 check for Linux only.
3229 2008-05-15 Bean <bean123ch@gmail.com>
3231 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
3232 keyboard hang problem in apple's intel mac.
3234 2008-05-09 Robert Millan <rmh@aybabtu.com>
3236 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
3238 * util/grub-mkdevicemap.c (get_virtio_disk_name)
3239 (make_device_map): Likewise.
3240 Reported by Aurelien Jarno <aurel32@debian.org>
3242 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
3244 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
3245 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
3246 (make_device_map): Output entries for xvd type disks.
3248 2008-05-07 Robert Millan <rmh@aybabtu.com>
3250 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
3252 * util/grub-mkdevicemap.c (get_cciss_disk_name)
3253 (make_device_map): Likewise.
3254 Reported by Roland Dreier <rdreier@cisco.com>
3256 2008-05-07 Robert Millan <rmh@aybabtu.com>
3258 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
3259 grub_strstr() call. Correct a few mistakes in failure path handling.
3261 2008-05-06 Robert Millan <rmh@aybabtu.com>
3263 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3264 Do not print a trailing slash (therefore, the root directory is an
3266 (convert_system_path_to_grub_path): Do not remove trailing slash
3267 from make_system_path_relative_to_its_root() output.
3269 * util/i386/pc/grub-install.in: Add trailing slash to output from
3270 make_system_path_relative_to_its_root().
3272 2008-05-06 Robert Millan <rmh@aybabtu.com>
3274 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
3275 ensures that output lines aren't intermangled with those sent to
3276 stderr (via grub_util_info()).
3277 * util/grub-probe.c (grub_refresh): Likewise.
3278 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
3280 2008-05-05 Christian Franke <franke@computer.org>
3282 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
3283 Add Cygwin device names.
3284 (get_ide_disk_name) [__CYGWIN__]: Likewise.
3285 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
3286 (check_device): Return error instead of success on empty name.
3287 (make_device_map): Move label inside linux specific code to
3288 prevent compiler warning.
3290 2008-04-30 Robert Millan <rmh@aybabtu.com>
3292 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
3293 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
3295 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
3297 2008-04-29 Robert Millan <rmh@aybabtu.com>
3299 * docs/grub.cfg: New file (example GRUB configuration).
3301 2008-04-26 Robert Millan <rmh@aybabtu.com>
3303 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
3304 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
3305 and `disk/ieee1275/nand.c'.
3307 2008-04-25 Bean <bean123ch@gmail.com>
3309 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
3312 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
3313 change the buffer size to 4096 for cdrom device.
3315 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
3317 (_linux_mod_SOURCES): New variable.
3318 (_linux_mod_CFLAGS): Likewise.
3319 (_linux_mod_LDFLAGS): Likewise.
3320 (linux_mod_SOURCES): Likewise.
3321 (linux_mod_CFLAGS): Likewise.
3322 (linux_mod_LDFLAGS): Likewise.
3323 (nand_mod_SOURCES): Likewise.
3324 (nand_mod_CFLAGS): Likewise.
3325 (nand_mod_LDFLAGS): Likewise.
3327 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
3328 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
3329 type property. (nand device in olpc don't have this property)
3331 * include/grub/disk.h (grub_disk_dev_id): New macro
3332 GRUB_DISK_DEVICE_NAND_ID.
3334 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
3336 (grub_rescue_cmd_initrd): Likewise.
3338 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
3339 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
3340 ofw_cif_handler and ofw_idt, adjust padding number.
3342 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
3343 GRUB_MACHINE_IEEE1275 is defined.
3345 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
3346 Use NESTED_FUNC_ATTR attribute on the hook parameter.
3348 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
3349 on nested function heap_init.
3350 (grub_upper_mem): New variable for i386-ieee1275.
3351 (grub_get_extended_memory): New function for i386-ieee1275.
3352 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
3354 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
3355 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
3358 * loader/i386/ieee1275/linux.c: New file.
3360 * loader/i386/ieee1275/linux_normal.c: New file.
3362 * disk/ieee1275/nand.c: New file.
3364 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
3366 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
3368 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
3370 2008-04-18 Robert Millan <rmh@aybabtu.com>
3372 Restructures early code path on ieee1275 to unify grub_main() as
3373 the first C function that is executed in every platform.
3375 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
3376 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
3378 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
3379 * kern/ieee1275/cmain.c (cmain): Rename to ...
3380 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
3381 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
3384 2008-04-18 Robert Millan <rmh@aybabtu.com>
3386 * util/update-grub.in: Fix syntax error when setting
3387 `GRUB_PRELOAD_MODULES'.
3388 Reported by Stephane Chazelas <stephane@artesyncp.com>
3390 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
3392 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
3393 section into account, newer toolchains generate unique build ids
3394 * configure.ac: remove the test for --build-id=none acceptance,
3395 we want build ids to be preserved
3396 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
3397 far from other sections don't cause the raw binary images grow
3400 2008-04-15 Robert Millan <rmh@aybabtu.com>
3402 * disk/lvm.c: Update copyright year.
3403 * kern/misc.c: Likewise.
3405 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3407 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
3408 there is no memory left for physical volume name.
3410 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3412 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
3413 volume name mapping to support bigger than 9 character names properly.
3415 2008-04-13 Robert Millan <rmh@aybabtu.com>
3417 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
3418 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
3420 2008-04-13 Christian Franke <franke@computer.org>
3422 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
3423 to create a floppy emulation boot CD when non emulation mode
3425 Enable Joliet CD filesystem extension.
3427 2008-04-13 Robert Millan <rmh@aybabtu.com>
3429 * kern/misc.c (grub_strncat): Fix off-by-one error.
3430 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
3432 * kern/env.c (grub_env_context_close): Clear current context, not
3434 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
3436 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
3438 2008-04-13 Robert Millan <rmh@aybabtu.com>
3440 Improve robustness when handling LVM.
3442 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
3443 (and leave `*p' unmodified).
3444 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
3446 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
3447 iterating through it.
3448 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
3450 (grub_lvm_scan_device): Check the return value (and fail gracefully
3451 when due) on each grub_lvm_getvalue() or grub_strstr() call.
3452 Don't assume `vg->pvs != NULL' when iterating through it.
3454 2008-04-13 Robert Millan <rmh@aybabtu.com>
3456 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
3457 * genmk.rb (partmap): New variable.
3458 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
3459 (#{partmap}): New target rule.
3460 * genpartmaplist.sh: New file.
3461 * Makefile.in (pkglib_DATA): Add partmap.lst.
3462 (partmap.lst): New target rule.
3463 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
3464 modules (including all partition maps), instead of preloading them.
3466 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
3468 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
3469 `linux-boot-prober' (if installed) to detect other operating
3470 systems which are installed on the computer and add them to
3472 * conf/common.rmk: Build and install 30_os-prober.
3474 2008-04-12 Robert Millan <rmh@aybabtu.com>
3476 * kern/powerpc/ieee1275/init.c: Move from here ...
3477 * kern/ieee1275/init.c: ... to here. Update all users.
3479 * kern/powerpc/ieee1275/cmain.c: Move from here ...
3480 * kern/ieee1275/cmain.c: ... to here. Update all users.
3482 * kern/powerpc/ieee1275/openfw.c: Move from here ...
3483 * kern/ieee1275/openfw.c: ... to here. Update all users.
3485 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
3486 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
3488 2008-04-10 Pavel Roskin <proski@gnu.org>
3490 * configure.ac: Always use "_cv_" in cache variables for
3491 compatibility with Autoconf 2.62.
3493 2008-04-07 Robert Millan <rmh@aybabtu.com>
3495 Revert grub/machine/init.h addition by Pavel (since it breaks on
3496 i386-ieee1275 and others):
3497 * util/i386/pc/misc.c: Remove grub/machine/init.h.
3498 * util/powerpc/ieee1275/misc.c: Likewise.
3500 2008-04-07 Robert Millan <rmh@aybabtu.com>
3502 * util/grub-probe.c (probe): Improve error message.
3504 2008-04-07 Robert Millan <rmh@aybabtu.com>
3506 * util/biosdisk.c (read_device_map): Skip devices that don't exist
3507 (this prevents the presence of a bogus entry from ruining the whole
3510 2008-04-06 Pavel Roskin <proski@gnu.org>
3512 * util/biosdisk.c: Include grub/util/biosdisk.h.
3513 * util/grub-fstest.c (execute_command): Make static.
3514 * util/grub-mkdevicemap.c (check_device): Likewise.
3515 * util/i386/pc/misc.c: Include grub/machine/init.h.
3516 * util/powerpc/ieee1275/misc.c: Likewise.
3517 * util/lvm.c: Include grub/util/lvm.h.
3518 * util/misc.c: Include grub/kernel.h, grub/misc.h and
3520 * util/raid.c: Include grub/util/raid.h.
3521 (grub_util_getdiskname): Make static.
3523 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
3524 grub_hostfs_fini(), as they are called from grub_init_all() and
3525 grub_fini_all() respectively. This fixes an infinite loop in
3526 grub-fstest due to double registration of hostfs.
3527 Reported by Christian Franke <Christian.Franke@t-online.de>
3529 2008-04-05 Pavel Roskin <proski@gnu.org>
3531 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
3532 all 8 functions. Otherwise, probe function 0 only.
3534 2008-04-04 Pavel Roskin <proski@gnu.org>
3536 * commands/lspci.c (grub_lspci_iter): Print the bus number
3539 * commands/lspci.c (grub_pci_classes): Fix typos.
3540 (grub_lspci_iter): Don't print func twice. Print vendor ID
3541 before device ID, as it's normally done.
3543 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3544 Fix signedness warnings.
3545 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
3547 * util/ieee1275/get_disk_name.c: Include config.h so that
3548 _GNU_SOURCE is defined and getline() is declared. Mark an
3549 unused argument as such. Fix a signedness warning.
3551 2008-04-02 Pavel Roskin <proski@gnu.org>
3553 * genkernsyms.sh.in: Use more robust assignments for CC and
3554 srcdir. Quote srcdir.
3555 * gensymlist.sh.in: Likewise. Assert at the compile time that
3556 the symbol table is not empty.
3558 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
3559 * fs/cpio.c (grub_cpio_read): Likewise.
3561 2008-04-01 Pavel Roskin <proski@gnu.org>
3563 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
3564 * disk/host.c (grub_host_open): Likewise.
3565 * disk/loopback.c (grub_loopback_open): Likewise.
3566 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
3567 disk->id as in disk/host.c, not a multi-character constant.
3569 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
3570 later is obsolete, potentially dangerous and sets a bad example.
3571 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
3572 * util/misc.c (grub_util_get_image_size): Likewise.
3574 * disk/loopback.c (options): Improve help for "--partitions".
3576 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
3577 options to align them with the short options, e.g. "echo -e".
3579 2008-03-31 Bean <bean123ch@gmail.com>
3581 * video/reader/png.c (grub_png_data): New member is_16bit and
3583 (grub_png_decode_image_header): Detect 16 bit png image.
3584 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
3585 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
3586 (grub_video_reader_png): Release memory occupied by image_data.
3588 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
3590 (grub_nfs_mount): Skip the test for sector per cluster.
3592 * include/grub/ntfs.h (MAX_SPC): Removed.
3594 2008-03-31 Bean <bean123ch@gmail.com>
3596 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
3597 (grub_probe_SOURCES): Add fs/afs.c.
3598 (grub_fstest_SOURCES): Likewise.
3599 (afs_mod_SOURCES): New variable.
3600 (afs_mod_CFLAGS): Likewise.
3601 (afs_mod_LDFLAGS): Likewise.
3603 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
3604 (grub_emu_SOURCES): Likewise.
3606 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3608 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3610 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3612 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3614 * fs/afs.c: New file.
3616 2008-03-30 Pavel Roskin <proski@gnu.org>
3618 * disk/host.c: Include grub/misc.h to fix a warning.
3619 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
3620 warnings about implicit declarations.
3622 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
3624 * include/grub/i386/loader.h: Change declaration of
3625 grub_linux_boot() to match what grub_loader_set() expects.
3626 * util/getroot.c (grub_guess_root_device): Return const char* to
3628 * util/grub-probe.c (probe): Fix a warning about uninitialized
3629 abstraction_name variable.
3630 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
3631 second argument as unused to fix a warning.
3633 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
3634 missing grub_error() call.
3636 * util/update-grub_lib.in: Define datarootdir, since Autoconf
3637 2.60 and newer uses it to define datadir.
3639 * commands/sleep.c: Fix warning about implicit declaration.
3640 * disk/memdisk.c: Likewise.
3641 * loader/aout.c: Likewise.
3642 * loader/i386/bsd_normal.c: Likewise.
3643 * util/grub-probe.c: Likewise.
3645 * commands/i386/cpuid.c (has_longmode): Make static.
3646 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
3647 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
3649 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
3650 GDT. This is more robust, as %ds can change.
3651 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
3652 calling real_to_prot().
3653 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
3655 2008-03-28 Pavel Roskin <proski@gnu.org>
3657 * kern/i386/pc/startup.S: Assert that uncompressed functions
3658 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
3659 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
3660 code, as they push parts of the code (error handlers) beyond
3661 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
3662 code as correctness and size.
3664 2008-03-28 Pavel Roskin <proski@gnu.org>
3666 * kern/i386/pc/startup.S
3667 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
3668 data block address to the real mode, keep offset minimal. This
3669 works around a bug in AWARD BIOS on old Athlon systems, which
3670 makes CD detection hang.
3672 2008-03-26 Pavel Roskin <proski@gnu.org>
3674 * normal/color.c (grub_parse_color_name_pair): Make `name' a
3676 * include/grub/normal.h: Add grub_parse_color_name_pair()
3679 2008-03-24 Bean <bean123ch@gmail.com>
3681 * disk/i386/pc/biosdisk.c (cd_start): Removed.
3682 (cd_count): Removed.
3683 (cd_drive): New variable.
3684 (grub_biosdisk_get_drive): Don't check for (cdN) device.
3685 (grub_biosdisk_call_hook): Likewise.
3686 (grub_biosdisk_iterate): Change cdrom detection method.
3687 (grub_biosdisk_open): Replace cd_start with cd_drive.
3688 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
3689 detect cdrom device.
3691 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
3693 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
3694 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
3695 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
3696 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
3697 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
3698 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
3699 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
3700 (grub_biosdisk_cdrp): New structure.
3701 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
3703 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
3705 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
3708 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
3711 2008-03-20 Robert Millan <rmh@aybabtu.com>
3713 Remove 2 TiB limit in ata.mod.
3714 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
3715 (grub_ata_dumpinfo): Print sector count with 0x%llx.
3716 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
3717 grub_uint64_t instead of grub_uint32_t.
3719 2008-03-05 Bean <bean123ch@gmail.com>
3721 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
3722 (grub_multiboot): Set boot device.
3724 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
3726 2008-03-02 Bean <bean123ch@gmail.com>
3728 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
3731 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
3733 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
3736 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
3739 * docs/fdl.texi: New file.
3741 * docs/mdate-sh: New file. Copied from gnulib.
3742 * docs/texinfo.tex: Likewise.
3744 * config.guess: Updated from gnulib.
3745 * install-sh: Likewise.
3747 2008-02-28 Robert Millan <rmh@aybabtu.com>
3749 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
3750 (aout_mod_SOURCES): New variable.
3751 (aout_mod_CFLAGS): Likewise.
3752 (aout_mod_LDFLAGS): Likewise.
3754 * conf/i386-ieee1275.rmk: Likewise.
3756 2008-02-28 Robert Millan <rmh@aybabtu.com>
3758 * util/update-grub.in: Reorganise terminal validity check. Accept
3759 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
3760 Based on suggestion by Franklin PIAT.
3762 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
3764 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
3766 * util/getroot.c (grub_util_check_block_device): New function that
3767 returns the given argument if it is a block device and returns NULL else.
3768 * util/grub-probe.c (argument_is_device): New variable.
3769 (probe): Promote device_name from a variable to an argument. Receive
3770 device_name from grub_util_check_block_device() if path is NULL and from
3771 grub_guess_root_device() else. Do not free() device_name anymore.
3772 (options): Introduce new parameter '-d, --device'.
3773 (main): Add description of the new parameter to the help screen.
3774 Rename path variable to argument. Set argument_is_device if the '-d'
3775 option is given. Pass argument to probe() depending on
3778 2008-02-24 Bean <bean123ch@gmail.com>
3780 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
3781 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
3782 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
3783 (GRUB_ISO9660_VOLDESC_PART): Likewise.
3784 (GRUB_ISO9660_VOLDESC_END): Likewise.
3785 (grub_iso9660_primary_voldesc): New member escape.
3786 (grub_iso9660_data): New member joliet.
3787 (grub_iso9660_convert_string): New function.
3788 (grub_iso9660_mount): Detect joliet extension.
3789 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
3790 (grub_iso9660_iso9660_label): Likewise.
3792 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
3793 (grub_setup_SOURCES): Add fs/udf.c.
3794 (grub_fstest_SOURCES): Likewise.
3795 (udf_mod_SOURCES): New variable.
3796 (udf_mod_CFLAGS): Likewise.
3797 (udf_mod_LDFLAGS): Likewise.
3799 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
3800 (grub_emu_SOURCES): Likewise.
3802 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3804 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3806 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3808 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3810 * fs/udf.c: New file.
3812 2008-02-24 Robert Millan <rmh@aybabtu.com>
3814 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
3815 (normal/lexer.c_DEPENDENCIES): New variables.
3816 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3817 (normal/lexer.c_DEPENDENCIES): Likewise.
3818 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
3819 (normal/lexer.c_DEPENDENCIES): Likewise.
3820 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
3821 (normal/lexer.c_DEPENDENCIES): Likewise.
3822 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3823 (normal/lexer.c_DEPENDENCIES): Likewise.
3824 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3825 (normal/lexer.c_DEPENDENCIES): Likewise.
3827 2008-02-23 Robert Millan <rmh@aybabtu.com>
3829 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
3830 since they were intended to be in hex. This didn't break previously
3831 because of a bug in gpt_partition_map_iterate() (see below).
3833 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
3834 when checking the validity of GPT header.
3835 Remove `partno', since it always provides the same information as `i'.
3837 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
3839 * include/grub/efi/time.h: Fix a wrong comment.
3841 2008-02-19 Pavel Roskin <proski@gnu.org>
3843 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
3846 2008-02-19 Bean <bean123ch@gmail.com>
3848 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
3849 (aout_mod_SOURCES): New variable.
3850 (aout_mod_CFLAGS): Likewise.
3851 (aout_mod_LDFLAGS): Likewise.
3852 (_bsd_mod_SOURCES): New variable.
3853 (_bsd_mod_CFLAGS): Likewise.
3854 (_bsd_mod_LDFLAGS): Likewise.
3855 (bsd_mod_SOURCES): New variable.
3856 (bsd_mod_CFLAGS): Likewise.
3857 (bsd_mod_LDFLAGS): Likewise.
3859 * include/grub/aout.h: New file.
3861 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
3863 * include/grub/i386/bsd.h: New file.
3865 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
3868 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
3869 function is called, so that it's possible to change it inside the hook.
3870 (grub_elf64_load): Likewise.
3871 (grub_elf_file): Don't close the file if elf header is not found.
3872 (grub_elf_close): Close the file if grub_elf_file fails (The new
3873 grub_elf_file won't close it).
3874 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
3875 (grub_elf64_size): Likewise.
3877 * kern/i386/loader.S (grub_unix_real_boot): New function.
3879 * loader/aout.c: New file.
3881 * loader/i386/bsd.c: New file.
3883 * loader/i386/bsd_normal.c: New file.
3885 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
3887 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
3888 can test other formats.
3890 2008-02-19 Robert Millan <rmh@aybabtu.com>
3892 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
3893 (grub_gpt_partition_type_empty): Redefine with macro from
3894 `<grub/gpt_partition.h>'.
3895 (gpt_partition_map_iterate): Adjust partition type comparison.
3897 Export `entry' as partmap-specific `part.data' struct.
3898 (grub_gpt_header, grub_gpt_partentry): Move from here ...
3900 * include/grub/gpt_partition.h (grub_gpt_header)
3901 (grub_gpt_partentry): ... to here (new file).
3903 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
3905 (grub_gpt_partition_type_bios_boot): New const variable, defined
3906 with macro from `<grub/gpt_partition.h>'.
3908 (setup): Replace `first_start' with `embed_region', which keeps
3909 track of the embed region (and is partmap-agnostic).
3911 Replace find_first_partition_start() with find_usable_region(),
3912 which finds a usable region for embedding using partmap-specific
3913 knowledge (supports PC/MSDOS and GPT).
3915 Fix all assumptions that the embed region start at sector 1, using
3916 `embed_region.start' from now on. Similarly, use `embed_region.end'
3917 rather than `first_start' to calculate available size.
3919 In grub_util_info() message, replace "into after the MBR" with an
3920 indication of the specific sector our embed region starts at.
3922 2008-02-19 Robert Millan <rmh@aybabtu.com>
3924 * DISTLIST: Replace `commands/ieee1275/halt.c' and
3925 `commands/ieee1275/reboot.c' with `commands/halt.c' and
3926 `commands/reboot.c'.
3927 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3928 (halt_mod_SOURCES): Likewise.
3929 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3930 (halt_mod_SOURCES): Likewise.
3932 2008-02-17 Christian Franke <franke@computer.org>
3934 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
3936 2008-02-17 Robert Millan <rmh@aybabtu.com>
3938 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3939 set `first_start' to 0 for non-PC/MSDOS partition maps.
3941 2008-02-16 Robert Millan <rmh@aybabtu.com>
3943 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3944 do not assume partition map is PC/MSDOS before performing checks that
3945 are specific to that layout.
3947 2008-02-13 Robert Millan <rmh@aybabtu.com>
3949 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
3950 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
3951 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
3953 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
3955 * configure.ac: Only a cosmetic change on the handling of
3956 -fno-stack-protector.
3958 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
3960 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
3961 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
3963 (grub_install_SOURCES): Add halt.mod and reboot.mod.
3964 (halt_mod_SOURCES): New variable.
3965 (halt_mod_CFLAGS): Likewise.
3966 (halt_mod_LDFLAGS): Likewise.
3967 (reboot_mod_SOURCES): Likewise.
3968 (reboot_mod_CFLAGS): Likewise.
3969 (reboot_mod_LDFLAGS): Likewise.
3971 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
3972 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
3974 (halt_mod_SOURCES): Likewise.
3975 (reboot_mod_SOURCES): Likewise.
3977 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
3978 commands/i386/pc/reboot.c by commands/reboot.c.
3979 (reboot_mod_SOURCES): Likewise.
3981 * commands/i386/pc/reboot.c: merge this file ...
3983 * commands/ieee1275/reboot.c: ... and this file ...
3985 * commands/reboot.c: ... to this file.
3986 Add some precompiler directive to include the correct header for
3989 * commands/ieee1275/halt.c: move this file ...
3991 * commands/halt.c: ... to here.
3992 Add some precompiler directive to include the correct header for
3995 * include/grub/efi/efi.h (grub_reboot): New function declaration.
3996 (grub_halt): Likewise.
3998 * kern/efi/efi.c (grub_reboot): New function.
3999 (grub_halt): Likewise.
4001 2008-02-12 Robert Millan <rmh@aybabtu.com>
4003 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
4004 /dev (like it is done for /dev/mapper). This doesn't provide support
4005 for EVMS, but at least it is now easy to identify the problem when it
4008 2008-02-11 Robert Millan <rmh@aybabtu.com>
4010 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
4011 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
4012 comparing it with -1, not 0.
4014 2008-02-10 Robert Millan <rmh@aybabtu.com>
4016 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
4018 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4019 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
4021 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
4022 `disk/lvm.c' to the end of the list.
4023 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4024 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4026 2008-02-10 Robert Millan <rmh@aybabtu.com>
4028 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
4029 grub_print_error() instead. This will let user know why we're entering
4031 Based on suggestions from Sam Morris.
4033 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
4035 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
4036 on remaining N args, instead of "--" arg N times.
4038 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
4040 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
4041 (fill_with_default_glyph): Changed to use unknown_glyph for fill
4042 pattern for unknown glyphs.
4044 2008-02-09 Robert Millan <rmh@aybabtu.com>
4046 * configure.ac: Probe for `help2man'.
4047 * Makefile.in (builddir): New variable.
4048 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
4049 or otherwise add a few flags/options to it.
4050 (install-local): For every executable utility or script that is
4051 installed, invoke $(HELP2MAN) to install a manpage based on --help
4054 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
4055 that it doesn't prevent --help from working in build tree.
4057 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
4058 with `bug-grub@gnu.org'.
4059 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
4060 * util/update-grub.in (usage): New function.
4061 Implement proper argument check, with support for --help and --version
4062 (as well as existing -y).
4064 2008-02-09 Christian Franke <franke@computer.org>
4066 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
4067 avoid overwriting previous output.
4068 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
4070 2008-02-09 Robert Millan <rmh@aybabtu.com>
4072 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
4075 2008-02-09 Robert Millan <rmh@aybabtu.com>
4077 * commands/sleep.c: New file.
4078 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
4079 (sleep_mod_SOURCES): New variable.
4080 (sleep_mod_CFLAGS): Likewise.
4081 (sleep_mod_LDFLAGS): Likewise.
4083 2008-02-09 Robert Millan <rmh@aybabtu.com>
4085 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
4086 situations in which we can deduce the RAID size and the superblock
4089 2008-02-09 Robert Millan <rmh@aybabtu.com>
4091 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
4092 and return a grub_diskmemberlist_t composed of LVM physical volumes.
4093 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
4095 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
4096 and return a grub_diskmemberlist_t composed of physical array members.
4097 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
4099 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
4101 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
4102 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
4103 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
4105 * util/grub-probe.c (probe): Move partmap probing code from here ...
4106 (probe_partmap): ... to here.
4107 (probe): Use probe_partmap() once for the disk we're probing, and
4108 additionally, when such disk contains a memberlist() struct member,
4109 once for each disk that is contained in the structure returned by
4112 2008-02-09 Robert Millan <rmh@aybabtu.com>
4114 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
4115 environment variable to 'all' in order to obtain debug output from
4117 * util/i386/pc/grub-setup.c (main): Likewise.
4119 2008-02-08 Robert Millan <rmh@aybabtu.com>
4121 * disk/raid.c (grub_raid_scan_device): Check for
4122 `array->device[sb.this_disk.number]' rather than for
4123 `array->device[sb.this_disk.number]->name', since the latter is not
4124 guaranteed to be accessible.
4126 2008-02-08 Robert Millan <rmh@aybabtu.com>
4128 * disk/raid.c: Update copyright.
4129 * fs/cpio.c: Likewise.
4130 * include/grub/raid.h: Likewise.
4131 * loader/i386/pc/multiboot.c: Likewise.
4132 * util/hostfs.c: Likewise.
4134 2008-02-08 Robert Millan <rmh@aybabtu.com>
4136 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
4137 to a grub_disk_t array.
4138 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
4140 (grub_raid_scan_device): Replace `device[x].name' accesses with
4141 `device[x]->name'. Simplify initialization of `array->device[x]'.
4143 2008-02-08 Robert Millan <rmh@aybabtu.com>
4145 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
4146 grub_dprintf() calls.
4147 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
4150 2008-02-07 Christian Franke <franke@computer.org>
4152 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
4153 instead of fseek and ftell to support large files.
4154 (grub_hostfs_read): Likewise.
4156 2008-02-07 Robert Millan <rmh@aybabtu.com>
4158 Patch from Jeroen Dekkers.
4159 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
4160 failure, since successfully reading all array members might not be
4163 2008-02-06 Robert Millan <rmh@aybabtu.com>
4165 * util/grub-probe.c (probe): Simplify partmap probing (with the
4166 assumption that the first word up to the underscore equals to
4169 2008-02-06 Christian Franke <franke@computer.org>
4171 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
4172 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
4173 last block of a cpio or tar stream.
4174 Check for "TRAILER!!!" instead of any empty data
4175 block to detect last block of a cpio stream.
4176 (grub_cpio_dir): Fix constness of variable np.
4177 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
4178 cpio or tar trailer is detected. This fixes a crash
4179 on open of a non existing file.
4181 2008-02-05 Bean <bean123ch@gmail.com>
4183 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
4185 (grub_multiboot_load_elf64): Likewise.
4186 (grub_multiboot): Initialize mbi structure.
4188 * util/grub-fstest.c: Don't include unused header file script.h.
4190 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
4192 (grub_fstest_SOURCES): Likewise.
4194 2008-02-05 Robert Millan <rmh@aybabtu.com>
4196 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
4197 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
4198 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
4199 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
4201 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
4202 (translation_table): Replace hardcoded values with macros
4203 provided by `<grub/term.h>'.
4205 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
4206 (keyboard_map): Correct/add a few values, with macros provided
4208 (keyboard_map_shift): Zero values that don't differ from their
4209 `keyboard_map' equivalents.
4210 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
4211 Discard the second scan code that is always sent by Caps lock.
4212 Only use `keyboard_map_shift' when it provides a non-zero value,
4213 otherwise fallback to `keyboard_map'.
4215 2008-02-04 Bean <bean123ch@gmail.com>
4217 * Makefile.in (enable_grub_fstest): New variable.
4219 * conf/common.rmk (grub_fstest_init.lst): New rule.
4220 (grub_fstest_init.h): Likewise.
4221 (grub_fstest_init.c): Likewise.
4222 (util/grub-fstest.c_DEPENDENCIES): New variable.
4223 (grub_fstest_SOURCES): Likewise.
4225 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
4227 * util/grub-fstest.c: New file.
4229 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4231 Make grub-setup handle a separate root device.
4233 * util/i386/pc/grub-setup.c (setup): Always open the root device,
4234 so that the root device can be compared with the destination
4236 When embedding the core image, if the root and destination devices
4237 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
4239 When not embedding, set ROOT_DRIVE to 0xFF.
4241 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4243 Add support for having a grub directory in a different drive. This
4244 is still only the data handling part.
4246 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
4247 (codestart): Save %dh in GRUB_ROOT_DRIVE.
4248 (grub_root_drive): New variable.
4250 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
4251 instead of GRUB_BOOT_DRIVE to construct a device name. Set
4252 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
4255 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
4257 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
4259 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
4261 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
4262 is bogus, because PXE booting does not specify any drive
4265 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
4266 am not sure if this is really correct.
4268 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
4269 is always identical to the boot drive when booting from a CD.
4271 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
4273 (root_drive): New variable.
4274 (real_start): Unconditionally set %dh to ROOT_DRIVE.
4275 (setup_sectors): Push %dx right after popping it, because %dh will
4277 (copy_buffer): Restore %dx.
4279 2008-02-03 Robert Millan <rmh@aybabtu.com>
4281 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
4282 use `cdboot.img' for cdrom images.
4284 2008-02-03 Robert Millan <rmh@aybabtu.com>
4286 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
4287 only setup gfxterm when `font' command has succeeded.
4289 2008-02-03 Robert Millan <rmh@aybabtu.com>
4291 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
4292 (grub_rescue_cmd_multiboot_loader)
4293 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
4295 2008-02-03 Pavel Roskin <proski@gnu.org>
4297 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
4298 %edx and %esi from stack only after grub_gate_a20() is called.
4299 grub_gate_a20() clobbers %edx.
4301 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4303 * configure.ac (AC_INIT): Bumped to 1.96.
4305 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
4306 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
4307 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
4308 video/readers/png.c.
4310 2008-02-03 Bean <bean123ch@gmail.com>
4312 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
4313 (cdboot_img_SOURCES): New variable.
4314 (cdboot_img_ASFLAGS): New variable.
4315 (cdboot_img_LDFLAGS): New variable.
4317 * boot/i386/pc/cdboot.S: New file.
4319 * disk/i386/pc/biosdisk.c (cd_start): New variable.
4320 (cd_count): Likewise.
4321 (grub_biosdisk_get_drive): Add support for cd device.
4322 (grub_biosdisk_call_hook): Likewise.
4323 (grub_biosdisk_iterate): Likewise.
4324 (grub_biosdisk_open): Likewise.
4325 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
4326 (grub_biosdisk_rw): Support reading from cd device.
4327 (GRUB_MOD_INIT): Iterate cd devices.
4329 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
4330 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
4331 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
4333 * kern/i386/pc/init.c (make_install_device): Check for cd device.
4335 2008-02-02 Robert Millan <rmh@aybabtu.com>
4337 * commands/read.c: New file.
4338 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
4339 (read_mod_SOURCES): New variable.
4340 (read_mod_CFLAGS): Likewise.
4341 (read_mod_LDFLAGS): Likewise.
4343 2008-02-02 Robert Millan <rmh@aybabtu.com>
4345 * normal/main.c (grub_normal_execute): Check for `menu->size' when
4346 determining whether menu has to be displayed.
4348 2008-02-02 Marco Gerards <marco@gnu.org>
4350 * bus/pci.c: New file.
4352 * include/grub/pci.h: Likewise.
4354 * include/grub/i386/pc/pci.h: Likewise.
4356 * commands/lspci.c: Likewise.
4358 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
4360 (pci_mod_SOURCES): New variable.
4361 (pci_mod_CFLAGS): Likewise.
4362 (pci_mod_LDFLAGS): Likewise.
4363 (lspci_mod_SOURCES): Likewise.
4364 (lspci_mod_CFLAGS): Likewise.
4365 (lspci_mod_LDFLAGS): Likewise.
4367 2008-02-02 Bean <bean123ch@gmail.com>
4369 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
4370 (grub_ufs_get_file_block): Fix indirect block calculation problem.
4372 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
4373 (grub_xfs_btree_node): New structure.
4374 (grub_xfs_btree_root): New structure.
4375 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
4376 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
4377 (GRUB_XFS_EXTENT_BLOCK): Likewise.
4378 (GRUB_XFS_EXTENT_SIZE): Likewise.
4379 (grub_xfs_read_block): Support btree format type.
4380 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
4381 Use directory block as basic unit.
4383 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
4385 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
4386 __attribute__ ((__regparm__ (1))).
4388 2008-02-01 Robert Millan <rmh@aybabtu.com>
4390 Correct a mistake in previous commit.
4392 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
4394 (normal/command.c_DEPENDENCIES): New variable.
4396 2008-02-01 Robert Millan <rmh@aybabtu.com>
4398 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
4400 (normal/command.c_DEPENDENCIES): New variable.
4401 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
4402 * conf/i386-ieee1275.rmk: Likewise.
4403 * conf/i386-linuxbios.rmk: Likewise.
4404 * conf/i386-pc.rmk: Likewise.
4405 * conf/sparc64-ieee1275.rmk: Likewise.
4406 * conf/powerpc-ieee1275.rmk: Likewise.
4407 (grub_emu_SOURCES): Add `fs/fshelp.c'.
4409 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
4411 2008-02-01 Robert Millan <rmh@aybabtu.com>
4413 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
4414 call at beginning of function.
4416 2008-01-31 Pavel Roskin <proski@gnu.org>
4418 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
4419 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
4420 (grub_mkrescue_SOURCES): Likewise.
4421 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
4423 2008-01-30 Robert Millan <rmh@aybabtu.com>
4425 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
4426 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
4427 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
4428 (grub_probe_SOURCES): ... to here.
4430 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
4431 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
4432 * conf/i386-ieee1275.rmk: Likewise.
4433 * conf/i386-linuxbios.rmk: Likewise.
4434 * conf/powerpc-ieee1275.rmk: Likewise.
4436 2008-01-30 Tristan Gingold <gingold@free.fr>
4438 * kern/rescue.c: Silently accept empty lines.
4440 2008-01-29 Bean <bean123ch@gmail.com>
4442 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
4443 (real_code_2): Code cleanup and change comment style.
4444 (move_memory): Avoid using 32-bit address mode.
4446 2008-01-29 Bean <bean123ch@gmail.com>
4448 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
4449 (png_mod_SOURCES): New variable.
4450 (png_mod_CFLAGS): Likewise.
4451 (png_mod_LDFLAGS): Likewise.
4453 * video/readers/png.c: New file.
4455 2008-01-28 Robert Millan <rmh@aybabtu.com>
4457 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
4458 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
4459 `ifndef GRUB_MOD_GAP' hack.
4460 * util/elf/grub-mkimage.c (add_segments): Likewise.
4462 2008-01-27 Robert Millan <rmh@aybabtu.com>
4464 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
4465 `GRUB_MOD_GAP' for platforms in which it's not defined.
4466 * util/elf/grub-mkimage.c (add_segments): Likewise.
4468 2008-01-27 Robert Millan <rmh@aybabtu.com>
4470 Get grub-emu to build again (including parallel builds).
4472 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
4474 (util/grub-emu.c_DEPENDENCIES): ... this, ...
4475 (normal/execute.c_DEPENDENCIES): ... this, ...
4476 (grub-emu_DEPENDENCIES): ... and this.
4478 * conf/i386-efi.rmk: Likewise.
4479 * conf/i386-linuxbios.rmk: Likewise.
4480 * conf/i386-ieee1275.rmk: Likewise.
4481 * conf/powerpc-ieee1275.rmk: Likewise.
4482 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
4484 2008-01-27 Robert Millan <rmh@aybabtu.com>
4486 * NEWS: Add a few items.
4488 2008-01-27 Robert Millan <rmh@aybabtu.com>
4490 Fix parallel builds with grub-emu. Based on earlier commit for
4491 grub-probe and grub-setup.
4493 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4494 (util/grub-emu.c_DEPENDENCIES): ... this.
4495 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4496 (util/grub-emu.c_DEPENDENCIES): ... this.
4497 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4498 (util/grub-emu.c_DEPENDENCIES): ... this.
4499 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4500 (util/grub-emu.c_DEPENDENCIES): ... this.
4501 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4502 (util/grub-emu.c_DEPENDENCIES): ... this.
4504 2008-01-27 Pavel Roskin <proski@gnu.org>
4506 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
4507 to create a gap between _end and the modules added to the image
4508 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
4509 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
4510 * util/elf/grub-mkimage.c (add_segments): Likewise.
4512 2008-01-26 Pavel Roskin <proski@gnu.org>
4514 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
4515 just return an error.
4517 2008-01-26 Bean <bean123ch@gmail.com>
4519 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
4520 (grub_reiserfs_get_item): Save offset of the next item.
4521 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
4523 2008-01-25 Robert Millan <rmh@aybabtu.com>
4525 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
4526 make all filesystem sources appear together (possibly fixing omissions
4528 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4529 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4530 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4531 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4533 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
4535 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
4536 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4537 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
4538 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4540 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
4541 (probe): Add a sanity check to make sure of our ability to read
4542 requested files when probing for filesystem type.
4544 * genmk.rb: Update copyright year (2007).
4546 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
4547 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
4548 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
4549 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
4550 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
4551 : Remove function prototypes.
4553 2008-01-25 Robert Millan <rmh@aybabtu.com>
4555 Revert my previous commits (based on wrong assumption of how grub_errno
4558 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
4559 * kern/file.c (grub_file_open): Likewise.
4561 2008-01-24 Pavel Roskin <proski@gnu.org>
4563 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
4564 that hang if GRUB tries to setup colors.
4565 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
4566 colors for firmwares that don't support it.
4567 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
4568 Recognize Open Hack'Ware, set flags to work around its
4571 2008-01-24 Robert Millan <rmh@aybabtu.com>
4573 * kern/file.c (grub_file_open): Do not account previous failures of
4574 unrelated functions when grub_errno is checked for.
4575 Reported by Oleg Strikov.
4577 2008-01-24 Bean <bean123ch@gmail.com>
4579 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
4580 (grub_ufs_sblock): New member volume name.
4581 (grub_ufs_find_file): Fix string copy bug.
4582 (grub_ufs_label): Implement this function properly.
4584 * fs/hfs.c (grub_hfs_cnid_type): New enum.
4585 (grub_hfs_iterate_records): Use the correct file number for extents
4586 and catalog file. Fix problem in next index calculation.
4587 (grub_hfs_find_node): Replace recursive function call with loop.
4588 (grub_hfs_iterate_dir): Replace recursive function call with loop.
4590 2008-01-23 Robert Millan <rmh@aybabtu.com>
4592 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
4593 `<grub/symbol.h>' and `<grub/multiboot.h>'.
4594 (grub_multiboot2_real_boot): New function prototype.
4596 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
4597 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
4599 * kern/i386/ieee1275/init.c (grub_os_area_addr)
4600 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
4602 2008-01-23 Robert Millan <rmh@aybabtu.com>
4604 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
4605 #ifdef'ed out grub_printf().
4607 2008-01-23 Robert Millan <rmh@aybabtu.com>
4609 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
4610 grub_dprintf calls, since they make "debug=all" mode unusable.
4611 (grub_console_checkkey): Likewise.
4613 2008-01-23 Robert Millan <rmh@aybabtu.com>
4615 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4616 `term/i386/pc/at_keyboard.c'.
4617 (pkglib_MODULES): Add `serial.mod'.
4618 (serial_mod_SOURCES): New variable.
4619 (serial_mod_CFLAGS): Likewise.
4620 (serial_mod_LDFLAGS): Likewise.
4622 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
4623 `<grub/powerpc/ieee1275/console.h>'.
4624 (grub_keyboard_controller_init): New function prototype.
4625 (grub_console_checkkey): Likewise.
4626 (grub_console_getkey): Likewise.
4628 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
4631 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
4632 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
4634 2008-01-23 Robert Millan <rmh@aybabtu.com>
4636 * kern/i386/pc/init.c (make_install_device): When memdisk image is
4637 present, "(memdisk)/boot/grub" becomes the default prefix.
4639 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
4640 a memdisk tarball with all the modules. Add --overlay=DIR option that
4641 allows users to overlay additional files into the image.
4643 2008-01-23 Robert Millan <rmh@aybabtu.com>
4645 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
4646 and `machine/memory.h'.
4647 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
4648 (_multiboot_mod_SOURCES): New variable.
4649 (_multiboot_mod_CFLAGS): Likewise.
4650 (_multiboot_mod_LDFLAGS): Likewise.
4651 (multiboot_mod_SOURCES): Likewise.
4652 (multiboot_mod_CFLAGS): Likewise.
4653 (multiboot_mod_LDFLAGS): Likewise.
4655 * include/grub/i386/ieee1275/loader.h: New file.
4657 * include/grub/i386/ieee1275/machine.h: Likewise.
4659 * include/grub/i386/ieee1275/memory.h: Likewise.
4661 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
4662 variable declaration.
4663 (grub_os_area_size): Likewise.
4665 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
4666 (grub_lower_mem, grub_upper_mem): New variables.
4667 (grub_stop_floppy): New function (just to make
4668 grub_multiboot2_real_boot() happy).
4670 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
4671 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
4672 (grub_stop): New function.
4673 Include `"../realmode.S"' and `"../loader.S"'.
4675 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
4676 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
4678 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
4679 rely on grub_multiboot2_real_boot() for final boot.
4681 2008-01-22 Robert Millan <rmh@aybabtu.com>
4683 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
4684 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
4685 device that doesn't look like an SD card.
4686 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4687 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
4688 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
4689 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
4692 2008-01-22 Robert Millan <rmh@aybabtu.com>
4694 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
4695 avoid claiming over our own code.
4697 2008-01-22 Bean <bean123ch@gmail.com>
4699 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
4700 (jpeg_mod_SOURCES): New variable.
4701 (jpeg_mod_CFLAGS): Likewise.
4702 (jpeg_mod_LDFLAGS): Likewise.
4704 * video/readers/jpeg.c : New file.
4706 2008-01-22 Bean <bean123ch@gmail.com>
4708 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
4709 there are no more items.
4711 2008-01-21 Robert Millan <rmh@aybabtu.com>
4713 * kern/mm.c (grub_mm_init_region): Improve debug message.
4715 2008-01-21 Robert Millan <rmh@aybabtu.com>
4717 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
4718 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
4720 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
4722 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
4723 Indicates start of upper memory.
4724 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
4725 (generate_image): Abort when image size is big enough to corrupt
4728 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
4729 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
4730 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4731 instead of hardcoding 0xA0000.
4732 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
4733 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4734 instead of hardcoding 0xA0000.
4736 2008-01-21 Robert Millan <rmh@aybabtu.com>
4738 * disk/memdisk.c (memdisk_size): New variable.
4739 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
4741 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
4742 image to dynamic memory.
4743 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
4744 `memdisk_size'. Free memdisk block.
4746 2008-01-21 Robert Millan <rmh@aybabtu.com>
4748 Fix detection of very small filesystems (like tar).
4750 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
4751 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
4752 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
4753 a problem with this disk).
4755 2008-01-21 Robert Millan <rmh@aybabtu.com>
4757 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
4758 on grub_biosdisk_rw_standard() error.
4760 2008-01-21 Robert Millan <rmh@aybabtu.com>
4762 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
4764 * kern/elf.c: Likewise.
4765 * kern/ieee1275/ieee1275.c: Likewise.
4766 * kern/powerpc/ieee1275/openfw.c: Likewise.
4767 * term/ieee1275/ofconsole.c: Likewise.
4769 2008-01-21 Robert Millan <rmh@aybabtu.com>
4771 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
4773 * include/grub/kernel.h (grub_arch_memdisk_addr)
4774 (grub_arch_memdisk_size): Moved from here ...
4776 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
4777 (grub_arch_memdisk_size): ... to here.
4779 2008-01-21 Robert Millan <rmh@aybabtu.com>
4781 Mostly based on bugfix from Bean.
4783 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
4784 attribute with hook() parameter.
4785 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
4787 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
4788 attribute with hook() parameter.
4789 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
4792 2008-01-21 Robert Millan <rmh@aybabtu.com>
4794 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
4795 (pkglib_MODULES): Add `memdisk.mod'.
4796 (memdisk_mod_SOURCES): New variable.
4797 (memdisk_mod_CFLAGS): Likewise.
4798 (memdisk_mod_LDFLAGS): Likewise.
4800 * disk/memdisk.c: New file.
4802 * include/grub/disk.h (grub_disk_dev_id): Add
4803 `GRUB_DISK_DEVICE_MEMDISK_ID'.
4805 * include/grub/i386/pc/kernel.h
4806 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
4807 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
4808 (grub_kernel_image_size): New variable declaration.
4809 (grub_total_module_size): Likewise.
4810 (grub_memdisk_image_size): Likewise.
4812 * include/grub/i386/pc/memory.h
4813 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
4815 * include/grub/kernel.h: Include `<grub/symbol.h>'.
4816 (grub_arch_memdisk_addr): New variable declaration.
4817 (grub_arch_memdisk_size): Likewise.
4819 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
4820 (grub_arch_memdisk_size): Likewise.
4822 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
4823 (codestart): Replace hardcoded `0x100000' with
4824 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
4826 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
4827 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
4828 not NULL, append the contents of the file it refers to, at the end of
4829 the compressed kernel image. Initialize `grub_memdisk_image_size'
4830 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
4831 (options): Add "memdisk"|'m' option.
4832 (main): Parse --memdisk|-m option, and pass user-provided path as
4833 parameter to generate_image().
4835 2008-01-20 Robert Millan <rmh@aybabtu.com>
4837 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
4838 grub_dprintf() calls from here ...
4839 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
4841 2008-01-20 Robert Millan <rmh@aybabtu.com>
4843 Fix detection of "real mode" when /options/real-mode? doesn't exist.
4845 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
4847 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
4848 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
4849 `GRUB_IEEE1275_FLAG_REAL_MODE'.
4850 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
4852 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
4853 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
4855 2008-01-19 Robert Millan <rmh@aybabtu.com>
4857 Get rid of confusing function (superseded by
4858 `grub_ieee1275_get_integer_property')
4859 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
4861 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
4863 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
4864 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
4865 in native endianness from grub_ieee1275_get_integer_property().
4867 2008-01-19 Robert Millan <rmh@aybabtu.com>
4869 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
4870 command after "shut-down", since implementations differ on which
4871 the command for halt is.
4873 2008-01-19 Robert Millan <rmh@aybabtu.com>
4875 * include/grub/i386/linuxbios/console.h: Add header protection.
4876 (grub_keyboard_controller_init): New function prototype.
4877 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
4878 (KEYBOARD_COMMAND_READ): Likewise.
4879 (KEYBOARD_COMMAND_WRITE): Likewise.
4880 (KEYBOARD_SCANCODE_SET1): Likewise.
4881 (grub_keyboard_controller_write): New function.
4882 (grub_keyboard_controller_read): Likewise.
4883 (grub_keyboard_controller_init): Likewise.
4885 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
4886 (grub_console_init): On coreboot/LinuxBIOS, call
4887 grub_keyboard_controller_init().
4889 2008-01-19 Robert Millan <rmh@aybabtu.com>
4891 PowerPC changes provided by Pavel Roskin.
4893 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
4894 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
4895 don't rely on cmain() doing it.
4896 * kern/i386/ieee1275/startup.S (_start): Store %eax in
4897 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
4899 2008-01-16 Robert Millan <rmh@aybabtu.com>
4901 * include/grub/i386/linuxbios/memory.h
4902 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
4903 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
4904 receive `table_header' as argument. Instead, probe for it in the
4905 known memory ranges where it can be present.
4906 (grub_available_iterate): Do not pass a fixed `table_header' address
4907 to grub_linuxbios_table_iterate().
4909 2008-01-15 Robert Millan <rmh@aybabtu.com>
4911 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
4912 * conf/i386-ieee1275.rmk: New file.
4913 * include/grub/i386/ieee1275/console.h: Likewise.
4914 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
4915 * include/grub/i386/ieee1275/kernel.h: Likewise.
4916 * include/grub/i386/ieee1275/time.h: Likewise.
4917 * kern/i386/ieee1275/init.c: Likewise.
4918 * kern/i386/ieee1275/startup.S: Likewise.
4920 2008-01-15 Robert Millan <rmh@aybabtu.com>
4922 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
4923 when pointers are 32-bit (but still do set it to one when they are
4926 2008-01-15 Robert Millan <rmh@aybabtu.com>
4928 * include/grub/ieee1275/ieee1275.h
4929 (grub_ieee1275_get_integer_property): New function prototype.
4931 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
4932 (grub_ieee1275_get_integer_property): New function. Wraps around
4933 grub_ieee1275_get_property() to handle endianness.
4935 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
4936 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
4938 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
4939 (grub_map): Likewise.
4940 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
4942 2008-01-15 Bean <bean123ch@gmail.com>
4944 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
4945 (grub_script_execute_cmdline): Reset grub_errno.
4947 * normal/main.c (read_config_file): Reset grub_errno.
4949 * normal/parse.y (script_init): New.
4950 (script): Move function and menuentry here.
4952 (command): Add delimiter at the end of command.
4953 (commands): Adjust to match the new command.
4954 (commandblock): Remove grub_script_lexer_record_start.
4955 (menuentry): Add grub_script_lexer_record_start, use the new commands.
4956 (if): Use the new commands.
4958 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
4960 2008-01-15 Robert Millan <rmh@aybabtu.com>
4962 * normal/menu.c (run_menu): Move timeout message from here ...
4963 (print_timeout): ... to here.
4964 (run_menu): Use print_timeout() once during initial draw to print
4965 the whole message, and again in every clock tick to update only
4966 the number of seconds.
4968 2008-01-15 Robert Millan <rmh@aybabtu.com>
4970 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
4971 actual size of `available' from grub_ieee1275_get_property(), and
4972 restrict parsing to that bound.
4974 2008-01-15 Christian Franke <franke@computer.org>
4976 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
4977 (argp_program_version): Remove variable.
4978 (argp_program_bug_address): Likewise.
4979 (options): Convert from struct argp_option to struct option.
4980 (struct arguments): Remove.
4981 (parse_opt): Remove.
4982 (usage): New function.
4983 (main): Replace struct args members by simple variables.
4984 Replace argp_parse() by getopt_long().
4985 Add switch to evaluate options.
4986 Add missing "(...)" around root_dev in prefix string.
4988 2008-01-14 Robert Millan <rmh@aybabtu.com>
4990 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
4991 for grub_ieee1275_exit(), in order to improve portability.
4993 2008-01-14 Robert Millan <rmh@aybabtu.com>
4995 * util/grub.d/10_linux.in (prefix): Define.
4996 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
4998 2008-01-13 Pavel Roskin <proski@gnu.org>
5000 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
5001 grub_errno if no errors have been detected.
5003 2008-01-12 Robert Millan <rmh@aybabtu.com>
5005 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
5006 (grub_util_get_dev_abstraction): New function prototype.
5008 * util/getroot.c: Include `<grub/util/getroot.h>'
5009 (grub_util_get_grub_dev): Move detection of abstraction type to ...
5010 (grub_util_get_dev_abstraction): ... here (new function).
5012 * util/grub-probe.c: Convert PRINT_* to an enum. Add
5013 `PRINT_ABSTRACTION'.
5014 (probe): Probe for abstraction type when requested.
5015 (main): Understand `--target=abstraction'.
5017 * util/i386/efi/grub-install.in: Add abstraction module to core
5018 image when it is found to be necessary.
5019 * util/i386/pc/grub-install.in: Likewise.
5020 * util/powerpc/ieee1275/grub-install.in: Likewise.
5022 * util/update-grub_lib.in (font_path): Return system path without
5023 converting to GRUB path.
5024 * util/update-grub.in: Convert system path returned by font_path()
5025 to a GRUB path. Use `grub-probe -t abstraction' to determine what
5026 abstraction module is needed for loading fonts (if any). Export
5027 that as `GRUB_PRELOAD_MODULES'.
5028 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
5031 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
5033 Remove some unused code from reiserfs.
5035 * fs/reiserfs.c (struct grub_reiserfs_key)
5036 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
5037 (struct grub_reiserfs_node_body): Removed.
5038 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5040 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5042 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5044 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
5046 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
5048 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
5050 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5051 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5052 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
5054 2008-01-10 Robert Millan <rmh@aybabtu.com>
5056 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
5057 Determines if a file is garbage left by packaging systems, etc.
5058 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
5059 for processing /etc/grub.d scripts.
5060 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
5061 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
5062 as a condition for processing Linux images.
5064 2008-01-10 Pavel Roskin <proski@gnu.org>
5066 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
5067 to compile reiserfs.c on PowerPC.
5069 2008-01-10 Robert Millan <rmh@aybabtu.com>
5071 * kern/device.c (grub_device_iterate): Do not abort device iteration
5072 when one of the devices cannot be opened.
5073 * kern/disk.c (grub_disk_open): Do not account previous failures of
5074 unrelated functions when grub_errno is checked for.
5076 2008-01-08 Robert Millan <rmh@aybabtu.com>
5078 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
5079 `! grub_linux_is_bzimage', change order of address comparison to make
5080 it more intuitive, and improve "too big zImage" error message.
5082 2008-01-08 Robert Millan <rmh@aybabtu.com>
5084 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
5085 `$(update-grub_DATA)'.
5086 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
5089 2008-01-07 Robert Millan <rmh@aybabtu.com>
5091 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
5092 which instruction is modified by grub-setup during installation
5093 (since it wasn't obvious by only looking at this file).
5095 2008-01-07 Robert Millan <rmh@aybabtu.com>
5097 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
5098 listing actual TODO items.
5100 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5102 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
5104 (grub_reiserfs_get_key_offset): Likewise.
5105 (grub_reiserfs_set_key_offset): Likewise.
5106 (grub_reiserfs_set_key_type): Likewise.
5107 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
5109 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
5110 better to remove the bitfield version completely.
5112 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5114 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
5115 allocated from the heap, due to the fshelp implementation.
5116 (grub_reiserfs_dir): Free NODE, due to the same reason.
5118 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5120 Mostly from Vincent Pelletier:
5122 * fs/reiserfs.c: New file.
5124 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
5125 (reiserfs_mod_SOURCES): New variable.
5126 (reiserfs_mod_CFLAGS): Likewise.
5127 (reiserfs_mod_LDFLAGS): Likewise.
5129 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
5130 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
5131 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
5134 2008-01-06 Robert Millan <rmh@aybabtu.com>
5136 * normal/color.c: Remove `<grub/env.h>'.
5138 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
5140 * include/grub/normal.h: Include <grub/env.h>.
5142 2008-01-05 Robert Millan <rmh@aybabtu.com>
5144 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
5145 usage example with `(hd0,1)'.
5146 Reported by Samuel Thibault.
5148 2008-01-05 Robert Millan <rmh@aybabtu.com>
5150 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
5151 (grub_linux_boot_zimage): Rename to ...
5152 (grub_linux_boot): ... this.
5153 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
5154 (grub_linux_boot_zimage): Conditionalize zImage copy.
5156 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
5157 (grub_linux_boot_bzimage): Remove prototype.
5158 (grub_linux_boot_zimage): Rename to ...
5159 (grub_linux_boot): ... this.
5161 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
5162 (grub_linux_boot): Remove function.
5164 2008-01-05 Robert Millan <rmh@aybabtu.com>
5166 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
5167 (grub_env_write_color_highlight): Likewise.
5168 (grub_wait_after_message): Likewise.
5170 * normal/color.c: New file.
5172 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5173 (normal_mod_DEPENDENCIES): Likewise.
5175 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5176 (normal_mod_DEPENDENCIES): Likewise.
5178 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5179 (normal_mod_DEPENDENCIES): Likewise.
5181 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5182 (normal_mod_DEPENDENCIES): Likewise.
5184 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
5185 for waiting after a message is printed.
5186 * normal/main.c (read_config_file): Likewise.
5187 (grub_normal_init): Register grub_env_write_color_normal() and
5188 grub_env_write_color_highlight() hooks. Mark `color_normal' and
5189 `color_highlight' variables as global.
5191 * normal/menu.c (grub_wait_after_message): New function.
5192 (grub_color_menu_normal): New variable. Replaces ...
5193 (GRUB_COLOR_MENU_NORMAL): ... this macro.
5194 (grub_color_menu_highlight): New variable. Replaces ...
5195 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
5196 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
5197 `GRUB_TERM_COLOR_STANDARD'.
5198 (print_message): Use `grub_setcolorstate' to reload colors. Rename
5199 `normal_code' and `highlight_code' to `old_color_normal' and
5200 `old_color_highlight', respectively.
5201 (grub_menu_init_page): Update colors when drawing the menu, based on
5202 `menu_color_normal' and `menu_color_highlight' variables.
5203 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
5204 a message is printed.
5206 2008-01-05 Robert Millan <rmh@aybabtu.com>
5208 * kern/env.c (grub_env_context_open): Propagate hooks for global
5209 variables to new context.
5211 * kern/main.c (grub_set_root_dev): Export `root' variable.
5213 2008-01-05 Robert Millan <rmh@aybabtu.com>
5215 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
5216 discs unconditionally, since udev and others have options to provide
5219 2008-01-05 Robert Millan <rmh@aybabtu.com>
5221 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
5223 2008-01-04 Christian Franke <franke@computer.org>
5225 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
5228 2008-01-03 Pavel Roskin <proski@gnu.org>
5230 * kern/i386/linuxbios/init.c: Put "void" to all function
5231 declarations with no arguments.
5232 * kern/powerpc/ieee1275/init.c: Likewise.
5233 * term/i386/pc/at_keyboard.c: Likewise.
5234 * term/i386/pc/vga_text.c: Likewise.
5235 * util/grub-mkdevicemap.c: Likewise.
5237 2008-01-02 Robert Millan <rmh@aybabtu.com>
5239 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
5240 message when loaded image is out of bounds.
5241 (grub_multiboot_load_elf64): Likewise.
5243 2008-01-02 Pavel Roskin <proski@gnu.org>
5245 * util/grub.d/10_linux.in: Try version without ".old" when
5246 looking for initrd. It's better to use initrd from the newer
5247 kernel of the same version than no initrd at all.
5249 2008-01-01 Robert Millan <rmh@aybabtu.com>
5251 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
5253 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
5255 * include/grub/video.h: Added grub_video_unmap_color and
5256 grub_video_get_active_render_target.
5257 (grub_video_adapter): Added unmap_color and get_active_render_target.
5259 * video/video.c: Added grub_video_unmap_color and
5260 grub_video_get_active_render_target.
5261 (grub_video_get_info): Changed method to accept NULL pointer as an
5262 argument to allow detection of active video adapter.
5264 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
5265 grub_video_vbe_unmap_color_int.
5266 Added grub_video_vbe_unmap_color and
5267 grub_video_vbe_get_active_render_target.
5268 (grub_video_vbe_adapter): Added unmap_color and
5269 get_active_render_target.
5271 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
5272 with grub_video_vbe_unmap_color_int.
5274 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
5275 (DEFAULT_NORMAL_COLOR): Likewise.
5276 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
5277 (DEFAULT_FG_COLOR): Removed.
5278 (DEFAULT_BG_COLOR): Likewise.
5279 (DEFAULT_CURSOR_COLOR): Changed value.
5280 (grub_virtual_screen): Added standard_color_setting,
5281 normal_color_setting, highlight_color_setting and term_color.
5282 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
5283 (bitmap_width): Added.
5284 (bitmap_height): Likewise.
5286 (set_term_color): Likewise.
5287 (grub_virtual_screen_setup): Changed to use new terminal coloring
5289 (grub_gfxterm_init): Added init for bitmap.
5290 (grub_gfxterm_fini): Added destroy for bitmap.
5291 (redraw_screen_rect): Updated to use background bitmap and new
5293 (scroll_up): Added optimization for case when there is no bitmap.
5294 (grub_gfxterm_cls): Fixed to use correct background color.
5295 (grub_virtual_screen_setcolorstate): Changed to use new terminal
5297 (grub_virtual_screen_setcolor): Likewise.
5298 (grub_virtual_screen_getcolor): Added.
5299 (grub_gfxterm_background_image_cmd): Likewise.
5300 (grub_video_term): Added setcolor and getcolor.
5301 (MOD_INIT): Added registration of background_image command.
5302 (MOD_TERM): Added unregistration for background_image command.
5304 2007-12-30 Pavel Roskin <proski@gnu.org>
5306 * loader/multiboot_loader.c: Fix multiboot command
5307 unregistration. Fix all typos in the word "multiboot".
5309 2007-12-29 Pavel Roskin <proski@gnu.org>
5311 * util/grub.d/10_linux.in: Refactor search for initrd. Add
5312 support for initrd names used in Fedora.
5314 2007-12-26 Bean <bean123ch@gmail.com>
5316 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
5317 (cpio_mod_SOURCES): New variable.
5318 (cpio_mod_CFLAGS): Likewise.
5319 (cpio_mod_LDFLAGS): Likewise.
5321 * fs/cpio.c: New file.
5323 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
5325 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5327 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5329 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5331 2007-12-25 Robert Millan <rmh@aybabtu.com>
5333 * include/grub/term.h (struct grub_term): Add `getcolor' function.
5334 (grub_getcolor): New function.
5336 * kern/term.c (grub_getcolor): New function.
5337 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
5338 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
5339 (print_entry): Set normal and highlight colors to
5340 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
5341 respectively, before printing and restore them to old
5343 (grub_menu_init_page): Likewise. Fill an additional colored space
5344 that would otherwise be left blank.
5346 * term/efi/console.c (grub_console_getcolor): New function.
5347 (struct grub_console_term.getcolor): New variable.
5348 * term/i386/pc/console.c (grub_console_getcolor): New function.
5349 (struct grub_console_term.getcolor): New variable.
5350 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
5351 (struct grub_console_term.getcolor): New variable.
5353 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
5354 (struct grub_console_term.setcolor): Remove variable.
5355 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
5356 (struct grub_console_term.setcolor): Remove variable.
5357 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
5358 (struct grub_console_term.setcolor): Remove variable.
5359 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
5360 (struct grub_console_term.setcolor): Remove variable.
5362 2007-12-25 Robert Millan <rmh@aybabtu.com>
5364 * configure.ac: Search for possible unifont.hex locations, and
5365 define UNIFONT_HEX if found.
5367 * Makefile.in (UNIFONT_HEX): Define variable.
5368 (DATA): Rename to ...
5369 (PKGLIB): ... this. Update all users.
5370 (PKGDATA): New variable.
5371 (pkgdata_IMAGES): Rename to ...
5372 (pkglib_IMAGES): ... this. Update all users.
5373 (pkgdata_MODULES): Rename to ...
5374 (pkglib_MODULES): ... this. Update all users.
5375 (pkgdata_PROGRAMS): Rename to ...
5376 (pkglib_PROGRAMS): ... this. Update all users.
5377 (pkgdata_DATA): Rename to ...
5378 (pkglib_DATA): ... this. Update all users.
5379 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
5380 (unicode.pff, ascii.pff): New rules.
5381 (all-local): Add `$(PKGDATA)' dependency.
5382 (install-local): Process `$(PKGDATA)'.
5384 * util/update-grub_lib.in (font_path): Search for *.pff files in
5385 a few more locations, including `${pkgdata}'.
5387 2007-12-23 Robert Millan <rmh@aybabtu.com>
5389 Patch from Bean <bean123ch@gmail.com>:
5390 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
5393 2007-12-21 Bean <bean123ch@gmail.com>
5395 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
5396 (ntfscomp_mod_SOURCES): New variable.
5397 (ntfscomp_mod_CFLAGS): Likewise.
5398 (ntfscomp_mod_LDFLAGS): Likewise.
5400 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
5401 (grub_probe_SOURCES): Likewise.
5402 (grub_emu_SOURCES): Likewise.
5404 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5405 (grub_emu_SOURCES): Likewise.
5407 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5408 (grub_emu_SOURCES): Likewise.
5410 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5411 (grub_emu_SOURCES): Likewise.
5413 * fs/ntfs.c (grub_ntfscomp_func): New variable.
5414 (read_run_list): Renamed to grub_ntfs_read_run_list.
5415 (decomp_nextvcn): Moved to ntfscomp.c.
5416 (decomp_getch): Likewise.
5417 (decomp_get16): Likewise.
5418 (decomp_block): Likewise.
5419 (read_block): Likewise.
5420 (read_data): Partially moved to ntfscomp.c.
5421 (fixup): Change unsigned to grub_uint16_t.
5422 (read_mft): Change unsigned long to grub_uint32_t.
5423 (read_attr): Likewise.
5424 (read_data): Likewise.
5425 (read_run_data): Likewise.
5426 (read_run_list): Likewise.
5427 (read_mft): Likewise.
5429 * fs/ntfscomp.c: New file.
5431 * include/grub/ntfs.h: New file.
5433 2007-12-16 Robert Millan <rmh@aybabtu.com>
5435 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
5436 IDE disk check, since Linux is known to support 20 IDE disks.
5437 Reported by Colin Watson.
5439 2007-12-15 Bean <bean123ch@gmail.com>
5441 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
5442 (lnxboot_img_SOURCES): New variable.
5443 (lnxboot_img_ASFLAGS): Likewise.
5444 (lnxboot_img_LDFLAGS): Likewise.
5446 * boot/i386/pc/lnxboot.S: New file.
5448 2007-11-24 Pavel Roskin <proski@gnu.org>
5450 * configure.ac: Test if '--build-id=none' is supported by the
5451 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
5452 objcopy to generate incorrect binary files (binutils
5453 2.17.50.0.18-1 as shipped by Fedora 8).
5454 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
5455 linking, so that build ID doesn't break the test.
5457 2007-11-24 Pavel Roskin <proski@gnu.org>
5459 * include/grub/i386/time.h: use "void" in the argument list
5461 * include/grub/powerpc/time.h: Likewise.
5462 * include/grub/sparc64/time.h: Likewise.
5464 2007-11-18 Christian Franke <franke@computer.org>
5466 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
5467 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
5468 This fixes the problem that function keys did not work in grub-emu.
5470 2007-11-18 Christian Franke <franke@computer.org>
5472 * disk/host.c (grub_host_open): Remove attribute unused from
5473 name parameter. Add check for "host". This fixes the problem
5474 that grub-emu does not find partitions.
5476 2007-11-18 Christian Franke <franke@computer.org>
5478 * util/hostfs.c (is_dir): New function.
5479 (grub_hostfs_dir): Handle missing dirent.d_type case.
5480 (grub_hostfs_read): Add missing fseek().
5481 (grub_hostfs_label): Clear label pointer. This fixes a crash
5482 of grub-emu on "ls (host)".
5484 2007-11-18 Christian Franke <franke@computer.org>
5486 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
5487 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
5488 to 64 bit boundary by default.
5490 2007-11-18 Bean <bean123ch@gmail.com>
5492 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
5493 (hexdump_mod_SOURCES): New variable.
5494 (hexdump_mod_CFLAGS): Likewise.
5495 (hexdump_mod_LDFLAGS): Likewise.
5497 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5499 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5501 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5503 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5505 * include/grub/hexdump.h: New file.
5507 * commands/hexdump.c: New file.
5509 2007-11-10 Robert Millan <rmh@aybabtu.com>
5511 * commands/i386/pc/play.c (beep_off): Switch order of arguments
5512 in grub_outb() calls.
5513 (beep_on): Likewise.
5515 2007-11-10 Christian Franke <franke@computer.org>
5517 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
5518 (grub_menu_run): Likewise.
5520 2007-11-10 Robert Millan <rmh@aybabtu.com>
5522 * include/grub/i386/efi/machine.h: New file.
5523 * include/grub/i386/linuxbios/machine.h: Likewise.
5524 * include/grub/i386/pc/machine.h: Likewise.
5525 * include/grub/powerpc/ieee1275/machine.h: Likewise.
5526 * include/grub/sparc64/ieee1275/machine.h: Likewise.
5528 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
5529 (serial_hw_io_addr): New variable.
5530 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
5531 instead of `(unsigned short *) 0x400'.
5533 2007-11-10 Bean <bean123ch@gmail.com>
5535 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
5537 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5539 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
5540 (vga_mod_SOURCES): Added.
5541 (vga_mod_CFLAGS): Likewise.
5542 (vga_mod_LDFLAGS): Likewise.
5544 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
5546 (set_map_mask): Likewise.
5547 (set_read_map): Likewise.
5548 (set_read_address): Likewise.
5549 (vga_font): Removed variable.
5550 (get_vga_glyph): Removed function.
5551 (invalidate_char): Likewise.
5552 (write_char): Changed to use grub_font_get_glyph() for font
5554 (grub_vga_putchar): Likewise.
5555 (grub_vga_getcharwidth): Likewise.
5557 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5559 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
5561 (pxeboot_img_LDFLAGS): Likewise.
5562 (diskboot_img_LDFLAGS): Likewise.
5563 (kernel_img_LDFLAGS): Likewise.
5565 2007-11-06 Robert Millan <rmh@aybabtu.com>
5567 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
5568 in grub_outb() calls.
5569 (serial_hw_init): Likewise.
5571 2007-11-05 Robert Millan <rmh@aybabtu.com>
5573 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
5574 spaces. Skip non-regular files.
5576 2007-11-05 Robert Millan <rmh@aybabtu.com>
5578 * kern/disk.c (grub_disk_firmware_fini)
5579 (grub_disk_firmware_is_tainted): New variables.
5581 * include/grub/disk.h (grub_disk_firmware_fini)
5582 (grub_disk_firmware_is_tainted): Likewise.
5584 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
5585 (grub_disk_biosdisk_fini): ... to here.
5586 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
5587 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
5588 is set. Register grub_disk_biosdisk_fini() in
5589 `grub_disk_firmware_fini'.
5591 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
5592 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
5593 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
5594 to finish existing firmware disk interface.
5596 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
5597 (ata_mod_SOURCES): New variable.
5598 (ata_mod_CFLAGS): Likewise.
5599 (ata_mod_LDFLAGS): Likewise.
5601 2007-11-05 Robert Millan <rmh@aybabtu.com>
5603 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
5604 (grub_ata_wait): Reimplement using grub_millisleep().
5606 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
5607 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
5609 2007-11-03 Marco Gerards <marco@gnu.org>
5611 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
5612 (CRTC_ADDR_PORT): New macro.
5613 (CRTC_DATA_PORT): Likewise.
5614 (CRTC_CURSOR): Likewise.
5615 (CRTC_CURSOR_ADDR_HIGH): Likewise.
5616 (CRTC_CURSOR_ADDR_LOW): Likewise.
5617 (update_cursor): New function.
5618 (grub_console_real_putchar): Call `update_cursor'.
5619 (grub_console_gotoxy): Likewise.
5620 (grub_console_cls): Set the default color when clearing the
5622 (grub_console_setcursor): Implemented.
5624 2007-11-03 Marco Gerards <marco@gnu.org>
5626 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
5628 (grub_ata_pio_write): Likewise.
5630 (grub_atapi_identify): Wait after issuing an ATA command.
5631 (grub_atapi_packet): Likewise.
5632 (grub_ata_identify): Likewise.
5633 (grub_ata_readwrite): Likewise.
5635 2007-11-03 Marco Gerards <marco@gnu.org>
5637 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
5638 (grub_ata_pio_write): Likewise.
5639 (grub_ata_readwrite): Use `grub_error', instead of
5640 returning `grub_errno'.
5642 2007-11-03 Marco Gerards <marco@gnu.org>
5644 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
5645 grub_ata_pio_write once for every single sector, instead of for
5648 2007-10-31 Robert Millan <rmh@aybabtu.com>
5650 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
5652 * conf/i386-linuxbios.rmk: New file.
5654 * kern/i386/pc/hardware.c: Likewise.
5655 * term/i386/pc/at_keyboard.c: Likewise.
5656 * term/i386/pc/vga_text.c: Likewise.
5658 * include/grub/i386/linuxbios/boot.h: Likewise.
5659 * include/grub/i386/linuxbios/console.h: Likewise.
5660 * include/grub/i386/linuxbios/init.h: Likewise.
5661 * include/grub/i386/linuxbios/kernel.h: Likewise.
5662 * include/grub/i386/linuxbios/loader.h: Likewise.
5663 * include/grub/i386/linuxbios/memory.h: Likewise.
5664 * include/grub/i386/linuxbios/serial.h: Likewise.
5665 * include/grub/i386/linuxbios/time.h: Likewise.
5667 * kern/i386/linuxbios/init.c: Likewise.
5668 * kern/i386/linuxbios/startup.S: Likewise.
5669 * kern/i386/linuxbios/table.c: Likewise.
5671 2007-10-31 Marco Gerards <marco@gnu.org>
5673 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
5674 (ata_mod_SOURCES): New variable.
5675 (ata_mod_CFLAGS): Likewise.
5676 (ata_mod_LDFLAGS): Likewise.
5678 * disk/ata.c: New file.
5680 * include/grub/disk.h (grub_disk_dev_id): Add
5681 `GRUB_DISK_DEV_ATA_ID'.
5683 2007-10-31 Robert Millan <rmh@aybabtu.com>
5685 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
5686 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
5688 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
5689 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
5691 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
5694 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
5696 2007-10-27 Robert Millan <rmh@aybabtu.com>
5698 * include/grub/types.h (ULONG_MAX): Define macro.
5700 2007-10-22 Robert Millan <rmh@aybabtu.com>
5702 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
5704 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
5706 2007-10-22 Robert Millan <rmh@aybabtu.com>
5708 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
5709 (pkgdata_MODULES): Add `biosdisk.mod'.
5710 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
5713 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
5714 (grub_biosdisk_init): Replace with ...
5715 (GRUB_MOD_INIT(biosdisk)): ... this.
5716 (grub_biosdisk_fini): Replace with ...
5717 (GRUB_MOD_FINI(biosdisk)): ... this.
5719 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
5720 (grub_machine_init): Remove call to grub_biosdisk_init().
5721 (grub_machine_fini): Remove call to grub_machine_fini().
5723 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
5725 2007-10-22 Robert Millan <rmh@aybabtu.com>
5727 * include/grub/time.h: New file.
5728 * include/grub/i386/time.h: Likewise.
5729 * include/grub/powerpc/time.h: Likewise.
5730 * include/grub/sparc64/time.h: Likewise.
5732 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
5734 (KERNEL_MACHINE_TIME_HEADER): ... this.
5735 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5737 (KERNEL_MACHINE_TIME_HEADER): ... this.
5738 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5740 (KERNEL_MACHINE_TIME_HEADER): ... this.
5742 * kern/i386/efi/init.c: Include `<grub/time.h>'.
5743 (grub_millisleep): New function.
5744 * kern/i386/pc/init.c: Include `<grub/time.h>'.
5745 (grub_millisleep): New function.
5746 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
5747 Remove `grub/machine/time.h' include.
5748 (grub_millisleep): New function.
5749 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
5750 Remove `grub/machine/time.h' include.
5751 (grub_millisleep): New function.
5753 * include/grub/misc.h (grub_div_roundup): New function.
5755 * kern/misc.c: Include `<grub/time.h>'.
5756 (grub_millisleep_generic): New function.
5758 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
5760 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
5762 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
5763 `machine/time.h'. Add `time.h'.
5764 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5766 2007-10-21 Robert Millan <rmh@aybabtu.com>
5768 * include/grub/misc.h (grub_max): New function.
5770 2007-10-21 Robert Millan <rmh@aybabtu.com>
5772 * util/misc.c (grub_util_info): Call fflush() before returning.
5774 2007-10-20 Robert Millan <rmh@aybabtu.com>
5776 * genmk.rb (Image): Copy `extra_flags' from here ...
5777 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
5779 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
5780 to `argc' and `args' arguments.
5782 2007-10-17 Robert Millan <rmh@aybabtu.com>
5784 * kern/i386/loader.S: New file.
5786 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
5787 * kern/i386/loader.S (grub_linux_prot_size)... to here.
5788 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
5789 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
5790 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
5791 * kern/i386/loader.S (grub_linux_real_addr)... to here.
5792 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
5793 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
5794 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
5795 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
5796 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
5797 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
5798 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
5799 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
5801 * kern/i386/realmode.S: New file.
5803 * kern/i386/pc/startup.S (protstack): Moved from here ...
5804 * kern/i386/realmode.S (protstack)... to here.
5805 * kern/i386/pc/startup.S (gdt): Moved from here ...
5806 * kern/i386/realmode.S (gdt)... to here.
5807 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
5808 * kern/i386/realmode.S (prot_to_real)... to here.
5810 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
5811 `kern/i386/realmode.S'.
5813 2007-10-17 Robert Millan <rmh@aybabtu.com>
5815 * include/grub/i386/loader.h: New file.
5817 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
5818 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5819 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5820 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5821 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
5822 * include/grub/i386/loader.h (grub_linux_prot_size)
5823 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5824 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5825 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5826 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
5828 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
5830 2007-10-15 Robert Millan <rmh@aybabtu.com>
5832 * normal/misc.c (grub_normal_print_device_info): Do not probe for
5833 filesystem when dev->disk is unset.
5834 Do probe for filesystem even when dev->disk->has_partitions is set.
5835 In case a filesystem is found, always report it.
5836 In case it isn't, if dev->disk->has_partitions is set, report that
5837 a partition table was found instead of reporting that no filesystem
5838 could be identified.
5840 2007-10-12 Robert Millan <rmh@aybabtu.com>
5842 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
5843 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
5845 * include/grub/types.h (grub_host_to_target16): New macro.
5846 (grub_host_to_target32): Likewise.
5847 (grub_host_to_target64): Likewise.
5848 (grub_target_to_host16): Likewise.
5849 (grub_target_to_host32): Likewise.
5850 (grub_target_to_host64): Likewise.
5852 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5854 (GRUB_MOD_ALIGN): ...this. Update all users.
5856 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
5857 grub_host_to_target32.
5858 Replace grub_be_to_cpu32 with grub_target_to_host32.
5859 (load_modules): Likewise.
5860 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
5861 Replace grub_be_to_cpu32 with grub_target_to_host32.
5862 Replace grub_cpu_to_be16 with grub_host_to_target16.
5863 Replace grub_cpu_to_be32 grub_host_to_target32.
5865 2007-10-12 Robert Millan <rmh@aybabtu.com>
5867 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
5868 * util/elf/grub-mkimage.c: ... here.
5870 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
5871 `util/powerpc/ieee1275/grub-mkimage.c'.
5873 2007-10-07 Robert Millan <rmh@aybabtu.com>
5875 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
5876 and make it easier to figure out.
5877 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
5878 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
5879 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
5880 leave us with less than HEAP_MIN_SIZE total heap.
5881 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
5883 2007-10-03 Robert Millan <rmh@aybabtu.com>
5885 * include/grub/i386/io.h: New file.
5886 * commands/i386/pc/play.c (inb): Removed.
5888 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5890 * term/i386/pc/serial.c (inb): Removed.
5892 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5894 * term/i386/pc/vga.c (inb): Removed.
5896 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5899 2007-10-02 Robert Millan <rmh@aybabtu.com>
5901 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
5902 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5903 Reported by Marcin Kurek.
5905 2007-09-07 Robert Millan <rmh@aybabtu.com>
5907 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
5908 SmartFirmware version updates (as released by Sven Luther), and avoid
5909 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
5910 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
5913 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5916 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
5917 when merging two regions.
5919 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5921 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
5922 * normal/completion.c (grub_normal_do_completion): Likewise.
5923 Reported by Hitoshi Ozeki.
5925 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5927 Do not use devices at boot in chainloading.
5929 * loader/i386/pc/chainloader.c (boot_drive): New variable.
5930 (boot_part_addr): Likewise.
5931 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
5932 with BOOT_DRIVE and BOOT_PART_ADDR.
5933 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
5934 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
5936 2007-08-29 Robert Millan <rmh@aybabtu.com>
5938 Patch from Simon Peter <dn.tlp@gmx.net>:
5939 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
5940 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
5941 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
5942 util/i386/pc/grub-setup.c_DEPENDENCIES.
5943 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
5944 util/grub-probe.c_DEPENDENCIES.
5945 * conf/powerpc-ieee1275.rmk: Likewise.
5947 2007-08-28 Robert Millan <rmh@aybabtu.com>
5949 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
5950 to tell grub-mkdevicemap how to name devices.
5951 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
5954 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
5955 util/i386/get_disk_name.c.
5956 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
5957 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
5958 util/ieee1275/get_disk_name.c.
5960 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
5962 * DISTLIST: Add util/i386/get_disk_name.c and
5963 util/ieee1275/get_disk_name.c.
5965 * util/grub-mkdevicemap.c: Replace device naming logic with
5966 grub_util_get_disk_name() calls.
5968 2007-08-20 Robert Millan <rmh@aybabtu.com>
5970 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
5971 (so that it works for both plural and singular quantities).
5973 2007-08-05 Robert Millan <rmh@aybabtu.com>
5975 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
5976 so that [xz] isn't taken into account when determining order.
5978 2007-08-02 Marco Gerards <marco@gnu.org>
5980 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
5981 `include/multiboot2.h', `include/grub/elfload.h',
5982 `include/multiboot.h', `include/grub/multiboot.h',
5983 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
5984 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
5985 `kern/elf.c', `loader/multiboot_loader.c',
5986 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
5987 `loader/i386/pc/multiboot2.c',
5988 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
5989 `util/i386/pc/grub-mkrescue.in'. Remove
5990 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
5991 `include/grub/i386/pc/util/biosdisk.h' and
5992 `include/grub/powerpc/ieee1275/multiboot.h'.
5994 2007-08-02 Bean <bean123ch@gmail.com>
5996 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
5997 (ntfs_mod_SOURCES): New variable.
5998 (ntfs_mod_CFLAGS): Likewise.
5999 (ntfs_mod_LDFLAGS): Likewise.
6001 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
6002 (grub_probe_SOURCES): Likewise.
6003 (grub_emu_SOURCES): Likewise.
6005 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6006 (grub_emu_SOURCES): Likewise.
6008 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
6009 (grub_emu_SOURCES): Likewise.
6011 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
6013 * fs/ntfs.c: New file.
6015 2007-08-02 Bean <bean123ch@gmail.com>
6017 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
6019 * file.h (grub_file): Likewise.
6021 * fshelp.h (grub_fshelp_read_file): Likewise.
6023 * util/i386/pc/grub-setup.c (setup): Likewise.
6024 (save_first_sector): Likewise.
6025 (save_blocklists): Likewise.
6027 * fs/affs.c (grub_affs_read_file): Likewise.
6029 * fs/ext2.c (grub_ext2_read_file): Likewise.
6031 * fs/fat.c (grub_fat_read_data): Likewise.
6033 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
6035 * fs/hfs.c (grub_hfs_read_file): Likewise.
6037 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6039 * fs/jfs.c (grub_jfs_read_file): Likewise.
6041 * fs/minix.c (grub_minix_read_file): Likewise.
6043 * fs/sfs.c (grub_sfs_read_file): Likewise.
6045 * fs/ufs.c (grub_ufs_read_file): Likewise.
6047 * fs/xfs.c (grub_xfs_read_file): Likewise.
6049 * command/blocklist.c (read_blocklist): Likewise.
6050 (print_blocklist): Likewise.
6052 2007-08-02 Marco Gerards <marco@gnu.org>
6054 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
6057 * disk/host.c: New file.
6059 * util/hostfs.c: Likewise.
6061 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
6062 return `GRUB_ERR_BAD_FS'.
6063 * fs/sfs.c (grub_sfs_mount): Likewise.
6064 * fs/xfs.c (grub_xfs_mount): Likewise.
6066 * include/grub/disk.h (enum grub_disk_dev_id): Add
6067 `GRUB_DISK_DEVICE_HOST_ID'.
6069 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
6071 2007-07-24 Jerone Young <jerone@gmail.com>
6073 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
6074 modules for compilation.
6075 * conf/powerpc-ieee1275.rmk: Likewise.
6077 * include/multiboot.h: Move multiboot definitions to one file. Rename
6078 many definitions to not get grub specific.
6079 * include/multiboot2.h: Create header with multiboot 2 definitions.
6080 * include/grub/multiboot.h: Header for grub specific function
6081 prototypes and definitions.
6082 * include/grub/multiboot2.h: Likewise.
6083 * include/grub/multiboot_loader.h: Likewise.
6084 * include/grub/i386/pc/multiboot.h: Removed.
6085 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
6087 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
6088 and 2 to allow for one multiboot and module commands.
6089 * loader/multiboot2.c: Add multiboot2 functionality.
6090 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
6091 and definition names.
6092 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
6094 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
6095 ieee1275 specific multiboot2 code.
6097 * kern/i386/pc/startup.S: Change headers and definition names for
6098 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
6100 2007-07-22 Robert Millan <rmh@aybabtu.com>
6102 * geninitheader.sh: Process file specified in first parameter rather
6103 than hardcoding grub_modules_init.lst.
6104 * geninit.sh: Likewise. Also, construct header name dynamically rather
6105 than hardcoding grub_modules_init.h.
6107 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
6108 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
6109 grub_probe_init.[ch] and grub_setup_init.[ch].
6111 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
6112 grub_modules_init.h with grub_emu_init.h.
6113 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
6114 grub_probe_init.[ch] files.
6115 * conf/i386-efi.rmk: Likewise.
6116 * conf/i386-pc.rmk: Likewise.
6117 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
6118 grub_setup_init.[ch] files.
6120 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
6121 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
6122 to initialize modules rather than a list of hardcoded functions.
6123 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
6124 grub_init_all() to initialize modules rather than a list of hardcoded
6127 2007-07-22 Robert Millan <rmh@aybabtu.com>
6129 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
6130 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
6132 2007-07-22 Robert Millan <rmh@aybabtu.com>
6134 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6135 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
6136 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
6137 flag when running on SmartFirmware.
6138 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
6139 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
6142 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6143 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
6144 rather than decreasing it.
6146 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
6147 there's not enough space to do it, fail in the same way as when it
6148 can't be done because there are no partitions.
6150 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
6151 when nvsetenv failed.
6153 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6155 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
6156 because this rule is automatically generated.
6157 (grub-mkrescue): Removed for the same reason as above.
6159 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6161 Migrate to GNU General Public License Version 3.
6163 * COPYING: Replaced with the plain text version of GPLv3.
6165 * config.guess: Updated from gnulib.
6166 * config.sub: Likewise.
6168 * geninit.sh: Output a GPLv3 copyright notice.
6169 * geninitheader.sh: Likewise.
6170 * genmodsrc.sh: Likewise.
6171 * gensymlist.sh.in: Likewise.
6173 * boot/i386/pc/boot.S: Upgraded to GPLv3.
6174 * boot/i386/pc/diskboot.S: Likewise.
6175 * boot/i386/pc/pxeboot.S: Likewise.
6176 * commands/blocklist.c: Likewise.
6177 * commands/boot.c: Likewise.
6178 * commands/cat.c: Likewise.
6179 * commands/cmp.c: Likewise.
6180 * commands/configfile.c: Likewise.
6181 * commands/echo.c: Likewise.
6182 * commands/help.c: Likewise.
6183 * commands/ls.c: Likewise.
6184 * commands/search.c: Likewise.
6185 * commands/terminal.c: Likewise.
6186 * commands/test.c: Likewise.
6187 * commands/videotest.c: Likewise.
6188 * commands/i386/cpuid.c: Likewise.
6189 * commands/i386/pc/halt.c: Likewise.
6190 * commands/i386/pc/play.c: Likewise.
6191 * commands/i386/pc/reboot.c: Likewise.
6192 * commands/i386/pc/vbeinfo.c: Likewise.
6193 * commands/i386/pc/vbetest.c: Likewise.
6194 * commands/ieee1275/halt.c: Likewise.
6195 * commands/ieee1275/reboot.c: Likewise.
6196 * commands/ieee1275/suspend.c: Likewise.
6197 * disk/loopback.c: Likewise.
6198 * disk/lvm.c: Likewise.
6199 * disk/raid.c: Likewise.
6200 * disk/efi/efidisk.c: Likewise.
6201 * disk/i386/pc/biosdisk.c: Likewise.
6202 * disk/ieee1275/ofdisk.c: Likewise.
6203 * font/manager.c: Likewise.
6204 * fs/affs.c: Likewise.
6205 * fs/ext2.c: Likewise.
6206 * fs/fat.c: Likewise.
6207 * fs/fshelp.c: Likewise.
6208 * fs/hfs.c: Likewise.
6209 * fs/hfsplus.c: Likewise.
6210 * fs/iso9660.c: Likewise.
6211 * fs/jfs.c: Likewise.
6212 * fs/minix.c: Likewise.
6213 * fs/sfs.c: Likewise.
6214 * fs/ufs.c: Likewise.
6215 * fs/xfs.c: Likewise.
6216 * hello/hello.c: Likewise.
6217 * include/grub/acorn_filecore.h: Likewise.
6218 * include/grub/arg.h: Likewise.
6219 * include/grub/bitmap.h: Likewise.
6220 * include/grub/boot.h: Likewise.
6221 * include/grub/cache.h: Likewise.
6222 * include/grub/device.h: Likewise.
6223 * include/grub/disk.h: Likewise.
6224 * include/grub/dl.h: Likewise.
6225 * include/grub/elfload.h: Likewise.
6226 * include/grub/env.h: Likewise.
6227 * include/grub/err.h: Likewise.
6228 * include/grub/file.h: Likewise.
6229 * include/grub/font.h: Likewise.
6230 * include/grub/fs.h: Likewise.
6231 * include/grub/fshelp.h: Likewise.
6232 * include/grub/gzio.h: Likewise.
6233 * include/grub/hfs.h: Likewise.
6234 * include/grub/kernel.h: Likewise.
6235 * include/grub/loader.h: Likewise.
6236 * include/grub/lvm.h: Likewise.
6237 * include/grub/misc.h: Likewise.
6238 * include/grub/mm.h: Likewise.
6239 * include/grub/net.h: Likewise.
6240 * include/grub/normal.h: Likewise.
6241 * include/grub/parser.h: Likewise.
6242 * include/grub/partition.h: Likewise.
6243 * include/grub/pc_partition.h: Likewise.
6244 * include/grub/raid.h: Likewise.
6245 * include/grub/rescue.h: Likewise.
6246 * include/grub/script.h: Likewise.
6247 * include/grub/setjmp.h: Likewise.
6248 * include/grub/symbol.h: Likewise.
6249 * include/grub/term.h: Likewise.
6250 * include/grub/terminfo.h: Likewise.
6251 * include/grub/tparm.h: Likewise.
6252 * include/grub/types.h: Likewise.
6253 * include/grub/video.h: Likewise.
6254 * include/grub/efi/api.h: Likewise.
6255 * include/grub/efi/chainloader.h: Likewise.
6256 * include/grub/efi/console.h: Likewise.
6257 * include/grub/efi/console_control.h: Likewise.
6258 * include/grub/efi/disk.h: Likewise.
6259 * include/grub/efi/efi.h: Likewise.
6260 * include/grub/efi/pe32.h: Likewise.
6261 * include/grub/efi/time.h: Likewise.
6262 * include/grub/i386/linux.h: Likewise.
6263 * include/grub/i386/setjmp.h: Likewise.
6264 * include/grub/i386/types.h: Likewise.
6265 * include/grub/i386/efi/kernel.h: Likewise.
6266 * include/grub/i386/efi/loader.h: Likewise.
6267 * include/grub/i386/efi/time.h: Likewise.
6268 * include/grub/i386/pc/biosdisk.h: Likewise.
6269 * include/grub/i386/pc/boot.h: Likewise.
6270 * include/grub/i386/pc/chainloader.h: Likewise.
6271 * include/grub/i386/pc/console.h: Likewise.
6272 * include/grub/i386/pc/init.h: Likewise.
6273 * include/grub/i386/pc/kernel.h: Likewise.
6274 * include/grub/i386/pc/loader.h: Likewise.
6275 * include/grub/i386/pc/memory.h: Likewise.
6276 * include/grub/i386/pc/multiboot.h: Likewise.
6277 * include/grub/i386/pc/serial.h: Likewise.
6278 * include/grub/i386/pc/time.h: Likewise.
6279 * include/grub/i386/pc/vbe.h: Likewise.
6280 * include/grub/i386/pc/vbeblit.h: Likewise.
6281 * include/grub/i386/pc/vbefill.h: Likewise.
6282 * include/grub/i386/pc/vbeutil.h: Likewise.
6283 * include/grub/i386/pc/vga.h: Likewise.
6284 * include/grub/ieee1275/ieee1275.h: Likewise.
6285 * include/grub/ieee1275/ofdisk.h: Likewise.
6286 * include/grub/powerpc/libgcc.h: Likewise.
6287 * include/grub/powerpc/setjmp.h: Likewise.
6288 * include/grub/powerpc/types.h: Likewise.
6289 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
6290 * include/grub/powerpc/ieee1275/console.h: Likewise.
6291 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
6292 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
6293 * include/grub/powerpc/ieee1275/loader.h: Likewise.
6294 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
6295 * include/grub/powerpc/ieee1275/time.h: Likewise.
6296 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
6297 * include/grub/sparc64/libgcc.h: Likewise.
6298 * include/grub/sparc64/setjmp.h: Likewise.
6299 * include/grub/sparc64/types.h: Likewise.
6300 * include/grub/sparc64/ieee1275/console.h: Likewise.
6301 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6302 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6303 * include/grub/sparc64/ieee1275/time.h: Likewise.
6304 * include/grub/util/biosdisk.h: Likewise.
6305 * include/grub/util/getroot.h: Likewise.
6306 * include/grub/util/lvm.h: Likewise.
6307 * include/grub/util/misc.h: Likewise.
6308 * include/grub/util/raid.h: Likewise.
6309 * include/grub/util/resolve.h: Likewise.
6310 * io/gzio.c: Likewise.
6311 * kern/device.c: Likewise.
6312 * kern/disk.c: Likewise.
6313 * kern/dl.c: Likewise.
6314 * kern/elf.c: Likewise.
6315 * kern/env.c: Likewise.
6316 * kern/err.c: Likewise.
6317 * kern/file.c: Likewise.
6318 * kern/fs.c: Likewise.
6319 * kern/loader.c: Likewise.
6320 * kern/main.c: Likewise.
6321 * kern/misc.c: Likewise.
6322 * kern/mm.c: Likewise.
6323 * kern/parser.c: Likewise.
6324 * kern/partition.c: Likewise.
6325 * kern/rescue.c: Likewise.
6326 * kern/term.c: Likewise.
6327 * kern/efi/efi.c: Likewise.
6328 * kern/efi/init.c: Likewise.
6329 * kern/efi/mm.c: Likewise.
6330 * kern/i386/dl.c: Likewise.
6331 * kern/i386/efi/init.c: Likewise.
6332 * kern/i386/efi/startup.S: Likewise.
6333 * kern/i386/pc/init.c: Likewise.
6334 * kern/i386/pc/lzo1x.S: Likewise.
6335 * kern/i386/pc/startup.S: Likewise.
6336 * kern/ieee1275/ieee1275.c: Likewise.
6337 * kern/powerpc/cache.S: Likewise.
6338 * kern/powerpc/dl.c: Likewise.
6339 * kern/powerpc/ieee1275/cmain.c: Likewise.
6340 * kern/powerpc/ieee1275/crt0.S: Likewise.
6341 * kern/powerpc/ieee1275/init.c: Likewise.
6342 * kern/powerpc/ieee1275/openfw.c: Likewise.
6343 * kern/sparc64/cache.S: Likewise.
6344 * kern/sparc64/dl.c: Likewise.
6345 * kern/sparc64/ieee1275/init.c: Likewise.
6346 * kern/sparc64/ieee1275/openfw.c: Likewise.
6347 * loader/efi/chainloader.c: Likewise.
6348 * loader/efi/chainloader_normal.c: Likewise.
6349 * loader/i386/efi/linux.c: Likewise.
6350 * loader/i386/efi/linux_normal.c: Likewise.
6351 * loader/i386/pc/chainloader.c: Likewise.
6352 * loader/i386/pc/chainloader_normal.c: Likewise.
6353 * loader/i386/pc/linux.c: Likewise.
6354 * loader/i386/pc/linux_normal.c: Likewise.
6355 * loader/i386/pc/multiboot.c: Likewise.
6356 * loader/i386/pc/multiboot_normal.c: Likewise.
6357 * loader/powerpc/ieee1275/linux.c: Likewise.
6358 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6359 * normal/arg.c: Likewise.
6360 * normal/cmdline.c: Likewise.
6361 * normal/command.c: Likewise.
6362 * normal/completion.c: Likewise.
6363 * normal/execute.c: Likewise.
6364 * normal/function.c: Likewise.
6365 * normal/lexer.c: Likewise.
6366 * normal/main.c: Likewise.
6367 * normal/menu.c: Likewise.
6368 * normal/menu_entry.c: Likewise.
6369 * normal/misc.c: Likewise.
6370 * normal/parser.y: Likewise.
6371 * normal/script.c: Likewise.
6372 * normal/i386/setjmp.S: Likewise.
6373 * normal/powerpc/setjmp.S: Likewise.
6374 * normal/sparc64/setjmp.S: Likewise.
6375 * partmap/acorn.c: Likewise.
6376 * partmap/amiga.c: Likewise.
6377 * partmap/apple.c: Likewise.
6378 * partmap/gpt.c: Likewise.
6379 * partmap/pc.c: Likewise.
6380 * partmap/sun.c: Likewise.
6381 * term/gfxterm.c: Likewise.
6382 * term/terminfo.c: Likewise.
6383 * term/efi/console.c: Likewise.
6384 * term/i386/pc/console.c: Likewise.
6385 * term/i386/pc/serial.c: Likewise.
6386 * term/i386/pc/vesafb.c: Likewise.
6387 * term/i386/pc/vga.c: Likewise.
6388 * term/ieee1275/ofconsole.c: Likewise.
6389 * util/biosdisk.c: Likewise.
6390 * util/console.c: Likewise.
6391 * util/genmoddep.c: Likewise.
6392 * util/getroot.c: Likewise.
6393 * util/grub-emu.c: Likewise.
6394 * util/grub-mkdevicemap.c: Likewise.
6395 * util/grub-probe.c: Likewise.
6396 * util/lvm.c: Likewise.
6397 * util/misc.c: Likewise.
6398 * util/raid.c: Likewise.
6399 * util/resolve.c: Likewise.
6400 * util/update-grub.in: Likewise.
6401 * util/update-grub_lib.in: Likewise.
6402 * util/grub.d/00_header.in: Likewise.
6403 * util/grub.d/10_hurd.in: Likewise.
6404 * util/grub.d/10_linux.in: Likewise.
6405 * util/i386/efi/grub-install.in: Likewise.
6406 * util/i386/efi/grub-mkimage.c: Likewise.
6407 * util/i386/pc/grub-install.in: Likewise.
6408 * util/i386/pc/grub-mkimage.c: Likewise.
6409 * util/i386/pc/grub-mkrescue.in: Likewise.
6410 * util/i386/pc/grub-setup.c: Likewise.
6411 * util/i386/pc/misc.c: Likewise.
6412 * util/powerpc/ieee1275/grub-install.in: Likewise.
6413 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
6414 * util/powerpc/ieee1275/misc.c: Likewise.
6415 * video/bitmap.c: Likewise.
6416 * video/video.c: Likewise.
6417 * video/i386/pc/vbe.c: Likewise.
6418 * video/i386/pc/vbeblit.c: Likewise.
6419 * video/i386/pc/vbefill.c: Likewise.
6420 * video/i386/pc/vbeutil.c: Likewise.
6421 * video/readers/tga.c: Likewise.
6423 2007-07-02 Robert Millan <rmh@aybabtu.com>
6425 * conf/i386-efi.rmk: Replace obsolete reference to
6426 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
6427 with util/getroot.c.
6428 * conf/powerpc-ieee1275.rmk: Likewise.
6429 * conf/sparc64-ieee1275.rmk: Likewise.
6431 * util/grub-emu.c (main): Fix unchecked pointer handling.
6433 2007-07-02 Robert Millan <rmh@aybabtu.com>
6435 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
6436 invocation to fail, in order to support partition-less media.
6438 * util/i386/pc/grub-install.in: Likewise.
6440 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
6441 which fs or partmap modules are needed (akin to its sister scripts).
6443 Also use grub-probe to get rid of unportable /proc/mounts check.
6445 Print the same informational message that the other scripts do, before
6448 2007-06-23 Robert Millan <rmh@aybabtu.com>
6450 * util/update-grub_lib.in (font_path): New function. Determine whether
6451 a font file can be found and, if so, echo the GRUB path to it.
6453 * util/update-grub.in: Handle multiple terminals depending on user
6454 input, platform availability and font file presence. Propagate
6455 variables of our findings to /etc/grub.d/ children.
6457 * util/grub.d/00_header.in: Handle multiple terminals, based on
6458 environment setup by update-grub.
6460 2007-06-23 Robert Millan <rmh@aybabtu.com>
6462 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
6464 2007-06-21 Robert Millan <rmh@aybabtu.com>
6466 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
6467 indicate end of data section in kernel image.
6468 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
6469 GRUB_KERNEL_MACHINE_DATA_END.
6471 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
6473 * kern/i386/efi/startup.S: Likewise.
6475 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
6476 during image generation. Implement --prefix option to override this
6478 * util/i386/efi/grub-mkimage.c: Likewise.
6480 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
6481 code to make path relative to its root into a separate function.
6483 * util/i386/pc/grub-install.in: Use newly provided
6484 make_system_path_relative_to_its_root() to convert ${grubdir}, then
6485 pass the result to grub-install --prefix.
6487 2007-06-13 Robert Millan <rmh@aybabtu.com>
6489 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
6491 * util/grub-emu.c: Use above definitions from misc.h instead of
6493 * util/grub-mkdevicemap.c: Likewise.
6494 * util/i386/pc/grub-setup.c: Likewise.
6495 * util/grub-probe.c: Likewise.
6496 (probe): Abort with grub_util_error() when either
6497 grub_guess_root_device or grub_util_get_grub_dev fails.
6499 2007-06-12 Robert Millan <rmh@aybabtu.com>
6501 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
6503 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
6505 * util/grub-probe.c (probe): Likewise for "drive_name".
6507 2007-06-11 Robert Millan <rmh@aybabtu.com>
6509 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
6510 not just the cdrom one.
6512 2007-06-11 Robert Millan <rmh@aybabtu.com>
6514 * util/i386/pc/grub-mkrescue.in: Add "set -e".
6515 Add --pkglibdir=DIR option to override pkglibdir.
6516 Mention --image-type=TYPE in help output.
6517 Fix --grub-mkimage (it was a no-op).
6518 Abort gracefully when no parameter is given.
6520 2007-06-11 Robert Millan <rmh@aybabtu.com>
6522 * util/i386/pc/grub-mkrescue.in: New file.
6523 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
6524 * Makefile.in: Handle bin_SCRIPTS.
6526 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
6528 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
6529 list of video modes.
6531 2007-06-06 Robert Millan <rmh@aybabtu.com>
6533 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
6534 file doesn't exist, or if it is in a filesystem grub can't read.
6536 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
6537 not abort if GRUB_DRIVE could not be defined. Rearrange generated
6538 header comment to fit in 80 columns when the variables are resolved.
6540 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
6541 could be identified by update-grub. Remove redundant check for
6542 unifont.pff existence (since convert_system_path_to_grub_path now
6545 2007-06-04 Robert Millan <rmh@aybabtu.com>
6547 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
6549 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
6551 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
6553 2007-06-04 Robert Millan <rmh@aybabtu.com>
6555 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
6557 * include/grub/partition.h: Declare grub_apple_partition_map_init and
6558 grub_apple_partition_map_fini.
6561 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
6562 to access >2 TiB disks).
6564 Print disk->total_sectors with %llu instead of %lu, since this
6565 variable is always 64-bit (prevents wrong disk size from being displayed
6566 on either >2 TiB disk or big-endian CPU).
6568 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
6569 into a generic case that supports all (sane) partition maps.
6571 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
6574 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
6575 and grub_apple_partition_map_fini() after that.
6577 2007-06-01 Robert Millan <rmh@aybabtu.com>
6579 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
6581 * util/grub.d/00_header.in: Only enable gfxterm when
6582 convert_system_path_to_grub_path() succeeds.
6584 2007-05-20 Robert Millan <rmh@aybabtu.com>
6586 * util/update-grub_lib.in: New file.
6587 * DISTLIST: Add update-grub_lib.in.
6588 * conf/common.rmk: Generate update-grub_lib and install it in
6590 * Makefile.in: Add install routine for $(lib_DATA).
6592 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
6593 function provided by update-grub_lib to support arbitrary paths of
6595 * util/update-grub.in: Use convert_system_path_to_grub_path() to
6596 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
6598 2007-05-19 Robert Millan <rmh@aybabtu.com>
6600 * commands/i386/cpuid.c: New module.
6602 * conf/i386-efi.rmk: Enable cpuid.mod.
6603 * conf/i386-pc.rmk: Likewise.
6605 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6607 * kern/disk.c (grub_disk_read): Check return value of
6610 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6612 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
6614 * disk/raid.c (grub_raid_open): Likewise.
6616 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6618 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
6619 stack instead of on the heap.
6621 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
6622 before doing a read on it.
6624 * configure.ac: Only use -fno-stack-protector for the target
6627 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6629 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
6630 __attribute_ ((unused)) to mode_type argument.
6632 * util/getroot.c (grub_guess_root_device): Fix #endif.
6634 * kern/misc.c (memcmp): Fix prototype.
6636 * include/grub/partition.h [GRUB_UTIL]
6637 (grub_gpt_partition_map_init): Add prototype.
6638 (grub_gpt_partition_map_fini): Likewise.
6640 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
6643 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
6644 (grub_fat_read_data): Likewise.
6645 (grub_fat_find_dir): Likewise.
6647 * font/manager.c (find_glyph): Make table a const.
6648 (grub_font_get_glyph): Remove bitmap from if statement.
6650 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
6652 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
6653 code, first search for device in /dev/mapper, then in /dev.
6654 (grub_util_get_grub_dev): New function.
6655 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
6657 * util/grub-probe.c (probe): Remove check for RAID, call
6658 grub_util_get_grub_dev() instead of
6659 grub_util_biosdisk_get_grub_dev().
6660 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
6661 grub_util_biosdisk_get_grub_dev().
6662 * util/i386/pc/grub-setup.c (main): Likewise.
6664 2007-05-16 Robert Millan <rmh@aybabtu.com>
6666 * DISTLIST: Update for the latest changes.
6667 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
6668 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
6669 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
6670 grub/util/biosdisk.h.
6671 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
6672 grub/util/biosdisk.h.
6674 2007-05-16 Robert Millan <rmh@aybabtu.com>
6676 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
6678 2007-05-16 Robert Millan <rmh@aybabtu.com>
6680 * util/i386/efi/grub-install.in: New.
6681 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
6682 newly added grub-install.
6683 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
6685 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
6686 grub/util/biosdisk.h.
6687 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
6688 grub/util/biosdisk.h.
6690 2007-05-16 Robert Millan <rmh@aybabtu.com>
6692 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
6693 * include/grub/util/biosdisk.h: ... here.
6694 * util/i386/pc/biosdisk.c: Moved to ...
6695 * util/biosdisk.c: ... here.
6696 * util/i386/pc/getroot.c: Moved to ...
6697 * util/getroot.c: ... here.
6698 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
6699 * util/grub-mkdevicemap.c: ... here.
6700 * util/i386/pc/grub-probe.c: Moved to ...
6701 * util/grub-probe.c: ... here.
6703 2007-05-15 Robert Millan <rmh@aybabtu.com>
6705 * util/update-grub.in: Remove duplicated line in grub.cfg header
6708 2007-05-13 Robert Millan <rmh@aybabtu.com>
6710 * util/update-grub.in: Fix a few assumptions about the devices holding
6711 /, /boot and /boot/grub being the same.
6712 * util/grub.d/00_header.in: Likewise.
6713 * util/grub.d/10_hurd.in: Likewise.
6714 * util/grub.d/10_linux.in: Likewise.
6716 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
6717 patterns. Use that to define the `.old' suffix as older than `'.
6719 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
6721 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
6722 the grub.cfg header message.
6724 2007-05-11 Robert Millan <rmh@aybabtu.com>
6726 * util/update-grub.in: Create device.map if it doesn't already exist,
6727 before attempting to run grub-probe.
6728 Check for grub-probe and grub-mkdevicemap with the same code
6729 grub-install is using.
6732 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
6734 * Makefile.in: Add the datarootdir autoconf variable.
6736 2007-05-09 Robert Millan <rmh@aybabtu.com>
6738 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
6739 fail gracefully if dev->disk->partition == NULL.
6741 2007-05-07 Robert Millan <rmh@aybabtu.com>
6743 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
6744 determine partition map module.
6745 * util/i386/pc/grub-install.in: Use this feature to decide which
6746 partition module to load, instead of hardcoding pc and gpt.
6748 2007-05-07 Robert Millan <rmh@aybabtu.com>
6750 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
6751 source directory differs from build directory.
6753 2007-05-05 Robert Millan <rmh@aybabtu.com>
6755 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
6758 2007-05-05 Robert Millan <rmh@aybabtu.com>
6760 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
6762 2007-05-05 Robert Millan <rmh@aybabtu.com>
6764 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
6765 command-line arguments via ${GRUB_CMDLINE_LINUX}.
6767 2007-05-05 Robert Millan <rmh@aybabtu.com>
6769 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
6770 (grub_probe_SOURCES): Likewise.
6771 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
6772 GPT and initialize dos_part and bsd_part accordingly.
6773 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
6775 (main): Activate gpt module for use during partition identification,
6776 and deactivate it afterwards.
6777 * util/i386/pc/grub-install.in: Add gpt module to core.img.
6778 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
6779 partition identification, and deactivate it afterwards.
6781 2007-05-05 Robert Millan <rmh@aybabtu.com>
6783 * term/i386/pc/console.c (grub_console_fini): Call
6784 grub_term_set_current() before grub_term_unregister().
6786 2007-05-04 Robert Millan <rmh@aybabtu.com>
6788 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
6789 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
6790 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
6791 and update-grub_DATA.
6792 * conf/common.rmk: Build and install update-grub components.
6793 * conf/common.mk: Regenerate.
6794 * util/update-grub.in: New. Core of update-grub.
6795 * util/grub.d/00_header.in: New. Generates grub.cfg header.
6796 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
6797 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
6798 * util/grub.d/README: New. Document grub.d directory layout.
6800 2007-05-01 Robert Millan <rmh@aybabtu.com>
6802 * util/grub-emu.c: Move initialization functions
6803 grub_util_biosdisk_init() and grub_init_all() before
6804 grub_util_biosdisk_get_grub_dev(), which relies on them.
6806 2007-04-19 Robert Millan <rmh@aybabtu.com>
6808 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
6811 2007-04-18 Jerone Young <jerone@gmail.com>
6813 * kernel/elf.c: Add missing parenthesis for conditional statement
6816 2007-04-10 Jerone Young <jerone@gmail.com>
6818 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
6819 continue on and look for device node with real device name.
6821 2007-04-10 Jerone Young <jerone@gmail.com>
6823 * configure.ac: Add argument for autoconf to use transformation
6825 * Makefile.in: Add autoconf package transformation code.
6826 * util/i386/pc/grub-install.in: Likewise.
6827 * util/powerpc/ieee1275/grub-install.in: Likewise.
6829 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
6831 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
6832 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
6833 (EXT2_REVISION): Likewise.
6834 (EXT2_INODE_SIZE): Likewise.
6835 (struct grub_ext2_block_group): Added a missing member
6837 (grub_ext2_read_inode): Divide by the inode size in a superblock
6838 instead of 128 to obtain INODES_PER_BLOCK.
6839 Use the macro EXT2_INODE_SIZE instead of directly using
6842 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
6844 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
6845 superblock instead of the structure size to compute an
6846 offset. This fixes the problem that GRUB could not read a
6847 filesystem when inode size is different from 128-byte.
6849 2007-03-05 Marco Gerards <marco@gnu.org>
6851 * normal/main.c (read_config_file): When "menu" is not set, create
6854 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6856 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
6857 (HEAP_LIMIT): New macro.
6858 (grub_claim_heap): Claim memory up to `heaplimit'.
6860 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6862 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
6863 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
6865 (grub_arch_modules_addr): Return address after `_end'.
6866 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
6867 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
6868 (add_segments): Calculate `_end' from phdr size and location.
6869 (ALIGN_UP): Moved to ...
6870 * include/grub/misc.h: here.
6871 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6873 (GRUB_IEEE1275_MODULE_BASE): Removed.
6875 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6877 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
6880 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6882 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
6884 (grub_elf64_load_hook_t): Likewise.
6885 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
6888 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6890 * kern/mm.c: Update copyright.
6891 (grub_mm_debug): Correct syntax error.
6892 (grub_mm_dump_free): New function.
6893 (grub_debug_free): Call `grub_free'.
6894 * include/grub/mm.h: Update copyright.
6895 (grub_mm_dump_free): Add declaration.
6897 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6899 * include/grub/ieee1275/ieee1275.h: Update copyright.
6900 * kern/powerpc/ieee1275/init.c: Likewise.
6901 * kern/powerpc/ieee1275/openfw.c: Likewise.
6903 * loader/powerpc/ieee1275/linux.c: Likewise.
6904 * include/grub/elfload.h: Likewise.
6905 * kern/elf.c: Likewise.
6906 (grub_elf32_load): Pass `base' and `size' parameters. Update all
6908 (grub_elf64_load): Likewise.
6909 (grub_elf32_load_segment): Move to a nested function.
6910 (grub_elf64_load_segment): Likewise.
6912 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6914 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
6916 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
6917 (grub_heap_len): Likewise.
6918 (HEAP_SIZE): New macro.
6919 (grub_claim_heap): New function.
6920 (grub_machine_init): Don't claim heap directly. Call
6922 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
6923 (grub_available_iterate): New function.
6925 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
6927 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
6928 * configure.ac: Use it for testing the HOST and TARGET compilers.
6930 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
6932 * Makefile.in (enable_grub_emu): New variable.
6933 * configure.ac (--enable-grub-emu): New option.
6934 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
6935 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
6936 * conf/i386-pc.rmk: Likewise.
6937 * conf/powerpc-ieee1275.rmk: Likewise.
6938 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
6940 2006-12-12 Marco Gerards <marco@gnu.org>
6942 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
6944 * kern/env.c (grub_env_unset): Don't free the member `value' when
6945 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
6948 * normal/main.c (current_menu): Removed.
6949 (free_menu): Unset the `menu' environment variable.
6950 (grub_normal_menu_addentry): Make use of the environment variable
6951 `menu', instead of using the global `current_menu'. Allocate
6952 memory for the sourcecode of this entry.
6953 (read_config_file): New argument `nested', changed all callers.
6954 Only in the case of a new context, initialize a new menu. Set the
6955 `menu' environment variable.
6956 (grub_normal_execute): Don't set and unset the environment
6957 variable `menu' here anymore. Only free the menu when leaving the
6960 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
6963 2006-12-11 Marco Gerards <marco@gnu.org>
6965 * normal/menu_entry.c (run): Fix off by one bug so the last line
6966 is executed. Move the loader check to outside the loop.
6968 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
6970 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
6972 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
6974 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
6975 the number of sectors. Reported by Andrey Shuvikov
6976 <mr_hyro@yahoo.com>.
6978 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
6980 * kern/disk.c (grub_disk_read): When there is a read error, always
6981 try to read only the necessary data.
6983 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
6985 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
6987 [GRUB_UTIL] (grub_raid_fini): Likewise.
6988 [GRUB_UTIL] (grub_lvm_init): Likewise.
6989 [GRUB_UTIL] (grub_lvm_fini): Likewise.
6990 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
6991 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
6992 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
6993 and grub_raid_fini().
6995 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
6997 * include/grub/types.h (__unused): Rename to UNUSED.
6998 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
6999 (grub_elf64_size): Likewise.
7001 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7003 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
7004 grub_error_push and grub_error_pop in the error-handling path.
7005 (grub_elf32_load_segment): Only call grub_file_read with non-zero
7008 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
7010 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
7011 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7012 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7013 (kernel_elf_SOURCES): Likewise.
7014 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
7015 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
7016 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7017 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7018 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
7019 (elf_mod_SOURCES): New variable.
7020 (elf_mod_CFLAGS): Likewise.
7021 (elf_mod_LDFLAGS): Likewise.
7022 * include/grub/types.h (__unused): New macro.
7023 * include/grub/elfload.h: New file.
7024 * kern/elf.c: Likewise.
7025 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
7026 (ELF32_LOADMASK): New macro.
7027 (ELF64_LOADMASK): Likewise.
7029 (grub_linux_load32): New function.
7030 (grub_linux_load64): Likewise.
7031 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
7032 Use grub_elf_t instead of grub_file_t.
7034 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
7036 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
7037 `catch_result' to struct set_color_args.
7039 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
7041 * normal/menu.c: Include grub/script.h.
7042 * normal/menu_entry.c: Likewise.
7043 * include/grub/normal.h: Do not include grub/script.h.
7045 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7047 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
7049 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7051 * kern/disk.c (grub_disk_open): Print debug messages when opening a
7053 (grub_disk_close): Print debug messages when closing a disk.
7054 (grub_disk_read): Print debug messages when disk read fails.
7055 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
7057 * kern/partition.c: Include misc.h.
7058 (grub_partition_iterate): Print debug messages when detecting
7061 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7063 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
7065 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
7067 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
7069 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7070 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
7072 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
7074 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
7075 instead of sizeof(lv). Patch by Michael Guntsche.
7077 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
7079 * disk/lvm.c: Rename VGS to VG_LIST.
7080 (grub_lvm_iterate): Change VGS->LV to VG-LV.
7081 (grub_lvm_open): Likewise.
7082 Thanks to Michael Guntsche for finding this bug.
7084 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7086 * configure.ac (AC_INIT): Bumped to 1.95.
7088 2006-10-14 Robert Millan <rmh@aybabtu.com>
7090 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
7091 with "/dev/.static/dev/md".
7093 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7095 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
7096 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
7097 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
7098 DRIVE_NAME are always freed.
7100 * util/i386/pc/biosdisk.c (make_device_name): Add one into
7101 DOS_PART, as a DOS partition is counted from one instead of zero
7102 now. Reported by Robert Millan.
7104 2006-10-14 Robert Millan <rmh@aybabtu.com>
7106 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
7107 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
7108 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
7109 string returned by grub_guess_root_device.
7110 * util/i386/pc/grub-setup.c: Likewise.
7111 * util/i386/pc/grub-probefs.c: Likewise.
7113 * util/i386/pc/grub-probefs.c: Rename to ...
7114 * util/i386/pc/grub-probe.c: ... this.
7115 * DISTLIST: Remove grub-probefs, add grub-probe.
7116 * conf/i386-efi.rmk: Likewise.
7117 * conf/i386-pc.rmk: Likewise.
7118 * util/i386/pc/grub-install.in: Likewise.
7120 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
7121 choose which information we want to print.
7123 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7125 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
7126 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
7127 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
7128 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
7129 video/readers/tga.c and video/i386/pc/vbeutil.c.
7131 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
7133 Added support for RAID and LVM.
7135 * disk/lvm.c: New file.
7136 * disk/raid.c: Likewise.
7137 * include/grub/lvm.h: Likewise.
7138 * include/grub/raid.h: Likewise.
7139 * include/grub/util/lvm.h: Likewise.
7140 * include/grub/util/raid.h: Likewise.
7141 * util/lvm.c: Likewise.
7142 * util/raid.c: Likewise.
7144 * include/grub/disk.h (grub_disk_dev_id): Add
7145 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
7146 (grub_disk_get_size): New prototype.
7147 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
7148 returns a partition.
7149 (grub_disk_get_size): New function.
7151 * kern/i386/pc/init.c (make_install_device): Copy the prefix
7152 verbatim if grub_install_dos_part is -2.
7154 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
7157 * util/i386/pc/grub-setup.c (setup): New argument
7158 MUST_EMBED. Force embedding of GRUB when the argument is
7159 true. Close FILE before returning.
7160 (main): Add support for RAID and LVM.
7162 * conf/common.rmk: Add RAID and LVM modules.
7163 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
7165 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
7167 * kern/misc.c (grub_strstr): New function.
7168 * include/grub/misc.h (grub_strstr): New prototype.
7170 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
7172 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
7174 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
7176 * kern/misc.c (grub_strtoull): Guess the base only if not
7179 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7181 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
7184 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7186 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
7188 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
7189 Remove `flags' argument. All callers changed.
7190 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
7191 (IEEE1275_IHANDLE_INVALID): New variable.
7192 (IEEE1275_CELL_INVALID): New variable.
7193 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
7194 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
7195 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
7196 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
7197 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
7198 codes from Open Firmware. All callers updated.
7199 (grub_ieee1275_next_property): Directly return Open Firmware return
7201 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7202 Standardize error checking from `grub_ieee1275_get_property'.
7203 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
7204 `devalias' to `aliases'. Correct comments. Consolidate error paths.
7206 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7208 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
7209 `instance_to_package_args' to `instance_to_path_args'.
7211 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
7212 `grub_ieee1275_chosen'.
7214 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
7215 `grub_ieee1275_interpret'.
7217 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7219 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
7221 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7223 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
7224 (__cmpdi): Likewise.
7226 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
7227 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
7230 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
7232 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
7233 to type `grub_ssize_t'.
7234 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
7236 2006-09-22 Marco Gerards <marco@gnu.org>
7238 * normal/script.c (grub_script_create_cmdmenu): Skip leading
7241 2006-09-22 Marco Gerards <marco@gnu.org>
7243 * commands/echo.c: New file.
7245 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
7247 * conf/common.rmk (echo_mod_SOURCES): New variable.
7248 (echo_mod_CFLAGS): Likewise.
7249 (echo_mod_LDFLAGS): Likewise.
7251 2006-09-22 Marco Gerards <marco@gnu.org>
7253 * normal/main.c (get_line): Malloc memory instead of using
7254 preallocated memory. Removed the arguments `cmdline' and
7255 `max_len'. Updated all callers.
7257 2006-09-22 Marco Gerards <marco@gnu.org>
7259 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
7260 (normal_mod_DEPENDENCIES): Likewise.
7262 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
7263 (normal_mod_DEPENDENCIES): Likewise.
7265 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
7267 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
7269 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
7271 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
7272 (normal_mod_DEPENDENCIES): Likewise.
7273 * conf/i386-pc.mk: Regenerate.
7274 * conf/i386-efi.mk: Likewise
7275 * conf/common.mk: Likewise.
7276 * conf/powerpc-ieee1275.mk: Likewise.
7277 * conf/sparc64-ieee1275.mk: Likewise.
7279 2006-09-22 Robert Millan <rmh@aybabtu.com>
7281 Sync with i386 version.
7282 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
7283 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
7285 2006-09-21 Robert Millan <rmh@aybabtu.com>
7287 Import from GRUB Legacy (lib/device.c):
7288 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
7289 (init_device_map) [__linux__]: Add support for I2O devices.
7291 2006-09-14 Marco Gerards <marco@gnu.org>
7293 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
7296 2006-09-14 Robert Millan <rmh@aybabtu.com>
7298 * util/i386/pc/grub-install.in: Skip menu.lst when removing
7301 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
7303 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
7304 before adding it to device.map.
7306 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
7308 * genmk.rb: Let GCC generate dependencies the first time it
7309 compiles a file; using the -MD option.
7310 * conf/common.mk: Regenerate.
7311 * conf/i386-pc.mk: Likewise.
7312 * conf/i386-efi.mk: Likewise.
7313 * conf/powerpc-ieee1275.mk: Likewise.
7314 * conf/sparc64-ieee1275.mk: Likewise.
7316 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
7318 Move the prototypes of grub_setjmp and grub_longjmp to
7319 cpu/setjmp.h, so that each architecture may specify different
7322 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
7323 (grub_longjmp): Likewise.
7324 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
7325 (grub_longjmp): Likewise.
7326 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
7327 (grub_longjmp): Likewise.
7329 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
7330 [!GRUB_UTIL] (grub_longjmp): Removed.
7332 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
7334 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
7335 "color!" method does not return any value.
7337 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7339 * include/grub/bitmap.h: New file.
7341 * include/grub/i386/pc/vbeutil.h: Likewise.
7343 * video/bitmap.c: Likewise.
7345 * video/readers/tga.c: Likewise.
7347 * video/i386/pc/vbeutil.c: Likewise.
7349 * commands/videotest.c: Code cleanup and updated to reflect to new
7352 * term/gfxterm.c: Likewise.
7354 * video/video.c: Likewise.
7356 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
7357 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
7358 (bitmap_mod_SOURCES): New entry.
7359 (bitmap_mod_CFLAGS): Likewise.
7360 (bitmap_mod_LDFLAGS): Likewise.
7361 (tga_mod_SOURCES): Likewise.
7362 (tga_mod_CFLAGS): Likewise.
7363 (tga_mod_LDFLAGS): Likewise.
7365 * include/grub/video.h (grub_video_blit_operators): New enum type.
7366 (grub_video_render_target): Changed as forward declaration and moved
7367 actual definition to be video driver specific.
7368 (grub_video_adapter.blit_bitmap): Added blitting operator.
7369 (grub_video_adapter.blit_render_target): Likewise.
7370 (grub_video_blit_bitmap): Likewise.
7371 (grub_video_blit_render_target): Likewise.
7373 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
7374 driver specific render target definition.
7375 (grub_video_vbe_map_rgba): Added driver internal helper.
7376 (grub_video_vbe_unmap_color): Updated to use
7377 grub_video_i386_vbeblit_info.
7378 (grub_video_vbe_get_video_ptr): Likewise.
7380 * include/grub/i386/pc/vbeblit.h
7381 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
7382 grub_video_i386_vbeblit_info.
7383 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7384 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7385 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7386 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7387 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7388 (grub_video_i386_vbeblit_index_index): Likewise.
7389 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
7390 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7391 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7392 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
7394 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
7397 * video/i386/pc/vbeblit.c: Updated to reflect changes on
7398 include/grub/i386/pc/vbeblit.h.
7400 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
7401 Updated to use grub_video_i386_vbeblit_info.
7402 (grub_video_i386_vbefill_R8G8B8): Likewise.
7403 (grub_video_i386_vbefill_index): Likewise.
7404 (grub_video_i386_vbefill): Added generic filler.
7406 * video/i386/pc/vbefill.c: Updated to reflect changes on
7407 include/grub/i386/pc/vbefill.h.
7409 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
7410 grub_video_i386_vbeblit_info.
7411 (grub_video_vbe_unmap_color): Likewise.
7412 (grub_video_vbe_blit_glyph): Likewise.
7413 (grub_video_vbe_scroll): Likewise.
7414 (grub_video_vbe_draw_pixel): Removed function.
7415 (grub_video_vbe_get_pixel): Likewise.
7416 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
7417 updated code to use it.
7418 (common_blitter): Added common blitter for render target and bitmap.
7419 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
7420 (grub_video_vbe_blit_render_target): Likewise.
7422 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
7424 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
7425 is in text mode if there is no console control protocol instance
7428 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7430 * include/grub/video.h: Code cleanup.
7432 * include/grub/i386/pc/vbe.h: Likewise.
7434 * video/i386/pc/vbe.c: Likewise.
7436 * video/i386/pc/vbeblit.c: Likewise.
7438 * video/i386/pc/vbefill.c: Likewise.
7440 * video/video.c: Likewise. Also added more comments.
7442 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7444 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
7445 (struct grub_biosdisk_dap): Likewise.
7447 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
7448 linkage settings for all functions.
7450 2006-07-12 Marco Gerards <marco@gnu.org>
7452 * configure.ac (--enable-mm-debug): Fix typo.
7454 * genkernsyms.sh.in: Use proper quoting for `CC'.
7456 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
7458 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
7459 (normal_mod_ASFLAGS): Remove "-m32".
7461 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
7463 * util/misc.c: Include config.h.
7464 [!HAVE_MEMALIGN]: Do not include malloc.h.
7465 (grub_memalign): Use posix_memalign, if present. Then, use
7466 memalign, if present. Otherwise, emit an error.
7468 * util/grub-emu.c: Do not include malloc.h.
7470 * include/grub/util/misc.h: Include unistd.h. This is required for
7471 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
7472 D. Eades III <hde@foobar-qux.org>.
7474 * configure.ac (AC_GNU_SOURCE): Added.
7475 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
7478 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
7480 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
7481 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
7483 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
7485 * include/grub/types.h (grub_host_addr_t): Rename to
7487 (grub_host_off_t): Rename to grub_target_off_t.
7488 (grub_host_size_t): Rename to grub_target_size_t.
7489 (grub_host_ssize_t): Rename to grub_target_ssize_t.
7490 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
7492 * include/grub/kernel.h (struct grub_module_header): Change type
7493 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
7494 (grub_module_info): Likewise.
7496 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7498 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
7499 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
7500 Velazquez <jesus.velazquez@gmail.com>.
7502 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7504 Count partitions from 1 instead of 0 in the string representation
7505 of partitions. Still use 0-based internally.
7507 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
7508 (sun_partition_map_iterate): Use grub_partition_t instead of
7509 struct grub_partition *. Cast DESC->START_CYLINDER to
7510 grub_uint64_t after converting the endian.
7511 (sun_partition_map_probe): Subtract 1 for PARTNUM.
7512 (sun_partition_map_get_name): Add 1 to P->INDEX.
7514 * partmap/pc.c (grub_partition_parse): Subtract 1 for
7516 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
7518 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
7519 zero instead of one.
7520 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
7521 (gpt_partition_map_get_name): Add 1 into P->INDEX.
7523 * partmap/apple.c (apple_partition_map_iterate): Change the type
7525 (apple_partition_map_probe): Subtract 1 for PARTNUM.
7526 (apple_partition_map_get_name): Add 1 into P->INDEX.
7528 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
7530 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
7531 calculate the offset of a partition.
7532 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
7533 (amiga_partition_map_get_name): Add 1 into P->INDEX.
7535 * partmap/acorn.c (acorn_partition_map_find): Change the type of
7536 SECTOR to grub_disk_addr_t.
7537 (acorn_partition_map_iterate): Likewise.
7538 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
7539 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
7541 (acorn_partition_map_get_name): Add 1 into P->INDEX.
7543 * kern/i386/pc/init.c (make_install_device): Add 1 into
7544 GRUB_INSTALL_DOS_PART.
7546 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
7549 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7551 Clean up the code to support 64-bit addressing in disks and
7552 files. This change is not enough for filesystems yet.
7554 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
7555 type of "start" to grub_uint64_t.
7556 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
7557 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
7558 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
7561 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
7562 to grub_disk_addr_t.
7564 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
7567 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7569 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
7572 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
7574 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
7576 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
7578 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
7579 to grub_off_t, to detect an error from grub_file_seek.
7580 (grub_multiboot_load_elf32): Likewise.
7582 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
7583 maximum unsigned long value when an overflow is detected.
7584 (grub_strtoull): New function.
7585 (grub_divmod64): Likewise.
7586 (grub_lltoa): use grub_divmod64.
7588 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
7590 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
7591 the pointer to next character. Use grub_strtoull instead of
7593 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
7594 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
7597 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
7598 return value is signed.
7599 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
7600 test if OFFSET is less than zero, as OFFSET is unsigned now.
7602 * kern/disk.c (struct grub_disk_cache): Change the type of
7603 "sector" to grub_disk_addr_t.
7604 (grub_disk_cache_get_index): Change the type of SECTOR to
7605 grub_disk_addr_t. Calculate the hash with SECTOR casted to
7606 unsigned after shifting.
7607 (grub_disk_cache_invalidate): Change the type of SECTOR to
7609 (grub_disk_cache_unlock): Likewise.
7610 (grub_disk_cache_store): Likewise.
7611 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
7612 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
7613 grub_disk_addr_t and grub_uint64_t, respectively.
7614 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
7615 body, as the value of OFFSET is tweaked by
7616 grub_disk_check_range. Change the types of START_SECTOR, LEN and
7617 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
7619 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
7620 body, as the value of OFFSET is tweaked by
7621 grub_disk_check_range. Change the types of LEN and N to
7624 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
7625 and "saved_offset" to grub_off_t.
7626 (test_header): Cast BUF to char *.
7627 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
7629 (grub_gzio_read): Change the types of OFFSET and SIZE to
7630 grub_off_t and grub_size_t, respectively.
7632 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
7634 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
7635 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
7636 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
7637 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
7638 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
7640 * include/grub/types.h (grub_off_t): Unconditionally set to
7642 (grub_disk_addr_t): Changed to grub_uint64_t.
7644 * include/grub/partition.h (struct grub_partition): Change the
7645 types of "start", "len" and "offset" to grub_disk_addr_t,
7646 grub_uint64_t and grub_disk_addr_t, respectively.
7647 (grub_partition_get_start): Return grub_disk_addr_t.
7648 (grub_partition_get_len): Return grub_uint64_t.
7650 * include/grub/misc.h (grub_strtoull): New prototype.
7651 (grub_divmod64): Likewise.
7653 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
7654 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
7655 grub_off_t, respectively.
7656 All callers and references changed.
7658 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
7659 grub_size_t in "read".
7660 All callers and references changed.
7662 * include/grub/file.h (struct grub_file): Change the types of
7663 "offset" and "size" to grub_off_t and grub_off_t,
7664 respectively. Change the type of SECTOR to grub_disk_addr_t in
7666 (grub_file_read): Change the type of LEN to grub_size_t.
7667 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
7669 (grub_file_size): Return grub_off_t.
7670 (grub_file_tell): Likewise.
7671 All callers and references changed.
7673 * include/grub/disk.h (struct grub_disk_dev): Change the types of
7674 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
7676 (struct grub_disk): Change the type of "total_sectors" to
7677 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
7679 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
7680 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
7681 (grub_disk_write): Likewise.
7682 All callers and references changed.
7684 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
7685 char * for grub_strncmp to silence gcc.
7686 (grub_iso9660_mount): Likewise.
7687 (grub_iso9660_mount): Likewise.
7688 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
7690 (grub_iso9660_iterate_dir): Likewise.
7691 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
7693 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
7694 LEN to grub_disk_addr_t and grub_size_t, respectively.
7696 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7698 * fs/jfs.c (grub_jfs_read_file): Likewise.
7700 * fs/minix.c (grub_jfs_read_file): Likewise.
7702 * fs/sfs.c (grub_jfs_read_file): Likewise.
7704 * fs/ufs.c (grub_jfs_read_file): Likewise.
7706 * fs/xfs.c (grub_jfs_read_file): Likewise.
7708 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
7709 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
7712 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
7713 BLKNR to -1 instead of returning GRUB_ERRNO.
7714 (grub_ext2_read_file): Change the types of SECTOR and
7715 LEN to grub_disk_addr_t and grub_size_t, respectively.
7717 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
7718 LEN to grub_disk_addr_t and grub_size_t, respectively.
7720 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
7723 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
7724 string. Do not cast SECTOR explicitly.
7726 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
7727 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
7728 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
7729 grub_disk_addr_t and grub_size_t, respectively. If the sector is
7730 over 2TB and LBA mode is not supported, raise an error.
7731 (get_safe_sectors): New function.
7732 (grub_biosdisk_read): Use get_safe_sectors.
7733 (grub_biosdisk_write): Likewise.
7735 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
7736 (grub_efidisk_write): Likewise.
7738 * disk/loopback.c (delete_loopback): Cosmetic changes.
7739 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
7741 (grub_loopback_open): Likewise.
7742 (grub_loopback_read): Likewise. Also, change the type of POS to
7743 grub_off_t, and fix the usage of grub_memset.
7745 * commands/i386/pc/play.c: Include grub/machine/time.h.
7747 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
7750 * commands/configfile.c: Include grub/env.h.
7752 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
7753 GRUB_ERRNO directly instead. Change the type of POS to
7754 grub_off_t. Follow the coding standard.
7756 * commands/blocklist.c: Include grub/partition.h.
7757 (grub_cmd_blocklist): Return an error if the underlying device is
7758 not a disk. Take the starting sector of a partition into account,
7759 if a partition is used.
7761 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
7763 (lba_mode): Support 64-bit addresses.
7764 (chs_mode): Likewise.
7765 (copy_buffer): Adapted to the new offsets of a length field and a
7767 (blocklist_default_start): Allocate 64-bit space.
7769 * boot/i386/pc/boot.S (force_lba): Removed.
7770 (boot_drive): Moved to under KERNEL_SECTOR.
7771 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
7773 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
7775 (lba_mode): Refactored to support a 64-bit address. More size
7777 (setup_sectors): Likewise.
7779 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7781 * DISTLIST: Added include/grub/i386/linux.h. Removed
7782 include/grub/i386/pc/linux.h
7784 * configure.ac (AC_INIT): Bumped to 1.94.
7786 * config.guess: Updated from gnulib.
7787 * config.sub: Likewise.
7788 * install-sh: Likewise.
7789 * mkinstalldirs: Likewise.
7791 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7793 * conf/common.rmk (grub_modules_init.lst): Depended on
7794 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
7797 * genmk.rb (PModule::rule): Reverted the previous change.
7799 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7801 * conf/common.rmk (grub_modules_init.lst): Depends on
7802 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
7803 that the target does not exist before producing.
7804 (grub_modules_init.h): Remove the target before generating.
7805 (grub_emu_init.c): Likewise.
7807 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
7809 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
7811 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
7812 for the target-specific tests. Make sure that we also have the
7813 up-to-date target variables for those tests.
7815 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7817 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
7818 (PModule::rule): Likewise.
7820 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7822 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
7823 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
7824 target-specific flags should be prefixed.
7825 (PModule::rule): Likewise.
7827 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
7829 * configure.ac (CMP): Check if cmp is available explicitly.
7831 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
7833 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
7834 (target_cpu): New variable.
7835 (pkglibdir): Use target_cpu instead of host_cpu.
7837 * util/i386/pc/grub-install.in (host_cpu): Removed.
7838 (target_cpu): New variable.
7839 (pkglibdir): Use target_cpu instead of host_cpu.
7841 * util/genmoddep.c: Removed.
7843 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
7844 instead of GRUB_HOST_SIZEOF_VOID_P.
7845 * kern/dl.c: Likewise.
7847 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
7849 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7850 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7851 (GRUB_TARGET_SIZEOF_LONG): ... this.
7852 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7853 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7854 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7856 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7857 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7858 (GRUB_TARGET_SIZEOF_LONG): ... this.
7859 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7860 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7861 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7863 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7864 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7865 (GRUB_TARGET_SIZEOF_LONG): ... this.
7866 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7867 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7869 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
7870 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
7871 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
7872 instead of GRUB_HOST_SIZEOF_LONG.
7873 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
7874 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
7875 GRUB_CPU_WORDS_BIGENDIAN.
7876 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
7877 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
7880 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
7881 (genmoddep_SOURCES): Likewise.
7882 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
7883 (genmoddep_SOURCES): Likewise.
7884 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
7885 (genmoddep_SOURCES): Likewise.
7886 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
7888 (genmoddep_SOURCES): Likewise.
7890 * genmoddep.awk: New file.
7892 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
7893 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
7894 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
7895 (PModule::rule): Likewise.
7896 (Program::rule): Likewise.
7897 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
7898 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
7901 * configure.ac: Rewritten intensively to use host and target
7902 instead of build and host, respectively.
7904 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
7905 (host_cpu): Removed.
7906 (target_cpu): New variable.
7907 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
7908 (BUILD_CC): Removed.
7909 (BUILD_CFLAGS): Likewise.
7910 (BUILD_CPPFLAGS): Likewise.
7911 (TARGET_CC): New variable.
7912 (TARGET_CFLAGS): Likewise.
7913 (TARGET_CPPFLAGS): Likewise.
7914 (TARGET_LDFLAGS): Likewise.
7916 (include): Use target_cpu instead of host_cpu.
7917 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
7919 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
7921 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
7923 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
7924 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
7925 field 'false' to 'exec_on_false'.
7926 (grub_script_create_cmdif): Renamed argument names to reflect above
7929 * normal/execute.c (grub_script_execute_cmdif): Likewise.
7931 * normal/script.c (grub_script_create_cmdif): Likewise.
7933 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
7935 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
7937 (grub_hfsplus_btree_recptr): Likewise.
7938 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
7939 FILEBLOCK both to pass a block number and store next block
7941 (grub_hfsplus_read_block): Rewritten heavily to support an extent
7942 overflow file correctly. Specify errors appropriately, because
7943 fshelp expects that GRUB_ERRNO is set when fails. Reuse
7944 grub_hfsplus_btree_recptr to get the pointer to a found key.
7945 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
7948 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
7950 (_linux_mod_SOURCES): New variable.
7951 (_linux_mod_CFLAGS): Likewise.
7952 (_linux_mod_LDFLAGS): Likewise.
7953 (linux_mod_SOURCES): Likewise.
7954 (linux_mod_CFLAGS): Likewise.
7955 (linux_mod_LDFLAGS): Likewise.
7957 * DISTLIST: Added loader/i386/efi/linux.c,
7958 loader/i386/efi/linux_normal.c and
7959 include/grub/i386/efi/loader.h.
7961 * loader/i386/efi/linux.c: New file.
7962 * loader/i386/efi/linux_normal.c: Likewise.
7963 * include/grub/i386/efi/loader.h: Likewise.
7965 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
7967 * commands/blocklist.c: New file.
7969 * DISTLIST: Added commands/blocklist.c.
7971 * term/efi/console.c (grub_console_highlight_color): Use a lighter
7972 color for the background, and a darker color for the foreground.
7973 (grub_console_checkkey): Return READ_KEY.
7974 (grub_console_cls): Set the background to
7975 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
7977 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
7979 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
7980 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
7982 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
7985 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
7986 BG. The spec is wrong again.
7988 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
7990 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
7992 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7993 commands/blocklist.c.
7994 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7996 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
7997 (blocklist_mod_SOURCES): New variable.
7998 (blocklist_mod_CFLAGS): Likewise.
7999 (blocklist_mod_LDFLAGS): Likewise.
8001 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
8003 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
8005 (lba_mode): Use %eax more intensively to reduce the code size.
8007 2006-05-20 Marco Gerards <marco@gnu.org>
8009 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
8011 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
8013 (script): Accept leading newlines.
8014 (newlines): New rule to describe 0 or more newlines.
8015 (commands): Accept `command' with trailing newline. Fixed the
8016 order in which arguments were passed to `grub_script_add_cmd'.
8017 Accept commands separated by newlines.
8018 (function): Changed to accept newlines.
8019 (menuentry) Rewritten.
8021 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
8022 front of the list, instead of to the end.
8024 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
8026 * util/i386/pc/grub-install.in (bindir): New variable.
8027 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
8028 Shaver <lbgwjl@gmail.com>.
8030 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
8032 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
8033 grub/machine/linux.h
8034 * loader/i386/pc/linux.c: Likewise.
8036 * include/grub/i386/pc/linux.h: Moved to ...
8037 * include/grub/i386/linux.h: ... here.
8039 * include/grub/i386/linux.h (struct linux_kernel_params): New
8042 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
8044 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
8046 (grub_video_vbe_blit_glyph): Likewise.
8047 (grub_video_vbe_blit_bitmap): Likewise.
8048 (grub_video_vbe_blit_render_target): Likewise.
8050 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
8052 * configure.ac (--with-platform): Properly quote the square
8055 2006-05-08 Marco Gerards <marco@gnu.org>
8057 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
8059 (kernel_elf_HEADERS): ...to this. Updated all users.
8060 (grubof_symlist.c): Renamed from this...
8061 (kernel_elf_symlist.c): ...to this. Updated all users.
8062 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8063 (grubof_SOURCES): Renamed from this...
8064 (kernel_elf_SOURCES): ...to this.
8065 (grubof_HEADERS): Renamed from this...
8066 (kernel_elf_HEADERS): ...to this.
8067 (grubof_CFLAGS): Renamed from this...
8068 (kernel_elf_CFLAGS): ...to this.
8069 (grubof_ASFLAGS): Renamed from this...
8070 (kernel_elf_ASFLAGS): ...to this.
8071 (grubof_LDFLAGS): Renamed from this...
8072 (kernel_elf_LDFLAGS): ...to this.
8074 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
8076 (kernel_elf_HEADERS): ...to this. Updated all users.
8077 (grubof_symlist.c): Renamed from this...
8078 (kernel_elf_symlist.c): ...to this. Updated all users.
8079 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8080 (grubof_SOURCES): Renamed from this...
8081 (kernel_elf_SOURCES): ...to this.
8082 (grubof_HEADERS): Renamed from this...
8083 (kernel_elf_HEADERS): ...to this.
8084 (grubof_CFLAGS): Renamed from this...
8085 (kernel_elf_CFLAGS): ...to this.
8086 (grubof_ASFLAGS): Renamed from this...
8087 (kernel_elf_ASFLAGS): ...to this.
8088 (grubof_LDFLAGS): Renamed from this...
8089 (kernel_elf_LDFLAGS): ...to this.
8091 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
8092 `kernel.elf' instead of `grubof'.
8094 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
8096 Add --with-platform to configure. Use pkglibdir instead of
8097 pkgdatadir. This is reported by Roger Leigh.
8099 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
8100 (host_vendor): Likewise.
8101 (host_os): Likewise.
8102 (pkgdatadir): Likewise.
8103 (platform): New variable.
8104 (pkglibdir): Likewise.
8105 Use PKGLIBDIR instead of PKGDATADIR.
8107 * util/i386/pc/grub-install.in (datadir): Removed.
8108 (host_vendor): Likewise.
8109 (host_os): Likewise.
8110 (pkgdatadir): Likewise.
8111 (platform): New variable.
8112 (pkglibdir): Likewise.
8113 Use PKGLIBDIR instead of PKGDATADIR.
8115 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
8116 instead of GRUB_DATADIR.
8118 * util/i386/pc/grub-mkimage.c (usage): Likewise.
8120 * util/i386/efi/grub-mkimage.c (usage): Likewise.
8123 * configure.ac (--with-platform): New option.
8124 Use PLATFORM instead of HOST_VENDOR to specify a platform.
8126 * Makefile.in: Include a makefile based on PLATFORM instead of
8128 (pkgdatadir): Not appended by the machine type.
8129 (pkglibdir): Appended by the machine type.
8130 (host_vendor): Removed.
8131 (platform): New variable.
8132 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
8133 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
8134 (uninstall): Likewise.
8136 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
8138 Use the environment context in the menu. Remove the commands
8139 "default" and "timeout", and use variables instead.
8141 * normal/menu.c: Include grub/env.h.
8142 (print_entry): Cast TITLE to silence gcc.
8143 (get_timeout): New function.
8144 (set_timeout): Likewise.
8145 (get_entry_number): Likewise.
8146 (run_menu): Use a default entry, a fallback entry and a timeout
8147 in the environment variables "default", "fallback" and
8148 "timeout". Also, tweak the default entry if it is not within the
8149 current menu entries.
8150 (grub_menu_run): Use a fallback entry in the environment variable
8153 * normal/main.c (read_config_file): Do not initialize
8154 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
8156 (grub_normal_execute): Use a data slot to store the menu.
8158 * include/grub/normal.h (struct grub_menu): Removed default_entry,
8159 fallback_entry and timeout.
8160 (struct grub_menu_list): Removed.
8161 (grub_menu_list_t): Likewise.
8162 (struct grub_context): Likewise.
8163 (grub_context_t): Likewise.
8164 (grub_context_get): Likewise.
8165 (grub_context_get_current_menu): Likewise.
8166 (grub_context_push_menu): Likewise.
8167 (grub_context_pop_menu): Likewise.
8168 (grub_default_init): Likewise.
8169 (grub_default_fini): Likewise.
8170 (grub_timeout_init): Likewise.
8171 (grub_timeout_fini): Likewise.
8173 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
8175 (normal_mod_SOURCES): Removed normal/context.c.
8177 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
8178 commands/default.c, commands/timeout.c and normal/context.c.
8179 (normal_mod_SOURCES): Removed normal/context.c.
8181 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
8182 commands/timeout.c and normal/context.c.
8183 (normal_mod_SOURCES): Removed normal/context.c.
8185 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
8186 commands/default.c, commands/timeout.c and normal/context.c.
8187 (normal_mod_SOURCES): Removed normal/context.c.
8189 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
8191 (default_mod_SOURCES): Removed.
8192 (default_mod_CFLAGS): Likewise.
8193 (default_mod_LDFLAGS): Likewise.
8194 (timeout_mod_SOURCES): Removed.
8195 (timeout_mod_CFLAGS): Likewise.
8196 (timeout_mod_LDFLAGS): Likewise.
8198 * DISTLIST: Removed commands/default.c, commands/timeout.c and
8201 * commands/default.c: Removed.
8202 * commands/timeout.c: Likewise.
8203 * normal/context.c: Likewise.
8205 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
8207 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
8209 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
8211 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
8212 "next" to "prev" for readability.
8213 (struct grub_env_sorted_var): New struct.
8214 (grub_env_context): Renamed to ...
8215 (initial_context): ... this.
8216 (grub_env_var_context): Renamed to ...
8217 (current_context): ... this.
8218 (grub_env_find): Look only at CURRENT_CONTEXT.
8219 (grub_env_context_open): Rewritten to copy exported variables from
8221 (grub_env_context_close): Rewritten according to the new
8222 scheme. Also, add an assertion to prevent the initial context from
8224 (grub_env_insert): Removed the code for the sorted list.
8225 (grub_env_remove): Likewise.
8226 (grub_env_export): Simply mark the variable with
8227 GRUB_ENV_VAR_GLOBAL.
8228 (grub_env_set): A cosmetic change for naming consistency.
8229 (grub_env_get): Likewise.
8230 (grub_env_unset): Likewise.
8231 (grub_env_iterate): Rewritten to sort variables within this
8233 (grub_register_variable_hook): Fixed for naming consistency. Call
8234 grub_env_find again, only if NAME is not found at the first time.
8235 (mangle_data_slot_name): New function.
8236 (grub_env_set_data_slot): Likewise.
8237 (grub_env_get_data_slot): Likewise.
8238 (grub_env_unset_data_slot): Likewise.
8240 * include/grub/env.h (grub_env_var_type): New enum.
8241 (GRUB_ENV_VAR_LOCAL): New constant.
8242 (GRUB_ENV_VAR_GLOBAL): Likewise.
8243 (GRUB_ENV_VAR_DATA): Likewise.
8244 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
8246 (grub_env_set): Replace VAR with NAME for consistency.
8247 (grub_register_variable_hook): Likewise.
8248 (grub_env_export): Specify the name of the argument.
8249 (grub_env_set_data_slot): New prototype.
8250 (grub_env_get_data_slot): Likewise.
8251 (grub_env_unset_data_slot): Likewise.
8253 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8255 Extend the loader so that GRUB can accept a loader which comes
8256 back to GRUB when a loaded image exits. Also, this change adds
8257 support for a chainloader on EFI.
8259 * term/efi/console.c: Include grub/misc.h.
8260 (grub_console_checkkey): Display a scan code on the top for
8261 debugging. This will be removed once the EFI port gets stable.
8262 Correct the scan code mapping.
8264 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
8265 allocate memory from larger regions, in order to reduce the number
8266 of allocated regions. Otherwise, the MacOSX loader panics.
8267 (filter_memory_map): Avoid less than 1MB for compatibility with
8269 (add_memory_regions): Allocate from the tail of a region, if
8270 possible, to avoid allocating a region near to 1MB, for the MacOSX
8273 * kern/efi/init.c (grub_efi_set_prefix): Specify
8274 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
8276 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
8277 argument IMAGE_HANDLE and specify it to get a loaded image.
8278 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
8279 grub_efi_get_loaded_image.
8280 (grub_efi_get_filename): Divide the length by the size of
8282 (grub_efi_get_device_path): New function.
8283 (grub_efi_print_device_path): Print End Device Path nodes. Divide
8284 the length by the size of grub_efi_char16_t for a file path device
8287 * kern/loader.c (grub_loader_noreturn): New variable.
8288 (grub_loader_set): Accept a new argument NORETURN. Set
8289 GRUB_LOADER_NORETURN to NORETURN.
8290 All callers changed.
8291 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
8294 * include/grub/efi/efi.h (grub_efi_get_device_path): New
8296 (grub_efi_get_loaded_image): Take an argument to specify an image
8299 * include/grub/loader.h (grub_loader_set): Added one more argument
8302 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
8303 instead of grub_efi_open_protocol.
8304 (grub_efidisk_get_device_name): Likewise.
8305 (grub_efidisk_close): Print a newline.
8306 (grub_efidisk_get_device_handle): Fixed to use
8307 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
8308 GRUB_EFI_DEVICE_PATH_TYPE.
8310 * disk/efi/efidisk.c (device_path_guid): Moved to ...
8311 * kern/efi/efi.c (device_path_guid): ... here.
8313 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
8315 (kernel_mod_HEADERS): Added efi/disk.h.
8316 (_chain_mod_SOURCES): New variable.
8317 (_chain_mod_CFLAGS): Likewise.
8318 (_chain_mod_LDFLAGS): Likewise.
8319 (chain_mod_SOURCES): Likewise.
8320 (chain_mod_CFLAGS): Likewise.
8321 (chain_mod_LDFLAGS): Likewise.
8323 * DISTLIST: Added include/grub/efi/chainloader.h,
8324 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
8326 * include/grub/efi/chainloader.h: New file.
8327 * loader/efi/chainloader.c: Likewise.
8328 * loader/efi/chainloader_normal.c: Likewise.
8330 2006-04-30 Marco Gerards <marco@gnu.org>
8332 * commands/configfile.c (grub_cmd_source): New function.
8333 (GRUB_MOD_INIT): Register the commands `source' and `.'.
8334 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
8336 2006-04-30 Marco Gerards <marco@gnu.org>
8338 * normal/execute.c (grub_script_execute_cmd): Change the return
8339 type to `grub_err_t'. Correctly return the error.
8340 (grub_script_execute_cmdline): In case a command line is not a
8341 command or a function, try to interpret it as an assignment.
8343 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8345 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
8346 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
8347 skip a node whose name is obviously invalid as UTF-16,
8348 i.e. contains a NUL character. Stop the iteration when the last
8349 directory entry is found. Instead of using the return value of
8350 grub_hfsplus_btree_iterate_node, store the value in RET and use
8351 it, because the iterator can be stopped by the last directory
8354 2006-04-30 Marco Gerards <marco@gnu.org>
8356 * include/grub/env.h (grub_env_export): New prototype. Reported
8357 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
8359 2006-04-30 Marco Gerards <marco@gnu.org>
8361 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
8362 size of the extents in a catalog file record.
8364 2006-04-29 Marco Gerards <marco@gnu.org>
8366 * commands/configfile.c (grub_cmd_configfile): Execute the
8367 configfile within its own context.
8369 * include/grub/env.h (grub_env_context_open): New prototype.
8370 (grub_env_context_close): Likewise.
8372 * kern/env.c (grub_env): Removed.
8373 (grub_env_sorted): Likewise.
8374 (grub_env_context): New variable.
8375 (grub_env_var_context): Likewise.
8376 (grub_env_find): Search both the active context and the global
8378 (grub_env_context_open): New function.
8379 (grub_env_context_close): Likewise.
8380 (grub_env_insert): Likewise.
8381 (grub_env_remove): Likewise.
8382 (grub_env_export): Likewise.
8383 (grub_env_set): Changed to use helper functions to avoid code
8385 (grub_env_iterate): Rewritten so both the current context and the
8386 global context are being used.
8388 * normal/command.c (export_command): New function.
8389 (grub_command_init): Register the `export' function.
8391 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
8393 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
8394 explicitly to suppress gcc's warnings.
8395 * fs/fat.c (grub_fat_find_dir): Likewise.
8396 (grub_fat_label): Likewise.
8397 * fs/xfs.c (grub_xfs_read_inode): Likewise.
8398 (grub_xfs_mount): Likewise.
8399 (grub_xfs_label): Likewise.
8400 * fs/affs.c (grub_affs_mount): Likewise.
8401 (grub_affs_label): Likewise.
8402 (grub_affs_iterate_dir): Likewise.
8403 * fs/sfs.c (grub_sfs_mount): Likewise.
8404 (grub_sfs_iterate_dir): Likewise.
8405 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
8406 * fs/hfs.c (grub_hfs_mount): Likewise.
8407 (grub_hfs_cmp_catkeys): Likewise.
8408 (grub_hfs_find_dir): Likewise.
8409 (grub_hfs_dir): Likewise.
8410 (grub_hfs_label): Likewise.
8411 * fs/jfs.c (grub_jfs_mount): Likewise.
8412 (grub_jfs_opendir): Likewise.
8413 (grub_jfs_getent): Likewise.
8414 (grub_jfs_lookup_symlink): Likewise.
8415 (grub_jfs_label): Likewise.
8416 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
8417 (grub_hfsplus_iterate_dir): Likewise.
8418 (grub_hfsplus_btree_iterate_node): Made static.
8420 * util/grub-emu.c (prefix): New variable.
8421 (grub_machine_set_prefix): New function.
8422 (main): Do not set the environment variable "prefix" here. Only
8423 set PREFIX, which is used later by grub_machine_set_prefix.
8425 * include/grub/video.h: Do not include grub/symbol.h.
8426 (grub_video_register): Not exported. This symbol is not defined in
8428 (grub_video_unregister): Likewise.
8429 (grub_video_iterate): Likewise.
8430 (grub_video_setup): Likewise.
8431 (grub_video_restore): Likewise.
8432 (grub_video_get_info): Likewise.
8433 (grub_video_get_blit_format): Likewise.
8434 (grub_video_set_palette): Likewise.
8435 (grub_video_get_palette): Likewise.
8436 (grub_video_set_viewport): Likewise.
8437 (grub_video_get_viewport): Likewise.
8438 (grub_video_map_color): Likewise.
8439 (grub_video_map_rgb): Likewise.
8440 (grub_video_map_rgba): Likewise.
8441 (grub_video_fill_rect): Likewise.
8442 (grub_video_blit_glyph): Likewise.
8443 (grub_video_blit_bitmap): Likewise.
8444 (grub_video_blit_render_target): Likewise.
8445 (grub_video_scroll): Likewise.
8446 (grub_video_swap_buffers): Likewise.
8447 (grub_video_create_render_target): Likewise.
8448 (grub_video_delete_render_target): Likewise.
8449 (grub_video_set_active_render_target): Likewise.
8451 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
8453 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
8455 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
8456 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8457 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8458 instead of $(srcdir)/genkernsyms.sh.
8460 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
8461 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8462 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8463 instead of $(srcdir)/genkernsyms.sh.
8465 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
8466 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8467 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8468 instead of $(srcdir)/genkernsyms.sh.
8470 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
8471 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8472 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8473 instead of $(srcdir)/genkernsyms.sh.
8475 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
8478 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
8480 (gensymlist.sh): New target.
8481 (genkernsyms.sh): Likewise.
8483 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
8484 genkernsyms.sh.in and gensymlist.sh.in.
8486 * genkernsyms.sh: Removed.
8487 * gensymlist.sh: Likewise.
8489 * genkernsyms.sh.in: New file.
8490 * gensymlist.sh.in: Likewise.
8492 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8494 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
8495 clobber "prefix", since we may have already set it manually.
8497 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8499 * kern/misc.c (abort): New alias for grub_abort.
8501 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
8503 A new machine-specific function "grub_machine_set_prefix" is
8504 defined. This is called after loading modules, so that a prefix
8505 initialization can use modules. Also, this change adds an
8506 intensive debugging feature for the memory manager via the
8507 configure option "--enable-mm-debug".
8509 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
8512 * kern/sparc64/ieee1275/init.c (abort): Removed.
8513 (grub_stop): Likewise.
8514 (grub_exit): New function.
8515 (grub_set_prefix): Renamed to ...
8516 (grub_machine_set_prefix): ... this.
8517 (grub_machine_init): Do not call grub_set_prefix.
8519 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
8520 (grub_machine_set_prefix): ... this.
8521 (grub_machine_init): Do not call grub_set_prefix.
8523 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
8524 (grub_machine_init): Do not set the prefix here.
8526 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
8528 * kern/efi/init.c: Include grub/mm.h.
8529 (grub_efi_set_prefix): New function.
8531 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
8532 (grub_efi_get_filename): New function.
8533 (grub_print_device_path): Renamed to ...
8534 (grub_efi_print_device_path): ... this.
8536 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
8537 [MM_DEBUG] (grub_realloc): Likewise.
8538 [MM_DEBUG] (grub_free): Likewise.
8539 [MM_DEBUG] (grub_memalign): Likewise.
8540 [MM_DEBUG] (grub_mm_debug): New variable.
8541 [MM_DEBUG] (grub_debug_malloc): New function.
8542 [MM_DEBUG] (grub_debug_free): New function.
8543 [MM_DEBUG] (grub_debug_realloc): New function.
8544 [MM_DEBUG] (grub_debug_memalign): New function.
8546 * kern/misc.c (grub_abort): Print a newline to distinguish
8549 * kern/main.c (grub_main): Call grub_machine_set_prefix and
8550 grub_set_root_dev after loading modules. This is necessary when
8551 setting a prefix depends on modules.
8553 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
8554 (grub_efi_print_device_path): ... this.
8555 (grub_efi_get_filename): New prototype.
8556 (grub_efi_set_prefix): Likewise.
8558 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
8560 (grub_efidisk_get_device_handle): New prototype.
8561 (grub_efidisk_get_device_name): Likewise.
8563 * include/grub/mm.h: Include config.h.
8564 (MM_DEBUG): Removed.
8565 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
8566 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
8567 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
8568 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
8569 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
8570 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
8571 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
8572 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
8573 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
8575 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
8577 * disk/efi/efidisk.c: Include grub/partition.h.
8578 (iterate_child_devices): New function.
8579 (add_device): First, compare only last device path nodes, so that
8580 devices are sorted by the types.
8581 (grub_efidisk_get_device_handle): New function.
8582 (grub_efidisk_get_device_name): Likewise.
8584 * configure.ac (--enable-mm-debug): New option to enable the
8585 memory manager debugging feature. This makes the binary much
8586 bigger, so is disabled by default.
8588 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
8590 Use grub_abort instead of grub_stop, and grub_exit must be
8591 define in each architecture now. Also, this change adds support
8594 * util/i386/pc/grub-probefs.c: Include grub/term.h.
8595 (grub_getkey): New function.
8596 (grub_term_get_current): Likewise.
8598 * util/i386/pc/grub-setup.c: Include grub/term.h.
8599 (grub_getkey): New function.
8600 (grub_term_get_current): Likewise.
8602 * util/misc.c (grub_stop): Renamed to ...
8603 (grub_exit): ... this.
8605 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
8606 (grub_exit): ... this.
8607 (grub_machine_init): Use grub_abort instead of abort.
8608 (grub_stop): Removed.
8610 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
8613 * kern/i386/pc/startup.S (grub_exit): New function.
8614 (cold_reboot): New label.
8616 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
8617 (grub_efi_init): Call grub_efidisk_init.
8618 (grub_efi_fini): Call grub_efidisk_fini.
8620 * kern/efi/efi.c: Include grub/mm.h.
8621 (grub_efi_console_control_guid): Renamed to ...
8622 (console_control_guid): ... this.
8623 (grub_efi_loaded_image_guid): Renamed to ...
8624 (loaded_image_guid): ... this.
8625 (grub_efi_locate_handle): New function.
8626 (grub_efi_open_protocol): Likewise.
8627 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
8628 GRUB_EFI_CONSOLE_CONTROL_GUID.
8629 (grub_efi_exit): Removed.
8630 (grub_stop): Likewise.
8631 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
8632 (grub_exit): New function.
8633 (grub_print_device_path): Likewise.
8635 * kern/rescue.c (grub_rescue_cmd_exit): New function.
8636 (grub_enter_rescue_mode): Register "exit".
8638 * kern/misc.c (grub_real_dprintf): A cosmetic change.
8639 (grub_abort): New function.
8641 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
8643 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
8645 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
8647 * include/grub/efi/efi.h (grub_efi_exit): Removed.
8648 (grub_print_device_path): New prototype.
8649 (grub_efi_locate_handle): Likewise.
8650 (grub_efi_open_protocol): Likewise.
8652 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
8653 * disk/efi/efidisk.c: Likewise.
8655 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
8657 * include/grub/efi/console_control.h
8658 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
8660 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
8661 last 8 bytes as an array.
8662 (GRUB_EFI_DISK_IO_GUID): New macro.
8663 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
8664 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
8665 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
8667 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
8668 (struct grub_efi_device_path): Rename the member "sub_type" to
8670 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
8671 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
8672 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
8673 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
8674 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
8675 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
8676 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
8677 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
8678 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
8679 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
8680 (struct grub_efi_pci_device_path): New structure.
8681 (grub_efi_pci_device_path_t): New type.
8682 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
8683 (struct grub_efi_pccard_device_path): New structure.
8684 (grub_efi_pccard_device_path_t): New type.
8685 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
8686 (struct grub_efi_memory_mapped_device_path): New structure.
8687 (grub_efi_memory_mapped_device_path_t): New type.
8688 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
8689 (struct grub_efi_vendor_device_path): New structure.
8690 (grub_efi_vendor_device_path_t): New type.
8691 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
8692 (struct grub_efi_controller_device_path): New structure.
8693 (grub_efi_controller_device_path_t): New type.
8694 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
8695 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
8696 (struct grub_efi_acpi_device_path): New structure.
8697 (grub_efi_acpi_device_path_t): New type.
8698 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
8699 (struct grub_efi_expanded_acpi_device_path): New structure.
8700 (grub_efi_expanded_acpi_device_path_t): New type.
8701 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
8702 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
8703 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
8704 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
8705 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
8706 (struct grub_efi_atapi_device_path): New structure.
8707 (grub_efi_atapi_device_path_t): New type.
8708 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
8709 (struct grub_efi_fibre_channel_device_path): New structure.
8710 (grub_efi_fibre_channel_device_path_t): New type.
8711 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
8712 (struct grub_efi_1394_device_path): New structure.
8713 (grub_efi_1394_device_path_t): New type.
8714 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
8715 (struct grub_efi_usb_device_path): New structure.
8716 (grub_efi_usb_device_path_t): New type.
8717 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
8718 (struct grub_efi_usb_class_device_path): New structure.
8719 (grub_efi_usb_class_device_path_t): New type.
8720 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
8721 (struct grub_efi_i2o_device_path): New structure.
8722 (grub_efi_i2o_device_path_t): New type.
8723 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
8724 (struct grub_efi_mac_address_device_path): New structure.
8725 (grub_efi_mac_address_device_path_t): New type.
8726 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
8727 (struct grub_efi_ipv4_device_path): New structure.
8728 (grub_efi_ipv4_device_path_t): New type.
8729 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
8730 (struct grub_efi_ipv6_device_path): New structure.
8731 (grub_efi_ipv6_device_path_t): New type.
8732 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
8733 (struct grub_efi_infiniband_device_path): New structure.
8734 (grub_efi_infiniband_device_path_t): New type.
8735 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
8736 (struct grub_efi_uart_device_path): New structure.
8737 (grub_efi_uart_device_path_t): New type.
8738 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
8739 (struct grub_efi_vendor_messaging_device_path): New structure.
8740 (grub_efi_vendor_messaging_device_path_t): New type.
8741 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
8742 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
8743 (struct grub_efi_hard_drive_device_path): New structure.
8744 (grub_efi_hard_drive_device_path_t): New type.
8745 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
8746 (struct grub_efi_cdrom_device_path): New structure.
8747 (grub_efi_cdrom_device_path_t): New type.
8748 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
8749 (struct grub_efi_vendor_media_device_path): New structure.
8750 (grub_efi_vendor_media_device_path_t): New type.
8751 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
8752 (struct grub_efi_file_path_device_path): New structure.
8753 (grub_efi_file_path_device_path_t): New type.
8754 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
8755 (struct grub_efi_protocol_device_path): New structure.
8756 (grub_efi_protocol_device_path_t): New type.
8757 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
8758 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
8759 (struct grub_efi_bios_device_path): New structure.
8760 (grub_efi_bios_device_path_t): New type.
8761 (struct grub_efi_disk_io): New structure.
8762 (grub_efi_disk_io_t): New type.
8763 (struct grub_efi_block_io_media): New structure.
8764 (grub_efi_block_io_media_t): New type.
8765 (struct grub_efi_block_io): New structure.
8766 (grub_efi_block_io_t): New type.
8768 * include/grub/misc.h (grub_stop): Removed.
8769 (grub_exit): New prototype.
8770 (grub_abort): Likewise.
8772 * include/grub/disk.h (enum grub_disk_dev_id): Added
8773 GRUB_DISK_DEVICE_EFIDISK_ID.
8775 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
8777 (kernel_syms.lst): Remove the target if an error occurs.
8779 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
8781 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
8782 as it was simply too buggy.
8784 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
8786 * kern/misc.c (grub_lltoa): New function.
8787 (grub_vsprintf): Added support for the long long suffix,
8790 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
8792 * Makefile.in (LDFLAGS): Add variable.
8793 (LD): Remove variable.
8794 * configure.ac: Add -m32 to LDFLAGS.
8795 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
8796 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
8797 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
8798 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
8799 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
8801 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
8802 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
8803 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
8805 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
8807 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
8808 length for unknown glyph.
8810 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8812 Add support for pre-loaded modules into the EFI port.
8814 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
8815 completely. Accept one more argument DIR. The caller has changed.
8817 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
8819 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
8820 (grub_efi_loaded_image_guid): New variable.
8821 (grub_efi_get_loaded_image): New function.
8822 (grub_arch_modules_addr): Likewise.
8824 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
8827 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
8828 (struct grub_efi_loaded_image): New structure.
8829 (grub_efi_loaded_image_t): New type.
8831 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8833 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
8834 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
8835 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
8837 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
8839 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
8841 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
8843 * DISTLIST: Added include/grub/efi/console.h,
8844 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
8845 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8847 * include/grub/efi/console.h: New file.
8848 * include/grub/efi/time.h: Likewise.
8849 * include/grub/i386/efi/kernel.h: Likewise.
8850 * kern/efi/init.c: Likewise.
8851 * kern/efi/mm.c: Likewise.
8852 * term/efi/console.c: Likewise.
8854 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
8855 (grub_stop): Removed.
8856 (grub_get_rtc): Likewise.
8857 (grub_machine_init): Simply call grub_efi_init.
8858 (grub_machine_fini): Call grub_efi_fini.
8860 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
8861 (grub_efi_output_string): Removed.
8862 (grub_efi_stall): New function.
8863 (grub_stop): Likewise.
8864 (grub_get_rtc): Likewise.
8866 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
8867 (grub_efi_stall): New prototype.
8868 (grub_efi_allocate_pages): Likewise.
8869 (grub_efi_free_pages): Likewise.
8870 (grub_efi_get_memory_map): Likewise.
8871 (grub_efi_mm_init): Likewise.
8872 (grub_efi_mm_fini): Likewise.
8873 (grub_efi_init): Likewise.
8874 (grub_efi_fini): Likewise.
8876 * include/grub/i386/efi/time.h: Do not include
8877 grub/symbol.h. Include grub/efi/time.h.
8878 (GRUB_TICKS_PER_SECOND): Removed.
8879 (grub_get_rtc): Likewise.
8881 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
8882 Added padding. The EFI spec is buggy.
8883 (GRUB_EFI_BLACK): New macro.
8884 (GRUB_EFI_BLUE): Likewise.
8885 (GRUB_EFI_GREEN): Likewise.
8886 (GRUB_EFI_CYAN): Likewise.
8887 (GRUB_EFI_RED): Likewise.
8888 (GRUB_EFI_MAGENTA): Likewise.
8889 (GRUB_EFI_BROWN): Likewise.
8890 (GRUB_EFI_LIGHTGRAY): Likewise.
8891 (GRUB_EFI_BRIGHT): Likewise.
8892 (GRUB_EFI_DARKGRAY): Likewise.
8893 (GRUB_EFI_LIGHTBLUE): Likewise.
8894 (GRUB_EFI_LIGHTGREEN): Likewise.
8895 (GRUB_EFI_LIGHTCYAN): Likewise.
8896 (GRUB_EFI_LIGHTRED): Likewise.
8897 (GRUB_EFI_LIGHTMAGENTA): Likewise.
8898 (GRUB_EFI_YELLOW): Likewise.
8899 (GRUB_EFI_WHITE): Likewise.
8900 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
8901 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
8902 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
8903 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
8904 (GRUB_EFI_BACKGROUND_RED): Likewise.
8905 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
8906 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
8907 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
8908 (GRUB_EFI_TEXT_ATTR): Likewise.
8910 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
8911 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8912 (kernel_mod_HEADERS): Added efi/time.h.
8914 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
8916 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
8917 include/grub/efi/api.h, include/grub/efi/console_control.h,
8918 include/grub/efi/efi.h, include/grub/efi/pe32.h,
8919 include/grub/i386/efi/time.h, kern/efi/efi.c,
8920 kern/i386/efi/init.c, kern/i386/efi/startup.S,
8921 and util/i386/efi/grub-mkimage.c.
8923 * Makefile.in (RMKFILES): Added i386-efi.rmk.
8925 * genmk.rb (PModule#rule): Do not export symbols if
8926 #{prefix}_EXPORTS is set to "no".
8928 * conf/i386-efi.mk: New file.
8929 * conf/i386-efi.rmk: Likewise.
8930 * include/grub/efi/api.h: Likewise.
8931 * include/grub/efi/console_control.h: Likewise.
8932 * include/grub/efi/efi.h: Likewise.
8933 * include/grub/efi/pe32.h: Likewise.
8934 * include/grub/i386/efi/time.h: Likewise.
8935 * kern/efi/efi.c: Likewise.
8936 * kern/i386/efi/init.c: Likewise.
8937 * kern/i386/efi/startup.S: Likewise.
8938 * util/i386/efi/grub-mkimage.c: Likewise.
8940 2006-04-17 Marco Gerards <marco@gnu.org>
8942 * include/grub/script.h: Include <grub/parser.h> and
8943 "grub_script.tab.h".
8944 (struct grub_lexer_param): New struct.
8945 (struct grub_parser_param): Likewise.
8946 (grub_script_create_arglist): Pass the state in an argument.
8947 (grub_script_add_arglist): Likewise.
8948 (grub_script_create_cmdline): Likewise.
8949 (grub_script_create_cmdblock): Likewise.
8950 (grub_script_create_cmdif): Likewise.
8951 (grub_script_create_cmdmenu): Likewise.
8952 (grub_script_add_cmd): Likewise.
8953 (grub_script_arg_add): Likewise.
8954 (grub_script_lexer_ref): Likewise.
8955 (grub_script_lexer_deref): Likewise.
8956 (grub_script_lexer_record_start): Likewise.
8957 (grub_script_lexer_record_stop): Likewise.
8958 (grub_script_mem_record): Likewise.
8959 (grub_script_mem_record_stop): Likewise.
8960 (grub_script_malloc): Likewise.
8961 (grub_script_yylex): Likewise.
8962 (grub_script_yyparse): Likewise.
8963 (grub_script_yyerror): Likewise.
8964 (grub_script_yylex): Likewise.
8965 (grub_script_lexer_init): Return the state.
8967 * normal/lexer.c (grub_script_lexer_state): Removed variable.
8968 (grub_script_lexer_done): Likewise.
8969 (grub_script_lexer_getline): Likewise.
8970 (grub_script_lexer_refs): Likewise.
8972 (newscript): Likewise.
8974 (recording): Likewise.
8975 (recordpos): Likewise.
8976 (recordlen): Likewise.
8977 (grub_script_lexer_init): Return the state instead of setting
8979 (grub_script_lexer_ref): Use the newly added argument for state
8981 (grub_script_lexer_deref): Likewise.
8982 (grub_script_lexer_record_start): Likewise.
8983 (grub_script_lexer_record_stop): Likewise.
8984 (recordchar): Likewise.
8985 (nextchar): Likewise.
8986 (grub_script_yylex2): Likewise.
8987 (grub_script_yylex): Likewise.
8988 (grub_script_yyerror): Likewise.
8990 * normal/parser.y (func_mem): Removed variable.
8991 (menu_entry): Likewise.
8993 (%lex-param): New parser option.
8994 (%parse-param): Likewise.
8995 (script): Always return the AST.
8996 (argument): Pass the state around.
8997 (arguments): Likewise.
8998 (grubcmd): Likewise.
8999 (commands): Likewise.
9000 (function): Likewise.
9001 (menuentry): Likewise.
9002 (if_statement): Likewise.
9005 * normal/script.c (grub_script_memused): Removed variable.
9006 (grub_script_parsed): Likewise.
9007 (grub_script_malloc): Added a state argument. Use that instead of
9009 (grub_script_mem_record): Likewise.
9010 (grub_script_mem_record_stop): Likewise.
9011 (grub_script_arg_add): Likewise.
9012 (grub_script_add_arglist): Likewise.
9013 (grub_script_create_cmdline): Likewise.
9014 (grub_script_create_cmdif): Likewise.
9015 (grub_script_create_cmdmenu): Likewise.
9016 (grub_script_add_cmd): Likewise.
9017 (grub_script_parse): Setup the state before calling the parser.
9019 2006-04-16 Marco Gerards <marco@gnu.org>
9021 * normal/command.c (grub_command_init): Remove the title command.
9023 * normal/lexer.c (grub_script_yylex): Renamed from this...
9024 (grub_script_yylex2): ... to this.
9025 (grub_script_yylex): New function. Temporary
9026 introduced to filter some tokens.
9027 (grub_script_yyerror): Print a newline.
9029 * normal/main.c (read_config_file): Output information about the
9030 lines that contain errors. Wait for a key after all lines have
9031 been processed. Don't return an empty menu.
9033 * normal/parser.y (func_mem): Don't initialize.
9034 (menu_entry): Likewise.
9035 (err): New variable.
9036 (script): Don't return anything when an error was encountered.
9037 (ws, returns): Removed rules.
9038 (argument): Disabled concatenated variable support.
9039 (arguments): Remove explicit separators.
9040 (grubcmd): Likewise.
9041 (function): Likewise.
9042 (menuentry): Likewise.
9044 (commands): Likewise. Add error handling.
9046 * normal/script.c (grub_script_create_cmdline): If
9047 `grub_script_parsed' is 0, assume the parser encountered an error.
9049 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
9051 * configure.ac: Add support for EFI. Fix the typo
9052 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
9054 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9056 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
9057 foreign multibyte characters should be shown correctly.
9059 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9061 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
9063 (read_config_file): Made it to close file before returning.
9065 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
9067 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
9068 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
9069 video/i386/pc/vbefill.c.
9071 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
9072 video/i386/pc/vbefill.c.
9074 * include/grub/video.h (grub_video_blit_format): New enum.
9075 (grub_video_mode_info): Added new member blit_format.
9076 (grub_video_get_blit_format): New function prototype.
9078 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
9080 (grub_video_vbe_map_rgb): Likewise.
9081 (grub_video_vbe_unmap_color): Likewise.
9083 * include/grub/i386/pc/vbeblit.h: New file.
9085 * include/grub/i386/pc/vbefill.h: New file.
9087 * video/video.c (grub_video_get_blit_format): New function.
9088 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
9089 (grub_video_vbe_map_rgb): Likewise.
9090 (grub_video_vbe_unmap_color): Likewise.
9092 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
9094 (grub_video_vbe_blit_render_target): Changed to use more optimized
9096 (grub_video_vbe_setup): Added detection for optimized settings.
9097 (grub_video_vbe_create_render_target): Likewise.
9099 * video/i386/pc/vbeblit.c: New file.
9101 * video/i386/pc/vbefill.c: New file.
9103 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
9105 * font/manager.c (grub_font_get_glyph): Removed font fixup from
9108 * util/unifont2pff.rb: ... and moved it to here. Improved argument
9109 parsing to support both hex and dec ranges. If filename was missing
9110 show usage information.
9112 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
9114 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
9115 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
9117 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
9118 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
9119 (video_mod_SOURCES): Added.
9120 (video_mod_CFLAGS): Likewise.
9121 (video_mod_LDFLAGS): Likewise.
9122 (gfxterm_mod_SOURCES): Likewise.
9123 (gfxterm_mod_CFLAGS): Likewise.
9124 (gfxterm_mod_LDFLAGS): Likewise.
9125 (videotest_mod_SOURCES): Likewise.
9126 (videotest_mod_CFLAGS): Likewise.
9127 (videotest_mod_LDFLAGS): Likewise.
9128 (vesafb_mod_SOURCES): Removed.
9129 (vesafb_mod_CFLAGS): Likewise.
9130 (vesafb_mod_LDFLAGS): Likewise.
9131 (vga_mod_SOURCES): Likewise.
9132 (vga_mod_CFLAGS): Likewise.
9133 (vga_mod_LDFLAGS): Likewise.
9135 * commands/videotest.c: New file.
9137 * font/manager.c (fill_with_default_glyph): Modified to use
9139 (grub_font_get_glyph): Likewise.
9140 (fontmanager): Renamed from this...
9141 (font_manager): ... to this.
9143 * include/grub/font.h (grub_font_glyph): Added new structure.
9144 (grub_font_get_glyph): Modified to use grub_font_glyph.
9146 * include/grub/misc.h (grub_abs): Added as inline function.
9148 * include/grub/video.h: New file.
9150 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
9151 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
9152 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
9153 (grub_vbe_get_controller_info): Renamed from this...
9154 (grub_vbe_bios_get_controller_info): ... to this.
9155 (grub_vbe_get_mode_info): Renamed from this...
9156 (grub_vbe_bios_get_mode_info): ... to this.
9157 (grub_vbe_set_mode): Renamed from this...
9158 (grub_vbe_bios_set_mode): ... to this.
9159 (grub_vbe_get_mode): Renamed from this...
9160 (grub_vbe_bios_get_mode): ... to this.
9161 (grub_vbe_set_memory_window): Renamed from this...
9162 (grub_vbe_bios_set_memory_window): ... to this.
9163 (grub_vbe_get_memory_window): Renamed from this...
9164 (grub_vbe_bios_get_memory_window): ... to this.
9165 (grub_vbe_set_scanline_length): Renamed from this...
9166 (grub_vbe_set_scanline_length): ... to this.
9167 (grub_vbe_get_scanline_length): Renamed from this...
9168 (grub_vbe_bios_get_scanline_length): ... to this.
9169 (grub_vbe_set_display_start): Renamed from this...
9170 (grub_vbe_bios_set_display_start): ... to this.
9171 (grub_vbe_get_display_start): Renamed from this...
9172 (grub_vbe_bios_get_display_start): ... to this.
9173 (grub_vbe_set_palette_data): Renamed from this...
9174 (grub_vbe_bios_set_palette_data): ... to this.
9175 (grub_vbe_set_pixel_rgb): Removed.
9176 (grub_vbe_set_pixel_index): Likewise.
9178 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
9180 (grub_vbe_bios_get_controller_info): ... to this.
9181 (grub_vbe_get_mode_info): Renamed from this...
9182 (grub_vbe_bios_get_mode_info): ... to this.
9183 (grub_vbe_set_mode): Renamed from this...
9184 (grub_vbe_bios_set_mode): ... to this.
9185 (grub_vbe_get_mode): Renamed from this...
9186 (grub_vbe_bios_get_mode): ... to this.
9187 (grub_vbe_set_memory_window): Renamed from this...
9188 (grub_vbe_bios_set_memory_window): ... to this.
9189 (grub_vbe_get_memory_window): Renamed from this...
9190 (grub_vbe_bios_get_memory_window): ... to this.
9191 (grub_vbe_set_scanline_length): Renamed from this...
9192 (grub_vbe_set_scanline_length): ... to this.
9193 (grub_vbe_get_scanline_length): Renamed from this...
9194 (grub_vbe_bios_get_scanline_length): ... to this.
9195 (grub_vbe_set_display_start): Renamed from this...
9196 (grub_vbe_bios_set_display_start): ... to this.
9197 (grub_vbe_get_display_start): Renamed from this...
9198 (grub_vbe_bios_get_display_start): ... to this.
9199 (grub_vbe_set_palette_data): Renamed from this...
9200 (grub_vbe_bios_set_palette_data): ... to this.
9201 (grub_vbe_bios_get_controller_info): Fixed problem with registers
9202 getting corrupted after calling it. Added more pushes and pops.
9203 (grub_vbe_bios_set_mode): Likewise.
9204 (grub_vbe_bios_get_mode): Likewise.
9205 (grub_vbe_bios_get_memory_window): Likewise.
9206 (grub_vbe_bios_set_scanline_length): Likewise.
9207 (grub_vbe_bios_get_scanline_length): Likewise.
9208 (grub_vbe_bios_get_display_start): Likewise.
9209 (grub_vbe_bios_set_palette_data): Likewise.
9211 * normal/cmdline.c (cl_set_pos): Refresh the screen.
9212 (cl_insert): Likewise.
9213 (cl_delete): Likewise.
9215 * term/gfxterm.c: New file.
9217 * term/i386/pc/vesafb.c: Removed file.
9219 * video/video.c: New file.
9221 * video/i386/pc/vbe.c (real2pm): Added new function.
9222 (grub_video_vbe_draw_pixel): Likewise.
9223 (grub_video_vbe_get_video_ptr): Likewise.
9224 (grub_video_vbe_get_pixel): Likewise
9225 (grub_video_vbe_init): Likewise.
9226 (grub_video_vbe_fini): Likewise.
9227 (grub_video_vbe_setup): Likewise.
9228 (grub_video_vbe_get_info): Likewise.
9229 (grub_video_vbe_set_palette): Likewise.
9230 (grub_video_vbe_get_palette): Likewise.
9231 (grub_video_vbe_set_viewport): Likewise.
9232 (grub_video_vbe_get_viewport): Likewise.
9233 (grub_video_vbe_map_color): Likewise.
9234 (grub_video_vbe_map_rgb): Likewise.
9235 (grub_video_vbe_map_rgba): Likewise.
9236 (grub_video_vbe_unmap_color): Likewise.
9237 (grub_video_vbe_fill_rect): Likewise.
9238 (grub_video_vbe_blit_glyph): Likewise.
9239 (grub_video_vbe_blit_bitmap): Likewise.
9240 (grub_video_vbe_blit_render_target): Likewise.
9241 (grub_video_vbe_scroll): Likewise.
9242 (grub_video_vbe_swap_buffers): Likewise.
9243 (grub_video_vbe_create_render_target): Likewise.
9244 (grub_video_vbe_delete_render_target): Likewise.
9245 (grub_video_vbe_set_active_render_target): Likewise.
9246 (grub_vbe_set_pixel_rgb): Remove function.
9247 (grub_vbe_set_pixel_index): Likewise.
9248 (index_color_mode): Remove static variable.
9249 (active_mode): Likewise.
9250 (framebuffer): Likewise.
9251 (bytes_per_scan_line): Likewise.
9252 (grub_video_vbe_adapter): Added new static variable.
9253 (framebuffer): Likewise.
9254 (render_target): Likewise.
9255 (initial_mode): Likewise.
9256 (mode_in_use): Likewise.
9257 (mode_list): Likewise.
9259 2006-03-10 Marco Gerards <marco@gnu.org>
9261 * configure.ac (AC_INIT): Bumped to 1.93.
9263 * DISTLIST: Added `include/grub/hfs.h'.
9265 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
9267 * boot/i386/pc/boot.S (general_error): Before looping, try INT
9268 18H, which might help the BIOS falling back to next boot media.
9270 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
9272 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
9273 Poe Chen <poe.poechen@gmail.com>.
9275 2006-01-17 Marco Gerards <marco@gnu.org>
9277 * include/grub/normal.h: Include <grub/script.h>.
9278 (grub_command_list): Removed struct.
9279 (grub_command_list_t): Removed type.
9280 (grub_menu_entry): Remove members `num' and `command_list'. Add
9281 members `commands' and `sourcecode'.
9282 * include/grub/script.h: Add inclusion guards.
9283 (grub_script_cmd_menuentry): New struct.
9284 (grub_script_execute_menuentry): New prototype.
9285 (grub_script_lexer_record_start): Likewise.
9286 (grub_script_lexer_record_stop): Likewise.
9287 * normal/execute.c (grub_script_execute_menuentry): New function.
9288 * normal/lexer.c (record, recording, recordpos, recordlen): New
9290 (grub_script_lexer_record_start): New function.
9291 (grub_script_lexer_record_stop): Likewise.
9292 (recordchar): Likewise.
9293 (nextchar): Likewise.
9294 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
9295 2048 as the buffer size. Add the tokens `menuentry' and `@'.
9296 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
9297 (current_menu): New variable.
9298 (free_menu): Mainly rewritten.
9299 (grub_normal_menu_addentry): New function.
9300 (read_config_file): Rewritten.
9301 * normal/menu.c (run_menu_entry): Mainly rewritten.
9302 * normal/menu_entry.c (make_screen): Rewritten the code to insert
9304 (run): Mainly rewritten.
9305 * normal/parser.y (menu_entry): New variable.
9306 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
9307 (menuentry): New rule.
9308 (command): Add `menuentry'.
9309 (if_statement): Allow additional returns before `fi'.
9310 * normal/script.c (grub_script_create_cmdmenu): New function.
9312 2006-01-03 Marco Gerards <marco@gnu.org>
9314 * INSTALL: GNU Bison is required.
9315 * configure.ac: Rewritten the test to detect Bison.
9316 * Makefile.in (YACC): New variable. Reported by Xun Sun
9317 <xun.sun.cn@gmail.com>.
9319 2006-01-03 Marco Gerards <marco@gnu.org>
9321 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
9322 the HFS+ filesystem to filesystem blocks.
9323 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
9324 GCC warning is silenced.
9326 2006-01-03 Marco Gerards <marco@gnu.org>
9328 * partmap/apple.c (apple_partition_map_iterate): Convert the data
9329 read from disk from big endian to host byte order.
9331 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
9333 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
9335 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
9336 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
9337 embedded HFS+ filesystem.
9338 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
9339 (grub_hfs_sblock): Move from here...
9340 * include/grub/hfs.h: To here... New file.
9341 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
9343 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
9345 (grub_hfsplus_volheader): Change type of member `magic' to
9347 (grub_hfsplus_data): Add new member `embedded_offset'.
9348 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
9350 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
9351 Calculate the offset.
9353 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9355 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
9357 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
9359 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9361 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
9362 ENV->NAME is NULL after allocating ENV->VALUE.
9364 2005-12-25 Marco Gerards <marco@gnu.org>
9366 * kern/env.c (grub_env_set): Rewritten the error handling code.
9368 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9370 * geninit.sh: Made more robust, and more portable.
9372 2005-12-25 Marco Gerards <marco@gnu.org>
9374 Add support for Apple HFS+ filesystems.
9376 * fs/hfsplus.c: New file.
9378 * DISTLIST: Added `fs/hfsplus.c'.
9380 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
9381 (hfsplus_mod_SOURCES): New variable.
9382 (hfsplus_mod_CFLAGS): Likewise.
9383 (hfsplus_mod_LDFLAGS): Likewise.
9384 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
9385 (grub_setup_SOURCES): Likewise.
9386 (grub_mkdevicemap_SOURCES): Likewise.
9387 (grub_emu_SOURCES): Likewise.
9388 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9390 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
9392 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
9394 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9396 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
9397 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
9398 include/grub/parser.h, include/grub/script.h, kern/parser.c,
9399 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
9400 normal/lexer.c, normal/parser.y, normal/script.c, and
9402 Removed kern/sparc64/cache.c.
9404 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
9405 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
9408 * configure.ac (AC_INIT): Bumped to 1.92.
9410 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
9412 * kern/err.c (grub_error_push): Added new function to support error
9414 (grub_error_pop): Likewise.
9415 (grub_error_stack_items): New local variable to support error stacks.
9416 (grub_error_stack_pos): Likewise.
9417 (grub_error_stack_assert): Likewise.
9418 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
9420 (grub_print_error): Added support to print errors from error stack.
9422 * include/grub/err.h (grub_error_push): Added function prototype.
9423 (grub_error_pop): Likewise.
9425 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
9427 * configure.ac: Accept `powerpc64' as host_cpu.
9428 (amd64): Rename to `biarch32'.
9430 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
9431 non-cacheline-aligned addresses.
9433 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
9434 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
9435 if `size' is non-zero.
9437 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
9439 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
9440 and `cd' to make sure the filename is not prefixed with a
9442 (pkgdata_MODULES): Add `gpt.mod'.
9443 (gpt_mod_SOURCES): New variable.
9444 (gpt_mod_CFLAGS): Likewise.
9445 (gpt_mod_LDFLAGS): Likewise.
9447 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
9449 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
9452 * partmap/gpt.c: New file.
9454 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
9455 GPT partition map is detected.
9457 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
9459 * commands/i386/pc/play.c: New file.
9460 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
9461 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
9464 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
9466 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
9467 ((unused))' to silence gcc warning.
9469 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
9471 * configure.ac: Correct `AC_PROG_YACC' test.
9473 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9475 * util/powerpc/ieee1275/grub-install.in: Run the mount point
9476 check before installing files.
9478 2005-11-22 Mike Small <smallm@panix.com>
9480 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
9481 number regex so multidigit numbers are recognized correctly.
9483 2005-11-22 Mike Small <smallm@panix.com>
9485 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
9486 debugging message before attempting to claim memory.
9487 (grub_rescue_cmd_initrd): Add a claim debugging message and try
9488 multiple addresses in case of failure.
9490 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9492 * term/tparm.c (get_space): Remove empty `if' statement.
9494 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
9496 * kern/parser.c (check_varstate): Rename `state' to 's'.
9498 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9500 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
9501 variable definitions to the beginning of each function. Sort stack
9503 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
9504 `buf' argument to `char *'.
9506 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9508 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
9509 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9510 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9511 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9512 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9513 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9514 configfile.mod, search.mod, gzio.mod and test.mod.
9515 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9516 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9517 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9518 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9519 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9520 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9521 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9522 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9523 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9524 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9525 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9526 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9527 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9528 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9529 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9530 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9531 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9532 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9533 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9534 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9535 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9536 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9537 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
9539 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
9541 (pkgdata_MODULES): Add test.mod.
9543 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9545 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
9546 appending to variables with "+=".
9547 (PModule): Use full pathname to generate *.lst filenames.
9549 * Makefile.in: Fixed list rules moved from genmk.rb.
9550 (.DELETE_ON_ERROR): New special target.
9551 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
9553 * conf/i386-pc.rmk: Include conf/common.mk.
9554 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9555 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9556 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9557 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9558 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9559 configfile.mod, search.mod, gzio.mod and test.mod.
9560 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9561 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9562 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9563 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9564 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9565 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9566 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9567 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9568 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9569 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9570 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9571 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9572 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9573 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9574 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9575 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9576 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9577 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9578 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9579 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9580 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9581 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9582 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
9584 * conf/common.rmk: ... to here. New file.
9586 * conf/common.mk: New file.
9588 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
9590 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
9591 (grub_script.tab.c): ... here.
9593 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
9594 (grub_script.tab.c): ... here.
9596 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
9597 (grub_script.tab.c): ... here.
9599 * normal/command.c (grub_command_find): Fixed a memory leak of
9600 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
9602 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9604 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
9605 "@" which marks the start of a comment on ARM.
9606 (VARIABLE): Likewise.
9608 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9610 Add support for Linux/ADFS partition tables.
9612 * partmap/acorn.c: New file.
9614 * include/grub/acorn_filecore.h: Likewise.
9616 * DISTLIST: Added `partmap/acorn.c' and
9617 `include/grub/acorn_filecore.h'.
9619 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9621 (pkgdata_MODULES): Add `acorn.mod'.
9622 (acorn_mod_SOURCES): New variable.
9623 (acorn_mod_CFLAGS): Likewise.
9625 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9627 (pkgdata_MODULES): Add `acorn.mod'.
9628 (acorn_mod_SOURCES): New variable.
9629 (acorn_mod_CFLAGS): Likewise.
9631 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
9632 (pkgdata_MODULES): Add `acorn.mod'.
9633 (acorn_mod_SOURCES): New variable.
9634 (acorn_mod_CFLAGS): Likewise.
9635 (acorn_mod_LDFLAGS): Likewise.
9637 * include/types.h (grub_disk_addr_t): New typedef.
9639 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
9641 * geninit.sh: New file.
9643 * geninitheader.sh: Likewise.
9645 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
9646 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
9647 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
9648 * commands/configfile.c (grub_configfile_init)
9649 (grub_configfile_fini): Likewise.
9650 * commands/default.c (grub_default_init, grub_default_fini):
9652 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
9653 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
9654 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
9655 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
9657 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
9658 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
9660 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
9661 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
9663 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
9665 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
9667 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
9668 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
9669 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
9670 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
9671 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
9672 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
9673 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
9674 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
9675 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
9676 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
9677 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
9678 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
9679 * partmap/amiga.c (grub_amiga_partition_map_init)
9680 (grub_amiga_partition_map_fini): Likewise.
9681 * partmap/apple.c (grub_apple_partition_map_init)
9682 (grub_apple_partition_map_fini): Likewise.
9683 * partmap/pc.c (grub_pc_partition_map_init)
9684 (grub_pc_partition_map_fini): Likewise.
9685 * partmap/sun.c (grub_sun_partition_map_init,
9686 grub_sun_partition_map_fini): Likewise.
9687 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
9690 * util/grub-emu.c: Include <grub_modules_init.h>.
9691 (main): Don't initialize and de-initialize any modules directly,
9692 use `grub_init_all' and `grub_fini_all' instead.
9694 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
9695 `grub_vesafb_mod_init'.
9696 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
9698 * term/i386/pc/vga.c (grub_vga_init): Renamed to
9699 `grub_vga_mod_init'. Updated all users.
9700 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
9702 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
9703 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
9706 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
9707 Generate a function to initialize the module in utilities.
9708 Updated all callers.
9709 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
9710 initialize the module in utilities. Updated all callers.
9712 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9714 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
9715 escape sequence and a literal ^L to clear the screen.
9717 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
9718 when returning from Open Firmware.
9720 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9722 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
9723 (grub_ofconsole_height): Likewise.
9724 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
9725 manually insert a '\n'.
9726 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
9727 `grub_ofconsole_height'. Return early if these are already set.
9729 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
9731 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9732 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
9733 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
9734 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
9735 and `normal/script.c'.
9736 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9737 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9738 (test_mod_SOURCES): New variable.
9739 (test_mod_CFLAGS): Likewise.
9740 (test_mod_LDFLAGS): Likewise.
9741 (pkgdata_MODULES): Add `test.mod'.
9742 (grub_script.tab.c): New rule.
9743 (grub_script.tab.h): Likewise.
9745 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
9747 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9748 `commands/test.c', `normal/execute.c', `normal/lexer.c',
9749 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9750 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9751 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9752 (test_mod_SOURCES): New variable.
9753 (test_mod_CFLAGS): Likewise.
9754 (pkgdata_MODULES): Add `test.mod'.
9755 (grub_script.tab.c): New rule.
9756 (grub_script.tab.h): Likewise.
9758 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
9760 Add initial scripting support.
9762 * commands/test.c: New file.
9763 * include/grub/script.h: Likewise.
9764 * normal/execute.c: Likewise.
9765 * normal/function.c: Likewise.
9766 * normal/lexer.c: Likewise.
9767 * normal/parser.y: Likewise.
9768 * normal/script.c: Likewise.
9770 * configure.ac: Add `AC_PROG_YACC' test.
9772 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
9773 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
9774 `normal/function.c' and `normal/script.c'.
9775 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9776 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9777 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
9779 (pkgdata_MODULES): Add `test.mod'.
9780 (grub_script.tab.c): New rule.
9781 (grub_script.tab.h): Likewise.
9783 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
9785 * include/grub/normal.h (grub_test_init): New prototype.
9786 (grub_test_fini): Likewise.
9788 * normal/command.c: Include <grub/script.h>.
9789 (grub_command_execute): Rewritten.
9791 * util/grub-emu.c (main): Call `grub_test_init' and
9794 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9796 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
9798 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
9799 there are no pending characters.
9801 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9803 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
9804 `grub_strndup' to drop device arguments. Replace unnecessary
9805 `grub_strndup' with `grub_strdup'.
9807 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9809 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
9810 `debug' environment variable has been set.
9812 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
9814 * Makefile.in (install-local): Use $(DATA).
9815 (uninstall): Likewise.
9816 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
9817 (sbin_UTILITIES): ... to here.
9818 (sbin_SCRIPTS): New variable.
9819 (grub_install_SOURCES): New variable.
9820 * util/powerpc/ieee1275/grub-install.in: New file.
9821 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
9823 (add_segments): Call `grub_util_get_path'.
9825 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
9827 From Timothy Baldwin:
9828 * commands/ls.c (grub_ls_list_files): Close FILE with
9830 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
9832 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
9834 * include/grub/parser.h: New file.
9836 * kern/parser.c: Likewise.
9838 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
9839 (grub_setup_SOURCES): Likewise.
9840 (grub_probefs_SOURCES): Likewise.
9841 (grub_emu_SOURCES): Likewise.
9842 (kernel_img_HEADERS): Add `parser.h'.
9844 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9845 (grub_emu_SOURCES): Add `kern/parser.c'.
9846 (grubof_SOURCES): Likewise.
9848 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9849 (grubof_SOURCES): Add `kern/parser.c'.
9851 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
9853 * kern/misc.c (grub_split_cmdline): Removed function.
9855 * kern/rescue.c: Include <grub/parser.h>.
9856 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
9857 of `grub_split_cmdline'.
9859 * normal/command.c: Include <grub/parser.h>.
9860 (grub_command_execute): Use `grub_parser_split_cmdline' instead
9861 of `grub_split_cmdline'.
9863 * normal/completion.c: Include <grub/parser.h>.
9864 (cmdline_state): New variable.
9865 (iterate_dir): End the filename with a quote depending on the
9867 (get_state): new function.
9868 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
9869 split the arguments and determine the current argument. When the
9870 argument string is not quoted, escape all spaces.
9872 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9874 * normal/sparc64/setjmp.S: New file.
9876 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9878 * include/grub/sparc64/libgcc.h: New file.
9879 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
9880 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
9881 normal/sparc64/setjmp.c.
9883 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9885 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
9886 * kern/sparc64/cache.S: New file.
9887 * kern/sparc64/cache.c: Removed.
9888 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
9889 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
9891 (COMMON_LDFLAGS): Add -melf64_sparc.
9892 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
9893 (grubof_SOURCES): Use cache.S instead of cache.c.
9894 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
9895 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
9896 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
9898 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
9899 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
9900 (linux_mod_CFLAGS): Commented out.
9901 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
9902 out because module isn't built.
9903 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
9904 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
9905 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
9906 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
9907 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
9908 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9909 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9910 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
9911 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
9912 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
9913 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9914 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9915 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
9916 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
9918 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
9920 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
9921 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
9922 longer, because HFS should not be used on PC.
9924 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9926 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
9927 consistently within the loop.
9929 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
9931 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
9932 directory can not be read.
9934 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9936 * configure.ac (AC_INIT): Increase the version number to 1.91.
9938 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
9939 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
9940 term/i386/pc/serial.c.
9942 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9944 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
9945 file size must be permitted.
9947 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
9948 between %ah and %al.
9950 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9952 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
9954 Call the hook with a NUL-terminated filename.
9955 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
9958 * kern/term.c (cursor_state): New variable.
9959 (grub_term_set_current): Reset the cursor state on a new
9961 (grub_setcursor): Rewritten to use CURSOR_STATE.
9962 (grub_getcursor): New function.
9964 * include/grub/term.h (grub_getcursor): New prototype.
9966 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
9967 integers on ARM. Reported by Timothy Baldwin
9968 <T.E.Baldwin99@members.leeds.ac.uk>.
9970 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
9972 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
9974 (grub_sfs_dir): Likewise.
9976 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
9978 Add support for the SFS filesystem.
9980 * fs/sfs.c: New file.
9982 * DISTLIST: Added `fs/sfs.c'.
9984 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
9985 (grub_probefs_SOURCES): Likewise.
9986 (grub_emu_SOURCES): Likewise.
9987 (pkgdata_MODULES): Add `sfs.mod'.
9988 (sfs_mod_SOURCES): New variable.
9989 (sfs_mod_CFLAGS): Likewise.
9990 (sfs_mod_LDFLAGS): Likewise.
9992 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
9993 (pkgdata_MODULES): Add `sfs.mod'.
9994 (sfs_mod_SOURCES): New variable.
9995 (sfs_mod_CFLAGS): Likewise.
9997 * util/grub-emu.c (main): Call `grub_sfs_init' and
10000 * include/grub/fs.h (grub_sfs_init): New prototype.
10001 (grub_sfs_fini): Likewise.
10003 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
10005 Add support for the AFFS filesystem.
10007 * fs/affs.c: New file.
10009 * DISTLIST: Added `fs/affs.c'.
10011 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
10012 (grub_probefs_SOURCES): Likewise.
10013 (grub_emu_SOURCES): Likewise.
10014 (pkgdata_MODULES): Add `affs.mod'.
10015 (affs_mod_SOURCES): New variable.
10016 (affs_mod_CFLAGS): Likewise.
10017 (affs_mod_LDFLAGS): Likewise.
10019 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
10020 (pkgdata_MODULES): Add `affs.mod'.
10021 (affs_mod_SOURCES): New variable.
10022 (affs_mod_CFLAGS): Likewise.
10024 * util/grub-emu.c (main): Call `grub_affs_init' and
10027 * include/grub/fs.h (grub_affs_init): New prototype.
10028 (grub_affs_fini): Likewise.
10030 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
10032 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
10034 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
10036 * configure.ac: Accept `x86_64' as host_cpu. In that case add
10039 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
10042 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
10043 (COMMON_LDFLAGS): New variable.
10044 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
10045 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
10046 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
10047 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
10048 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
10049 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
10050 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
10051 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
10052 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
10053 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
10054 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10055 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10056 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
10057 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
10058 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
10060 (normal_mod_ASFLAGS): Add `-m32'.
10062 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
10063 (grub_host_size_t, grub_host_ssize_t): New types.
10064 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
10065 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
10066 `GRUB_HOST_SIZEOF_VOID_P'.
10068 * include/grub/kernel.h (struct grub_module_header): Type of
10069 member offset changed to `grub_host_off_t'. Type of member size
10070 changed to `grub_host_size_t'.
10071 (struct grub_module_info): Type of member offset changed to
10072 `grub_host_off_t'. Type of member size changed to
10073 `grub_host_size_t'.
10075 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
10077 Make GRUB's kernel compliant to Multiboot Specification.
10079 * kern/i386/pc/startup.S (multiboot_header): New label.
10080 (multiboot_entry): Likewise.
10081 (multiboot_trampoline): Likewise.
10083 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10084 Increased to 0x4A0.
10086 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
10087 put parentheses after a question mark.
10088 [!GRUB_UTIL] (my_mod): New variable.
10090 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
10092 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
10094 Adds support for the XFS filesystem. Btrees are not supported
10097 * fs/xfs.c: New file.
10099 * DISTLIST: Added `fs/xfs.c'.
10101 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
10102 (grub_probefs_SOURCES): Likewise.
10103 (grub_emu_SOURCES): Likewise.
10104 (pkgdata_MODULES): Add `xfs.mod'.
10105 (xfs_mod_SOURCES): New variable.
10106 (xfs_mod_CFLAGS): Likewise.
10108 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
10109 (pkgdata_MODULES): Add `xfs.mod'.
10110 (xfs_mod_SOURCES): New variable.
10111 (xfs_mod_CFLAGS): Likewise.
10113 * util/grub-emu.c (main): Call `grub_xfs_init' and
10116 * include/grub/fs.h (grub_xfs_init): New prototype.
10117 (grub_xfs_fini): Likewise.
10120 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
10122 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
10123 color modes, allow greater than 16 colors to be configured as
10126 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10128 * normal/completion.c (complete_arguments): Add the qualifier
10129 const into OPTIONS.
10131 From Omniflux <omniflux+lists@omniflux.com>:
10132 * include/grub/terminfo.h: New file.
10133 * include/grub/tparm.h: Likewise.
10134 * include/grub/i386/pc/serial.h: Likewise.
10135 * term/terminfo.c: Likewise.
10136 * term/tparm.c: Likewise.
10137 * term/i386/pc/serial.c: Likewise.
10138 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
10140 (terminfo_mod_SOURCES): New variable.
10141 (terminfo_mod_CFLAGS): Likewise.
10142 (serial_mod_SOURCES): Likewise.
10143 (serial_mod_CFLAGS): Likewise.
10145 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
10147 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
10148 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
10149 and kern/powerpc/ieee1275/cmain.c, respectively.
10151 * boot/powerpc/ieee1275/crt0.S: Moved to ...
10152 * kern/powerpc/ieee1275/crt0.S: ... here.
10154 * boot/powerpc/ieee1275/cmain.c: Moved to ...
10155 * kern/powerpc/ieee1275/cmain.c: ... here.
10157 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
10158 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
10159 instead of boot/powerpc/ieee1275/crt0.S and
10160 boot/powerpc/ieee1275/cmain.c, respectively.
10162 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
10163 sectors. It was not used anyway.
10165 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10167 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
10168 `unused parameter' warning.
10170 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10172 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
10174 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
10177 2005-08-28 Marco Gerards <metgerards@student.han.nl>
10179 * include/grub/normal.h (enum grub_completion_type): Added
10180 `GRUB_COMPLETION_TYPE_ARGUMENT'.
10182 * normal/cmdline.c (print_completion): Handle
10183 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
10184 * normal/menu_entry.c (store_completion): Likewise.
10186 * normal/completion.c (complete_arguments): New function.
10187 (grub_normal_do_completion): Call `complete_arguments' when the
10188 current words start with a dash.
10190 2005-08-27 Marco Gerards <metgerards@student.han.nl>
10192 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
10193 `gzio.mod' instead of `io.mod').
10195 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
10197 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
10198 (DISTDIRS): Added io and video.
10199 Rewrite the search routine to make an output consistently.
10201 * DISTLIST: Added conf/sparc64-ieee1275.mk,
10202 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
10203 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
10204 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
10205 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
10206 util/powerpc/ieee1275/misc.c.
10208 * include/grub/gzio.h: New file.
10209 * io/gzio.c: Likewise.
10211 * kern/file.c (grub_file_close): Call grub_device_close only if
10212 FILE->DEVICE is not NULL.
10214 * include/grub/mm.h [!NULL] (NULL): New macro.
10216 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
10218 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
10219 (pkgdata_MODULES): Added gzio.mod.
10220 (gzio_mod_SOURCES): New variable.
10221 (gzio_mod_CFLAGS): Likewise.
10223 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
10224 (pkgdata_MODULES): Added gzio.mod.
10225 (gzio_mod_SOURCES): New variable.
10226 (gzio_mod_CFLAGS): Likewise.
10228 * commands/cat.c: Include grub/gzio.h.
10229 (grub_cmd_cat): Use grub_gzfile_open instead of
10232 * commands/cmp.c: Include grub/gzio.h.
10233 (grub_cmd_cmp): Use grub_gzfile_open instead of
10236 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
10237 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
10239 (grub_rescue_cmd_module): Likewise.
10241 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10243 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
10244 kern/sparc64/ieee1275/init.c because it contains _start.
10245 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
10247 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10249 * configure.ac: Add support for sparc64 host with ieee1275
10251 * configure: Generated from configure.ac.
10252 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
10254 (grub_ofdisk_read): Likewise.
10255 (grub_ofdisk_open): Use %p to print pointer values, and cast the
10256 pointers as (void *) to remove a warning.
10257 (grub_ofdisk_close): Likewise.
10258 (grub_ofdisk_read): Likewise.
10259 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
10260 returns, so make it return void to remove a warning.
10261 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
10262 Corresponding prototype change.
10263 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
10264 values, and cast the pointers as (void *) to remove a warning.
10265 (grub_mm_dump): Likewise.
10266 * conf/sparc64-ieee1275.mk: New file.
10267 * conf/sparc64-ieee1275.rmk: Likewise.
10268 * include/grub/sparc64/setjmp.h: Likewise.
10269 * include/grub/sparc64/types.h: Likewise.
10270 * include/grub/sparc64/ieee1275/console.h: Likewise.
10271 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10272 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10273 * include/grub/sparc64/ieee1275/time.h: Likewise.
10274 * kern/sparc64/cache.c: Likewise.
10275 * kern/sparc64/dl.c: Likewise.
10276 * kern/sparc64/ieee1275/init.c: Likewise.
10277 * kern/sparc64/ieee1275/openfw.c: Likewise.
10279 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10281 * util/console.c (grub_ncurses_putchar): If C is greater than
10282 0x7f, set C to a question mark.
10283 (grub_ncurses_getcharwidth): New function.
10284 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
10287 * normal/menu.c (print_entry): Made aware of Unicode. First,
10288 convert TITLE to UCS-4, and predict the cursor position by
10291 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
10293 * kern/misc.c (grub_utf16_to_utf8): Likewise.
10295 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10297 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
10298 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10301 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
10302 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10303 grub_strcpy and grub_strlen. Take it into account that a space
10304 character is inserted as a delimiter.
10306 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10308 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
10309 invalid magic in the error.
10311 * commands/search.c: New file.
10313 * util/grub-emu.c (main): Call grub_search_init and
10316 * kern/rescue.c (grub_rescue_print_disks): Removed.
10317 (grub_rescue_print_devices): New function.
10318 (grub_rescue_cmd_ls): Use grub_device_iterate with
10319 grub_rescue_print_devices instead of grub_disk_dev_iterate with
10320 grub_rescue_print_disks.
10322 * kern/partition.c (grub_partition_iterate): Return the result of
10323 PARTMAP->ITERATE instead of GRUB_ERRNO.
10325 * kern/device.c: Include grub/partition.h.
10326 (grub_device_iterate): New function.
10328 * include/grub/partition.h (grub_partition_iterate): Return int
10329 instead of grub_err_t.
10331 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
10333 [GRUB_UTIL] (grub_search_fini): Likewise.
10335 * include/grub/device.h (grub_device_iterate): New prototype.
10337 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10339 (pkgdata_MODULES): Added search.mod.
10340 (search_mod_SOURCES): New variable.
10341 (search_mod_CFLAGS): Likewise.
10343 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
10344 (pkgdata_MODULES): Added search.mod.
10345 (search_mod_SOURCES): New variable.
10346 (search_mod_CFLAGS): Likewise.
10348 * commands/ls.c (grub_ls_list_disks): Renamed to ...
10349 (grub_ls_list_devices): ... this, and use grub_device_iterate.
10350 All callers changed.
10352 * DISTLIST: Added commands/search.c.
10354 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10356 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
10358 (grub_getcharwidth): New function.
10360 * kern/misc.c (grub_utf8_to_ucs4): New function.
10362 * include/grub/term.h (struct grub_term): Added a new member
10364 (grub_getcharwidth): New prototype.
10366 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
10368 * term/i386/pc/console.c (map_char): New function. Segregated from
10369 grub_console_putchar.
10370 (grub_console_putchar): Use map_char.
10371 (grub_console_getcharwidth): New function.
10372 (grub_console_term): Specified grub_console_getcharwidth as
10375 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
10376 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
10378 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
10380 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
10381 on grub_strtoul completely.
10382 (write_char): Declare local variables in the beginning of the
10384 (grub_vesafb_getcharwidth): New function.
10385 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
10388 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
10390 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
10391 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
10392 commands/i386/pc/vbetest.c.
10394 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
10395 call grub_vbe_get_controller_info again, because the returned
10396 information is volatile.
10397 (grub_vbe_set_video_mode): Mostly rewritten.
10398 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
10399 grub_vbe_status_t correctly.
10400 (grub_vbe_get_video_mode_info): Likewise.
10401 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
10402 several if statements.
10404 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
10405 * commands/i386/pc/vbeinfo.c: ... this.
10407 * commands/i386/pc/vbe_test.c: Renamed to ...
10408 * commands/i386/pc/vbetest.c: ... this.
10410 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
10412 (grub_cmd_vbeinfo): ... this. Save video modes before
10413 iterating. Skip a video mode, if it is not available, not enough
10414 information is given or it is monochrome. Show the memory
10415 model. Leave the interpretation of MODEVAR to grub_strtoul
10417 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
10418 (GRUB_MOD_FINI): Likewise.
10420 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
10421 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
10422 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
10423 duplicated grub_env_get. Leave the interpretation of MODEVAR to
10424 grub_strtoul completely.
10425 (real2pm): Removed.
10426 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
10427 (GRUB_MOD_FINI): Likewise.
10429 * normal/misc.c: Include grub/mm.h.
10431 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
10432 vbe_list_modes with vbetest.mod and vbeinfo.mod.
10433 (vbe_list_modes_mod_SOURCES): Removed.
10434 (vbe_list_modes_mod_CFLAGS): Likewise.
10435 (vbe_test_mod_SOURCES): Likewise.
10436 (vbe_test_mod_CFLAGS): Likewise.
10437 (vbeinfo_mod_SOURCES): New variable.
10438 (vbeinfo_mod_CFLAGS): Likewise.
10439 (vbetest_mod_SOURCES): Likewise.
10440 (vbetest_mod_CFLAGS): Likewise.
10442 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
10444 * normal/misc.c: New file.
10446 * DISTLIST: Added normal/misc.c.
10448 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
10449 DISK to HOOK. Call HOOK with DISK.
10450 * partmap/apple.c (apple_partition_map_iterate): Likewise.
10451 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10452 * partmap/sun.c (sun_partition_map_iterate): Likewise.
10454 * normal/menu_entry.c (struct screen): Added a new member
10455 "completion_shown".
10456 (completion_buffer): New global variable.
10457 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
10458 (store_completion): New function.
10459 (complete): Likewise.
10460 (clear_completions): Likewise.
10461 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
10462 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
10463 a tab, call complete.
10465 * normal/completion.c (disk_dev): Removed.
10466 (print_simple_completion): Likewise.
10467 (print_partition_completion): Likewise.
10468 (print_func): New global variable.
10469 (add_completion): Do not take the arguments WHAT or PRINT any
10470 longer. Added a new argument TYPE. Instead of printing directly,
10471 call PRINT_FUNC if not NULL.
10472 All callers changed.
10473 (complete_device): Use a local variable DEV instead of
10474 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
10475 (grub_normal_do_completion): Take a new argument HOOK. Do not
10476 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
10477 empty string, return NULL instead.
10478 All callers changed.
10480 * normal/cmdline.c (print_completion): New function.
10482 * kern/partition.c (grub_partition_iterate): Add an argument DISK
10484 All callers changed.
10486 * kern/disk.c (grub_print_partinfo): Removed.
10488 * include/grub/partition.h (struct grub_partition_map): Add a new
10489 argument DISK into HOOK of ITERATE.
10490 (grub_partition_iterate): Add a new argument DISK to HOOK.
10492 * include/grub/normal.h (enum grub_completion_type): New enum.
10493 (grub_completion_type_t): New type.
10494 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
10495 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
10496 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
10497 (GRUB_COMPLETION_TYPE_FILE): Likewise.
10498 (grub_normal_do_completion): Added a new argument HOOK.
10499 (grub_normal_print_device_info): New prototype.
10501 * include/grub/disk.h (grub_print_partinfo): Removed.
10503 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
10504 (normal_mod_SOURCES): Likewise.
10505 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10506 (normal_mod_SOURCES): Likewise.
10508 * commands/ls.c (grub_ls_list_disks): Use
10509 grub_normal_print_device_info instead of grub_print_partinfo. Free
10511 (grub_ls_list_files): Use grub_normal_print_device_info instead of
10512 duplicating the code.
10514 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10516 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
10517 follow GCS more precisely.
10518 * commands/i386/pc/vbe_test.c: Likewise.
10519 * include/grub/i386/pc/vbe.h: Likewise.
10520 * term/i386/pc/vesafb.c: Likewise.
10521 * video/i386/pc/vbe.c: Likewise.
10523 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10525 * DISTLIST: Added term/i386/pc/vesafb.c
10526 DISTLIST: Added video/i386/pc/vbe.c
10527 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
10528 DISTLIST: Added commands/i386/pc/vbe_test.c.
10529 * commands/i386/pc/vbe_list_modes.c: New file.
10530 * commands/i386/pc/vbe_test.c: Likewise.
10531 * term/i386/pc/vesafb.c: Likewise.
10532 * video/i386/pc/vbe.c: Likewise.
10533 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
10534 (grub_vbe_probe) Added prototype.
10535 (grub_vbe_set_video_mode) Likewise.
10536 (grub_vbe_get_video_mode) Likewise.
10537 (grub_vbe_get_video_mode_info) Likewise.
10538 (grub_vbe_set_pixel_rgb) Likewise.
10539 (grub_vbe_set_pixel_index) Likewise.
10540 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
10541 (pkgdata_MODULES): Added vesafb.mod.
10542 (pkgdata_MODULES): Added vbe_list_modes.mod.
10543 (pkgdata_MODULES): Added vbe_test.mod.
10544 (vbe_mod_SOURCES): Added.
10545 (vbe_mod_CFLAGS): Likewise.
10546 (vesafb_mod_SOURCES): Likewise.
10547 (vesafb_mod_CFLAGS): Likewise.
10548 (vbe_list_modes_mod_SOURCES): Likewise.
10549 (vbe_list_modes_mod_CFLAGS): Likewise.
10550 (vbe_test_mod_SOURCES): Likewise.
10551 (vbe_test_mod_CFLAGS): Likewise.
10553 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
10555 * normal/command.c (grub_command_execute): If INTERACTIVE is
10556 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
10557 CMDLINE. Disable the pager if INTERACTIVE is true.
10558 All callers are changed.
10560 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
10561 before reading a config file.
10562 * normal/main.c (read_config_file): Even if a command is not
10563 found, register it if it is within an entry.
10565 * util/grub-emu.c: Include sys/types.h and unistd.h.
10566 (options): Added --hold.
10567 (struct arguments): Added a new member "hold".
10568 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
10570 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
10571 cleared by a debugger, if it is not zero.
10573 * include/grub/normal.h (grub_command_execute): Add an argument
10576 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
10578 * DISTLIST: Added include/grub/i386/pc/vbe.h.
10580 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
10582 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
10583 program with another one, because the old one didn't detect a bug
10584 in gcc-3.4. Always use regparm 2, because the new test is still
10585 not enough for gcc-4.0. Someone must investigate a simple test
10586 case which detects a bug in gcc-4.0.
10588 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
10590 * DISTLIST: Added normal/completion.c.
10592 * normal/completion.c: New file.
10594 * term/i386/pc/console.c (grub_console_getwh): New function.
10595 (grub_console_term): Assign grub_console_getwh to getwh.
10597 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
10598 function is defined in normal/completion.c as
10599 grub_normal_do_completion.
10600 (grub_cmdline_get): Use grub_normal_do_completion instead of
10603 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
10604 returns non-zero, otherwise return 0.
10605 (grub_partition_iterate): First, probe the partition map. Then,
10606 call ITERATE only for this partition map.
10608 * kern/misc.c (grub_strncmp): Rewritten.
10610 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
10611 returns non-zero. Otherwise return 0.
10613 * include/grub/partition.h (grub_partition_map_iterate): Return
10614 int instead of void.
10616 * include/grub/normal.h (grub_normal_do_completion): New prototype.
10618 * include/grub/misc.h (grub_strncmp): Change the type of N to
10621 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
10624 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
10625 unsigned explicitly before comparing it with I.
10627 * kern/main.c (grub_env_write_root): Add the attribute unused into
10630 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10631 normal/completion.c.
10632 (normal_mod_SOURCES): Likewise.
10633 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10634 (normal_mod_SOURCES): Likewise.
10636 * normal/command.c (grub_iterate_commands): If ITERATE returns
10637 non-zero, return one immediately.
10639 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
10641 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
10642 * kern/i386/pc/startup.S: Updated Global Descriptor table's
10644 (grub_vbe_get_controller_info): New function.
10645 (grub_vbe_get_mode_info): Likewise.
10646 (grub_vbe_set_mode): Likewise.
10647 (grub_vbe_get_mode): Likewise.
10648 (grub_vbe_set_memory_window): Likewise.
10649 (grub_vbe_get_memory_window): Likewise.
10650 (grub_vbe_set_scanline_length): Likewise.
10651 (grub_vbe_get_scanline_length): Likewise.
10652 (grub_vbe_set_display_start): Likewise.
10653 (grub_vbe_get_display_start): Likewise.
10654 (grub_vbe_set_palette_data): Likewise.
10655 * include/grub/i386/pc/vbe.h: New file.
10657 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10659 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10660 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
10661 * DISTLIST: Likewise.
10662 * kern/ieee1275/of.c: Moved to ...
10663 * kern/ieee1275/ieee1275.c: ... here.
10665 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10667 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
10668 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
10669 Pass 0 as `end' parameter to grub_strtoul().
10671 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10673 * include/grub/powerpc/ieee1275/console.h: Do not include
10674 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
10676 (grub_console_cur_color): Remove i386-specific prototype.
10677 (grub_console_real_putchar): Likewise.
10678 (grub_console_checkkey): Likewise.
10679 (grub_console_getkey): Likewise.
10680 (grub_console_getxy): Likewise.
10681 (grub_console_gotoxy): Likewise.
10682 (grub_console_cls): Likewise.
10683 (grub_console_setcursor): Likewise.
10684 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
10685 Include <grub/machine/console.h>.
10686 * term/ieee1275/ofconsole.c: Likewise.
10688 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
10690 * Makefile.in (LIBLZO): New variable.
10692 * configure.ac: Check for LZO version 2.
10694 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
10695 lzo/lzo1x.h instead of lzo1x.h.
10697 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
10700 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
10701 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
10703 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
10704 copying the data from PARTITION to P.
10706 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10708 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
10709 negative, unload the module.
10711 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
10712 map is "pc_partition_map" but not "pc".
10713 (usage): Fix the description. The options are --boot-image and
10714 --core-image but not --boot-file or --core-file.
10715 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
10716 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
10719 * util/i386/pc/grub-install.in: Do not specify --boot-file or
10720 --core-file. Specify INSTALL_DEVICE as an argument.
10722 * util/console.c: Include config.h.
10723 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
10724 [HAVE_NCURSES_H]: Include ncurses.h.
10725 [HAVE_CURSES_H]: Include curses.h.
10726 [!A_NORMAL] (A_NORMAL): Defined as zero.
10727 [!A_STANDOUT] (A_STANDOUT): Likewise.
10729 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
10731 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
10733 * configure.ac: Check for curses libraries and headers.
10735 * Makefile.in (LIBCURSES): New variable.
10737 * genmk.rb (Script::rule): Set the executable bits.
10739 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
10740 name of the PC partition map is "pc_partition_map" but not "pc".
10742 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10744 * util/i386/pc/grub-install.in (grub_probefs): New variable.
10745 (modules): Likewise.
10746 (usage): Added descriptions for --modules and --grub-probefs.
10747 Handle --modules and --grub-probefs. Save the arguments in MODULES
10748 and GRUB_PROBEFS, respectively.
10749 Auto-detect a filesystem module against GRUBDIR. If the result is
10750 empty and modules are not specified explicitly, abort the
10751 installation. Add the result to MODULES.
10753 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
10754 disk/powerpc/ieee1275/ofdisk.c,
10755 include/grub/powerpc/ieee1275/init.h and
10756 term/powerpc/ieee1275/ofconsole.c.
10757 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
10758 term/ieee1275/ofconsole.c.
10760 * include/grub/powerpc/ieee1275/console.h: Resurrected.
10762 * COPYING: Upgraded to the latest version. Only the address of the
10763 FSF office has changed.
10765 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10767 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10768 kern/ieee1275.c with kern/ieee1275/of.c.
10770 * kern/ieee1275.c: Moved to ...
10771 * kern/ieee1275/of.c: ... here.
10773 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
10775 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
10778 * config.guess: Updated to the latest version from gnulib.
10779 * config.sub: Likewise.
10780 * install.sh: Likewise.
10781 * mkinstalldirs: Likewise.
10783 * include/grub/console.h: Removed. This file is arch-specific. Do
10784 not put this in include/grub.
10786 * include/grub/i386/pc/console.h: Resurrected.
10788 * util/console.c: Include grub/machine/console.h instead of
10790 * util/grub-emu.c: Likewise.
10792 2005-08-04 Marco Gerards <metgerards@student.han.nl>
10794 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
10797 From Vincent Pelletier <subdino2004@yahoo.fr>
10798 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
10799 Redefined to use grub_getwh.
10800 (grub_term): New member named getwh.
10801 (grub_getwh): New prototype.
10802 * kern/term.c (grub_getwh): New function.
10803 * term/i386/pc/console.c (grub_console_getwh): New function.
10804 (grub_console_term): New member `getwh'.
10805 * term/i386/pc/vga.c (grub_vga_getwh): New function.
10806 (grub_vga_term): New member `getwh'.
10807 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
10809 (grub_ofconsole_getw): New function.
10810 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
10811 (grub_ofconsole_term): New field named getwh and new initial
10814 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
10816 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
10817 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
10818 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
10819 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
10820 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
10821 of <grub/machine/ieee1275.h>.
10822 * commands/ieee1275/reboot.c: Likewise.
10823 * boot/powerpc/ieee1275/ieee1275.c: Move ...
10824 * kern/ieee1275.c: ... to here. All users updated. Change all
10825 parameter structs to use new type `grub_ieee1275_cell_t'.
10826 * term/powerpc/ieee1275/ofconsole.c: Move ...
10827 * term/ieee1275/ofconsole.c: ... to here. All users updated.
10828 * disk/powerpc/ieee1275/ofdisk.c: Move ...
10829 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
10830 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
10832 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
10833 Remove unused prototypes. All users updated.
10834 * include/grub/powerpc/ieee1275/console.h: Removed.
10835 * include/grub/powerpc/ieee1275/ieee1275.h: Define
10836 `grub_ieee1275_cell_t'.
10837 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
10838 Cast comparisons with -1 to the correct type.
10839 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
10840 type to match `grub_ieee1275_entry_fn'.
10842 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
10844 * DISTLIST: Added util/i386/pc/grub-probefs.c.
10846 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
10847 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
10849 (grub_probefs_SOURCES): New variable.
10851 * util/i386/pc/grub-probefs.c: New file.
10853 * util/i386/pc/grub-setup.c (main): Call
10854 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
10855 grub_hfs_init and grub_jfs_init to initialize the system. Call
10856 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
10857 grub_pc_partition_map_fini to finish the system.
10859 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
10861 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
10863 (grub_multiboot_load_elf32): Likewise.
10864 (grub_multiboot_is_elf64): Likewise.
10865 (grub_multiboot_load_elf64): Likewise.
10866 (grub_multiboot_load_elf): Likewise.
10867 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
10868 an ELF32 or ELF64 file.
10869 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
10871 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
10872 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
10873 NULL before calling FS->LABEL.
10874 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
10875 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
10876 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
10877 before calling FS->LABEL.
10879 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
10881 * util/i386/pc/grub-install.in (datadir): New variable.
10883 (pkgdatadir): New variable.
10884 (pkglibdir): Removed.
10886 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
10888 * DISTLIST: Added util/i386/pc/grub-install.in.
10890 * util/i386/pc/grub-install.in: New file.
10892 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
10893 (grub_install_SOURCES): Likewise.
10895 * genmk.rb: Added support for scripts.
10896 (Script): New class.
10897 (scripts): New variable.
10899 * Makefile.in (install-local): Install sbin_SCRIPTS by
10901 (uninstall): Remove sbin_SCRIPTS.
10903 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
10904 device, try to get a GRUB device by
10905 grub_util_biosdisk_get_grub_dev.
10908 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
10909 description for --device-map.
10911 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10913 Change the semantics of variable hooks. They now return strings
10914 instead of error values.
10916 * util/i386/pc/grub-setup.c: Include grub/env.h.
10917 (setup): Use grub_device_set_root instead of grub_env_set.
10919 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
10920 grub_env_get instead of grub_device_set_root and
10921 grub_device_get_root, respectively.
10923 * kern/main.c (grub_env_write_root): New function.
10924 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
10925 grub_env_set instead of grub_device_set_root.
10927 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
10929 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
10930 rather than calling ENV->WRITE_HOOK afterwards.
10931 (grub_env_get): Return the result of ENV->READ_HOOK rather than
10932 passing a pointer of a pointer.
10933 (grub_register_variable_hook): Change the types of "read_hook" and
10934 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
10936 Allocate the default empty string on the heap, because this string
10937 may be freed later.
10939 * kern/device.c: Include grub/env.h.
10940 (grub_device_set_root): Removed.
10941 (grub_device_get_root): Likewise.
10942 (grub_device_open): Use grub_env_get instead of
10943 grub_device_get_root.
10945 * include/grub/env.h (grub_env_read_hook_t): New type.
10946 (grub_env_write_hook_t): Likewise.
10947 (grub_env_var): Change the types of "read_hook" and "write_hook"
10948 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
10949 (grub_register_variable_hook): Likewise.
10951 * include/grub/device.h (grub_device_set_root): Removed.
10952 (grub_device_set_root): Likewise.
10954 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
10955 make sure that DIRNAME terminates with '/', so that
10956 grub_fat_find_dir will fail if PATH is not a directory.
10958 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
10960 Use the qualifier auto for print_files and print_files_long.
10961 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
10963 Put a newline only if there is no error.
10964 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
10967 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10969 * kern/partition.c (grub_partition_probe): Initialize PART to
10970 NULL. Otherwise, when no partition map is registered, this returns
10973 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
10975 * partmap/apple.c (apple_partition_map_iterate): Check if POS
10976 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
10979 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
10981 * commands/ls.c (grub_ls_list_disks): Print the filesystem
10982 information on each device, if it does not have partitions. Print
10983 "Device" instead of "Disk", because this function is not specific
10986 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
10987 static to ensure that it is put on the memory rather than a
10990 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10992 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
10993 (grub_cat_init): Likewise.
10994 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
10995 (options): Likewise.
10996 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
10997 (grub_configfile_init): Likewise.
10998 * font/manager.c (GRUB_MOD_INIT): Likewise.
10999 * commands/help.c (GRUB_MOD_INIT): Likewise.
11000 (grub_help_init): Likewise.
11001 * normal/command.c (grub_command_init): Likewise.
11002 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
11003 * disk/loopback.c (grub_loop_init): Likewise.
11004 (GRUB_MOD_INIT): Likewise.
11005 * commands/ls.c (grub_ls_init): Likewise.
11006 (GRUB_MOD_INIT): Likewise.
11007 (options): Likewise.
11008 * commands/boot.c (grub_boot_init): Likewise.
11009 (GRUB_MOD_INIT): Likewise.
11010 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
11011 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
11012 (GRUB_MOD_INIT): Likewise.
11013 * commands/cmp.c (grub_cmp_init): Likewise.
11014 (GRUB_MOD_INIT): Likewise.
11016 * normal/arg.c: Use <> instead of "" to include header files.
11017 (SHORT_ARG_HELP): New macro.
11018 (SHORT_ARG_USAGE): Likewise.
11019 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
11020 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
11022 (find_short): Check if C is 'h' or 'u' explicitly.
11023 (grub_arg_show_help): Use space characters instead of tabs. Treat
11024 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
11025 are shown with --help and --usage only if they are not used for
11026 the command itself.
11027 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
11030 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
11031 const into "longarg". Change the type of "shortarg" to int.
11033 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11035 * boot/i386/pc/boot.S (boot_drive_check): New label.
11037 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
11040 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
11041 which do not pass a boot drive correctly. Copied from GRUB Legacy.
11043 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11045 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
11046 When turning off Gate A20, skip the check and return immediately,
11047 because this is not fatal usually.
11049 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
11051 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
11052 be 0x7C00 instead of 0x8000.
11054 * boot/i386/pc/pxeboot.S: Rewritten.
11056 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
11058 (gate_a20_check_state): Read a byte from 0x108000. Invert the
11061 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
11063 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
11064 robustness. This routine now supports a BIOS call and System
11065 Control Port A to modify the gate A20.
11067 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11068 Increased to 0x440.
11070 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
11072 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
11073 device path and resulting ihandle.
11074 (grub_ofdisk_close): dprintf the ihandle being closed.
11075 (grub_ofdisk_read): dprintf function parameters.
11076 * kern/mm.c (grub_mm_init_region): Likewise.
11077 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
11078 (grub_linux_boot): dprintf the Linux entry point, initrd address and
11079 size, and boot arguments.
11080 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
11081 before loading into memory.
11082 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
11083 before loading into memory.
11085 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
11087 * kern/mm.c: Added much documentation.
11088 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
11089 8, set to 5 instead of 8.
11091 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11093 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
11095 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
11096 (grub_mkdevicemap_SOURCES): New variable.
11098 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
11099 lib/device.c of GRUB Legacy.
11101 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11103 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
11104 instead of PATH is NULL.
11106 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
11108 * commands/cmp.c (BUFFER_SIZE): New macro.
11109 (grub_cmd_cmp): Close the right file at the right time. Compare
11110 only data just read. Don't report files of different size as
11111 identical. Dynamically allocate buffers. Move variable
11112 declarations at the beginning of function.
11114 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
11116 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
11119 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
11121 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
11122 when backspace is pressed at beginning of line.
11124 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
11126 * DISTLIST: Added genfslist.sh.
11128 * normal/main.c (fs_module_list): New variable.
11129 (autoload_fs_module): New function.
11130 (read_fs_list): Likewise.
11131 (grub_normal_execute): Call read_fs_list.
11133 * kern/fs.c (grub_fs_autoload_hook): New variable.
11134 (grub_fs_probe): Added support for auto-loading.
11136 * include/grub/normal.h (struct grub_fs_module_list): New struct.
11137 (grub_fs_module_list_t): New type.
11139 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
11140 (grub_fs_autoload_hook): New prototype.
11142 * genfslist.sh: New file.
11144 * genmk.rb: Added a rule to generate a filesystem list.
11146 2005-06-30 Marco Gerards <metgerards@student.han.nl>
11148 * configure.ac: Fix the test for cross-compiling.
11150 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
11151 define GRUB_UTIL anymore.
11153 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
11154 so this function works on other systems than just big endian.
11155 (load_modules): Likewise.
11156 (add_segments): Likewise.
11158 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
11160 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
11161 contains `l' modifier, get a long from va_arg().
11163 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
11165 * kern/mm.c (grub_free): If the next free block which is being
11166 merged is the first free block, set the first block to the block
11168 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
11170 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11172 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
11173 `grub_ieee1275_chosen'.
11175 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11177 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
11178 (grub_ieee1275_chosen): New variable.
11179 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
11181 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
11182 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11183 Rename first argument to `phandle' for consistency.
11184 (grub_ieee1275_get_property_length): Likewise.
11185 (grub_ieee1275_next_property): Likewise. Change type of first argument
11186 to grub_ieee1275_phandle_t.
11187 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
11188 Move export next to declaration.
11189 (grub_ieee1275_chosen): New variable.
11190 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
11191 Correct cosmetic typo.
11192 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
11193 `grub_ieee1275_chosen'.
11194 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
11195 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
11196 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
11197 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
11198 `grub_ieee1275_chosen'.
11200 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
11202 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
11204 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
11205 /chosen/bootargs as "variable=value" pairs.
11207 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
11209 * include/grub/misc.h (grub_dprintf): New macro.
11210 (grub_real_dprintf): New prototype.
11211 (grub_strword): Likewise.
11212 (grub_iswordseparator): Likewise.
11213 * kern/misc.c (grub_real_dprintf): New function.
11214 (grub_strword): Likewise.
11215 (grub_iswordseparator): Likewise.
11217 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
11219 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
11220 (roundup): Remove macro.
11221 (grub_ieee1275_flags): Make static.
11222 (grub_ieee1275_realmode): Remove.
11223 (grub_ieee1275_test_flag): New function.
11224 (grub_ieee1275_set_flag): Likewise.
11225 (find_options): Rename to `grub_ieee1275_find_options'; update
11226 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
11227 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
11228 (cmain): New prototype.
11229 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
11230 `grub_ieee1275_flags' directly.
11231 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
11232 machine/biosdisk.h.
11233 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
11234 Don't include grub/machine/init.h.
11235 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
11236 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11238 (grub_ieee1275_realmode): Likewise.
11239 (grub_ieee1275_flag): New enum.
11240 (grub_ieee1275_test_flag): New prototype.
11241 (grub_ieee1275_set_flag): New prototype.
11242 * include/grub/powerpc/ieee1275/init.h: Remove file.
11243 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
11244 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
11245 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
11246 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
11248 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
11249 `grub_ieee1275_test_flag'.
11250 (grub_ieee1275_encode_devname): Likewise.
11252 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
11254 * include/grub/powerpc/ieee1275/ieee1275.h
11255 (grub_ieee1275_encode_devname): New prototype.
11256 (grub_ieee1275_get_filename): Likewise.
11257 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
11259 (grub_set_prefix): Likewise.
11260 (grub_machine_init): Call grub_set_prefix.
11261 * kern/powerpc/ieee1275/openfw.c: Fix typos.
11262 (grub_parse_type): New enum.
11263 (grub_ieee1275_get_devargs): New function.
11264 (grub_ieee1275_get_devname): Likewise.
11265 (grub_ieee1275_parse_args): Likewise.
11266 (grub_ieee1275_get_filename): Likewise.
11267 (grub_ieee1275_encode_devname): Likewise.
11269 2005-03-30 Marco Gerards <metgerards@student.han.nl>
11271 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
11272 `grub_loader_unset'.
11274 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
11276 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
11277 instead of grub_ieee1275_interpret.
11278 (grub_halt_init): New function.
11279 (grub_halt_fini): Likewise.
11280 (GRUB_MOD_INIT): Correct message grammar.
11281 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
11282 instead of grub_ieee1275_interpret.
11283 (grub_reboot_init): New function.
11284 (grub_reboot_fini): Likewise.
11285 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
11286 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
11287 util/i386/pc/misc.c with commands/ieee1275/halt.c,
11288 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
11289 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
11291 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
11293 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
11295 (grub_halt): Likewise.
11296 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
11297 (cmain): Remove __attribute__((unused)).
11298 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
11299 (grub_heap_len): Likewise.
11300 (grub_machine_fini): New function.
11301 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
11302 (grub_halt): Likewise.
11303 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
11305 * util/powerpc/ieee1275/misc.c: New file.
11307 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11309 * DISTLIST: New file.
11310 * gendistlist.sh: Likewise.
11312 * Makefile.in (COMMON_DISTFILES): Removed.
11313 (BOOT_DISTFILES): Likewise.
11314 (CONF_DISTFILES): Likewise.
11315 (DISK_DISTFILES): Likewise.
11316 (FS_DISTFILES): Likewise.
11317 (INCLUDE_DISTFILES): Likewise.
11318 (KERN_DISTFILES): Likewise.
11319 (LOADER_DISTFILES): Likewise.
11320 (TERM_DISTFILES): Likewise.
11321 (UTIL_DISTFILES): Likewise.
11322 (DISTFILES): Likewise.
11323 (uninstall): Uninstall files in $(pkgdata_DATA).
11324 (DISTLIST): New target.
11325 (distdir): Use the contents of the file DISTLIST to get a list of
11328 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11330 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
11331 descriptor. This is ported from GRUB Legacy.
11333 * gencmdlist.sh: Added an extra semicolon to make it work with
11334 old sed versions. Reported by Robert Bihlmeyer
11335 <robbe@orcus.priv.at>.
11337 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
11339 Automatic loading of commands is supported.
11341 * normal/main.c (read_command_list): New function.
11342 (grub_normal_execute): Call read_command_list.
11344 * normal/command.c (grub_register_command): Return zero or CMD.
11345 Allocate CMD->NAME from the heap.
11346 Initialize CMD->MODULE_NAME to zero.
11347 Find the same name as well. If the same command is found and it is
11348 a dummy command, overwrite members. If it is not a dummy command,
11350 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
11351 (grub_command_find): If a dummy command is found, load a module
11352 and retry to find a command only once.
11354 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
11355 make sure that each command is loaded.
11357 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
11359 (struct grub_command): Remove const from the member `name'.
11360 Add a new member `module_name'.
11361 (grub_register_command): Return grub_command_t.
11363 * commands/help.c (grub_cmd_help): Call grub_command_find to make
11364 sure that each command is loaded.
11366 * genmk.rb (PModule::rule): Specify a module name without the
11367 suffix ".mod" to gencmdlist.sh.
11369 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11371 * gencmdlist.sh: New file.
11373 * genmk.rb (PModule::rule): Generate a rule for a command list.
11375 Generate command.lst from $(COMMANDFILES).
11377 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
11378 (DATA): Added $(pkgdata_DATA).
11379 (install-local): Install files in $(pkgdata_DATA).
11381 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11383 * term/i386/pc/vga.c (debug_command): Removed.
11384 (GRUB_MOD_INIT): Do not register the command "debug".
11386 From Hollis Blanchard:
11387 * commands/configfile.c: New file.
11388 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11389 commands/configfile.c.
11390 (pkgdata_MODULES): Added configfile.mod.
11391 (configfile_mod_SOURCES): New variable.
11392 (configfile_mod_CFLAGS): Likewise.
11393 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11394 commands/configfile.c.
11395 (pkgdata_MODULES): Added configfile.mod.
11396 (configfile_mod_SOURCES): New variable.
11397 (configfile_mod_CFLAGS): Likewise.
11398 * util/grub-emu.c (main): Call grub_configfile_init and
11399 grub_configfile_fini.
11400 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
11402 [GRUB_UTIL] (grub_configfile_fini): Likewise.
11404 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11406 * normal/arg.c (grub_arg_show_help): Do not show the bug report
11409 * commands/help.c (grub_cmd_help): Do not print newlines after
11410 the last command in print_command_help.
11412 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11414 * commands/default.h: New file.
11415 * commands/timeout.h: Likewise.
11416 * normal/context.c: Likewise.
11418 * util/misc.c: Do not include sys/times.h.
11419 Include sys/time.h and grub/machine/time.h.
11420 (grub_get_rtc): Rewritten with gettimeofday.
11422 * util/grub-emu.c (main): Call grub_default_init and
11423 grub_timeout_init before grub_normal_init, and call
11424 grub_timeout_fini and grub_default_fini after grub_main.
11426 * util/console.c (grub_ncurses_checkkey): Return the read
11429 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
11432 * normal/main.c (read_config_file): Push MENU. If this fails,
11433 print an error and wait for a user input.
11434 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
11435 If a menu is empty or an error occurs, pop MENU.
11436 (grub_normal_execute): Pop and free MENU after grub_menu_run
11439 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
11441 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
11443 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11445 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
11447 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11450 * include/grub/normal.h (struct grub_menu_list): New struct.
11451 (grub_menu_list_t): New type.
11452 (struct grub_context): New struct.
11453 (grub_context_t): New type.
11454 (grub_register_command): Got rid of EXPORT_FUNC.
11455 (grub_unregister_command): Likewise.
11456 (grub_context_get): New prototype.
11457 (grub_context_get_current_menu): Likewise.
11458 (grub_context_push_menu): Likewise.
11459 (grub_context_pop_menu): Likewise.
11460 [GRUB_UTIL] (grub_default_init): Likewise.
11461 [GRUB_UTIL] (grub_default_fini): Likewise.
11462 [GRUB_UTIL] (grub_timeout_init): Likewise.
11463 [GRUB_UTIL] (grub_timeout_fini): Likewise.
11465 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
11466 commands/timeout.c and normal/context.c.
11467 (pkgdata_MODULES): Added default.mod and timeout.mod.
11468 (normal_mod_SOURCES): Added normal/context.c.
11469 (default_mod_SOURCES): New variable.
11470 (default_mod_CFLAGS): Likewise.
11471 (timeout_mod_SOURCES): Likewise.
11472 (timeout_mod_CFLAGS): Likewise.
11473 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
11475 (pkgdata_MODULES): Added default.mod and timeout.mod.
11476 (normal_mod_SOURCES): Added normal/context.c.
11477 (default_mod_SOURCES): New variable.
11478 (default_mod_CFLAGS): Likewise.
11479 (timeout_mod_SOURCES): Likewise.
11480 (timeout_mod_CFLAGS): Likewise.
11482 * Makefile.in (all-local): Added $(MKFILES).
11484 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
11486 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
11487 (grub_emu_SOURCES): Likewise.
11488 (pkgdata_MODULES): Add `sun.mod'.
11489 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11490 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11492 (pkgdata_MODULES): Add `sun.mod'.
11493 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11494 * include/grub/partition.h (grub_sun_partition_map_init): New
11496 (grub_sun_partition_map_fini): Likewise.
11497 * partmap/sun.c: New file.
11498 * util/grub-emu.c (main): Initialize and de-initialize the sun
11499 partitionmap support.
11501 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
11503 This implements an Emacs-like menu entry editor.
11505 * normal/menu_entry.c: New file.
11507 * util/console.c (grub_ncurses_putchar): Translate some Unicode
11508 characters to ASCII.
11509 (saved_char): New variable.
11510 (grub_ncurses_checkkey): Rewritten completely.
11511 (grub_ncurses_getkey): Likewise.
11512 (grub_ncurses_init): Call raw instead of cbreak.
11514 * normal/menu.c (print_entry): Do not put a space.
11515 (init_page): Renamed to ...
11516 (grub_menu_init_page): ... this. All callers changed.
11517 (edit_menu_entry): Removed.
11518 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
11520 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
11522 * kern/misc.c (grub_vprintf): Call grub_refresh.
11524 * normal/menu.c (DISP_LEFT): Renamed to ...
11525 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
11526 * normal/menu.c (DISP_UP): Renamed to ...
11527 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
11528 * normal/menu.c (DISP_RIGHT): Renamed to ...
11529 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
11530 * normal/menu.c (DISP_DOWN): Renamed to ...
11531 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
11532 * normal/menu.c (DISP_HLINE): Renamed to ...
11533 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
11534 * normal/menu.c (DISP_VLINE): Renamed to ...
11535 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
11536 * normal/menu.c (DISP_UL): Renamed to ...
11537 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
11538 * normal/menu.c (DISP_UR): Renamed to ...
11539 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
11540 * normal/menu.c (DISP_LL): Renamed to ...
11541 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
11542 * normal/menu.c (DISP_LR): Renamed to ...
11543 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
11544 * normal/menu.c (TERM_WIDTH): Renamed to ...
11545 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
11546 * normal/menu.c (TERM_HEIGHT): Renamed to ...
11547 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
11548 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
11549 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
11550 * normal/menu.c (TERM_MARGIN): Renamed to ...
11551 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
11552 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
11553 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
11554 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
11555 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
11556 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
11557 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
11558 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
11559 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
11560 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
11561 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
11562 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
11563 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
11564 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
11565 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
11566 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
11567 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
11568 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
11569 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
11570 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
11571 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
11572 All callers changed.
11574 * include/grub/normal.h: New prototype.
11576 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11577 normal/menu_entry.c.
11578 (normal_mod_SOURCES): Likewise.
11579 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11580 (normal_mod_SOURCES): Likewise.
11582 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
11584 * include/grub/normal.h (grub_halt_init): New prototype.
11585 (grub_halt_fini): Likewise.
11586 (grub_reboot_init): Likewise.
11587 (grub_reboot_fini): Likewise.
11589 * util/grub-emu.c: Include signal.h.
11590 (main_env): New global variable.
11591 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
11593 (grub_machine_fini): New function.
11594 (main): Call grub_halt_init and grub_reboot_init before
11595 grub_main, and grub_reboot_fini and grub_halt_fini after it.
11596 Call setjmp with MAIN_ENV to go back afterwards.
11597 Call grub_machine_fini right before return.
11599 * include/grub/util/misc.h: Include setjmp.h.
11600 (main_env): New prototype.
11602 * include/grub/kernel.h (grub_machine_fini): New prototype.
11603 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
11604 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
11606 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
11607 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
11608 * term/i386/pc/console.c (grub_console_fini): Likewise.
11610 * util/i386/pc/misc.c: New file.
11612 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11613 util/i386/pc/misc.c, commands/i386/pc/halt.c and
11614 commands/i386/pc/reboot.c.
11616 2005-02-14 Guillem Jover <guillem@hadrons.org>
11618 * include/grub/dl.h (grub_dl_check_header): New prototype.
11619 (grub_arch_dl_check_header): Change return type to grub_err_t,
11620 remove size parameter and export function. Update all callers.
11621 * kern/dl.c (grub_dl_check_header): New function.
11622 (grub_dl_load_core): Use `grub_dl_check_header' instead of
11623 `grub_arch_dl_check_header'. Check ELF type. Check if sections
11624 are inside the core.
11625 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
11626 independent ELF header checks.
11627 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11628 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
11629 `grub_dl_check_header' instead of explicit checks. Check for the
11631 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
11632 `grub_dl_check_header' instead of explicit checks. Remove arch
11633 specific ELF header checks.
11635 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
11638 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
11640 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
11641 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
11643 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
11645 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
11646 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
11647 (part_map_iterate): Clear `grub_errno' and return 0 if
11648 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
11649 * partmap/amiga.c (amiga_partition_map_iterate): Return
11650 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
11651 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11653 2005-02-01 Guillem Jover <guillem@hadrons.org>
11655 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
11658 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11660 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
11662 (grub_rescue_cmd_linux): New prototype.
11663 (grub_rescue_cmd_initrd): Likewise.
11664 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
11666 (grub_linux_release_mem): Release the memory for the initrd.
11667 (grub_load_linux): Renamed from this...
11668 (grub_rescue_cmd_linux): ...To this. Changed all callers.
11669 Changed `entry' not to be static. Loop over memory regions to
11670 find another one when the default fails.
11671 (grub_rescue_cmd_initrd): New function.
11672 (grub_linux_init): Remove function.
11673 (grub_linux_fini): Likewise.
11674 (GRUB_MOD_INIT): Register `initrd'.
11675 (GRUB_MOD_FINI): Unregister `initrd'.
11676 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
11678 (grub_linux_normal_fini): Likewise.
11679 (GRUB_MOD_INIT): Register `initrd'.
11680 (GRUB_MOD_FINI): Unregister `initrd'.
11682 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11684 * commands/help.c: New file.
11685 * normal/arg.c (show_help): Renamed to...
11686 (grub_arg_show_help): ... this.
11687 * commands/i386/pc/halt.c: New file.
11688 * commands/i386/pc/reboot.c: Likewise.
11689 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
11690 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
11691 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
11692 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
11694 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11696 (pkgdata_MODULES): Add `help.mod'.
11697 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
11698 * grub/i386/pc/init.h (grub_reboot): New prototype.
11699 (grub_halt): Likewise.
11700 * include/grub/normal.h (grub_arg_show_help): New prototype.
11701 (grub_help_init): Likewise.
11702 (grub_help_fini): Likewise.
11703 * util/grub-emu.c (main): Initialize and deinitialize the help
11706 * normal/cmdline.c (grub_cmdline_get): Doc fix.
11708 * normal/command.c (grub_command_init): Fixed the description of
11709 the `set' and `unset' commands.
11711 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11713 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
11715 * commands/ieee1275/halt.c: New file.
11716 * commands/ieee1275/reboot.c: Likewise.
11717 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
11718 `__attribute__ ((unused))'. Some GCS related fixed.
11719 (grub_suspend_init) [GRUB_UTIL]: Function removed.
11720 (grub_suspend_fini): Likewise.
11721 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
11723 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
11724 (halt_mod_CFLAGS): New variables.
11725 * include/grub/powerpc/ieee1275/ieee1275.h
11726 (grub_ieee1275_interpret): New prototype.
11728 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
11730 * include/grub/misc.h (memmove): New prototype.
11731 (memcpy): Likewise.
11733 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
11735 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
11736 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
11738 2005-01-22 Marco Gerards <metgerards@student.han.nl>
11740 * kern/misc.c (grub_strndup): Function rewritten.
11742 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
11744 * normal/menu.c (TERM_WIDTH): Macro redefined.
11745 (TERM_TOP_BORDER_Y): Likewise.
11746 (draw_border): Replaced while-loop by a for-loop. Make the number
11747 of lines consistent with the number of lines displayed in
11748 print_entries. Added a margin below the rectangle.
11749 (print_entry): Make the entry fit in the rectangle.
11750 (print_entries): Display the scroll arrows next to the right
11753 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11755 * fs/minix.c (grub_minix_find_file): Reserve more space for
11756 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
11757 `grub_strncpy' to copy `path' into it.
11759 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11761 Add the loopback device, a device via which files can be accessed
11764 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
11765 (pkgdata_MODULES): Add loopback.mod.
11766 (loopback_mod_SOURCES): New variable.
11767 (loopback_mod_CFLAGS): Likewise.
11768 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11770 (pkgdata_MODULES): Add loopback.mod.
11771 (loopback_mod_SOURCES): New variable.
11772 (loopback_mod_CFLAGS): Likewise.
11773 * disk/loopback.c: new file.
11774 * include/grub/normal.h (grub_loop_init): New prototype.
11775 (grub_loop_fini): New prototype.
11776 * util/grub-emu.c (main): Initialize and de-initialize loopback
11778 * include/grub/disk.h (grub_disk_dev_id): Add
11779 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
11781 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
11783 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
11785 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
11786 (suspend_mod_SOURCES): New variable.
11787 (suspend_mod_CFLAGS): Likewise.
11788 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
11790 * commands/ieee1275/suspend.c: New file.
11792 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11794 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
11795 ((unused))' to `__attribute__ ((used))'.
11796 (GRUB_MOD_FINI): Likewise.
11797 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
11798 * genmk.rb (PModule): Assign space to common symbols when linking
11801 2005-01-20 Marco Gerards <metgerards@student.han.nl>
11803 * include/grub/mm.h (grub_mm_init_region): Change the type of the
11804 `unsigned' arguments to `grub_size_t'.
11805 (grub_malloc): Likewise.
11806 (grub_realloc): Likewise.
11807 (grub_memalign): Likewise.
11808 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
11809 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11810 * util/misc.c (grub_malloc): Likewise.
11811 (grub_realloc): Likewise.
11812 * kern/mm.c (get_header_from_pointer): Change the casts to
11813 `unsigned' into a cast to `grub_size_t'.
11815 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
11816 point to `currnode' when `currnode' is changed.
11818 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
11819 Schottelius <nico-linux@schottelius.org>.
11821 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
11823 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
11824 (note_path): Remove variable.
11825 (GRUB_IEEE1275_NOTE_NAME): New macro.
11826 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
11827 (grub_ieee1275_note_hdr): New structure.
11828 (grub_ieee1275_note_desc): Likewise.
11829 (grub_ieee1275_note): Likewise.
11830 (load_note): Remove `dir' argument. All callers updated. Remove
11831 `note_img' and `path'. Do not load a file from `note_path'.
11832 Initialize a struct grub_ieee1275_note and write that to `out'.
11833 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
11835 2005-01-05 Marco Gerards <metgerards@student.han.nl>
11837 * util/misc.c (grub_util_read_image): Revert last change. It
11838 called `grub_util_read_at', which seeks from the beginning of the
11841 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
11843 * TODO: Add note about endianness in grub-mkimage.
11844 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
11846 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
11847 (grub_mkimage_SOURCES): New target.
11848 * include/grub/kernel.h (grub_start_addr): Remove variable.
11849 (grub_end_addr): Likewise.
11850 (grub_total_module_size): Likewise.
11851 (grub_kernel_image_size): Likewise.
11852 (GRUB_MODULE_MAGIC): New constant.
11853 (grub_module_info): New structure.
11854 (grub_arch_modules_addr): New prototype.
11855 (grub_get_end_addr): Remove prototype.
11856 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
11857 * include/grub/powerpc/ieee1275/kernel.h: New file.
11858 * include/grub/util/misc.h (grub_util_get_fp_size): New
11860 (grub_util_read_at): Likewise.
11861 (grub_util_write_image_at): Likewise.
11862 * kern/main.c (grub_get_end_addr): Remove function.
11863 (grub_load_modules): Call grub_arch_modules_addr instead of using
11864 grub_end_addr. Look for a grub_module_info struct in memory. Use
11865 the grub_module_info fields instead of calling grub_get_end_addr
11866 as loop conditions. Move grub_add_unused_region code here.
11867 (grub_add_unused_region): Remove function.
11868 * kern/i386/pc/init.c: Include grub/cache.h.
11869 (grub_machine_init): Remove call to grub_get_end_addr. Remove
11870 one call to add_mem_region.
11871 (grub_arch_modules_addr): New function.
11872 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
11873 (grub_total_module_size): Likewise.
11874 Include grub/machine/kernel.h.
11875 (grub_arch_modules_addr): New function.
11876 * util/grub-emu.c (grub_end_addr): Remove variable.
11877 (grub_total_module_size): Likewise.
11878 (grub_arch_modules_addr): New function.
11879 * util/misc.c: Include unistd.h.
11880 (grub_util_get_fp_size): New function.
11881 (grub_util_read_at): Likewise.
11882 (grub_util_write_image_at): Likewise.
11883 (grub_util_read_image): Call grub_util_read_at.
11884 (grub_util_write_image): Call grub_util_write_image_at.
11885 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
11886 additional memory in kernel_img for a struct grub_module_info.
11887 Fill in that grub_module_info.
11888 * util/powerpc/ieee1275/grub-mkimage.c: New file.
11890 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11892 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
11894 * include/grub/powerpc/ieee1275/ieee1275.h
11895 (grub_ieee1275_milliseconds): New prototype.
11896 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
11898 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
11899 grub_ieee1275_milliseconds.
11901 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11903 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
11905 (find_options): New function.
11906 (cmain): Call find_options.
11907 * include/grub/powerpc/ieee1275/ieee1275.h
11908 (grub_ieee1275_realmode): New extern variable.
11909 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
11910 grub_map if grub_ieee1275_realmode is false.
11912 2004-12-29 Marco Gerards <metgerards@student.han.nl>
11914 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
11915 lines are inserted and make it work like readline. Reported by
11916 Vincent Pelletier <subdino2004@yahoo.fr>.
11918 2004-12-28 Marco Gerards <metgerards@student.han.nl>
11920 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
11922 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
11923 `kern/powerpc/cache.S'.
11925 2004-12-27 Marco Gerards <metgerards@student.han.nl>
11927 * genmk.rb: Handle the `Program' class in the main loop. Written
11928 by Johan Rydberg <jrydberg@gnu.org>.
11929 (Program): New class.
11930 (programs): New variable.
11931 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
11932 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
11933 instead of "grub/kernel.h". Include <grub/machine/init.h>.
11934 (help_arch): Function removed.
11935 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
11936 `powerpc/libgcc.h' and `loader.h'.
11937 (pkgdata_PROGRAMS): New variable.
11938 (sbin_UTILITIES): Variable removed.
11939 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
11940 (grubof_SOURCES): Variable re-defined so it only includes the
11941 core functionality.
11942 (grubof_CFLAGS): Remove `-DGRUBOF'.
11943 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
11944 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
11945 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
11946 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
11947 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
11948 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
11949 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
11950 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
11951 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
11952 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
11953 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11954 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
11955 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
11956 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
11957 (pc_mod_CFLAGS): New variables.
11958 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
11959 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
11960 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
11961 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
11963 * include/grub/i386/pc/init.h (grub_os_area_addr)
11964 (rub_os_area_size): ... to here.
11965 * include/grub/powerpc/ieee1275/ieee1275.h
11966 (grub_ieee1275_entry_fn): Export symbol.
11967 * include/grub/powerpc/ieee1275/init.h: New file.
11968 * include/grub/powerpc/libgcc.h: Likewise.
11969 * include/grub/cache.h: Likewise.
11970 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
11971 <hollis@penguinppc.org>.
11972 * kern/dl.c: Include <grub/cache.h>.
11973 (grub_dl_flush_cache): New function.
11974 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
11976 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
11977 (grub_console_init): Removed prototypes.
11978 (grub_machine_init): Don't initialize the modules anymore.
11979 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
11981 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
11982 Macro undef removed.
11983 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
11984 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
11985 relocation `R_PPC_REL32'. Return an error when the relocation is
11987 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
11988 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
11989 * util/misc.c (grub_arch_sync_caches): Likewise.
11991 2004-12-19 Marco Gerards <metgerards@student.han.nl>
11993 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
11994 `symlist.c', add `grubof_symlist.c'.
11995 (symlist.c): Variable removed.
11996 (grubof_HEADERS): Variable added.
11997 (grubof_symlist.c): New target.
11998 (kernel_syms.lst): Use `grubof_HEADERS' instead of
11999 `kernel_img_HEADERS'.
12000 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
12001 * kern/powerpc/dl.c: New file.
12002 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
12004 (grub_arch_dl_relocate_symbols): Likewise.
12005 (grub_register_exported_symbols): Likewise.
12007 2004-12-13 Marco Gerards <metgerards@student.han.nl>
12009 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
12010 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
12011 to fail instead. Reported by Vincent Pelletier
12012 <subdino2004@yahoo.fr>.
12014 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
12015 it is not allocated. Reported by Vincent Pelletier
12016 <subdino2004@yahoo.fr>.
12018 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
12019 output so the output looks better.
12021 2004-12-04 Marco Gerards <metgerards@student.han.nl>
12023 Modulize the partition map support and add support for the amiga
12026 * commands/ls.c: Include <grub/partition.h> instead of
12027 <grub/machine/partition.h>.
12028 * kern/disk.c: Likewise.
12029 * kern/rescue.c: Likewise.
12030 * loader/i386/pc/chainloader.c: Likewise.
12031 * normal/cmdline.c: Likewise.
12032 * kern/powerpc/ieee1275/init.c: Likewise.
12033 (grub_machine_init): Call `grub_pc_partition_map_init',
12034 `grub_amiga_partition_map_init' and
12035 `grub_apple_partition_map_init'.
12036 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
12037 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
12038 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
12039 `partition.h' and `pc_partition.h'.
12040 (grub_setup_SOURCES): Remove
12041 `disk/i386/pc/partition.c'. Add `kern/partition.c',
12042 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12043 (grub_emu_SOURCES): Likewise.
12044 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
12045 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
12046 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
12047 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12048 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
12049 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
12050 (grubof_SOURCES): Likewise.
12051 * disk/i386/pc/partition.c: File removed.
12052 * disk/powerpc/ieee1275/partition.c: Likewise.
12053 * include/grub/powerpc/ieee1275/partition.h: Likewise.
12054 * include/grub/i386/pc/partition.h: Likewise.
12055 * kern/partition.c: New file.
12056 * partmap/amiga.c: Likewise.
12057 * partmap/apple.c: Likewise.
12058 * partmap/pc.c: Likewise.
12059 * include/grub/partition.h: Likewise..
12060 * include/grub/pc_partition.h: Likewise.
12061 * util/grub-emu.c: Include <grub/partition.h> instead of
12062 <grub/machine/partition.h>.
12063 (main): Call `grub_pc_partition_map_init',
12064 `grub_amiga_partition_map_init' and
12065 `grub_apple_partition_map_init' and deinitialize afterwards.
12066 * util/i386/pc/biosdisk.c: Include `#include
12067 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12068 `<grub/machine/partition.h>'.
12069 * util/i386/pc/grub-setup.c: Likewise.
12070 * util/i386/pc/biosdisk.c: Likewise.
12071 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
12072 partition information in case of a PC partition.
12073 * util/i386/pc/grub-setup.c: Include `#include
12074 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12075 `<grub/machine/partition.h>'.
12076 (setup): Only access the PC specific partition information in case
12079 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
12081 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
12082 (grub_longjmp): Likewise.
12083 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
12085 * normal/powerpc/setjmp.S: New file.
12086 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12087 `normal/powerpc/setjmp.S'.
12088 (grubof_CFLAGS): Add `-DGRUBOF'.
12089 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
12090 [GRUB_UTIL && !GRUBOF].
12092 2004-11-16 Marco Gerards <metgerards@student.han.nl>
12094 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
12095 property named `name'. Correctly handle the error returned by
12096 `grub_ieee1275_finddevice' if a device can not be opened.
12098 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
12100 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
12101 `actual' for negativity.
12102 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12105 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12107 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
12108 (PAGE_OFFSET): New macro.
12109 (CRTC_ADDR_PORT): Likewise.
12110 (CRTC_DATA_PORT): Likewise.
12111 (START_ADDR_HIGH_REGISTER): Likewise.
12112 (START_ADDR_LOW_REGISTER): Likewise.
12113 (GRAPHICS_ADDR_PORT): Likewise.
12114 (GRAPHICS_DATA_PORT): Likewise.
12115 (READ_MAP_REGISTER): Likewise.
12116 (INPUT_STATUS1_REGISTER): Likewise.
12117 (INPUT_STATUS1_VERTR_BIT): Likewise.
12118 (page): New variable.
12119 (wait_vretrace): New function.
12120 (set_read_map): Likewise.
12121 (set_start_address): Likewise.
12122 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
12124 (check_vga_mem): Take the page into account.
12125 (write_char): Likewise.
12126 (write_cursor): Likewise.
12127 (scroll_up): Likewise. Copy the page to the page that is not
12128 shown and switch between both pages.
12129 (grub_vga_putchar): Fix off by one error.
12130 (grub_vga_cls): Wait for the vertical retrace. Take the page into
12133 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12135 Add support for iso9660 (including rockridge).
12137 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12138 (iso9660_mod_SOURCES): New variable.
12139 (iso9660_mod_CFLAGS): Likewise.
12140 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12141 * include/grub/fs.h (grub_iso9660_init): New prototype.
12142 * util/grub-emu.c (main): Call `grub_iso9660_init'.
12143 * fs/iso9660.c: New file.
12145 * include/grub/misc.h (grub_strncat): New prototype.
12146 * kern/misc.c (grub_strncat): New function.
12148 * fs/hfs.c (grub_hfs_mount): Translate the error
12149 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
12150 * fs/jfs.c (grub_jfs_mount): Likewise.
12151 * fs/ufs.c (grub_ufs_mount): Likewise.
12153 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
12155 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
12156 which initialized BAT registers.
12157 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
12158 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12160 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
12161 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12163 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
12164 (grub_mapclaim): Likewise.
12165 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
12166 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
12169 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
12171 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
12172 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
12173 -ffreestanding and -msoft-float.
12175 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
12177 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
12178 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
12179 set in grub_ieee1275_flags.
12181 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
12183 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
12185 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
12186 grub_console_init first.
12187 Change the memory range used for grub_ieee1275_claim and
12188 grub_mm_init_region.
12189 Print an error message if the claim fails.
12190 Include <grub/misc.h>.
12192 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
12194 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
12195 Call grub_children_iterate for device nodes of type `scsi',
12197 (grub_ofdisk_open): Remove manual device alias resolution.
12198 Fix memory leak when device cannot be opened.
12199 * include/grub/powerpc/ieee1275/ieee1275.h
12200 (grub_children_iterate): New prototype.
12201 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
12203 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12204 Return -1 if args.size was -1.
12206 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12208 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
12209 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
12210 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
12211 Open Firmware's memory for it; claim memory from _start to _end.
12212 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
12213 (_end): New extern.
12214 (_start): Zero BSS from __bss_start to _end.
12215 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12217 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
12219 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12221 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
12222 -1 if args.base was -1.
12224 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
12226 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
12227 escape sequence instead of a literal ^L. Also call
12228 grub_ofconsole_gotoxy.
12230 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
12232 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
12233 void * arguments to grub_addr_t. All callers updated. Also make
12234 the `result' argument optional.
12235 (grub_ieee1275_release): change void * arguments to grub_addr_t.
12236 All callers updated.
12238 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
12240 * commands/ls.c (grub_ls_list_files): Use the string following the
12241 initial ')', if present, as the filesystem path.
12242 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
12244 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
12246 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
12248 Make the source code of the menu interface more readable.
12250 * normal/menu.c: Include grub/mm.h.
12251 (TERM_WIDTH): New macro.
12252 (TERM_HEIGHT): Likewise.
12253 (TERM_INFO_HEIGHT): Likewise.
12254 (TERM_MARGIN): Likewise.
12255 (TERM_SCROLL_WIDTH): Likewise.
12256 (TERM_TOP_BORDER_Y): Likewise.
12257 (TERM_LEFT_BORDER_X): Likewise.
12258 (TERM_BORDER_WIDTH): Likewise.
12259 (TERM_MESSAGE_HEIGHT): Likewise.
12260 (TERM_BORDER_HEIGHT): Likewise.
12261 (TERM_NUM_ENTRIES): Likewise.
12262 (TERM_FIRST_ENTRY_Y): Likewise.
12263 (TERM_ENTRY_WIDTH): Likewise.
12264 (TERM_CURSOR_X): Likewise.
12265 (draw_border): Use macros instead of magic numbers.
12266 (print_entry): Likewise.
12267 (print_entries): Likewise.
12268 (run_menu): Likewise. Also, handle the key 'e'.
12269 (run_menu_entry): Ignore empty command lines.
12270 (print_message): Added a new argument EDIT. If EDIT is true,
12271 print a different message.
12272 (init_page): Likewise.
12273 (edit_menu_entry): New function. Not implemented yet.
12275 2004-09-17 Marco Gerards <metgerards@student.han.nl>
12277 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
12278 can be loaded from normal mode.
12280 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
12282 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
12283 (multiboot_mod_CFLAGS): New variables.
12284 * loader/i386/pc/linux_normal.c: New file.
12285 * loader/i386/pc/multiboot_normal.c: Likewise.
12287 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
12288 attribute `unused'.
12290 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
12291 `fdiro' to read the mode information from instead of `diro'.
12293 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
12294 looking up a symlink.
12296 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
12298 * normal/command.c (grub_command_execute): Don't parse the
12299 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
12300 flags of the command.
12302 * normal/menu.c (grub_menu_run): Fix typo.
12304 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
12306 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
12308 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
12309 `y + 1' instead of `y - 1'.
12311 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
12313 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
12315 From Hollis Blanchard <hollis@penguinppc.org>:
12316 * kern/misc.c (memmove): New alias for grub_memmove.
12317 (memcmp): New alias for grub_memcmp.
12318 (memset): New alias for grub_memset.
12319 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12320 Change "int handle" to "grub_ieee1275_phandle_t handle".
12321 * include/grub/powerpc/ieee1275/ieee1275.h
12322 (grub_ieee1275_get_property): Likewise.
12324 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
12326 Added normal mode command `chainloader' as module chain.mod, which
12327 depends on normal.mod and _chain.mod.
12329 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
12330 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
12331 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
12333 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
12334 but arguments parsing moved to ...
12335 (grub_chainloader_cmd): ... here. New function.
12336 * include/grub/i386/pc/chainloader.h: New file.
12337 * loader/i386/pc/chainloader_normal.c: Likewise.
12339 2004-09-11 Marco Gerards <metgerards@student.han.nl>
12341 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
12342 (grub_mkimage_LDFLAGS): Likewise.
12343 (grub_emu_SOURCES): Likewise.
12344 (kernel_img_HEADERS): Added fshelp.h.
12345 * fs/ext2.c: Include <grub/fshelp.h>.
12346 (FILETYPE_REG): New macro.
12347 (FILETYPE_INO_REG): Likewise.
12348 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
12350 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
12352 (grub_fshelp_node): New struct.
12353 (grub_ext2_data): Added member `diropen'. Changed member `inode'
12355 (grub_ext2_get_file_block): Removed function.
12356 (grub_ext2_read_block): New function.
12357 (grub_ext2_read_file): Replaced parameter `data' by `node'.
12358 This function was written.
12359 (grub_ext2_mount): Read the root inode. Create a diropen struct.
12360 (grub_ext2_find_file): Removed function.
12361 (grub_ext2_read_symlink): New function.
12362 (grub_ext2_iterate_dir): Likewise.
12363 (grub_ext2_open): Rewritten.
12364 (grub_ext2_dir): Rewritten.
12365 * include/grub/fshelp.h: New file.
12366 * fs/fshelp.c: Likewise.
12368 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
12370 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
12371 (print_message): Add a missing newline.
12372 (run_menu): Added timeout support.
12373 (run_menu_entry): New local function.
12374 (grub_menu_run): Added support for booting.
12376 * kern/loader.c (grub_loader_is_loaded): New function.
12378 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
12379 (grub_get_rtc): Exported.
12381 * include/grub/i386/pc/time.h: Include grub/symbol.h.
12382 (grub_get_rtc): Exported.
12384 * include/grub/normal.h (struct grub_command_list): Remove
12385 constant from the member `command'.
12387 * include/grub/loader.h (grub_loader_is_loaded): Declared.
12389 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
12391 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
12393 2004-08-28 Marco Gerards <metgerards@student.han.nl>
12395 Add support for the JFS filesystem.
12397 * fs/jfs.c: New file.
12398 * include/grub/fs.h (grub_jfs_init): New prototype.
12399 (grub_jfs_fini): New prototype.
12400 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
12401 (grub_emu_SOURCES): Likewise.
12402 (pkgdata_MODULES): Add jfs.mod.
12403 (jfs_mod_SOURCES): New variable.
12404 (jfs_mod_CFLAGS): Likewise.
12405 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
12406 (grubof_SOURCES): Likewise.
12407 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
12409 * fs/fat.c (grub_fat_find_dir): Convert the filename little
12410 endian to the host endian.
12411 (grub_fat_utf16_to_utf8): Move function from there...
12412 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
12413 the endianness of the source string anymore.
12414 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
12416 2004-08-24 Marco Gerards <metgerards@student.han.nl>
12418 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
12419 (grub_boot_fini) [GRUB_UTIL]: Likewise.
12420 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
12421 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
12423 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
12424 (grub_hfs_iterate_dir): Make the function static. Add prototypes
12425 for `node_found' and `it_dir'.
12426 (grub_hfs_dir): Add prototype for `dir_hook'.
12428 * fs/minix.c (grub_minix_get_file_block): Add prototype for
12429 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
12430 and `indir32' to silence a gcc warning.
12432 * include/grub/fs.h (grub_hfs_init): New prototype.
12433 (grub_hfs_fini): Likewise.
12436 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12438 Each disk device has its own id now. This is useful to make use
12439 of multiple disk devices.
12441 * include/grub/disk.h (grub_disk_dev_id): New enum.
12442 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
12443 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
12445 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
12446 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12448 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
12449 GRUB_DISK_DEVICE_OFDISK_ID as an id.
12451 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
12452 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12454 * include/grub/disk.h (struct grub_disk_dev): Added a new member
12455 "id" which is used by the cache manager.
12457 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
12460 2004-08-18 Marco Gerards <metgerards@student.han.nl>
12462 * fs/hfs.c: New file.
12463 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
12464 (grub_emu_SOURCES): Likewise.
12465 (pkgdata_MODULES): Add hfs.mod.
12466 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
12467 (grubof_SOURCES): Likewise.
12468 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
12470 * include/grub/misc.h (grub_strncasecmp): Add prototype.
12471 * kern/misc.c (grub_strncasecmp): Add function.
12473 2004-08-14 Marco Gerards <metgerards@student.han.nl>
12475 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
12478 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
12479 (grub_ext2_dir): In case the directory entry type is unknown, read
12482 2004-08-02 Peter Bruin <pjbruin@dds.nl>
12484 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
12485 grub_load_linux instead of grub_rescue_cmd_linux as second
12486 argument of grub_rescue_register_command.
12488 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
12490 2004-07-27 Marco Gerards <metgerards@student.han.nl>
12492 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
12494 * commands/boot.c: Remove the check for `GRUB_UTIL'.
12495 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12496 `loader/powerpc/ieee1275/linux.c',
12497 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
12498 * include/grub/powerpc/ieee1275/ieee1275.h
12499 (grub_ieee1275_release): New prototype.
12500 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
12501 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
12502 normal, boot, linux and linux_normal.
12503 * loader/powerpc/ieee1275/linux.c: New file.
12504 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12506 2004-07-12 Marco Gerards <metgerards@student.han.nl>
12508 * normal/arg.c (grub_arg_parse): Correct error handling after
12509 reallocating the argumentlist (check if `argl' is not null instead
12510 of checking if `args' is not null).
12511 * kern/mm.c (grub_realloc): Return the same pointer when using the
12512 same region, instead of returning the header address.
12514 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12516 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
12517 one block instead of two when looking for the initial partition.
12518 (grub_partition_probe): Initialize the local variable `p' with 0.
12519 Use base 10 for the grub_strtoul call.
12520 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
12521 need for one local variable.
12522 (grub_strtoul): Don't add the new value to `num', instead of that
12525 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12527 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
12528 (pxeboot_img_SOURCES): New variable.
12529 (pxeboot_img_ASFLAGS): Likewise.
12530 (pxeboot_img_LDFLAGS): Likewise.
12531 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
12532 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
12533 <lode_leroy@hotmail.com>.
12535 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12537 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
12538 there was no input.
12540 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12542 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
12543 the history buffer logic.
12545 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12547 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
12548 (FILETYPE_INO_SYMLINK): New macros.
12549 (grub_ext2_find_file): Check if the node is a directory using the
12550 inode stat information instead of using the filetype in the
12551 dirent. Exclude the first character of an absolute symlink.
12552 (grub_ext2_dir): Mask out the filetype part of the mode member of
12555 2004-05-24 Marco Gerards <metgerards@student.han.nl>
12557 Add support for UFS version 1 and 2. Add support for the minix
12558 filesystem version 1 and 2, both the variants with 14 and 30 long
12561 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
12563 (grub_emu_SOURCES): Likewise.
12564 (pkgdata_MODULES): Add ufs.mod and minix.mod.
12565 (ufs_mod_SOURCES): New variable.
12566 (ufs_mod_CFLAGS): Likewise.
12567 (minix_mod_SOURCES): Likewise.
12568 (minix_mod_CFLAGS): Likewise.
12569 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
12571 (grubof_SOURCES): Likewise.
12572 * fs/ufs.c: New file.
12573 * fs/minix.c: New file.
12574 * include/grub/fs.h (grub_ufs_init): New prototype.
12575 (grub_ufs_fini): Likewise.
12576 (grub_minix_init): Likewise.
12577 (grub_minix_fini): Likewise.
12578 * util/grub-emu.c (main): Initialize and deinitialize UFS and
12581 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
12583 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
12584 commands/ls.c, commands/terminal.c, commands/boot.c,
12585 commands/cmp.c and commands/cat.c.
12586 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
12588 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
12591 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12593 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
12594 and grub_, respectively. Because the conversion is trivial and
12595 mechanical, I omit the details here. Please refer to the CVS
12596 if you need more information.
12598 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12600 * include/pupa: Renamed to ...
12601 * include/grub: ... this.
12602 * util/i386/pc/pupa-mkimage.c: Renamed to ...
12603 * util/i386/pc/grub-mkimage.c: ... this.
12604 * util/i386/pc/pupa-setup.c: Renamed to ...
12605 * util/i386/pc/grub-setup.c: ... this.
12606 * util/pupa-emu.c: Renamed to ...
12607 * util/grub-emu.c: ... this.
12609 2004-03-29 Marco Gerards <metgerards@student.han.nl>
12611 Add support for the newworld apple macintosh (PPC). This has been
12612 tested on the powerbook 2000 only. It only adds support for
12613 generic ieee1275 functions, console and disk support. This should
12614 be easy to port to other architectures with support for Open
12617 * configure.ac: Accept the powerpc as host_cpu. In the case of
12618 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
12619 specific tests are only executed while building for the i386.
12620 Inverse test for crosscompile.
12621 * genmk.rb (Utility): Allow assembler files.
12622 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
12623 * conf/powerpc-ieee1275.rmk: New file.
12624 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
12625 * disk/powerpc/ieee1275/partition.c: Likewise.
12626 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
12627 * include/pupa/powerpc/ieee1275/console.h: Likewise.
12628 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
12629 * include/pupa/powerpc/ieee1275/time.h: Likewise.
12630 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
12631 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
12632 * include/pupa/powerpc/ieee1275/loader.h
12633 * include/pupa/powerpc/setjmp.h: Likewise.
12634 * include/pupa/powerpc/types.h: Likewise.
12635 * kern/powerpc/ieee1275/init.c: Likewise.
12636 * kern/powerpc/ieee1275/openfw.c: Likewise.
12637 * term/powerpc/ieee1275/ofconsole.c: Likewise.
12639 These files were written by Johan Rydberg
12640 (jrydberg@night.trouble.net) and I only modified them slightly.
12642 * boot/powerpc/ieee1275/cmain.c: New file.
12643 * boot/powerpc/ieee1275/crt0.S: Likewise.
12644 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
12645 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
12647 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
12649 * Makefile.in: Update copyright.
12650 * genmodsrc.sh: Likewise.
12651 * gensymlist.sh: Likewise.
12652 * term/i386/pc/vga.c: Indent correctly.
12654 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
12655 bugreporting address.
12656 * util/i386/pc/pupa-setup.c (usage): Likewise,
12657 (main): Call pupa_ext2_init and pupa_ext2_fini.
12659 * fs/fat.c (log2): Renamed to ...
12660 (fat_log2): ... this.
12661 All callers changed.
12662 * kern/misc.c (memcpy): Alias to pupa_memmove.
12663 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
12665 * util/console.c (pupa_ncurses_fini): Return 0.
12667 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
12668 Move fail label here.
12669 [__GNU__]: Don't warn when using stat.
12670 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
12671 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
12672 long int. Use strtol instead of strtoul.
12674 2004-03-14 Marco Gerards <metgerards@student.han.nl>
12676 * commands/boot.c: New file.
12677 * commands/cat.c: Likewise.
12678 * commands/cmp.c: Likewise.
12679 * commands/ls.c: Likewise.
12680 * commands/terminal.c: Likewise.
12681 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
12682 (pupa_register_command): Changed interface to match the new
12684 (pupa_command_execute): Changed (almost rewritten) so it uses
12685 pupa_split_command. Added support for setting variables using the
12687 (rescue_command): Changed to work with the new argument parser.
12688 (terminal_command): Moved from here to commands/terminal.c.
12689 (set_command): New function.
12690 (unset_command): New function.
12691 (insmod_command): New function.
12692 (rmmod_command): New function.
12693 (lsmod_command): New function.
12694 (pupa_command_init): Don't initialize the command terminal
12695 anymore. Initialize the commands set, unset, insmod, rmmod and
12697 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
12698 (kernel_img_HEADERS): Add arg.h and env.h.
12699 (pupa_mkimage_LDFLAGS): Add kern/env.c.
12700 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
12701 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
12703 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
12705 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
12706 (boot_mod_SOURCES): New variable.
12707 (terminal_mod_SOURCES): Likewise.
12708 (ls_mod_SOURCES): Likewise.
12709 (cmp_mod_SOURCES): Likewise.
12710 (cat_mod_SOURCES): Likewise.
12712 * normal/arg.c: New file.
12713 * kern/env.c: Likewise.
12714 * include/pupa/arg.h: Likewise.
12715 * include/pupa/env.h: Likewise.
12716 * font/manager.c (font_command): Changed to match argument parsing
12718 (PUPA_MOD_INIT): Likewise.
12719 * hello/hello.c (pupa_cmd_hello): Likewise.
12720 (PUPA_MOD_INIT): Likewise.
12721 * include/pupa/disk.h: Include <pupa/device.h>.
12722 (pupa_print_partinfo): New prototype.
12723 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
12724 (pupa_dl_get_prefix): Likewise.
12725 * include/pupa/misc.h: Include <pupa/err.h>.
12726 (pupa_isgraph): New prototype.
12727 (pupa_isdigit): Likewise.
12728 (pupa_split_cmdline): Likewise.
12729 * include/pupa/normal.h: Include <pupa/arg.h>.
12730 (pupa_command): Changed the prototype of the member `func' to
12731 match the argument parsing interface. Added member `options'.
12732 (pupa_register_command): Updated to match function.
12733 (pupa_arg_parse): New prototype.
12734 (pupa_hello_init) [PUPA_UTIL]: New prototype.
12735 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
12736 (pupa_ls_init) [PUPA_UTIL]: Likewise.
12737 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
12738 (pupa_cat_init) [PUPA_UTIL]: Likewise.
12739 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
12740 (pupa_boot_init) [PUPA_UTIL]: Likewise.
12741 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
12742 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
12743 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
12744 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
12745 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
12746 * kern/disk.c: Include <pupa/file.h>.
12747 (pupa_print_partinfo): New function.
12748 * kern/dl.c: Include <pupa/env.h>.
12749 (pupa_dl_dir): Variable removed.
12750 (pupa_dl_load): Use the environment variable `prefix' instead of
12751 the variable pupa_dl_dir.
12752 (pupa_dl_set_prefix): Function removed.
12753 (pupa_dl_get_prefix): Likewise.
12754 * kern/i386/pc/init.c: Include <pupa/env.h>.
12755 (pupa_machine_init): Use the environment variable `prefix' instead of
12756 using pupa_dl_set_prefix to set the prefix.
12757 * kern/main.c: Include <pupa/env.h>.
12758 (pupa_set_root_dev): Use the environment variable `prefix' instead of
12759 using pupa_dl_get_prefix to get the prefix.
12760 * kern/misc.c: Include <pupa/env.h>.
12761 (pupa_isdigit): New function.
12762 (pupa_isgraph): Likewise.
12763 (pupa_ftoa): Likewise.
12764 (pupa_vsprintf): Added support for printing values of the type
12765 `double'. Make it possible to format variable output when using
12766 formatting like `%1.2%f'.
12767 (pupa_split_cmdline): New function.
12768 * kern/rescue.c: Include <pupa/env.h>.
12769 (next_word): Removed function.
12770 (pupa_rescue_cmd_prefix): Likewise.
12771 (pupa_rescue_cmd_set): New function.
12772 (pupa_rescue_cmd_unset): New function.
12773 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
12774 split the command line instead of splitting it here. Added
12775 support for setting variables using the syntax `foo=bar'. Don't
12776 initialize the prefix command anymore. Initialized the set and
12778 * normal/cmdline.c: Include <pupa/env.h>.
12779 (pupa_tab_complete): Added prototypes for print_simple_completion,
12780 print_partition_completion, add_completion, iterate_commands,
12781 iterate_dev, iterate_part and iterate_dir. Moved code to print
12782 partition information from here to kern/disk.c.
12783 (pupa_cmdline_run): Don't check if the function exists anymore.
12784 * normal/main.c: Include <pupa/env.h>.
12785 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
12786 instead of using pupa_dl_get_prefix to get the prefix.
12787 * term/i386/pc/vga.c: Include <pupa/arg.h>.
12788 (check_vga_mem): Cast pointers to `void *' to silence a gcc
12790 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
12791 (pupa_vga_setcolor): Declare unused variables with `__attribute__
12792 ((unused))' to silence a gcc warning.
12793 (pupa_vga_setcolor): Likewise.
12794 (debug_command): Changed to match argument parsing
12796 * util/pupa-emu.c: Include <pupa/env.h>.
12797 (options): Added 0's for unused fields to silence a gcc warning.
12799 (main): Use the environment variable `prefix' instead of using
12800 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
12801 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
12804 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
12805 * util/misc.c: Include <malloc.h>.
12806 (pupa_malloc): Rewritten so errors are correctly reported.
12807 (pupa_realloc): Likewise.
12808 (pupa_memalign): Likewise.
12809 (pupa_mm_init_region): Declare unused variables with
12810 `__attribute__ ((unused))' to silence a gcc warning.
12811 * normal/i386/setjmp.S: Remove tab at the end of the file to
12812 silence a gcc warning.
12813 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
12814 variables with `__attribute__ ((unused))' to silence a gcc
12816 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
12817 local variable i unsigned to silence a gcc warning.
12819 * kern/term.c: Include <pupa/misc.h>.
12820 (pupa_more_lines): New variable.
12821 (pupa_more): Likewise.
12822 (pupa_putcode): When the pager is active pause at the end of every
12824 (pupa_set_more): New function.
12825 * include/pupa/term.h (pupa_set_more): New prototype.
12828 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
12830 Now this project is GRUB 2 rather than PUPA. The location of
12831 the CVS repository was moved to GRUB's.
12833 * configure.ac: Use bug-grub as the reporting address.
12834 Use GRUB instead of PUPA.
12835 Change the version number to 1.90.
12837 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
12839 * genkernsyms.sh: Updated copyright information.
12840 * genmk.rb: Likewise.
12841 * genmodsrc.sh: Likewise.
12842 * gensymlist.sh: Likewise.
12843 * boot/i386/pc/boot.S: Likewise.
12844 * boot/i386/pc/diskboot.S: Likewise.
12845 * disk/i386/pc/biosdisk.c: Likewise.
12846 * disk/i386/pc/partition.c: Likewise.
12847 * font/manager.c: Likewise.
12848 * fs/ext2.c: Likewise.
12849 * fs/fat.c: Likewise.
12850 * include/pupa/boot.h: Likewise.
12851 * include/pupa/device.h: Likewise.
12852 * include/pupa/disk.h: Likewise.
12853 * include/pupa/dl.h: Likewise.
12854 * include/pupa/elf.h: Likewise.
12855 * include/pupa/err.h: Likewise.
12856 * include/pupa/file.h: Likewise.
12857 * include/pupa/font.h: Likewise.
12858 * include/pupa/fs.h: Likewise.
12859 * include/pupa/kernel.h: Likewise.
12860 * include/pupa/loader.h: Likewise.
12861 * include/pupa/misc.h: Likewise.
12862 * include/pupa/mm.h: Likewise.
12863 * include/pupa/net.h: Likewise.
12864 * include/pupa/normal.h: Likewise.
12865 * include/pupa/rescue.h: Likewise.
12866 * include/pupa/setjmp.h: Likewise.
12867 * include/pupa/symbol.h: Likewise.
12868 * include/pupa/term.h: Likewise.
12869 * include/pupa/types.h: Likewise.
12870 * include/pupa/i386/setjmp.h: Likewise.
12871 * include/pupa/i386/types.h: Likewise.
12872 * include/pupa/i386/pc/biosdisk.h: Likewise.
12873 * include/pupa/i386/pc/boot.h: Likewise.
12874 * include/pupa/i386/pc/console.h: Likewise.
12875 * include/pupa/i386/pc/init.h: Likewise.
12876 * include/pupa/i386/pc/kernel.h: Likewise.
12877 * include/pupa/i386/pc/linux.h: Likewise.
12878 * include/pupa/i386/pc/loader.h: Likewise.
12879 * include/pupa/i386/pc/memory.h: Likewise.
12880 * include/pupa/i386/pc/multiboot.h: Likewise.
12881 * include/pupa/i386/pc/partition.h: Likewise.
12882 * include/pupa/i386/pc/time.h: Likewise.
12883 * include/pupa/i386/pc/vga.h: Likewise.
12884 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
12885 * include/pupa/util/getroot.h: Likewise.
12886 * include/pupa/util/misc.h: Likewise.
12887 * include/pupa/util/resolve.h: Likewise.
12888 * kern/device.c: Likewise.
12889 * kern/disk.c: Likewise.
12890 * kern/dl.c: Likewise.
12891 * kern/err.c: Likewise.
12892 * kern/file.c: Likewise.
12893 * kern/fs.c: Likewise.
12894 * kern/loader.c: Likewise.
12895 * kern/main.c: Likewise.
12896 * kern/misc.c: Likewise.
12897 * kern/mm.c: Likewise.
12898 * kern/rescue.c: Likewise.
12899 * kern/term.c: Likewise.
12900 * kern/i386/dl.c: Likewise.
12901 * kern/i386/pc/init.c: Likewise.
12902 * kern/i386/pc/lzo1x.S: Likewise.
12903 * kern/i386/pc/startup.S: Likewise.
12904 * loader/i386/pc/chainloader.c: Likewise.
12905 * loader/i386/pc/linux.c: Likewise.
12906 * loader/i386/pc/multiboot.c: Likewise.
12907 * normal/cmdline.c: Likewise.
12908 * normal/command.c: Likewise.
12909 * normal/main.c: Likewise.
12910 * normal/menu.c: Likewise.
12911 * normal/i386/setjmp.S: Likewise.
12912 * term/i386/pc/console.c: Likewise.
12913 * term/i386/pc/vga.c: Likewise.
12914 * util/console.c: Likewise.
12915 * util/genmoddep.c: Likewise.
12916 * util/misc.c: Likewise.
12917 * util/pupa-emu.c: Likewise.
12918 * util/resolve.c: Likewise.
12919 * util/unifont2pff.rb: Likewise.
12920 * util/i386/pc/biosdisk.c: Likewise.
12921 * util/i386/pc/getroot.c: Likewise.
12922 * util/i386/pc/pupa-mkimage.c: Likewise.
12923 * util/i386/pc/pupa-setup.c: Likewise.
12925 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
12927 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
12928 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
12929 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
12930 reading and reset it after reading.
12931 (pupa_ext2_close): Return PUPA_ERR_NONE.
12933 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
12935 (struct linux_kernel_header): Add kernel_version and
12937 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
12938 pupa_file_read succeeds.
12939 (pupa_rescue_cmd_initrd): Implement.
12941 2003-12-03 Marco Gerards <metgerards@student.han.nl>
12943 * fs/ext2.c (pupa_ext2_label): New function.
12944 (pupa_ext2_fs): Added label.
12945 * fs/fat.c (pupa_fat_label): New function.
12946 (pupa_fat_fs): Added label.
12947 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
12949 * kern/misc.c (pupa_strndup): New function.
12950 * include/pupa/misc.h (pupa_strndup): New prototype.
12952 * include/pupa/normal.h: Include <pupa/err.h>.
12953 (pupa_set_history): New prototype.
12954 (pupa_iterate_commands): New prototype.
12955 * normal/cmdline.c: Include <pupa/machine/partition.h>,
12956 <pupa/disk.h>, <pupa/file.h>.
12957 (hist_size): New variable.
12958 (hist_lines): Likewise.
12959 (hist_end): Likewise.
12960 (hist_used): Likewise.
12961 (pupa_set_history): New function.
12962 (pupa_history_get): Likewise.
12963 (pupa_history_add): Likewise.
12964 (pupa_history_replace): Likewise.
12965 (pupa_tab_complete): Likewise.
12966 (pupa_cmdline_run): Added tab completion and history buffer. Tab
12967 completion shows partitionnames while completing partitions, this
12968 feature was suggested by Jeff Bailey.
12969 * normal/command.c (pupa_iterate_commands): New function.
12970 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
12971 (pupa_normal_init): Initialize history buffer.
12972 (PUPA_MOD_INIT): Likewise.
12973 (pupa_normal_fini): Free the history buffer.
12974 (PUPA_MOD_FINI): Likewise.
12976 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
12979 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
12980 * configure.ac [i386]: Check for regparam bug.
12981 (NESTED_FUNC_ATTR) [! i386]: Defined.
12983 2003-11-17 Marco Gerards <metgerards@student.han.nl>
12985 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
12986 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
12987 (pupa_emu_SOURCES): New variable.
12988 (pupa_emu_LDFLAGS): Likewise.
12989 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
12990 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
12991 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
12992 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12993 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
12994 (pupa_jmp_buf): New typedef.
12995 (pupa_setjmp) [PUPA_UTIL]: New macro.
12996 (pupa_longjmp) [PUPA_UTIL]: Likewise.
12997 * include/pupa/term.h (struct pupa_term): New member `refresh'.
12998 (pupa_refresh): New prototype.
12999 * include/pupa/util/getroot.h: New file.
13000 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
13002 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
13003 (pupa_rescue_cmd_cat): Likewise.
13004 (pupa_rescue_cmd_ls): Likewise.
13005 (pupa_rescue_cmd_testload): Likewise.
13006 (pupa_rescue_cmd_lsmod): Likewise.
13007 * normal/cmdline.c (pupa_cmdline_get): Likewise.
13008 * normal/menu.c (run_menu): Likewise.
13009 * kern/term.c (pupa_cls): Likewise.
13010 (pupa_refresh): New function.
13011 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
13012 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
13013 * util/console.c: New file.
13015 * util/i386/pc/getroot.c: New file.
13016 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
13017 (pupa_putchar): New function.
13018 (pupa_refresh): Likewise.
13019 (xgetcwd): Function moved to ...
13020 (strip_extra_slashes): Likewise.
13021 (get_prefix): Likewise.
13022 * util/i386/pc/getroot.c: ... here.
13023 (find_root_device): Function moved and renamed to...
13024 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
13025 Changed all callers.
13026 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
13028 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
13029 Changed all callers.
13030 * util/misc.c (pupa_memalign): New function.
13031 (pupa_mm_init_region): Likewise.
13032 (pupa_register_exported_symbols): Likewise.
13033 (pupa_putchar): Function removed.
13034 * util/pupa-emu.c: New file.
13036 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
13038 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
13039 (_multiboot_mod_SOURCES): New variable.
13040 (_multiboot_mod_CFLAGS): Likewise.
13041 * loader/i386/pc/multiboot.c: New file.
13042 * include/pupa/i386/pc/multiboot.h: Likewise.
13043 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
13044 (pupa_multiboot_real_boot): New function.
13045 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
13046 (pupa_multiboot_real_boot): New prototype.
13047 (pupa_rescue_cmd_multiboot): Likewise
13048 (pupa_rescue_cmd_module): Likewise.
13050 * kern/loader.c (pupa_loader_set): Continue when
13051 pupa_loader_unload_func() fails.
13052 (pupa_loader_unset): New function.
13053 * include/pupa/loader.h (pupa_loader_unset): New prototype.
13055 * kern/misc.c (pupa_stpcpy): New function.
13056 * include/pupa/misc.h (pupa_stpcpy): New prototype.
13058 2003-11-12 Marco Gerards <metgerards@student.han.nl>
13060 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
13061 for available extensions.
13063 * include/pupa/i386/pc/time.h: New file.
13064 * kern/disk.c: Include <pupa/machine/time.h>.
13065 (PUPA_CACHE_TIMEOUT): New macro.
13066 (pupa_last_time): New variable.
13067 (pupa_disk_open): Flush the cache when there was a timeout.
13068 (pupa_disk_close): Reset the timer.
13069 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
13071 * util/misc.c: Include <sys/times.h>
13072 (pupa_get_rtc): New function.
13074 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
13076 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
13078 (pupa_ext2_get_file_block): Use blocks member.
13080 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
13081 first block. Return -1 instead of pupa_errno on error.
13083 2003-10-27 Marco Gerards <metgerards@student.han.nl>
13085 * README: In the pupa-mkimage example use _chain instead of chain
13086 and ext2 instead of fat.
13087 * TODO: Replace ext2fs with jfs as an example. Add an item for
13088 adding journal playback for ext2fs.
13089 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
13090 (pkgdata_MODULES): Added ext2.mod.
13091 (ext2_mod_SOURCES): New variable.
13092 (ext2_mod_CFLAGS): Likewise.
13093 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
13094 * include/pupa/misc.h (pupa_strncpy): New prototype.
13095 (pupa_strcat): Likewise.
13096 (pupa_strncmp): Likewise.
13097 * kern/misc.c (pupa_strcat): Enable function.
13098 (pupa_strncpy): New function.
13099 (pupa_strncmp): Likewise.
13100 * fs/ext2.c: New file.
13102 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
13103 when the read failed before retrying.
13104 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
13105 (_FILE_OFFSET_BITS): Likewise.
13106 * configure.ac: Added AC_SYS_LARGEFILE.
13108 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13110 * genmk.rb (PModule#rule): Make sure to get only symbol names
13111 from the output of nm.
13112 Reported by Robert Millan <zeratul2@wanadoo.es>.
13114 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13116 I forgot to check in these changes for a long time. This adds
13117 incomplete support for VGA console, and this is still very
13118 buggy. Also, a lot of consideration is required for I18N,
13119 UNICODE, and VGA font issues. Therefore, assume that this is
13120 such that "better than nothing".
13122 * font/manager.c: New file.
13123 * include/pupa/font.h: Likewise.
13124 * include/pupa/i386/pc/vga.h: Likewise.
13125 * term/i386/pc/vga.c: Likewise.
13126 * util/unifont2pff.rb: Likewise.
13128 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
13129 (pkgdata_MODULES): Added vga.mod and font.mod.
13130 (vga_mod_SOURCES): New variables.
13131 (vga_mod_CFLAGS): Likewise.
13132 (font_mod_SOURCES): Likewise.
13133 (font_mod_CFLAGS): Likewise.
13135 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
13137 * include/pupa/term.h: Include pupa/err.h.
13138 (struct pupa_term): Added init and fini.
13139 Changed the argument of putchar to pupa_uint32_t.
13141 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
13142 (pupa_console_real_putchar): New prototype.
13143 (pupa_console_putchar): Removed.
13144 (pupa_console_checkkey): Exported.
13145 (pupa_console_getkey): Likewise.
13147 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
13150 * kern/term.c (pupa_term_set_current): Rewritten.
13151 (pupa_putchar): Likewise.
13152 (pupa_putcode): New function.
13154 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
13155 (pupa_console_real_putchar): ... this.
13156 (pupa_vga_set_mode): New function.
13157 (pupa_vga_get_font): Likewise.
13159 * normal/command.c: Include pupa/term.h.
13160 (terminal_command): New function.
13161 (pupa_command_init): Register the command "terminal".
13163 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
13164 (DISP_UP): Likewise.
13165 (DISP_RIGHT): Likewise.
13166 (DISP_DOWN): Likewise.
13167 (DISP_HLINE): Likewise.
13168 (DISP_VLINE): Likewise.
13169 (DISP_UL): Likewise.
13170 (DISP_UR): Likewise.
13171 (DISP_LL): Likewise.
13172 (DISP_LR): Likewise.
13174 * term/i386/pc/console.c (pupa_console_putchar): New function.
13176 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
13178 * util/resolve.c (pupa_util_resolve_dependencies): BUG
13179 FIX. Reverse the path_list.
13181 * include/pupa/normal.h: Export pupa_register_command and
13182 pupa_unregister_command.
13184 * hello/hello.c (pupa_cmd_hello): New module.
13185 * conf/i386-pc.rmk: Added hello.mod.
13187 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
13189 * kern/i386/pc/lzo1x.S: New file.
13191 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
13192 (compress_kernel): New variable.
13193 (generate_image): Heavily modified to support compressing a
13194 large part of the core image.
13196 * util/misc.c (pupa_util_read_image): Fix a file descriptor
13198 (pupa_util_load_image): New function.
13200 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
13201 (pupa_compressed_size): New variable.
13202 (codestart): Enable Gate A20 here.
13203 Decompress the compressed part of the core image.
13204 Rearrange the code to put functions and variables which are
13205 required for initialization in the non-compressed part.
13208 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
13211 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
13213 * include/pupa/i386/pc/kernel.h
13214 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
13215 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
13216 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13217 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13218 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
13220 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
13222 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
13223 (Utility#rule): Likewise.
13225 * configure.ac: Check if LZO is available.
13227 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
13229 * include/pupa/normal.h: New file.
13230 * include/pupa/setjmp.h: Likewise.
13231 * include/pupa/i386/setjmp.h: Likewise.
13232 * normal/cmdline.c: Likewise.
13233 * normal/command.c: Likewise.
13234 * normal/main.c: Likewise.
13235 * normal/menu.c: Likewise.
13236 * normal/i386/setjmp.S: Likewise.
13238 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
13239 (pupa_rescue_cmd_initrd): Likewise.
13241 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
13244 * kern/i386/pc/startup.S (translation_table): New variable.
13245 (translate_keycode): New function.
13246 (pupa_console_getkey): Call translate_keycode.
13248 * kern/rescue.c (attempt_normal_mode): New function.
13249 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
13250 it failed, print a message.
13252 * kern/mm.c (pupa_real_malloc): Print more information when a
13253 free magic is broken.
13254 (pupa_free): If the first free header is not free actually, set
13257 * kern/main.c (pupa_load_normal_mode): Just load the module
13259 (pupa_main): Don't print the message
13260 "Entering into rescue mode..." here.
13262 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
13264 (pupa_rescue_cmd_initrd): Likewise.
13265 (pupa_rescue_cmd_initrd): Likewise.
13267 * include/pupa/symbol.h (FUNCTION): Specify the type.
13268 (VARIABLE): Likewise.
13270 * include/pupa/err.h (pupa_err_t): Added
13271 PUPA_ERR_UNKNOWN_COMMAND.
13273 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
13274 (pupa_dl_get_prefix): Likewise.
13276 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
13277 Added _chain.mod and _linux.mod instead of chain.mod and
13279 (chain_mod_SOURCES): Renamed to ...
13280 (_chain_mod_SOURCES): ... this.
13281 (chain_mod_CFLAGS): Renamed to ...
13282 (_chain_mod_CFLAGS): ... this.
13283 (linux_mod_SOURCES): Renamed to ...
13284 (_linux_mod_SOURCES): ... this.
13285 (linux_mod_CFLAGS): Renamed to ...
13286 (_linux_mod_CFLAGS): ... this.
13287 (normal_mod_SOURCES): New variable.
13288 (normal_mod_CFLAGS): Likewise.
13289 (normal_mod_ASFLAGS): Likewise.
13291 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
13293 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
13296 * kern/dl.c (pupa_dl_ref): Refer depending modules
13298 (pupa_dl_unref): Unrefer depending modules recursively.
13299 Don't call pupa_dl_unload implicitly, because PUPA can crash if
13300 a module is unloaded before one depending on that module is
13302 (pupa_dl_unload): Unload depending modules explicitly,
13305 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
13307 * include/pupa/i386/pc/linux.h: New file.
13308 * loader/i386/pc/linux.c: Likewise.
13310 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
13312 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
13313 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
13314 of PUPA_CHAINLOADER_BOOT_SECTOR.
13316 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
13317 (pupa_linux_prot_size): New variable.
13318 (pupa_linux_tmp_addr): Likewise.
13319 (pupa_linux_real_addr): Likewise.
13320 (pupa_linux_boot_zimage): New function.
13321 (pupa_linux_boot_bzimage): Likewise.
13323 * kern/i386/pc/init.c (struct mem_region): New structure.
13324 (MAX_REGIONS): New macro.
13325 (mem_regions): New variable.
13326 (num_regions): Likewise.
13327 (pupa_os_area_addr): Likewise.
13328 (pupa_os_area_size): Likewise.
13329 (pupa_lower_mem): Likewise.
13330 (pupa_upper_mem): Likewise.
13331 (add_mem_region): New function.
13332 (compact_mem_regions): Likewise.
13333 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
13334 the size of the conventional memory and that of so-called upper
13335 memory (before the first memory hole).
13336 Instead of adding each found region to free memory, use
13337 add_mem_region and add them after removing overlaps.
13338 Also, add only 1/4 of the upper memory to free memory. The rest
13339 is used for loading OS images. Maybe this is ad hoc, but this
13340 makes it much easier to relocate OS images when booting.
13342 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
13343 (pupa_enter_rescue_mode): Don't register initrd and module.
13345 * kern/mm.c: Include pupa/dl.h.
13347 * kern/main.c: Include pupa/file.h and pupa/device.h.
13349 * kern/loader.c (pupa_loader_load_module_func): Removed.
13350 (pupa_loader_load_module): Likewise.
13352 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
13355 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
13356 (pupa_linux_tmp_addr): Likewise.
13357 (pupa_linux_real_addr): Likewise.
13358 (pupa_linux_boot_zimage): Likewise.
13359 (pupa_linux_boot_bzimage): Likewise.
13361 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
13362 (pupa_upper_mem): Likewise.
13363 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
13364 module is too dangerous.
13366 * include/pupa/loader.h (pupa_os_area_addr): Declared.
13367 (pupa_os_area_size): Likewise.
13368 (pupa_loader_set): Remove the first argument. Loader doesn't
13369 manage modules or initrd any longer.
13370 (pupa_loader_load_module): Removed.
13372 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
13373 (linux_mod_SOURCES): New variable.
13374 (linux_mod_CFLAGS): Likewise.
13376 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
13378 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
13379 the length of a blocklist correctly.
13381 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
13382 Use ioctl only if the OS file is a block device.
13383 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
13384 not very useful for normal files.
13386 * kern/main.c (pupa_set_root_dev): New function.
13387 (pupa_load_normal_mode): Likewise.
13388 (pupa_main): Call those above.
13390 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
13393 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
13395 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
13397 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
13398 (setup): Configure the installed partition information and the
13401 * loader/i386/pc/chainloader.c (my_mod): New variable.
13402 (pupa_chainloader_unload): New function.
13403 (pupa_rescue_cmd_chainloader): Refer itself.
13404 (PUPA_MOD_INIT): Save its own module in MY_MOD.
13406 * kern/i386/pc/startup.S (install_partition): Removed.
13407 (version_string): Likewise.
13408 (config_file): Likewise.
13409 (pupa_install_dos_part): New variable.
13410 (pupa_install_bsd_part): Likewise.
13411 (pupa_prefix): Likewise.
13412 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
13414 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
13416 (make_install_device): New function.
13417 (pupa_machine_init): Set the dl prefix.
13419 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
13420 (buf): Renamed to ...
13421 (linebuf): ... this.
13422 (pupa_rescue_cmd_prefix): New function.
13423 (pupa_rescue_cmd_insmod): Likewise.
13424 (pupa_rescue_cmd_rmmod): Likewise.
13425 (pupa_rescue_cmd_lsmod): Likewise.
13426 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
13429 * kern/mm.c (pupa_memalign): If failed even after invalidating
13430 disk caches, unload unneeded modules and retry.
13432 * kern/misc.c (pupa_memmove): New function.
13433 (pupa_memcpy): Removed.
13434 (pupa_strcpy): New function.
13435 (pupa_itoa): Made static.
13437 * kern/dl.c (pupa_dl_iterate): New function.
13438 (pupa_dl_ref): Likewise.
13439 (pupa_dl_unref): Likewise.
13440 (pupa_dl_unload): Return if succeeded or not.
13441 (pupa_dl_unload_unneeded): New function.
13442 (pupa_dl_unload_all): Likewise.
13443 (pupa_dl_init): Renamed to ...
13444 (pupa_dl_set_prefix): ... this.
13445 (pupa_dl_get_prefix): New function.
13447 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
13448 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
13449 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13450 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13451 (pupa_install_dos_part): Declared.
13452 (pupa_install_bsd_part): Likewise.
13453 (pupa_prefix): Likewise.
13454 (pupa_boot_drive): Likewise.
13456 * include/pupa/types.h: Fix a typo.
13458 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
13460 (pupa_memmove): Declared.
13461 (pupa_strcpy): Likewise.
13463 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
13464 pupa_mod_init takes one argument, its own module.
13465 (pupa_dl_unload_unneeded): Declared.
13466 (pupa_dl_unload_all): Likewise.
13467 (pupa_dl_ref): Likewise.
13468 (pupa_dl_unref): Likewise.
13469 (pupa_dl_iterate): Likewise.
13470 (pupa_dl_init): Renamed to ...
13471 (pupa_dl_set_prefix): ... this.
13472 (pupa_dl_get_prefix): Declared.
13474 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
13475 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
13477 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
13478 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
13480 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
13481 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
13483 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13485 * util/i386/pc/pupa-setup.c (setup): Define the internal
13486 function find_first_partition_start at the top level, because GCC
13487 3.0.x cannot compile internal functions in deeper scopes
13489 (find_root_device): Use lstat instead of stat.
13490 Don't follow symbolic links.
13491 Fix the path-constructing code.
13493 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
13494 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
13495 by a BLKGETSIZE ioctl first, because block devices don't fill
13496 the member st_mode of the structure stat on Linux.
13497 [__linux__] (linux_find_partition): Use a temporary buffer
13498 REAL_DEV for the working space. Copy it to DEV before returning.
13499 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
13500 buffer cache consistent.
13501 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
13502 strncmp. The previous value was merely wrong.
13503 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
13505 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
13506 FAT size is 12. The previous value was merely wrong.
13508 * kern/main.c (pupa_main): Don't split the starting message from
13511 * kern/term.c (pupa_putchar): Put CR after LF instead of before
13512 LF, because BIOS goes crazy about character attributes in this
13515 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13517 * include/i386/pc/util/biosdisk.h: New file.
13518 * util/i386/pc/biosdisk.c: Likewise.
13519 * util/i386/pc/pupa-setup.c: Likewise.
13521 * Makefile.in (INCLUDE_DISTFILES): Added
13522 include/pupa/i386/pc/util/biosdisk.h.
13523 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
13524 directory util/i386/pc.
13525 (install-local): Added a rule for sbin_UTILITIES.
13526 (uninstall): Likewise.
13528 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
13530 * util/misc.c (xrealloc): New function.
13531 (pupa_malloc): Likewise.
13532 (pupa_free): Likewise.
13533 (pupa_realloc): Likewise.
13534 (pupa_stop): Likewise.
13535 (pupa_putchar): Likewise.
13537 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
13539 * include/pupa/util/misc.h (xrealloc): Declared.
13541 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
13543 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
13544 (PUPA_BOOT_MACHINE_BPB_END): ... this.
13546 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
13547 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13549 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
13550 way should be implemented.
13551 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13553 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
13554 the size of NAME for safety.
13555 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
13558 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
13559 (pupa_setup_SOURCES): Likewise.
13561 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
13563 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13565 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
13566 bunch of pushl's from pusha, because this destroys the return
13569 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13571 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
13572 This means that any missing prototypes could be fatal. Also, you
13573 must take care when writing assembly code. See the comments at
13574 the beginning of startup.S, for more details.
13576 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
13577 compilation mechanism.
13578 (pupa_chainloader_real_boot): Likewise.
13579 (pupa_biosdisk_rw_int13_extensions): Likewise.
13580 (pupa_biosdisk_rw_standard): Likewise.
13581 (pupa_biosdisk_check_int13_extensions): Likewise.
13582 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
13583 (pupa_biosdisk_get_diskinfo_standard): Likewise.
13584 (pupa_get_memsize): Likewise.
13585 (pupa_get_mmap_entry): Likewise.
13586 (pupa_console_putchar): Likewise.
13587 (pupa_console_setcursor): Likewise.
13588 (pupa_getrtsecs): Use pushl instead of push.
13590 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
13591 memory instead of the stack for a mmap entry, because some
13592 BIOSes may ignore the maximum size and overflow.
13594 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
13596 * genmk.rb (PModule#rule): Compile automatically generated
13597 sources with module-specific CFLAGS as well as other sources.
13599 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13601 * configure.ac: Check ld.
13602 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
13603 respectively, before checking endianness and sizes.
13605 * Makefile.in (LD): New variable.
13607 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13609 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
13611 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13613 * Changelog: New file.