1 2008-11-19 Robert Millan <rmh@aybabtu.com>
3 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
5 constraints to initrd allocation (based on code from
6 loader/i386/pc/linux.c). Without them, initrd was allocated too high
9 2008-11-14 Robert Millan <rmh@aybabtu.com>
11 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
12 order to cope with duplicate slashes.
14 2008-11-14 Robert Millan <rmh@aybabtu.com>
16 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
17 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
18 don't want to mess with lower memory, because it is used in the Linux
21 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
22 an appropiate place in lower memory, between 0x10000 and 0x90000,
23 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
24 is in our heap (probably as a result of it being corrupted during
25 decompression). Add #error instance with comment to explain why this
26 loader isn't currently usable on PC/BIOS.
28 2008-11-14 Robert Millan <rmh@aybabtu.com>
30 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
31 (GRUB_SERIAL_PORT_NUM): Fix misscalculation.
33 2008-11-12 Robert Millan <rmh@aybabtu.com>
35 Make loader/i386/linux.c buildable on i386-pc (although disabled).
37 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
38 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
40 * include/grub/i386/pc/memory.h: ... to here.
42 2008-11-12 Robert Millan <rmh@aybabtu.com>
44 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
47 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
48 (grub_console_cur_color, grub_console_real_putchar)
49 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
50 (grub_console_setcolorstate, grub_console_setcolor)
51 (grub_console_getcolor): Move from here ...
52 * include/grub/i386/vga_common.h: ... to here (new file).
54 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
55 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
57 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
58 `<grub/i386/vga_common.h>'.
60 2008-11-12 Robert Millan <rmh@aybabtu.com>
62 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
63 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
64 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
66 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
67 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
69 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
70 grub_console_init() with call to grub_vga_text_init().
71 (grub_machine_fini): Replace call to
72 grub_console_fini() with call to grub_vga_text_fini() and
73 grub_at_keyboard_fini().
75 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
76 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
77 (grub_console_setcolorstate, grub_console_setcolor)
78 (grub_console_getcolor): New function prototypes.
80 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
81 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
82 (grub_vga_text_setcursor): Static-ize.
83 (grub_vga_text_term): New structure.
84 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
86 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
87 (grub_console_cur_color, grub_console_standard_color)
88 (grub_console_normal_color, grub_console_highlight_color)
89 (map_char, grub_console_putchar, grub_console_getcharwidth)
90 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
91 (grub_console_getcolor): Move from here ...
92 * term/i386/vga_common.c: ... to here (same function names).
94 2008-11-12 Robert Millan <rmh@aybabtu.com>
96 Use newly-added Multiboot support in coreboot.
98 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
99 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
101 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
102 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
103 (codestart): Store the MBI in `startup_multiboot_info' when we're
104 being loaded using Multiboot.
106 * kern/i386/coreboot/init.c (grub_machine_init): Move
107 grub_at_keyboard_init() call to beginning of function (useful for
108 debugging). Call grub_machine_mmap_init() before attempting to use
109 grub_machine_mmap_iterate().
110 (grub_lower_mem, grub_upper_mem): Move from here ...
111 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
114 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
117 2008-11-12 Robert Millan <rmh@aybabtu.com>
119 Fix a regression introduced by the at_keyboard.mod split. Because
120 some terminals are default on some platforms and non-default on
121 others, the first terminal being registered determines which is
124 * kern/term.c (grub_term_register_input): If this is the first
125 terminal being registered, set it as the current one.
126 (grub_term_register_output): Likewise.
128 * term/efi/console.c (grub_console_init): Do not call
129 grub_term_set_current_output() or grub_term_set_current_input().
130 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
131 * term/i386/pc/console.c (grub_console_init): Likewise.
132 (grub_console_fini): Do not call grub_term_set_current_input()
133 (but leave grub_term_set_current_output() to restore text mode).
135 2008-11-10 Robert Millan <rmh@aybabtu.com>
137 * util/grub.d/00_header.in: Add backward compatibility check for
138 versions of terminal.mod that don't understand `terminal_input' or
141 2008-11-09 Robert Millan <rmh@aybabtu.com>
143 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
144 `terminal_input' / `terminal_output', not `terminal'.
146 2008-11-08 Robert Millan <rmh@aybabtu.com>
148 * Makefile.in (include_DATA): Fix srcdir=. assumption.
149 (DISTCLEANFILES): Add `build_env.mk'.
151 2008-11-08 Robert Millan <rmh@aybabtu.com>
153 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
154 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
155 members. Update all users.
156 * util/console.c (grub_ncurses_term): Split in ...
157 (grub_ncurses_term_input): ... this, and ...
158 (grub_ncurses_term_output): ... this. Update all users.
159 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
161 2008-11-08 Robert Millan <rmh@aybabtu.com>
163 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
164 (PKGDATA): Add $(pkgdata_SRCDIR).
165 (pkglib_BUILDDIR): New variable.
166 (pkgdata_SRCDIR): New variable.
167 (build_env.mk): New target.
168 (include_DATA): New variable.
169 (install-local): Install $(include_DATA) files in $(includedir).
171 2008-11-07 Pavel Roskin <proski@gnu.org>
173 * gendistlist.sh: Use C locale for sorting to ensure consistent
174 output on all systems.
176 * util/grub.d/00_header.in: Remove incorrect space before
179 2008-11-07 Robert Millan <rmh@aybabtu.com>
181 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
183 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
184 * loader/multiboot_loader.c (find_multi_boot2_header): New function
185 (based on find_multi_boot1_header).
186 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
187 using find_multi_boot2_header(), and abort if neither Multiboot or
188 Multiboot headers were found.
190 2008-11-07 Robert Millan <rmh@aybabtu.com>
192 Modularize at_keyboard.mod:
194 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
195 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
196 (at_keyboard_mod_LDFLAGS): New variables.
198 Actual terminal split:
200 * include/grub/term.h (struct grub_term): Split in ...
201 (struct grub_term_input): ... this, and ...
202 (struct grub_term_output): ... this. Update all users.
203 (grub_term_set_current): Split in ...
204 (grub_term_set_current_input): ... this, and ...
205 (grub_term_set_current_output): ... this.
206 (grub_term_get_current): Split in ...
207 (grub_term_get_current_input): ... this, and ...
208 (grub_term_get_current_output): ... this.
209 (grub_term_register): Split in ...
210 (grub_term_register_input): ... this, and ...
211 (grub_term_register_output): ... this.
212 (grub_term_unregister): Split in ...
213 (grub_term_unregister_input): ... this, and ...
214 (grub_term_unregister_output): ... this.
215 (grub_term_iterate): Split in ...
216 (grub_term_iterate_input): ... this, and ...
217 (grub_term_iterate_output): ... this.
219 * kern/term.c (grub_term_list): Split in ...
220 (grub_term_list_input): ... this, and ...
221 (grub_term_list_output): ... this. Update all users.
222 (grub_cur_term): Split in ...
223 (grub_cur_term_input): ... this, and ...
224 (grub_cur_term_output): ... this. Update all users.
225 (grub_term_set_current): Split in ...
226 (grub_term_set_current_input): ... this, and ...
227 (grub_term_set_current_output): ... this.
228 (grub_term_get_current): Split in ...
229 (grub_term_get_current_input): ... this, and ...
230 (grub_term_get_current_output): ... this.
231 (grub_term_register): Split in ...
232 (grub_term_register_input): ... this, and ...
233 (grub_term_register_output): ... this.
234 (grub_term_unregister): Split in ...
235 (grub_term_unregister_input): ... this, and ...
236 (grub_term_unregister_output): ... this.
237 (grub_term_iterate): Split in ...
238 (grub_term_iterate_input): ... this, and ...
239 (grub_term_iterate_output): ... this.
241 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
242 a check for input and one for output (and only attempt to get keys
243 from user when input works).
245 * util/grub-probe.c (grub_term_get_current): Split in ...
246 (grub_term_get_current_input): ... this, and ...
247 (grub_term_get_current_output): ... this.
248 * util/grub-fstest.c: Likewise.
249 * util/i386/pc/grub-setup.c: Likewise.
250 * util/grub-editenv.c: Likewise.
252 Portability adjustments:
254 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
255 `term/i386/pc/at_keyboard.c'.
256 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
257 grub_keyboard_controller_init() (now handled by terminal .init).
258 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
259 grub_at_keyboard_init().
260 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
261 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
262 at_keyboard.mod via input terminal interface).
263 * include/grub/i386/coreboot/console.h: Convert into a stub for
264 `<grub/i386/pc/console.h>'.
266 Migrate full terminals to new API:
268 * term/efi/console.c (grub_console_term): Split into ...
269 (grub_console_term_input): ... this, and ...
270 (grub_console_term_output): ... this. Update all users.
271 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
272 (grub_ofconsole_init): Split into ...
273 (grub_ofconsole_init_input): ... this, and ...
274 (grub_ofconsole_init_output): ... this.
275 (grub_ofconsole_term): Split into ...
276 (grub_ofconsole_term_input): ... this, and ...
277 (grub_ofconsole_term_output): ... this. Update all users.
278 * term/i386/pc/serial.c (grub_serial_term): Split into ...
279 (grub_serial_term_input): ... this, and ...
280 (grub_serial_term_output): ... this. Update all users.
281 * term/i386/pc/console.c (grub_console_term): Split into ...
282 (grub_console_term_input): ... this, and ...
283 (grub_console_term_output): ... this. Update all users.
284 (grub_console_term_input): Only enable it on PC/BIOS platform.
285 (grub_console_init): Remove grub_keyboard_controller_init() call.
287 Migrate input terminals to new API:
289 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
290 `i386' and `i386/pc' to enable build on x86_64 (this driver is
291 i386-specific anyway).
292 (grub_console_checkkey): Rename to ...
293 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
295 (grub_keyboard_controller_orig): New variable.
296 (grub_console_getkey): Rename to ...
297 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
299 (grub_keyboard_controller_init): Static-ize. Save original
300 controller value so that it can be restored ...
301 (grub_keyboard_controller_fini): ... here (new function).
302 (grub_at_keyboard_term): New structure.
303 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
306 Migrate output terminals to new API:
308 * term/i386/pc/vga.c (grub_vga_term): Change type to
309 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
310 members. Update all users.
311 * term/gfxterm.c (grub_video_term): Change type to
312 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
313 members. Update all users.
314 * include/grub/i386/pc/console.h (grub_console_checkkey)
315 (grub_console_getkey): Do not export (no longer needed by gfxterm,
318 Migrate `terminal' command and userland tools to new API:
320 * commands/terminal.c (grub_cmd_terminal): Split into ...
321 (grub_cmd_terminal_input): ... this, and ...
322 (grub_cmd_terminal_output): ... this.
323 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
324 `terminal_input' and `terminal_output'.
325 * util/grub.d/00_header.in: Adjust `terminal' calls to new
326 `terminal_input' / `terminal_output' API.
327 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
328 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
329 provided ${GRUB_TERMINAL}, convert it).
331 2008-11-04 Robert Millan <rmh@aybabtu.com>
333 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
335 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
337 2008-11-03 Bean <bean123ch@gmail.com>
339 * kern/elf.c (grub_elf32_load): Revert to previous code.
340 (grub_elf64_load): Likewise.
342 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
344 2008-11-01 Robert Millan <rmh@aybabtu.com>
346 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
347 (TARGET_CPPFLAGS): Likewise.
348 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
350 2008-11-01 Carles Pina i Estany <carles@pina.cat>
352 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
354 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
356 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
357 addition of objects until the code is not going to be able to fail.
359 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
361 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
362 (add a missing NULL check, and correct them by moving the pointer
363 operations after the actual check).
365 2008-10-29 Robert Millan <rmh@aybabtu.com>
367 * util/i386/pc/grub-install.in: Handle empty string as output from
368 make_system_path_relative_to_its_root().
370 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
372 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
373 circular metadata worst case scenario. If the metadata is circular
374 then copy the wrap in place.
375 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
376 project lib/format_text/layout.h
377 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
379 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
381 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
383 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
385 * util/update-grub_lib.in: Mention filename in warning message.
387 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
389 * NEWS: Update for rename of update-grub to grub-mkconfig.
391 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
393 * util/update-grub_lib.in: Copy to ...
394 * util/grub-mkconfig_lib.in: ... this. Update all users.
395 * util/update-grub_lib.in: Make it a stub to `grub-mkconfigig_lib.in'.
396 * util/update-grub.in: Rename to ...
397 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
398 option. Add `--output' option to allow users to specify the generated
399 configuration file. Default to stdout.
400 (update_grub_dir): Rename to ...
401 (grub_mkconfig_dir): ... this.
402 (grub_cfg): Default to an empty string.
403 * conf/common.rmk (update-grub): Rename to ...
404 (grub-mkconfig): ... this.
405 (update-grub_lib): Copy to ...
406 (grub-mkconfig_lib): ... this.
407 (update-grub_SCRIPTS): Copy to ...
408 (grub-mkconfig_SCRIPTS): ... this. Update all users.
409 (update-grub_DATA): Rename to ...
410 (grub-mkconfig_DATA): ... this.
412 2008-09-28 Robert Millan <rmh@aybabtu.com>
414 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
415 to `modified'. Add the real `created' field.
416 (grub_iso9660_uuid): Use `modified' rather than `created' for
417 constructing the UUID.
419 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
421 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
422 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
424 2008-09-28 Bean <bean123ch@gmail.com>
426 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
427 Thanks to Christian Franke for finding this bug.
429 2008-09-25 Robert Millan <rmh@aybabtu.com>
431 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
432 instances of grub_util_get_disk_name() (see previous commit).
434 2008-09-25 Robert Millan <rmh@aybabtu.com>
436 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
437 `util/i386/get_disk_name.c'.
438 * conf/i386-efi.rmk: Likewise.
439 * conf/x86_64-efi.rmk: Likewise.
440 * conf/i386-coreboot.rmk: Likewise.
441 * conf/i386-ieee1275.rmk: Likewise.
442 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
443 `util/ieee1275/get_disk_name.c'.
444 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
445 * util/ieee1275/get_disk_name.c: Remove file.
446 * util/i386/get_disk_name.c: Remove file.
447 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
448 "hd%d" for device.map entries, rather than using
449 grub_util_get_disk_name().
451 2008-09-24 Carles Pina i Estany <carles@pina.cat>
453 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
455 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
457 2008-09-24 Carles Pina i Estany <carles@pina.cat>
459 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
461 (GRUB_TERM_PPAGE): Changed to 0x4900.
463 2008-09-24 Robert Millan <rmh@aybabtu.com>
465 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
466 macros (they were i386-pc specific).
467 * include/grub/sparc64/ieee1275/console.h: Likewise.
468 * include/grub/efi/console.h: Likewise.
470 2008-09-22 Bean <bean123ch@gmail.com>
472 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
473 resident and in attribute list.
475 * include/grub/ntfs.h (BMP_LEN): Removed.
477 2008-09-22 Bean <bean123ch@gmail.com>
479 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
480 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
482 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
483 error occurs, as grub_disk_open will call grub_disk_close, which will
484 call p->close (scsi).
486 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
488 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
489 (AC_PREREQ): Bumped to 2.59.
490 (AC_TRY_COMPILE): Replace obsolete macro with ...
491 (AC_COMPILE_IFELSE): ... this.
492 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
493 (AC_LINK_IFELSE): ... this.
495 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
497 * autogen.sh: Add a call to `gendistlist.sh'.
499 2008-09-19 Christian Franke <franke@computer.org>
501 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
502 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
503 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
504 Export __enable_execute_stack() to modules.
505 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
508 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
510 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
513 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
515 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
516 #include <grub/util/hostdisk.h>.
518 2008-09-08 Robert Millan <rmh@aybabtu.com>
520 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
521 segments when their filesz is zero (grub_file_read() interprets
522 zero-size as "read until EOF", which results in memory corruption).
523 Use `lowest_segment' rather than 0 for calculating the current
524 segment load address.
526 2008-09-08 Robert Millan <rmh@aybabtu.com>
528 * util/hostdisk.c (open_device): Replace a grub_util_info() call
529 with grub_dprintf("hostdisk", ...), as it was so verbose that it
530 clobbered useful information.
532 2008-09-08 Robert Millan <rmh@aybabtu.com>
534 * include/grub/util/biosdisk.h: Move to ...
535 * include/grub/util/hostdisk.h: ... here. Update all users.
536 * util/biosdisk.c: Move to ...
537 * util/hostdisk.c: ... here. Update all users.
539 2008-09-07 Robert Millan <rmh@aybabtu.com>
541 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
543 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
544 and length can be stored directly in the `mbi->mmap_addr' and
545 `mbi->mmap_length' struct fields.
547 2008-09-07 Robert Millan <rmh@aybabtu.com>
549 * conf/i386.rmk: New file. Provides declaration for building
551 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
552 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
554 Include `conf/i386.mk'.
555 * conf/i386-efi.rmk: Likewise.
556 * conf/x86_64-efi.rmk: Likewise.
557 * conf/i386-coreboot.rmk: Likewise.
558 * conf/i386-ieee1275.rmk: Likewise.
560 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
562 Based on patch created by Colin D Bennett <colin@gibibit.com>.
563 Adds optimization support for BGR based modes.
565 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
566 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
567 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
568 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
569 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
570 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
571 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
572 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
573 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
574 (grub_video_i386_vbeblit_index_index): Likewise.
575 (grub_video_i386_vbeblit_replace_directN): Added.
576 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
577 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
578 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
579 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
580 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
581 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
582 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
583 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
584 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
585 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
586 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
587 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
588 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
590 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
591 (grub_video_i386_vbefill_R8G8B8): Likewise.
592 (grub_video_i386_vbefill_index): Likewise.
593 (grub_video_i386_vbefill_direct32): Added.
594 (grub_video_i386_vbefill_direct24): Likewise.
595 (grub_video_i386_vbefill_direct16): Likewise.
596 (grub_video_i386_vbefill_direct8): Likewise.
598 * include/grub/video.h (grub_video_blit_format): Removed
599 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
600 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
601 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
602 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
603 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
605 * video/video.c (grub_video_get_blit_format): Updated to use new
606 blit formats. Added handling for 16 bit color modes.
608 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
610 (common_blitter): Updated to use new blitters.
612 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
614 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
615 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
616 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
617 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
618 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
619 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
620 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
621 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
622 (grub_video_i386_vbeblit_index_index): Likewise.
623 (grub_video_i386_vbeblit_replace_directN): Added.
624 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
625 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
626 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
627 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
628 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
629 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
630 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
631 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
632 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
633 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
634 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
635 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
636 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
638 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
639 (grub_video_i386_vbefill_R8G8B8): Likewise.
640 (grub_video_i386_vbefill_index): Likewise.
641 (grub_video_i386_vbefill_direct32): Added.
642 (grub_video_i386_vbefill_direct24): Likewise.
643 (grub_video_i386_vbefill_direct16): Likewise.
644 (grub_video_i386_vbefill_direct8): Likewise.
646 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
649 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
652 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
655 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
658 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
660 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
663 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
665 * fs/iso9660.c (grub_iso9660_date): New structure.
666 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
667 (grub_iso9660_uuid): New function.
669 2008-09-05 Bean <bean123ch@gmail.com>
671 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
673 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
674 insensitive bit for names in Win32 and Win32 & DOS namespace.
676 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
678 * include/grub/types.h (LONG_MAX): Likewise.
680 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
682 * util/getroot.c: Include <config.h>.
683 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
684 add support for /dev/md/N devices and handle LVM double dash escaping.
686 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
688 * config.guess: Update to latest version from config git.
689 * config.sub: Likewise.
691 2008-09-03 Robert Millan <rmh@aybabtu.com>
693 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
694 `disk->total_sectors'.
696 2008-09-01 Colin D Bennett <colin@gibibit.com>
698 * include/grub/normal.h: Fixed incorrect comment for
699 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
701 2008-09-01 Colin D Bennett <colin@gibibit.com>
703 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
706 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
707 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
708 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
709 (GRUB_VBE_MODEATTR_COLOR): Likewise.
710 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
711 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
712 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
713 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
714 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
715 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
716 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
717 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
718 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
719 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
720 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
721 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
722 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
723 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
724 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
726 2008-08-31 Robert Millan <rmh@aybabtu.com>
728 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
730 (grub_multiboot): Fix a few warnings.
732 2008-08-31 Robert Millan <rmh@aybabtu.com>
734 * loader/i386/pc/multiboot.c: Update comment not to say that
735 boot_device support is unimplemented.
737 2008-08-31 Robert Millan <rmh@aybabtu.com>
739 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
740 or memory map support are unimplemented.
742 2008-08-31 Colin D Bennett <colin@gibibit.com>
744 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
746 2008-08-31 Colin D Bennett <colin@gibibit.com>
748 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
749 total video memory in 'vbeinfo' output; show color format details for
752 2008-08-30 Pavel Roskin <proski@gnu.org>
754 * util/genmoddep.c: Remove for real this time.
755 * DISTLIST: Remove util/genmoddep.c.
757 2008-08-30 Robert Millan <rmh@aybabtu.com>
759 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
760 as required by Multiboot spec (it was already 4-byte aligned, but
763 2008-08-29 Pavel Roskin <proski@gnu.org>
765 * kern/powerpc/ieee1275/crt0.S: Rename to ...
766 * kern/powerpc/ieee1275/startup.S: ... this.
767 * conf/powerpc-ieee1275.rmk: Adjust for the above.
768 * DISTLIST: Likewise.
770 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
771 grub/cpu/kernel.h. Add start label for consistency with other
772 platforms. Add grub_prefix immediately after start. Add jump
773 to the code after grub_prefix.
774 * include/grub/powerpc/kernel.h: Provide valid values for
775 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
777 2008-08-29 Bean <bean123ch@gmail.com>
779 * configure.ac: Change host_os to cygwin for mingw.
780 (asprintf): New check for function.
782 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
783 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
785 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
786 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
787 sync, sleep and grub_util_get_disk_size for mingw.
789 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
790 to get size in mingw.
791 (open_device): Use flag O_BINARY if it's defined.
792 (find_root_device): Add dummy code for mingw.
794 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
795 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
796 (get_scsi_disk_name): Return 0 for mingw.
798 * util/hostfs.c: #include <grub/util/misc.h>.
799 (grub_hostfs_open): Use "rb" flag to open file, use
800 grub_util_get_disk_size to get disk size for mingw.
802 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
803 (asprintf): New function if HAVE_ASPRINTF is not set.
804 (sync): New function for mingw.
806 (grub_util_get_disk_size): Likewise.
808 2008-08-28 Pavel Roskin <proski@gnu.org>
810 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
813 2008-08-28 Robert Millan <rmh@aybabtu.com>
815 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
817 2008-08-28 Robert Millan <rmh@aybabtu.com>
819 Change find_grub_drive() syntax so it doesn't prevent it from
820 detecting NULL names as errors.
822 * util/biosdisk.c (find_grub_drive): Move free slot search code
824 (find_free_slot): ... to here.
825 (read_device_map): Use find_free_slot() to search for free slots.
827 2008-08-27 Marco Gerards <marco@gnu.org>
829 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
830 (scsi_mod_SOURCES): New variable.
831 (scsi_mod_CFLAGS): Likewise
832 (scsi_mod_LDFLAGS): Likewise.
834 * disk/scsi.c: New file.
836 * include/grub/scsi.h: Likewise.
838 * include/grub/scsicmd.h: Likewise.
840 * disk/ata.c: Include <grub/scsi.h>.
841 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
843 (grub_ata_iterate): Skip ATAPI devices.
844 (grub_ata_open): Only handle ATAPI devices.
845 (struct grub_atapi_read): Removed.
846 (grub_atapi_readsector): Likewise.
847 (grub_ata_read): No longer handle ATAPI devices.
848 (grub_ata_write): Likewise.
849 (grub_atapi_iterate): New function.
850 (grub_atapi_read): Likewise.
851 (grub_atapi_write): Likewise.
852 (grub_atapi_open): Likewise.
853 (grub_atapi_close): Likewise.
854 (grub_atapi_dev): New variable.
855 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
856 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
858 * include/grub/disk.h (enum grub_disk_dev_id): Add
859 `GRUB_DISK_DEVICE_SCSI_ID'.
861 2008-08-26 Robert Millan <rmh@aybabtu.com>
863 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
864 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
867 2008-08-23 Bean <bean123ch@gmail.com>
869 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
870 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
871 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
872 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
874 (raid5rec_mod_SOURCES): New macro.
875 (raid5rec_mod_CFLAGS): Likewise.
876 (raid5rec_mod_LDFLAGS): Likewise.
877 (raid6rec_mod_SOURCES): Likewise.
878 (raid6rec_mod_CFLAGS): Likewise.
879 (raid6rec_mod_LDFLAGS): Likewise.
880 (mdraid_mod_SOURCES): Likewise.
881 (mdraid_mod_CFLAGS): Likewise.
882 (mdraid_mod_LDFLAGS): Likewise.
883 (dm_nv_mod_SOURCES): Likewise.
884 (dm_nv_mod_CFLAGS): Likewise.
885 (dm_nv_mod_LDFLAGS): Likewise.
887 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
888 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
889 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
891 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
892 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
894 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
896 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
898 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
900 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
902 * disk/raid5_recover.c: New file.
904 * disk/raid6_recover.c: Likewise.
906 * disk/mdraid_linux.c: Likewise.
908 * disk/dmraid_nvidia.c: Likewise.
910 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
913 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
914 calculate the size of raid device.
915 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
916 different layout of raid5.
917 (grub_raid_scan_device): Remove code specific to mdraid.
918 (grub_raid_list): New variable.
919 (free_array): New function.
920 (grub_raid_register): Likewise.
921 (grub_raid_unregister): Likewise.
922 (grub_raid_rescan): Likewise.
923 (GRUB_MOD_INIT): Don't iterate device here.
924 (GRUB_MOD_FINI): Use free_array to release resource.
926 * include/grub/raid.h: Remove macro and structure specific to mdraid.
927 (grub_raid5_recover_func_t): New function variable type.
928 (grub_raid6_recover_func_t): Likewise.
929 (grub_raid5_recover_func): New variable.
930 (grub_raid6_recover_func): Likewise.
931 (grub_raid_register): New function.
932 (grub_raid_unregister): Likewise.
933 (grub_raid_rescan): Likewise.
934 (grub_raid_block_xor): Likewise.
936 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
937 (CMD_CRC): New macro.
939 (read_file): Handle device as well as file.
940 (cmd_crc): New function.
941 (fstest): Handle multiple disks.
942 (options): Remove part, raw and long, add root and diskcount.
943 (usage): Add crc, remove -p, -r, -l, add -r and -c.
944 (main): Find the first non option entry and ignore subsequent options,
945 add handling for the new options, support multiple disks.
947 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
949 2008-08-23 Bean <bean123ch@gmail.com>
951 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
953 * genfslist.sh: Ignore kernel.mod.
955 * genpartmaplist.sh: Likewise.
957 2008-08-23 Robert Millan <rmh@aybabtu.com>
959 * util/getroot.c (find_root_device): Skip anything that starts with
960 a dot, not just directories. This avoids things like /dev/.tmp.md0.
962 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
964 * util/update-grub.in (GRUB_GFXMODE): Export variable.
965 * util/grub.d/00_header.in: Allow the administrator to change default
966 gfxmode via ${GRUB_GFXMODE}.
968 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
970 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
972 2008-08-21 Robert Millan <rmh@aybabtu.com>
974 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
976 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
977 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
979 2008-08-20 Carles Pina i Estany <carles@pina.cat>
981 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
982 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
984 2008-08-19 Robert Millan <rmh@aybabtu.com>
986 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
987 (struct grub_virtual_screen): Remove `cursor_color'.
988 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
990 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
992 2008-08-18 Robert Millan <rmh@aybabtu.com>
994 Unify (identical) linux_normal.c files.
995 * loader/i386/efi/linux_normal.c: Move from here ...
996 * loader/linux_normal.c: ... to here. Update all users.
997 * loader/i386/pc/linux_normal.c: Delete. Update all users.
998 * loader/i386/ieee1275/linux_normal.c: Likewise.
1000 2008-08-18 Robert Millan <rmh@aybabtu.com>
1002 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
1003 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
1004 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
1005 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
1006 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
1008 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
1009 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
1010 (GRUB_LINUX_CL_END_OFFSET): ... to here.
1011 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
1012 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
1013 (GRUB_EFI_CL_END_OFFSET): Rename to ...
1014 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
1015 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
1016 Initialize `params->video_cursor_x' and `params->video_cursor_y'
1017 portably using grub_getxy().
1018 Replace `-EFI' with `-bzImage' in boot message.
1020 2008-08-17 Robert Millan <rmh@aybabtu.com>
1022 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
1024 2008-08-17 Robert Millan <rmh@aybabtu.com>
1026 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
1028 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
1029 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
1030 (grub_machine_mmap_iterate): New function declaration.
1031 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
1033 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
1036 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
1037 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
1038 Move e820 parsing from here ...
1039 * kern/i386/pc/mmap.c: New file.
1040 (grub_machine_mmap_iterate): ... to here.
1042 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
1043 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
1044 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
1045 (grub_available_iterate): Redeclare to return `void', and redeclare
1046 its hook to use grub_uint64_t as addr and size parameters, and rename
1048 (grub_machine_mmap_iterate): ... this. Update all users.
1050 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
1051 to make it more readable. Rename to ...
1052 (grub_machine_mmap_iterate): ... this.
1054 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
1055 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
1056 (grub_multiboot): Allocate an extra region after the payload, and fill
1057 it with a Multiboot memory map. Adjust a.out loader to calculate size
1058 with the extra space.
1059 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
1060 with the extra space.
1062 2008-08-17 Carles Pina i Estany <carles@pina.cat>
1064 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
1066 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
1068 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
1069 mdate-sh to the list `find' searches for.
1070 * DISTLIST: Regenerated.
1072 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
1074 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
1075 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
1076 genmoddep.awk, gensymlist.sh.in.
1077 (DISTDIRS): Add bus, docs, hook, lib.
1078 * DISTLIST: Regenerated.
1079 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
1081 2008-08-16 Robert Millan <rmh@aybabtu.com>
1083 * disk/raid.c (grub_raid_init): Handle/report errors set by
1084 grub_device_iterate().
1085 * disk/lvm.c (grub_lvm_init): Likewise.
1087 2008-08-15 Bean <bean123ch@gmail.com>
1089 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1091 (datetime_mod_SOURCES): New macro.
1092 (datetime_mod_CFLAGS): Likewise.
1093 (datetime_mod_LDFLAGS): Likewise.
1094 (date_mod_SOURCES): Likewise.
1095 (date_mod_CFLAGS): Likewise.
1096 (date_mod_LDFLAGS): Likewise.
1097 (datehook_mod_SOURCES): Likewise.
1098 (datehook_mod_CFLAGS): Likewise.
1099 (datehook_mod_LDFLAGS): Likewise.
1101 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1103 (datetime_mod_SOURCES): New macro.
1104 (datetime_mod_CFLAGS): Likewise.
1105 (datetime_mod_LDFLAGS): Likewise.
1106 (date_mod_SOURCES): Likewise.
1107 (date_mod_CFLAGS): Likewise.
1108 (date_mod_LDFLAGS): Likewise.
1109 (datehook_mod_SOURCES): Likewise.
1110 (datehook_mod_CFLAGS): Likewise.
1111 (datehook_mod_LDFLAGS): Likewise.
1113 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1115 (datetime_mod_SOURCES): New macro.
1116 (datetime_mod_CFLAGS): Likewise.
1117 (datetime_mod_LDFLAGS): Likewise.
1118 (date_mod_SOURCES): Likewise.
1119 (date_mod_CFLAGS): Likewise.
1120 (date_mod_LDFLAGS): Likewise.
1121 (datehook_mod_SOURCES): Likewise.
1122 (datehook_mod_CFLAGS): Likewise.
1123 (datehook_mod_LDFLAGS): Likewise.
1125 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1127 (datetime_mod_SOURCES): New macro.
1128 (datetime_mod_CFLAGS): Likewise.
1129 (datetime_mod_LDFLAGS): Likewise.
1130 (date_mod_SOURCES): Likewise.
1131 (date_mod_CFLAGS): Likewise.
1132 (date_mod_LDFLAGS): Likewise.
1133 (datehook_mod_SOURCES): Likewise.
1134 (datehook_mod_CFLAGS): Likewise.
1135 (datehook_mod_LDFLAGS): Likewise.
1137 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
1139 (datetime_mod_SOURCES): New macro.
1140 (datetime_mod_CFLAGS): Likewise.
1141 (datetime_mod_LDFLAGS): Likewise.
1142 (date_mod_SOURCES): Likewise.
1143 (date_mod_CFLAGS): Likewise.
1144 (date_mod_LDFLAGS): Likewise.
1145 (datehook_mod_SOURCES): Likewise.
1146 (datehook_mod_CFLAGS): Likewise.
1147 (datehook_mod_LDFLAGS): Likewise.
1149 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
1151 * commands/date.c: New file.
1153 * hook/datehook.c: Likewise.
1155 * include/grub/lib/datetime.h: Likewise.
1157 * include/grub/i386/cmos.h: Likewise.
1159 * lib/datetime.c: Likewise.
1161 * lib/i386/datetime.c: Likewise.
1163 * lib/efi/datetime.c: Likewise.
1165 2008-08-14 Robert Millan <rmh@aybabtu.com>
1167 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
1168 (grub_mkelfimage_SOURCES): New variable.
1169 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
1171 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
1172 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
1173 * conf/powerpc-ieee1275.rmk: Likewise.
1174 * conf/i386-ieee1275.rmk: Likewise.
1176 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
1177 * kern/i386/coreboot/init.c: Likewise.
1179 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
1180 with `<grub/cpu/kernel.h>'.
1181 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
1183 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
1184 * kern/i386/coreboot/startup.S: Likewise.
1186 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
1187 (GRUB_MOD_GAP): Remove.
1188 * include/grub/powerpc/kernel.h: New file.
1189 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
1190 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1191 * include/grub/i386/kernel.h: New file.
1192 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
1193 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
1194 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
1196 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
1198 Use --directory when invoking grub_mkimage.
1200 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
1201 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
1202 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
1203 and GRUB_KERNEL_CPU_PREFIX.
1205 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
1207 * include/grub/err.h (grub_err_printf): New function prototype.
1208 * util/misc.c (grub_err_printf): New function.
1209 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
1211 * kern/err.c (grub_print_error): Use grub_err_printf.
1213 2008-08-13 Robert Millan <rmh@aybabtu.com>
1215 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
1217 2008-08-13 Robert Millan <rmh@aybabtu.com>
1219 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
1222 2008-08-12 Robert Millan <rmh@aybabtu.com>
1224 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
1225 of the relocation code from here ...
1226 (grub_multiboot): ... to here.
1227 (forward_relocator, backward_relocator): Move from here ...
1228 * kern/i386/loader.S (grub_multiboot_forward_relocator)
1229 (grub_multiboot_backward_relocator): ... to here.
1230 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
1231 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
1232 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
1233 (grub_multiboot_forward_relocator_end)
1234 (grub_multiboot_backward_relocator)
1235 (grub_multiboot_backward_relocator_end): New variables.
1237 2008-08-12 Bean <bean123ch@gmail.com>
1239 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
1241 2008-08-11 Robert Millan <rmh@aybabtu.com>
1243 * kern/i386/linuxbios/startup.S: Move from here ...
1244 * kern/i386/coreboot/startup.S: ... to here.
1246 * kern/i386/linuxbios/init.c: Move from here ...
1247 * kern/i386/coreboot/init.c: ... to here.
1249 * kern/i386/linuxbios/table.c: Move from here ...
1250 * kern/i386/coreboot/mmap.c: ... to here.
1252 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
1254 2008-08-11 Robert Millan <rmh@aybabtu.com>
1256 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
1257 errors. Leave it to the upper layer to handle them.
1259 2008-08-09 Christian Franke <franke@computer.org>
1261 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
1262 * conf/common.rmk: Install `grub-pe2elf' only if requested.
1263 Install `grub.d/10_windows' only on Cygwin.
1264 * configure.ac: Add subst of `target_os'.
1265 Check `target_os' also before setting TARGET_OBJ2ELF.
1266 Add `--enable-grub-pe2elf'.
1268 2008-08-08 Robert Millan <rmh@aybabtu.com>
1270 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1271 (grub_last_time): Change type to grub_uint64_t.
1272 (grub_disk_open): Migrate code from to using grub_get_time_ms().
1273 (grub_disk_close): Likewise.
1275 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
1276 (run_menu): Migrate code from to using grub_get_time_ms().
1278 * util/misc.c (grub_get_time_ms): New function.
1280 2008-08-08 Marco Gerards <marco@gnu.org>
1282 * disk/ata.c (grub_ata_regget): Change return type to
1284 (grub_ata_regget2): Likewise.
1285 (grub_ata_wait_status): New function.
1286 (grub_ata_wait_busy): Removed function, updated all users to use
1287 `grub_ata_wait_status'.
1288 (grub_ata_wait_drq): Likewise.
1289 (grub_ata_cmd): New function.
1290 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
1292 (grub_ata_pio_write): Add error handling.
1293 (grub_atapi_identify): Likewise.
1294 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
1296 (grub_ata_identify): Use `grub_ata_cmd' and improve error
1297 handling. Actually use the detected registers. Reorder the
1298 detection logic such that it is easier to read.
1299 (grub_ata_pciinit): Do not assign the same ID to each controller.
1300 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
1302 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
1304 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
1306 2008-08-08 Marco Gerards <marco@gnu.org>
1310 2008-08-07 Bean <bean123ch@gmail.com>
1312 * include/grub/x86_64/pci.h: New file.
1314 2008-08-07 Christian Franke <franke@computer.org>
1316 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
1317 (TIMER2_GATE): Likewise.
1318 (grub_pit_wait): Add enable/disable of the timer2 gate
1319 bit of port 0x61. This fixes a possible infinite loop.
1321 2008-08-07 Bean <bean123ch@gmail.com>
1323 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
1324 kern/i386/tsc.c and kern/i386/pit.c.
1326 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
1329 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
1332 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
1334 2008-08-07 Bean <bean123ch@gmail.com>
1336 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
1338 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
1340 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
1341 multiple inclusion. Add #include <grub/types.h>.
1343 2008-08-06 Christian Franke <franke@computer.org>
1345 * conf/common.rmk: Build and install `10_windows'.
1346 * util/grub.d/10_windows.in: New script.
1348 2008-08-06 Pavel Roskin <proski@gnu.org>
1350 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
1352 2008-08-06 Robert Millan <rmh@aybabtu.com>
1354 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
1355 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
1357 2008-08-06 Bean <bean123ch@gmail.com>
1359 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
1360 (grub_pxefs_fs_int): Remove dummy definition.
1361 (grub_pxefs_open): Use data->block_size to store the current block
1363 (grub_pxefs_read): Use block size stored in data->block_size. As the
1364 value of grub_pxe_blksize can be changed after the file is opened.
1366 2008-08-06 Bean <bean123ch@gmail.com>
1368 * fs/i386/pc/pxe.c (curr_file): new variable.
1369 (grub_pxefs_open): Simply the handling of pxe file system. Don't
1370 require the dummy internal file system anymore.
1371 (grub_pxefs_read): Removed.
1372 (grub_pxefs_close): Likewise.
1373 (grub_pxefs_fs_int): Likewise.
1374 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
1375 connection when we switch file.
1376 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
1378 2008-08-06 Robert Millan <rmh@aybabtu.com>
1380 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
1382 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
1383 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
1385 * kern/i386/halt.c: New file.
1386 * kern/i386/reboot.c: Likewise.
1387 * include/grub/i386/reboot.h: Likewise.
1388 * include/grub/i386/halt.h: Likewise.
1390 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
1391 Include `<grub/cpu/halt.h>'.
1392 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
1393 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
1395 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
1396 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
1397 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
1398 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
1399 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
1400 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
1402 * include/grub/i386/at_keyboard.h: ... to here.
1404 2008-08-05 Robert Millan <rmh@aybabtu.com>
1406 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
1407 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
1408 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
1409 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1410 `kern/generic/millisleep.c'.
1412 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
1413 instead of grub_get_rtc().
1414 (grub_tsc_init): Initialize `tsc_boot_time'.
1416 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
1417 (grub_machine_init): Use grub_tsc_init() rather than
1418 installing an RTC-based handler via grub_install_get_time_ms().
1420 * kern/i386/pit.c: New file.
1421 * include/grub/i386/pit.h: Likewise.
1423 2008-08-05 Bean <bean123ch@gmail.com>
1425 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
1427 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
1428 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
1429 (pxe_mod_SOURCES): New macro.
1430 (pxe_mod_CFLAGS): Likewise.
1431 (pxe_mod_LDFLAGS): Likewise.
1432 (pxecmd_mod_SOURCES): Likewise.
1433 (pxecmd_mod_CFLAGS): Likewise.
1434 (pxecmd_mod_LDFLAGS): Likewise.
1436 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
1437 (grub_pxe_call): Likewise.
1439 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
1441 * commands/i386/pc/pxecmd.c: New file.
1443 * fs/i386/pc/pxe.c: Likewise.
1445 * include/grub/i386/pc/pxe.h: Likewise.
1447 2008-08-05 Bean <bean123ch@gmail.com>
1449 * util/console.c (grub_console_cur_color): New variable.
1450 (grub_console_standard_color): Likewise.
1451 (grub_console_normal_color): Likewise.
1452 (grub_console_highlight_color): Likewise.
1453 (color_map): Likewise.
1454 (use_color): Likewise.
1455 (NUM_COLORS): New macro.
1456 (grub_ncurses_setcolorstate): Handle color properly.
1457 (grub_ncurses_setcolor): Don't change color here, just remember the
1458 settings, color will be set in grub_ncurses_setcolorstate.
1459 (grub_ncurses_getcolor): New function.
1460 (grub_ncurses_init): Initialize color pairs.
1461 (grub_ncurses_term): New member grub_ncurses_getcolor.
1463 2008-08-05 Colin D Bennett <colin@gibibit.com>
1465 High resolution timer support. Implemented for x86 CPUs using TSC.
1466 Extracted generic grub_millisleep() so it's linked in only as needed.
1467 This requires a Pentium compatible CPU; if the RDTSC instruction is
1468 not supported, then it falls back on the generic grub_get_time_ms()
1469 implementation that uses the machine's RTC.
1471 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
1472 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1473 `kern/generic/millisleep.c'.
1475 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
1476 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
1478 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
1479 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
1481 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1483 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1484 `kern/generic/millisleep.c'.
1486 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1488 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
1490 * kern/generic/rtc_get_time_ms.c: New file.
1492 * kern/generic/millisleep.c: New file.
1494 * kern/misc.c: Don't include
1495 <kern/time.h> anymore.
1496 (grub_millisleep_generic): Removed.
1498 * commands/sleep.c (grub_interruptible_millisleep): Uses
1499 grub_get_time_ms() instead of grub_get_rtc().
1501 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
1503 (grub_cpu_is_cpuid_supported): New inline function.
1504 (grub_cpu_is_tsc_supported): New inline function.
1505 (grub_tsc_init): New function prototype.
1506 (grub_tsc_get_time_ms): New function prototype.
1508 * kern/i386/tsc.c (grub_get_time_ms): New file.
1510 * include/grub/time.h: Include <grub/types.h.
1511 (grub_millisleep_generic): Removed.
1512 (grub_get_time_ms): New prototype.
1513 (grub_install_get_time_ms): New prototype.
1514 (grub_rtc_get_time_ms): New prototype.
1516 * kern/time.c (grub_get_time_ms): New function.
1517 (grub_install_get_time_ms): New function.
1519 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
1520 <grub/time.h> anymore.
1521 (grub_millisleep): Removed.
1522 (grub_machine_init): Call grub_tsc_init.
1524 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
1525 get_time_ms() implementation.
1527 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
1528 (ieee1275_get_time_ms): New function.
1529 (grub_machine_init): Install get_time_ms() implementation.
1531 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
1532 (grub_machine_init): Call grub_tsc_init().
1533 (grub_millisleep): Removed.
1535 * kern/ieee1275/init.c (grub_millisleep): Removed.
1536 (grub_machine_init): Install ieee1275_get_time_ms()
1538 (ieee1275_get_time_ms): New function.
1539 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
1542 2008-08-05 Marco Gerards <marco@gnu.org>
1544 * disk/ata.c: Include <grub/pci.h>.
1545 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
1546 (grub_ata_initialize): Rewritten.
1547 (grub_ata_device_initialize): New function.
1549 2008-08-04 Pavel Roskin <proski@gnu.org>
1551 * kern/main.c: Include grub/mm.h.
1553 2008-08-04 Robert Millan <rmh@aybabtu.com>
1555 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
1556 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
1557 corruption problem).
1559 2008-08-04 Robert Millan <rmh@aybabtu.com>
1561 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
1562 warnings introduced in my last commit.
1564 2008-08-03 Robert Millan <rmh@aybabtu.com>
1566 Make PCI available on all i386 architectures.
1568 * include/grub/i386/pc/pci.h: Move from here ...
1569 * include/grub/i386/pci.h: ... to here.
1571 * include/grub/i386/pc/pci.h: Remove.
1572 * include/grub/i386/efi/pci.h: Remove.
1573 * include/grub/x86_64/efi/pci.h: Remove.
1575 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
1578 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
1579 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
1580 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
1582 * conf/i386-ieee1275.rmk: Likewise.
1584 2008-08-03 Robert Millan <rmh@aybabtu.com>
1586 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
1587 (grub_console_setcursor): Make it possible to set cursor off.
1589 2008-08-03 Robert Millan <rmh@aybabtu.com>
1591 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
1592 of modules instead of assuming which platform provides what.
1593 * util/update-grub.in: Likewise.
1595 2008-08-03 Robert Millan <rmh@aybabtu.com>
1597 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
1598 instead of `grub_install_dos_part' to determine whether a drive needs
1599 to be prepended to prefix (`grub_install_dos_part' is not reliable,
1600 because it can be overridden when loading GRUB via Multiboot).
1602 2008-08-02 Robert Millan <rmh@aybabtu.com>
1604 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
1606 2008-08-02 Robert Millan <rmh@aybabtu.com>
1608 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
1609 of informational grub_dprintf() calls.
1611 2008-08-02 Robert Millan <rmh@aybabtu.com>
1613 * disk/memdisk.c (memdisk_size): Don't initialize.
1614 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
1616 * include/grub/i386/pc/kernel.h
1617 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
1618 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
1619 (grub_memdisk_image_size, grub_arch_memdisk_addr)
1620 (grub_arch_memdisk_size): Remove.
1622 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
1623 field (was only used to transfer a constant). Add `type' field to
1624 support multiple module types.
1625 (grub_module_iterate): New function.
1627 * kern/device.c (grub_device_open): Do not hide error messages
1628 when grub_disk_open() fails. Use grub_print_error() instead.
1630 * kern/i386/pc/init.c (grub_arch_modules_addr)
1631 (grub_arch_memdisk_size): Remove functions.
1632 (grub_arch_modules_addr): Return the module address in high memory
1633 (now that it isn't copied anymore).
1635 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
1636 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
1637 decompression routine (grub_total_module_size already includes that
1638 now). Don't copy modules back to low memory.
1640 * kern/main.c: Include `<grub/mm.h>'.
1641 (grub_load_modules): Split out (and use) ...
1642 (grub_module_iterate): ... this function, which iterates through
1643 module objects and runs a hook.
1644 Comment out grub_mm_init_region() call, as it would cause non-ELF
1645 modules to be overwritten.
1647 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
1648 the memdisk image in its own region, make it part of the module list.
1649 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
1650 (main): Parse --memdisk|-m option, and pass user-provided path as
1651 parameter to generate_image().
1652 (add_segments): Pass `memdisk_path' down to load_modules().
1653 (load_modules): Embed memdisk image in module section when requested.
1654 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
1655 `header.type' instead of `header.offset'.
1657 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
1658 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
1659 (memdisk_mod_LDFLAGS): New variables.
1660 * conf/i386-coreboot.rmk: Likewise.
1661 * conf/i386-ieee1275.rmk: Likewise.
1663 2008-08-02 Robert Millan <rmh@aybabtu.com>
1665 * loader/i386/pc/multiboot.c (playground, forward_relocator)
1666 (backward_relocator): New variables. Used to allocate and relocate
1667 the payload, respectively.
1668 (grub_multiboot_load_elf32): Load into heap instead of requested
1669 address, install the appropriate relocator code in each bound of
1670 the payload, and set the entry point such that
1671 grub_multiboot_real_boot() will jump to one of them.
1673 * kern/i386/loader.S (grub_multiboot_payload_size)
1674 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1675 (grub_multiboot_payload_entry_offset): New variables.
1676 (grub_multiboot_real_boot): Set cpu context to what the relocator
1677 expects, and jump to the relocator instead of the payload.
1679 * include/grub/i386/loader.h (grub_multiboot_payload_size)
1680 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1681 (grub_multiboot_payload_entry_offset): Export.
1683 2008-08-01 Bean <bean123ch@gmail.com>
1685 * normal/menu_entry.c (editor_getline): Don't return the original
1686 string as result, as it will be released by lexer once it has done
1689 2008-08-01 Robert Millan <rmh@aybabtu.com>
1691 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
1692 within menuentries, not before them.
1693 util/grub.d/10_hurd.in: Likewise.
1695 2008-08-01 Bean <bean123ch@gmail.com>
1697 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
1698 (bufio_mod_SOURCES): New macro.
1699 (bufio_mod_CFLAGS): Likewise.
1700 (bufio_mod_LDFLAGS): Likewise.
1702 * include/grub/bufio.h: New file.
1704 * io/bufio.c: Likewise.
1706 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
1707 (grub_video_reader_png): Use grub_buffile_open to open file.
1709 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
1710 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
1712 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
1713 (grub_video_reader_tga): Use grub_buffile_open to open file.
1715 * font/manager.c: Include <grub/bufio.h>.
1716 (add_font): Use grub_buffile_open to open file.
1718 2008-07-31 Robert Millan <rmh@aybabtu.com>
1720 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
1721 ELF segments, use a macro for arbitrarily accessing any of them instead
1722 of preparing a pointer that allows access to one at a time.
1723 (grub_multiboot_load_elf64): Likewise.
1725 2008-07-31 Bean <bean123ch@gmail.com>
1727 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
1728 GRUB_KERNEL_MACHINE_DATA_END.
1730 2008-07-30 Robert Millan <rmh@aybabtu.com>
1732 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
1733 Increase from 0x50 to 0x60.
1734 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
1735 use UUIDs to identify the root drive for them. If that's not
1737 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
1738 check, for cross-disk installs.
1740 2008-07-30 Robert Millan <rmh@aybabtu.com>
1742 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
1743 is non-empty, use it to set the `prefix' environment variable instead
1744 of the usual approach.
1745 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
1746 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
1747 environment variable instead of dummy make_install_device().
1749 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
1750 (start): Insert a data section, with `grub_prefix' variable.
1751 * kern/i386/linuxbios/startup.S: Likewise.
1753 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
1754 New variable reference.
1755 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
1756 New macro. Defines offset of `grub_prefix' within startup.S (relative
1758 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
1759 section within startup.S (relative to `start').
1760 * include/grub/i386/coreboot/kernel.h: Likewise.
1762 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
1763 Overwrite grub_prefix with its contents, at the beginning of the
1765 (main): Understand -p|--prefix.
1767 2008-07-30 Robert Millan <rmh@aybabtu.com>
1769 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
1771 2008-07-30 Robert Millan <rmh@aybabtu.com>
1773 * term/i386/pc/vga_text.c (grub_console_cls): Use
1774 grub_console_gotoxy() to go back to beginning of the screen.
1775 Found by Patrick Georgi <patrick.georgi@coresystems.de>
1777 2008-07-29 Christian Franke <franke@computer.org>
1779 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1780 Add conversion of emulated mount points on Cygwin.
1782 2008-07-29 Christian Franke <franke@computer.org>
1784 * util/update-grub.in: Add a check for admin
1786 Remove old `grub.cfg.new' before creation.
1787 Add `-f' to `mv' to handle the different filesystem
1788 semantics of Windows.
1790 2008-07-29 Bean <bean123ch@gmail.com>
1792 * normal/main.c (get_line): Fix buffer overflow bug.
1794 2008-07-28 Robert Millan <rmh@aybabtu.com>
1796 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
1797 (struct grub_apple_header): New struct. Describes the layout of
1799 (apple_partition_map_iterate): Check the header magic as well as the
1800 partition magic (which was already being checked).
1802 2008-07-28 Pavel Roskin <proski@gnu.org>
1804 * genmk.rb: Add a warning to the beginning of the output that
1805 it's a generated file and should not be edited.
1807 2008-07-28 Robert Millan <rmh@aybabtu.com>
1809 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1810 with the same number are found, just use issue a warning with
1811 grub_dprintf(), as this error has been reported to be non-fatal.
1813 2008-07-27 Robert Millan <rmh@aybabtu.com>
1815 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
1818 2008-07-27 Bean <bean123ch@gmail.com>
1820 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
1821 (grub_fat_find_dir): Ignore case when comparing filename.
1823 2008-07-27 Bean <bean123ch@gmail.com>
1825 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
1826 smallino, as it's more descriptive, and i8count can be confused with
1827 the other field count.
1828 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
1831 2008-07-27 Bean <bean123ch@gmail.com>
1833 * commands/crc.c: New file.
1835 * lib/crc.c: Likewise.
1837 * include/grub/lib/crc.h: Likewise.
1839 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
1841 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
1842 (hexdump): Move this function to ...
1844 * lib/hexdump.c: ... here.
1846 * include/grub/hexdump.h: Renamed to ...
1848 * include/grub/lib/hexdump.h: ... this.
1850 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
1852 * util/grub-editenv.c: Likewise.
1854 * include/envblk.h: Renamed to ...
1856 * include/lib/envblk.h: ... this.
1858 * util/envblk.c: Renamed to ...
1860 * lib/envblk.c: ... this.
1862 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
1864 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
1865 (pkglib_MODULES): Add crc.mod.
1866 (hexdump_mod_SOURCES): Add lib/hexdump.c.
1867 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
1868 (crc_mod_SOURCES): New macro.
1869 (crc_mod_CFLAGS): Likewise.
1870 (crc_mod_LDFLAGS): Likewise.
1872 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
1874 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1876 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1878 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1880 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1882 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
1884 * commands/help.c: Include <grub/term.h>.
1885 (TERM_WIDTH): Removed. Updated all users.
1887 2008-07-27 Pavel Roskin <proski@gnu.org>
1889 * util/getroot.c (find_root_device): Rephrase a comment to avoid
1890 spurious warnings about a comment within a comment.
1892 2008-07-25 Robert Millan <rmh@aybabtu.com>
1894 * util/getroot.c (find_root_device): Skip devices that match
1895 /dev/dm-[0-9]. This lets the real device be found for any type of
1896 abstraction (LVM, EVMS, RAID..).
1897 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
1898 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
1899 device is found first, find_root_device() will now skip it.
1901 2008-07-24 Pavel Roskin <proski@gnu.org>
1903 * include/grub/types.h: Use __builtin_bswap32() and
1904 __builtin_bswap64() with gcc 4.3 and newer.
1906 2008-07-24 Christian Franke <franke@computer.org>
1908 * util/i386/pc/grub-install.in: If `--debug' is specified,
1909 pass `--verbose' to grub-setup.
1910 Abort script if make_system_path_relative_to_its_root() fails.
1912 2008-07-24 Bean <bean123ch@gmail.com>
1914 * configure.ac: Fixed a bug caused by the previous cygwin patch,
1915 variable `target_platform' should be `platform'.
1917 2008-07-24 Bean <bean123ch@gmail.com>
1919 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
1920 (grub_png_init_fixed_block): New function.
1921 (grub_png_decode_image_data): Handle fixed huffman code compression.
1923 2008-07-24 Bean <bean123ch@gmail.com>
1925 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
1926 (grub_pe2elf_SOURCES): New macro.
1927 (CLEANFILES): Add grub-pe2elf.
1929 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
1930 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
1931 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
1932 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
1933 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
1934 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
1935 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
1936 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
1937 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
1938 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
1939 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
1940 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
1941 (GRUB_PE32_DT_FUNCTION): Likewise.
1942 (GRUB_PE32_REL_I386_DIR32): Likewise.
1943 (GRUB_PE32_REL_I386_REL32): Likewise.
1944 (grub_pe32_symbol): New structure.
1945 (grub_pe32_reloc): Likewise.
1947 * util/grub-pe2elf.c: New file.
1949 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
1950 start symbol in non pc platform.
1952 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
1954 The following patches are from Christian Franke.
1956 * include/grub/dl.h: Remove .previous, gas supports this only
1959 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
1960 Remove .type, gas supports this only for ELF format.
1962 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
1963 nullbytes in symbol table. This fixes an infinite loop if table is
1966 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
1967 TARGET_IMG_LDFLAGS and EXEEXT.
1969 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
1970 TARGET_IMG_LDFLAGS_AC.
1971 (grub_CHECK_STACK_ARG_PROBE): New function.
1973 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
1975 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
1977 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
1978 to set TARGET_IMG_LD* accordingly.
1979 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
1980 Add call to grub_CHECK_STACK_ARG_PROBE.
1981 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
1983 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
1985 * genmk.rb: Add EXEEXT to CLEANFILES.
1987 2008-07-23 Robert Millan <rmh@aybabtu.com>
1989 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
1990 define the codes for arrows and lines used for the menu).
1991 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
1994 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
1995 fonts, because the latter are too slow.
1997 2008-07-21 Bean <bean123ch@gmail.com>
1999 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
2000 a20. Run keyboard test last, as it will cause macbook to halt.
2002 2008-07-18 Pavel Roskin <proski@gnu.org>
2004 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
2005 load foreign architecture modules correctly anyway. Keep
2006 support for loading host architecture modules, whether we
2007 compile them or not.
2009 2008-07-17 Pavel Roskin <proski@gnu.org>
2011 * configure.ac: Use -m32 or -m64 regardless of whether we had to
2012 change target_cpu. The compiler default can mismatch target_cpu
2015 * disk/efi/efidisk.c: Fix format warnings on x86_64.
2016 * kern/efi/efi.c: Likewise.
2018 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
2019 target compiler is functional.
2020 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
2023 * configure.ac: Default to efi platform for x86_64-apple. Allow
2024 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
2025 adjustments from the rest, only do them if target is not
2026 explicitly given. Merge other adjustments with the final sanity
2027 check. Remove an extraneous check for supported CPU. Be
2028 specific which CPU and which platform is not supported.
2030 * configure.ac: Default to pc platform for x86_64.
2032 2008-07-17 Robert Millan <rmh@aybabtu.com>
2034 Partial LinuxBIOS -> Coreboot rename.
2036 * conf/i386-linuxbios.rmk: Renamed to ...
2037 * conf/i386-coreboot.rmk: ... this.
2038 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
2039 * configure.ac: Accept "coreboot" as input platform (but maintain
2040 compatibility with "linuxbios").
2041 * include/grub/i386/linuxbios: Renamed to ...
2042 * include/grub/i386/coreboot: ... this.
2044 2008-07-17 Bean <bean123ch@gmail.com>
2046 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
2047 (appleldr_mod_SOURCE): New variable.
2048 (appleldr_mod_CFLAGS): Likewise.
2049 (appleldr_mod_LDFLAGS): Likewise.
2050 (pci_mod_SOURCES): Likewise.
2051 (pci_mod_CFLAGS): Likewise.
2052 (pci_mod_LDFLAGS): Likewise.
2053 (lspci_mod_SOURCES): Likewise.
2054 (lspci_mod_CFLAGS): Likewise.
2055 (lspci_mod_LDFLAGS): Likewise.
2057 * conf/x86_64-efi.rmk: New file.
2059 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
2061 (grub_efidisk_write): Likewise.
2063 * include/efi/api.h (efi_call_0): New macro.
2064 (efi_call_1): Likewise.
2065 (efi_call_2): Likewise.
2066 (efi_call_3): Likewise.
2067 (efi_call_4): Likewise.
2068 (efi_call_5): Likewise.
2069 (efi_call_6): Likewise.
2071 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
2072 grub_rescue_cmd_chainloader.
2074 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
2075 (grub_pe32_optional_header): Change some fields based on i386 or
2077 (GRUB_PE32_PE32_MAGIC): Likewise.
2079 * include/grub/efi/uga_draw.h: New file.
2081 * include/grub/elf.h (STN_ABS): New constant.
2082 (R_X86_64_NONE): Relocation constant for x86_64.
2083 (R_X86_64_64): Likewise.
2084 (R_X86_64_PC32): Likewise.
2085 (R_X86_64_GOT32): Likewise.
2086 (R_X86_64_PLT32): Likewise.
2087 (R_X86_64_COPY): Likewise.
2088 (R_X86_64_GLOB_DAT): Likewise.
2089 (R_X86_64_JUMP_SLOT): Likewise.
2090 (R_X86_64_RELATIVE): Likewise.
2091 (R_X86_64_GOTPCREL): Likewise.
2092 (R_X86_64_32): Likewise.
2093 (R_X86_64_32S): Likewise.
2094 (R_X86_64_16): Likewise.
2095 (R_X86_64_PC16): Likewise.
2096 (R_X86_64_8): Likewise.
2097 (R_X86_64_PC8): Likewise.
2099 * include/grub/i386/efi/pci.h: New file.
2101 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
2102 Change it value based on platform.
2103 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
2104 (GRUB_E820_RAM): Likewise.
2105 (GRUB_E820_RESERVED): Likewise.
2106 (GRUB_E820_ACPI): Likewise.
2107 (GRUB_E820_NVS): Likewise.
2108 (GRUB_E820_EXEC_CODE): Likewise.
2109 (GRUB_E820_MAX_ENTRY): Likewise.
2110 (grub_e820_mmap): New structure.
2111 (linux_kernel_header): Change the efi field according to different
2112 kernel version, also field from linux_kernel_header.
2114 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
2116 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
2117 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
2118 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
2119 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
2120 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
2121 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
2122 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
2123 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
2124 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
2125 (GRUB_PCI_ADDR_IO_MASK): Likewise.
2127 * include/grub/x86_64/efi/kernel.h: New file.
2129 * include/grub/x86_64/efi/loader.h: Likewise.
2131 * include/grub/x86_64/efi/machine.h: Likewise.
2133 * include/grub/x86_64/efi/pci.h: Likewise.
2135 * include/grub/x86_64/efi/time.h: Likewise.
2137 * include/grub/x86_64/linux.h: Likewise.
2139 * include/grub/x86_64/setjmp.h: Likewise.
2141 * include/grub/x86_64/time.h: Likewise.
2143 * include/grub/x86_64/types.h: Likewise.
2145 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
2146 GRUB_TARGET_SIZEOF_VOID_P.
2148 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
2149 (grub_efi_locate_handle): Likewise.
2150 (grub_efi_open_protocol): Likewise.
2151 (grub_efi_set_text_mode): Likewise.
2152 (grub_efi_stall): Likewise.
2153 (grub_exit): Likewise.
2154 (grub_reboot): Likewise.
2155 (grub_halt): Likewise.
2156 (grub_efi_exit_boot_services): Likewise.
2157 (grub_get_rtc): Likewise.
2159 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
2160 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
2161 (grub_efi_allocate_pages): Wrap efi calls.
2162 (grub_efi_free_pages): Wrap efi calls.
2163 (grub_efi_get_memory_map): Wrap efi calls.
2165 * kern/x86_64/dl.c: New file.
2167 * kern/x86_64/efi/callwrap.S: Likewise.
2169 * kern/x86_64/efi/startup.S: Likewise.
2171 * loader/efi/appleloader.c: Likewise.
2173 * loader/efi/chainloader.c (cmdline): New variable.
2174 (grub_chainloader_unload): Wrap efi calls.
2175 (grub_chainloader_boot): Likewise.
2176 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
2179 * loader/efi/chainloader_normal.c (chainloader_command):
2180 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
2183 * loader/i386/efi/linux.c (allocate_pages): Change allocation
2185 (grub_e820_add_region): New function.
2186 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
2188 (grub_find_video_card): New function.
2189 (grub_linux_setup_video): New function.
2190 (grub_rescue_cmd_linux): Probe for video information.
2192 * normal/x86_64/setjmp.S: New file.
2194 * term/efi/console.c (map_char): New function.
2195 (grub_console_putchar): Map unicode char.
2196 (grub_console_checkkey): Wrap efi calls.
2197 (grub_console_getkey): Likewise.
2198 (grub_console_getwh): Likewise.
2199 (grub_console_gotoxy): Likewise.
2200 (grub_console_cls): Likewise.
2201 (grub_console_setcolorstate): Likewise.
2202 (grub_console_setcursor): Likewise.
2204 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
2206 2008-07-16 Pavel Roskin <proski@gnu.org>
2208 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
2211 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
2212 pointer, not an integer. This fixes a warning and prevents
2213 precision loss on 64-bit systems.
2214 (relocate_addresses): Remove unneeded cast.
2216 2008-07-15 Pavel Roskin <proski@gnu.org>
2218 * kern/i386/ieee1275/init.c: Include grub/cache.h.
2220 * term/ieee1275/ofconsole.c: Disable code unused on i386.
2222 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
2223 Fix comparison between signed and unsigned.
2225 * include/grub/i386/ieee1275/console.h: Declare
2226 grub_console_init() and grub_console_fini().
2228 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
2229 It's empty and unused.
2231 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
2232 beginning to avoid warnings with some compilers.
2234 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
2235 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
2237 2008-07-14 Pavel Roskin <proski@gnu.org>
2239 * kern/env.c (grub_register_variable_hook): Don't copy empty
2240 string, it leaks memory. Pass "" to grub_env_set(), it should
2241 handle constant strings.
2243 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
2244 * commands/cmp.c (grub_cmd_cmp): Likewise.
2245 * kern/dl.c (grub_dl_flush_cache): Likewise.
2246 (grub_dl_load_core): Likewise.
2247 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
2248 (grub_elf64_load_phdrs): Likewise.
2250 2008-07-13 Pavel Roskin <proski@gnu.org>
2252 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
2253 between signed and unsigned.
2254 (LzmaEnc_Finish): Fix warning about an unused parameter.
2256 2008-07-13 Bean <bean123ch@gmail.com>
2258 * Makefile.in (enable_lzo): New rule.
2260 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
2262 * configure.ac (ENABLE_LZO): New option --enable-lzo.
2264 * boot/i386/pc/lnxboot.S: #include <config.h>.
2266 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
2267 its value according to the compression algorithm used, lzo or lzma.
2269 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
2270 compression algorithm according to configure macro.
2272 * kern/i386/pc/startup.S (codestart): Likewise.
2274 * kern/i386/pc/lzma_decode.S: New file.
2276 * include/grub/lib/LzFind.h: Likewise.
2278 * include/grub/lib/LzHash.h: Likewise.
2280 * include/grub/lib/LzmaDec.h: Likewise.
2282 * include/grub/lib/LzmaEnc.h: Likewise.
2284 * include/grub/lib/LzmaTypes.h: Likewise.
2286 * lib/LzFind.c: Likewise.
2288 * lib/LzmaDec.c: Likewise.
2290 * lib/LzmaEnc.c: Likewise.
2292 2008-07-13 Bean <bean123ch@gmail.com>
2294 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
2295 (grub_ext4_extent_header): New structure.
2296 (grub_ext4_extent): Likewise.
2297 (grub_ext4_extent_idx): Likewise.
2298 (grub_ext4_find_leaf): New function.
2299 (grub_ext2_read_block): Handle extents.
2301 2008-07-12 Robert Millan <rmh@aybabtu.com>
2303 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
2305 2008-07-11 Robert Millan <rmh@aybabtu.com>
2307 * util/grub.d/40_custom.in: New file. Example on how to add custom
2308 entries to /etc/grub.d.
2309 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
2310 40_custom (implicitly, by merging all the grub.d rules).
2312 2008-07-11 Pavel Roskin <proski@gnu.org>
2314 * commands/read.c (grub_getline): Fix invalid memory access.
2315 Don't add newline to the variable value.
2317 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
2318 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
2319 (serial_hw_get_port): Check validity of the port number.
2320 (grub_cmd_serial): Check return value of serial_hw_get_port().
2322 2008-07-07 Pavel Roskin <proski@gnu.org>
2324 * boot/i386/pc/diskboot.S (notification_string): Replace
2325 "Loading kernel" with just "loading". This is shorter, less
2326 confusing and saves a few bytes for possible future changes.
2328 2008-07-05 Pavel Roskin <proski@gnu.org>
2330 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
2331 size for ATAPI devices, they are undefined. Output sector
2332 number in decimal form.
2334 * disk/ata.c: Use named constants for status bits.
2336 2008-07-04 Pavel Roskin <proski@gnu.org>
2338 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
2339 grub_addr_t before casting it to the void pointer to fix a
2340 warning. Non-addressable regions are discarded earlier.
2341 (grub_arch_modules_addr): Cast _end to grub_addr_t.
2342 * kern/i386/linuxbios/table.c: Include grub/misc.h.
2343 (check_signature): Don't shadow table_header.
2344 (grub_linuxbios_table_iterate): Cast numeric constants to
2345 grub_linuxbios_table_header_t.
2346 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
2349 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
2352 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
2353 pointer, which can cause warnings. Support 64-bit addresses.
2355 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
2356 of sizeof(long). This fixes PowerPC image generation on x86_64.
2358 2008-07-04 Robert Millan <rmh@aybabtu.com>
2360 This fixes a performance issue when pc & gpt partmap iterators
2361 didn't abort iteration even after our hook found what it was
2362 looking for (often causing expensive probes of non-existent drives).
2364 Some callers relied on previous buggy behaviour, since they would
2365 rise an error when their own hooks caused early abortion of its
2368 * kern/device.c (grub_device_open): Improve error message.
2369 * disk/lvm.c (grub_lvm_open): Likewise.
2370 * disk/raid.c (grub_raid_open): Likewise.
2372 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
2373 when hook requests it, independently of grub_errno.
2374 (pc_partition_map_probe): Do not fail when find_func() caused
2375 early abortion of pc_partition_map_iterate().
2377 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
2378 when hook requests it, independently of grub_errno.
2379 (gpt_partition_map_probe): Do not fail when find_func() caused
2380 early abortion of gpt_partition_map_iterate().
2382 * kern/partition.c (grub_partition_iterate): Abort parent iteration
2383 when hook requests it, independently of grub_errno. Do not fail when
2384 part_map_iterate_hook() caused early abortion of p->iterate().
2386 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
2387 when grub_partition_iterate() returned with non-zero.
2389 2008-07-03 Pavel Roskin <proski@gnu.org>
2391 * disk/ata.c (grub_ata_pio_write): Check status before writing,
2392 like we do in grub_ata_pio_read().
2393 (grub_ata_readwrite): Always write individual sectors. Fix the
2394 sector count for the remainder.
2395 (grub_ata_write): Enable writing to ATA devices. Correctly
2396 report error for ATAPI devices.
2398 2008-07-02 Pavel Roskin <proski@gnu.org>
2400 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
2403 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
2404 for every read sector, we already increment it for the whole
2405 batch. This fixes reading more than 256 sectors at once.
2407 * util/grub-editenv.c (cmd_info): Cast argument to long
2408 explicitly. ptrdiff_t reduces to int on i386.
2410 * util/grub-editenv.c (main): Be specific which parameter is
2413 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
2414 (memdisk): Make memdisk_orig_addr a pointer.
2416 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
2417 for file offsets, use grub_off_t instead. Fix printf format
2420 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
2421 there. Real unexpected warnings should not drown in the noise
2422 about known problems.
2424 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
2425 grub_disk_addr_t for memory addresses.
2427 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
2428 explicitly to fix a warning.
2430 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
2432 * Makefile.in (MODULE_LDFLAGS): New variable.
2433 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
2434 the linker accepts --build-id=none.
2435 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
2437 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
2439 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
2440 those in Linux XFS code. Provide a way to access 64-bit parent
2442 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
2443 the end of struct grub_xfs_dir_header.
2445 2008-07-02 Bean <bean123ch@gmail.com>
2447 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
2448 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2449 and GRUB_IEEE1275_FLAG_NO_ANSI.
2451 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
2452 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2453 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
2455 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
2456 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
2458 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
2459 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
2461 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
2462 esc sequence on non ANSI terminal.
2463 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
2465 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
2468 2008-07-02 Bean <bean123ch@gmail.com>
2470 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
2471 (grub_editenv_SOURCES): New variable.
2472 (pkglib_MODULES): Add loadenv.mod.
2473 (loadenv_mod_SOURCES): New variable.
2474 (loadenv_mod_CFLAGS): Likewise.
2475 (loadenv_mod_LDFLAGS): Likewise.
2477 * include/grub/envblk.h: New file.
2479 * util/envblk.c: New file.
2481 * util/grub-editenv.c: New file.
2483 * commands/loadenv.c: New file.
2485 2008-07-01 Pavel Roskin <proski@gnu.org>
2487 * include/multiboot2.h (struct multiboot_tag_module): Use char,
2488 not unsigned char. This fixes warnings and is consistent with
2491 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
2493 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
2495 * term/tparm.c (analyze): Always set *popcount.
2497 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
2498 cast to fix a warning.
2500 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
2501 cast to suppress a warning.
2503 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
2504 grub_fshelp_read_file() expects.
2506 * fs/fat.c: Fix UUID calculation on big-endian systems. We
2507 write uuid as a 32-bit value in CPU byte order, so declare and
2510 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
2511 long if the format specifier expects it.
2512 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
2513 * partmap/pc.c (pc_partition_map_iterate): Likewise.
2514 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
2515 long to fix a warning.
2516 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
2517 grub_dprintf() arguments to fix warnings.
2519 2008-06-30 Pavel Roskin <proski@gnu.org>
2521 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
2522 install_bsd_part immediately before core.img is embedded or
2523 modified on disk. This fixes core.img verification if core.img
2526 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
2527 core_path to calculate the blocklist.
2528 Patch from Javier MartÃn <lordhabbit@gmail.com>
2530 2008-06-29 Robert Millan <rmh@aybabtu.com>
2532 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
2533 block to disk block.
2534 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
2535 Patch from Niels Böhm <bitbucket@arcor.de>
2537 2008-06-29 Robert Millan <rmh@aybabtu.com>
2539 * util/update-grub_lib.in (font_path): Search for fonts in
2540 /boot/grub first, which is more likely to be readable (we aren't
2541 deciding where fonts live, just looking for them).
2543 2008-06-26 Pavel Roskin <proski@gnu.org>
2545 * util/biosdisk.c (read_device_map): Don't leave dead map
2546 entries for devices failing stat() check.
2548 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
2549 core_path_dev for the core.img path on the target device.
2551 2008-06-26 Robert Millan <rmh@aybabtu.com>
2553 * disk/fs_uuid.c: New file.
2554 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
2555 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
2556 (fs_uuid_mod_LDFLAGS): New variables.
2557 * include/grub/disk.h (grub_disk_dev_id): Add
2558 `GRUB_DISK_DEVICE_UUID_ID'.
2559 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
2560 implement iterate().
2562 2008-06-26 Robert Millan <rmh@aybabtu.com>
2564 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
2565 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
2566 Linux image includes no initrd.
2568 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
2570 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
2571 call to resolve the core image location that effectively appended the
2574 2008-06-21 Robert Millan <rmh@aybabtu.com>
2576 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
2579 * util/grub.d/10_hurd.in: ... to here ...
2580 * util/grub.d/10_linux.in: ... and here.
2582 2008-06-19 Robert Millan <rmh@aybabtu.com>
2584 * kern/main.c (grub_main): Export `prefix' variable immediately
2585 after it has been set by grub_machine_set_prefix().
2587 2008-06-19 Robert Millan <rmh@aybabtu.com>
2589 * commands/search.c (search_label, search_fs_uuid, search_file): Print
2590 search result when not saving to variable, not the other way around.
2591 When saving to variable, abort iteration as soon as a match is found.
2593 2008-06-19 Robert Millan <rmh@aybabtu.com>
2595 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
2596 check for partition that provides /boot/grub. Its logic is flawed,
2597 as it prevents prepare_grub_to_access_device() from being called
2600 2008-06-19 Robert Millan <rmh@aybabtu.com>
2602 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
2603 "insmod" command directly when abstraction modules are needed,
2604 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
2605 since it had already been processed).
2607 2008-06-19 Pavel Roskin <proski@gnu.org>
2609 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
2610 changed. This is needed in case GRUB_LIBDIR changes.
2611 * conf/i386-ieee1275.rmk: Likewise.
2612 * conf/i386-linuxbios.rmk: Likewise.
2613 * conf/i386-pc.rmk: Likewise.
2614 * conf/powerpc-ieee1275.rmk: Likewise.
2616 2008-06-18 Pavel Roskin <proski@gnu.org>
2618 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
2619 kernel_elf_symlist.c to symlist.c for consistency with other
2620 architectures. Update all users.
2621 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2623 2008-06-18 Robert Millan <rmh@aybabtu.com>
2625 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
2628 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
2629 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
2630 a RAID device, run setup() for all members independently on whether
2631 LVM abstraction is being used.
2632 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
2633 If grub-mkimage has set `*install_dos_part == -2', don't override this
2635 Perform *install_dos_part adjustments independently on whether
2636 we're embedding or not.
2637 Clarify error message when image is too big for embedding.
2638 Remove duplicate *install_dos_part stanza.
2640 2008-06-17 Robert Millan <rmh@aybabtu.com>
2642 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
2643 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
2645 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
2646 values in grub_ofconsole_normal_color and
2647 grub_ofconsole_highlight_color (they're not directly related to
2648 background and foreground).
2649 (grub_ofconsole_setcolorstate): Extract background and foreground
2650 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
2652 2008-06-17 Robert Millan <rmh@aybabtu.com>
2654 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
2655 /boot/grub for the check in last commit, not /boot (they could be
2656 different partitions).
2658 2008-06-16 Robert Millan <rmh@aybabtu.com>
2660 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
2661 asked to setup access for the same partition that provides /boot,
2662 don't bother using UUIDs since our root already has the value we
2665 2008-06-16 Robert Millan <rmh@aybabtu.com>
2667 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
2669 Patch from Sven Mueller <sven@debian.org>.
2671 2008-06-16 Robert Millan <rmh@aybabtu.com>
2673 * util/update-grub.in: Check for $EUID instead of $UID.
2674 Reported by Vincent Zweije.
2676 2008-06-16 Bean <bean123ch@gmail.com>
2678 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
2679 (grub_ext2_read_block): Likewise.
2680 (grub_ext2_read_inode): Likewise.
2681 (grub_ext2_mount): Likewise.
2682 (grub_ext2_close): Likewise.
2683 (grub_ext3_get_journal): Removed.
2685 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
2686 (grub_reiserfs_read_symlink): Likewise.
2687 (grub_reiserfs_mount): Likewise.
2688 (grub_reiserfs_open): Likewise.
2689 (grub_reiserfs_read): Likewise.
2690 (grub_reiserfs_close): Likewise.
2691 (grub_reiserfs_get_journal): Removed.
2693 * fs/fshelp.c (grub_fshelp_read): Removed.
2694 (grub_fshelp_map_block): Likewise.
2696 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
2697 (grub_fshelp_journal): Likewise.
2698 (grub_fshelp_read): Likewise.
2699 (grub_fshelp_map_block): Likewise.
2701 2008-06-16 Pavel Roskin <proski@gnu.org>
2703 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
2704 floating point anymore.
2705 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
2707 2008-06-15 Pavel Roskin <proski@gnu.org>
2709 * commands/ls.c (grub_ls_list_files): Use integer calculations
2710 for human readable format, avoid floating point use.
2711 * kern/misc.c (grub_ftoa): Remove.
2712 (grub_vsprintf): Remove floating point support.
2714 2008-06-15 Robert Millan <rmh@aybabtu.com>
2716 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
2718 Reported by Max Vozeler.
2720 2008-06-15 Robert Millan <rmh@aybabtu.com>
2722 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
2723 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
2725 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
2726 the beginning of the prefix.
2728 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
2729 It is assumed that if we have a memdisk, grub-mkimage has set
2730 grub_prefix to include the "(memdisk)" drive in it.
2732 2008-06-15 Robert Millan <rmh@aybabtu.com>
2734 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
2735 Initialize keyboard controller after registering the terminal, so that
2736 grub_printf() can be called from grub_keyboard_controller_init().
2738 2008-06-15 Robert Millan <rmh@aybabtu.com>
2740 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
2741 extent-btree which is written as big endian on disk.
2742 Reported by Alain Greppin <al@chilibi.org>.
2744 2008-06-14 Robert Millan <rmh@aybabtu.com>
2746 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
2747 * util/i386/pc/grub-install.in (modules): Likewise.
2749 2008-06-13 Pavel Roskin <proski@gnu.org>
2751 * commands/ls.c (grub_ls_list_files): Fix format warnings.
2753 2008-06-13 Bean <bean123ch@gmail.com>
2755 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
2757 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
2759 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
2760 to indicate sparse block.
2762 2008-06-12 Pavel Roskin <proski@gnu.org>
2764 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
2765 number, grub_fshelp_read() does it for us.
2767 * fs/fshelp.c (grub_fshelp_read): New function. Implement
2768 linear disk read with journal translation.
2769 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
2770 * include/grub/fshelp.h: Declare grub_fshelp_read().
2772 2008-06-09 Pavel Roskin <proski@gnu.org>
2774 * fs/minix.c (grub_minix_mount): Handle error reading
2777 2008-06-08 Robert Millan <rmh@aybabtu.com>
2779 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
2780 don't append the RAID prefix afterwards.
2781 Reported by Clint Adams.
2783 2008-06-08 Robert Millan <rmh@aybabtu.com>
2785 Based on description from Pavel:
2786 * kern/disk.c (grub_disk_check_range): Rename to ...
2787 (grub_disk_adjust_range): ... this. Add a comment explaining the
2788 tasks performed by this function.
2790 2008-06-08 Robert Millan <rmh@aybabtu.com>
2792 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
2793 `num_serial' (for consistency with other variables).
2794 (struct grub_ntfs_data): Add `uuid' member.
2795 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
2796 (grub_ntfs_uuid): New function.
2797 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2799 2008-06-07 Pavel Roskin <proski@gnu.org>
2801 * util/biosdisk.c (open_device): Revert last change to the
2802 function, it broke installation. The sector needs to be
2803 different dependent on which device is opened.
2805 2008-06-06 Robert Millan <rmh@aybabtu.com>
2807 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
2808 rest of GRUB, and breakage doesn't happen if its value were modified.
2810 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2811 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
2812 a constant (same value).
2813 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
2814 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
2816 2008-06-06 Robert Millan <rmh@aybabtu.com>
2818 * util/biosdisk.c (open_device): Do not modify sector offset when
2819 accessing a partition. kern/disk.c already handles this for us.
2821 2008-06-06 Robert Millan <rmh@aybabtu.com>
2823 * util/grub-emu.c (grub_machine_init): Move code in this function from
2825 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
2826 segfault in case grub_printf() is called).
2828 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
2829 grub_probe. Update all users not to explicitly add it again.
2830 (grub_device): New variable; contains corresponding device for grubdir.
2831 (fs_module, partmap_module, devabstraction_module): Pass
2832 `--device ${grub_device}' to grub_probe to avoid traversing /dev
2835 2008-06-05 Robert Millan <rmh@aybabtu.com>
2837 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
2838 is found, print it (same layout as with labels).
2840 2008-06-04 Robert Millan <rmh@aybabtu.com>
2842 * util/biosdisk.c (get_drive): Rename to ...
2843 (find_grub_drive): ... this. Update all users.
2845 (get_os_disk): Rename to ...
2846 (convert_system_partition_to_system_disk): ... this. Update all users.
2848 (find_drive): Rename to ...
2849 (find_system_device): ... this. Update all users.
2851 2008-06-04 Robert Millan <rmh@aybabtu.com>
2853 * util/biosdisk.c (get_os_disk): Handle IDA devices.
2854 * util/grub-mkdevicemap.c (get_mmc_disk_name)
2855 (make_device_map): Likewise.
2857 2008-06-01 Robert Millan <rmh@aybabtu.com>
2859 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
2860 before dereferencing it.
2862 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
2863 union with fat12/fat16-specific ones. Add some new fields, including
2864 `num_serial' for both versions.
2865 (struct grub_fat_data): Add `uuid' member.
2866 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
2867 names. Initialize `data->uuid' using `num_serial'.
2868 (grub_fat_uuid): New function.
2869 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
2871 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
2872 (grub_reiserfs_uuid): New function.
2873 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
2876 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
2877 (grub_xfs_uuid): New function.
2878 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2880 2008-06-01 Robert Millan <rmh@aybabtu.com>
2882 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
2883 code that is backward compatible with pre-uuid search command.
2885 2008-05-31 Robert Millan <rmh@aybabtu.com>
2887 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
2888 floppies after everything else, to ensure floppy drive isn't accessed
2889 unnecessarily (patch from Bean).
2891 2008-05-31 Robert Millan <rmh@aybabtu.com>
2893 * commands/search.c (search_label, search_fs_uuid, search_file): Do
2894 not print device names when we were asked to set a variable.
2896 2008-05-31 Robert Millan <rmh@aybabtu.com>
2898 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
2899 using "cursor-on" and "cursor-off" commands (understood at least by
2900 the Open Firmware flavour on OLPC).
2902 2008-05-31 Michael Gorven <michael@gorven.za.net>
2904 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
2905 on and off sequences.
2907 2008-05-31 Robert Millan <rmh@aybabtu.com>
2909 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
2910 * util/update-grub.in: Likewise.
2912 2008-05-30 Pavel Roskin <proski@gnu.org>
2914 * util/biosdisk.c (linux_find_partition): Simplify logic and
2915 make the code more universal. Keep special processing for
2916 devfs, but use a simple rule for all other devices. If the
2917 device ends with a number, append 'p' and the partition number.
2918 Otherwise, append only the partition number.
2920 2008-05-30 Robert Millan <rmh@aybabtu.com>
2922 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
2923 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
2924 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
2925 the `root' parameter to Linux.
2927 2008-05-30 Robert Millan <rmh@aybabtu.com>
2929 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
2930 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
2931 --fs_uuid with --fs-uuid.
2932 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
2933 all filesystems support them).
2935 2008-05-30 Robert Millan <rmh@aybabtu.com>
2937 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
2938 grub_printf() flags, since we're printing in units of 2 bytes.
2940 2008-05-30 Robert Millan <rmh@aybabtu.com>
2942 * util/grub.d/00_header.in: Remove obsolete comment referencing
2943 convert_system_path_to_grub_path().
2944 * util/update-grub.in: Likewise.
2945 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
2946 (convert_system_path_to_grub_path): Add a warning message explaining
2947 that this function is deprecated. Rely on is_path_readable_by_grub()
2948 for the readability checks.
2949 (font_path): Use is_path_readable_by_grub() for the readability
2950 check rather than convert_system_path_to_grub_path().
2952 2008-05-30 Robert Millan <rmh@aybabtu.com>
2954 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
2955 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
2956 converting it first.
2957 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
2958 grub.cfg for access to font file, and afterwards call it again to set
2961 2008-05-30 Robert Millan <rmh@aybabtu.com>
2963 * commands/search.c (options): Add --fs_uuid option.
2964 (search_fs_uuid): New function.
2965 (grub_cmd_search): Fix --set argument passing.
2966 Use search_fs_uuid() when requested via --fs_uuid.
2967 (grub_search_init): Update help message.
2968 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
2969 and redeclare it as an array of 16-bit words.
2970 (grub_ext2_uuid): New function.
2971 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
2972 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
2973 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
2974 (GRUB_DEVICE_BOOT_UUID): New variables.
2975 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
2976 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
2978 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
2979 just assume `root' variable has the right value.
2980 * util/grub.d/10_linux.in: Likewise.
2981 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
2983 (main): Recognise `-t fs_uuid' argument.
2985 2008-05-30 Robert Millan <rmh@aybabtu.com>
2987 * util/biosdisk.c (map): Redefine structure to hold information
2988 about GRUB drive name.
2989 (get_drive): Reimplement without assuming (and verifying) BIOS-like
2991 (call_hook): Remove.
2992 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
2993 member. Assume drive has partitions.
2994 (grub_util_biosdisk_open): Access device names via `.device' struct
2996 (open_device): Likewise.
2997 (find_drive): Likewise.
2998 (read_device_map): Adjust map[] usage to match the new struct
2999 definition. Don't check for duplicates (still possible, but not cheap
3001 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
3002 (make_device_name): Remove assumption of BIOS-like drive names.
3004 2008-05-30 Pavel Roskin <proski@gnu.org>
3006 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
3007 compiling execute.c doesn't need grub_script.tab.h anymore.
3008 (normal/command.c_DEPENDENCIES): Likewise.
3009 (normal/function.c_DEPENDENCIES): Likewise.
3010 * conf/i386-ieee1275.rmk: Likewise.
3011 * conf/i386-linuxbios.rmk: Likewise.
3012 * conf/i386-pc.rmk: Likewise.
3013 * conf/powerpc-ieee1275.rmk: Likewise.
3014 * conf/sparc64-ieee1275.rmk: Likewise.
3016 2008-05-29 Pavel Roskin <proski@gnu.org>
3018 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
3019 when scanning metadata for volume group name.
3021 * include/grub/script.h: Don't include grub_script.tab.h. It's
3022 a generated file, which may only be included from the files with
3023 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
3024 use union YYSTYPE, as the later allows forward declaration.
3025 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
3027 2008-05-29 Robert Millan <rmh@aybabtu.com>
3029 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
3030 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
3031 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
3032 (grub_console_checkkey): Add grub_dprintf() call to report unknown
3035 2008-05-29 Robert Millan <rmh@aybabtu.com>
3037 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
3038 control key combinations.
3040 2008-05-29 Robert Millan <rmh@aybabtu.com>
3042 * util/powerpc/ieee1275/grub-install.in: Move from here ...
3043 * util/ieee1275/grub-install.in: ... to here.
3044 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
3045 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
3046 (grub_install_SOURCES): Likewise.
3048 2008-05-29 Robert Millan <rmh@aybabtu.com>
3050 * fs/affs.c: Update copyright year.
3051 * fs/ext2.c: Likewise.
3052 * fs/fshelp.c: Likewise.
3053 * fs/hfsplus.c: Likewise.
3054 * fs/ntfs.c: Likewise.
3055 * fs/xfs.c: Likewise.
3056 * include/grub/fshelp.h: Likewise.
3057 * util/grub-mkdevicemap.c: Likewise.
3059 2008-05-28 Robert Millan <rmh@aybabtu.com>
3061 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
3062 might need to be fatfs to support some firmware implementations
3065 2008-05-28 Robert Millan <rmh@aybabtu.com>
3067 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
3069 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3070 (make_device_map): Likewise.
3072 2008-05-20 Bean <bean123ch@gmail.com>
3074 * fs/fshelp.c (grub_fshelp_map_block): New function.
3075 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
3076 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
3078 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
3079 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
3080 (grub_fshelp_journal): New structure.
3081 (grub_fshelp_map_block): New function prototype.
3082 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
3083 (grub_fshelp_map_block): Likewise.
3085 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
3086 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
3087 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
3088 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
3089 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
3090 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
3091 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
3092 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
3093 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
3094 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
3095 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
3096 (grub_ext2_sblock): New members for journal support.
3097 (grub_ext3_journal_header): New structure.
3098 (grub_ext3_journal_revoke_header): Likewise.
3099 (grub_ext3_journal_block_tag): Likewise.
3100 (grub_ext3_journal_sblock): Likewise.
3101 (grub_fshelp_node): New members logfile and journal.
3102 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
3103 grub_fshelp_map_block to get real block number.
3104 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
3106 (grub_ext2_read_inode): Likewise.
3107 (grub_ext3_get_journal): New function.
3108 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
3109 (grub_ext2_close): Release memory used by journal.
3111 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
3112 (REISERFS_MAGIC_DESC_BLOCK): New macro.
3113 (grub_reiserfs_transaction_header): Renamed to
3114 grub_reiserfs_description_block, replace field data with real_blocks.
3115 (grub_reiserfs_commit_block): New structure.
3116 (grub_reiserfs_data): New member journal.
3117 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
3119 (grub_reiserfs_read_symlink): Likewise.
3120 (grub_reiserfs_iterate_dir): Likewise.
3121 (grub_reiserfs_open): Likewise.
3122 (grub_reiserfs_read): Likewise.
3123 (grub_reiserfs_get_journal): New function.
3124 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
3125 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
3126 using grub_reiserfs_get_journal.
3127 (grub_reiserfs_close): Release memory used by journal.
3129 * fs/affs.c (grub_affs_read_block): Change block type to
3130 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
3132 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
3134 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
3136 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
3138 * fs/udf.c (grub_udf_read_block): Change block type to
3139 grub_disk_addr_t. Use type cast to avoid warning.
3141 * fs/xfs.c (grub_xfs_read_block): Likewise.
3143 2008-05-16 Christian Franke <franke@computer.org>
3145 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
3146 to ensure that break with ESC will always work.
3147 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
3148 Remove ESC from keyboard queue.
3150 2008-05-16 Christian Franke <franke@computer.org>
3152 * util/biosdisk.c: [__CYGWIN__] Add includes.
3153 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
3154 (get_os_disk): Move variable declarations to OS specific
3155 parts to avoid warning.
3156 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
3157 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
3158 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
3160 * util/getroot.c: [__CYGWIN__] Add includes.
3161 (strip_extra_slashes): Fix "/" case.
3162 [__CYGWIN__] (get_win32_path): New function.
3163 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
3164 [__CYGWIN__] (find_root_device): Disable.
3165 [__CYGWIN__] (get_bootsec_serial): New function.
3166 [__CYGWIN__] (find_cygwin_root_device): Likewise.
3167 [__linux__] (grub_guess_root_device): Add early returns to simplify
3169 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
3170 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
3171 check for Linux only.
3173 2008-05-15 Bean <bean123ch@gmail.com>
3175 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
3176 keyboard hang problem in apple's intel mac.
3178 2008-05-09 Robert Millan <rmh@aybabtu.com>
3180 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
3182 * util/grub-mkdevicemap.c (get_virtio_disk_name)
3183 (make_device_map): Likewise.
3184 Reported by Aurelien Jarno <aurel32@debian.org>
3186 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
3188 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
3189 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
3190 (make_device_map): Output entries for xvd type disks.
3192 2008-05-07 Robert Millan <rmh@aybabtu.com>
3194 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
3196 * util/grub-mkdevicemap.c (get_cciss_disk_name)
3197 (make_device_map): Likewise.
3198 Reported by Roland Dreier <rdreier@cisco.com>
3200 2008-05-07 Robert Millan <rmh@aybabtu.com>
3202 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
3203 grub_strstr() call. Correct a few mistakes in failure path handling.
3205 2008-05-06 Robert Millan <rmh@aybabtu.com>
3207 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3208 Do not print a trailing slash (therefore, the root directory is an
3210 (convert_system_path_to_grub_path): Do not remove trailing slash
3211 from make_system_path_relative_to_its_root() output.
3213 * util/i386/pc/grub-install.in: Add trailing slash to output from
3214 make_system_path_relative_to_its_root().
3216 2008-05-06 Robert Millan <rmh@aybabtu.com>
3218 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
3219 ensures that output lines aren't intermangled with those sent to
3220 stderr (via grub_util_info()).
3221 * util/grub-probe.c (grub_refresh): Likewise.
3222 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
3224 2008-05-05 Christian Franke <franke@computer.org>
3226 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
3227 Add Cygwin device names.
3228 (get_ide_disk_name) [__CYGWIN__]: Likewise.
3229 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
3230 (check_device): Return error instead of success on empty name.
3231 (make_device_map): Move label inside linux specific code to
3232 prevent compiler warning.
3234 2008-04-30 Robert Millan <rmh@aybabtu.com>
3236 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
3237 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
3239 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
3241 2008-04-29 Robert Millan <rmh@aybabtu.com>
3243 * docs/grub.cfg: New file (example GRUB configuration).
3245 2008-04-26 Robert Millan <rmh@aybabtu.com>
3247 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
3248 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
3249 and `disk/ieee1275/nand.c'.
3251 2008-04-25 Bean <bean123ch@gmail.com>
3253 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
3256 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
3257 change the buffer size to 4096 for cdrom device.
3259 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
3261 (_linux_mod_SOURCES): New variable.
3262 (_linux_mod_CFLAGS): Likewise.
3263 (_linux_mod_LDFLAGS): Likewise.
3264 (linux_mod_SOURCES): Likewise.
3265 (linux_mod_CFLAGS): Likewise.
3266 (linux_mod_LDFLAGS): Likewise.
3267 (nand_mod_SOURCES): Likewise.
3268 (nand_mod_CFLAGS): Likewise.
3269 (nand_mod_LDFLAGS): Likewise.
3271 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
3272 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
3273 type property. (nand device in olpc don't have this property)
3275 * include/grub/disk.h (grub_disk_dev_id): New macro
3276 GRUB_DISK_DEVICE_NAND_ID.
3278 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
3280 (grub_rescue_cmd_initrd): Likewise.
3282 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
3283 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
3284 ofw_cif_handler and ofw_idt, adjust padding number.
3286 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
3287 GRUB_MACHINE_IEEE1275 is defined.
3289 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
3290 Use NESTED_FUNC_ATTR attribute on the hook parameter.
3292 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
3293 on nested function heap_init.
3294 (grub_upper_mem): New variable for i386-ieee1275.
3295 (grub_get_extended_memory): New function for i386-ieee1275.
3296 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
3298 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
3299 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
3302 * loader/i386/ieee1275/linux.c: New file.
3304 * loader/i386/ieee1275/linux_normal.c: New file.
3306 * disk/ieee1275/nand.c: New file.
3308 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
3310 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
3312 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
3314 2008-04-18 Robert Millan <rmh@aybabtu.com>
3316 Restructures early code path on ieee1275 to unify grub_main() as
3317 the first C function that is executed in every platform.
3319 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
3320 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
3322 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
3323 * kern/ieee1275/cmain.c (cmain): Rename to ...
3324 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
3325 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
3328 2008-04-18 Robert Millan <rmh@aybabtu.com>
3330 * util/update-grub.in: Fix syntax error when setting
3331 `GRUB_PRELOAD_MODULES'.
3332 Reported by Stephane Chazelas <stephane@artesyncp.com>
3334 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
3336 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
3337 section into account, newer toolchains generate unique build ids
3338 * configure.ac: remove the test for --build-id=none acceptance,
3339 we want build ids to be preserved
3340 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
3341 far from other sections don't cause the raw binary images grow
3344 2008-04-15 Robert Millan <rmh@aybabtu.com>
3346 * disk/lvm.c: Update copyright year.
3347 * kern/misc.c: Likewise.
3349 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3351 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
3352 there is no memory left for physical volume name.
3354 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3356 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
3357 volume name mapping to support bigger than 9 character names properly.
3359 2008-04-13 Robert Millan <rmh@aybabtu.com>
3361 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
3362 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
3364 2008-04-13 Christian Franke <franke@computer.org>
3366 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
3367 to create a floppy emulation boot CD when non emulation mode
3369 Enable Joliet CD filesystem extension.
3371 2008-04-13 Robert Millan <rmh@aybabtu.com>
3373 * kern/misc.c (grub_strncat): Fix off-by-one error.
3374 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
3376 * kern/env.c (grub_env_context_close): Clear current context, not
3378 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
3380 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
3382 2008-04-13 Robert Millan <rmh@aybabtu.com>
3384 Improve robustness when handling LVM.
3386 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
3387 (and leave `*p' unmodified).
3388 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
3390 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
3391 iterating through it.
3392 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
3394 (grub_lvm_scan_device): Check the return value (and fail gracefully
3395 when due) on each grub_lvm_getvalue() or grub_strstr() call.
3396 Don't assume `vg->pvs != NULL' when iterating through it.
3398 2008-04-13 Robert Millan <rmh@aybabtu.com>
3400 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
3401 * genmk.rb (partmap): New variable.
3402 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
3403 (#{partmap}): New target rule.
3404 * genpartmaplist.sh: New file.
3405 * Makefile.in (pkglib_DATA): Add partmap.lst.
3406 (partmap.lst): New target rule.
3407 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
3408 modules (including all partition maps), instead of preloading them.
3410 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
3412 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
3413 `linux-boot-prober' (if installed) to detect other operating
3414 systems which are installed on the computer and add them to
3416 * conf/common.rmk: Build and install 30_os-prober.
3418 2008-04-12 Robert Millan <rmh@aybabtu.com>
3420 * kern/powerpc/ieee1275/init.c: Move from here ...
3421 * kern/ieee1275/init.c: ... to here. Update all users.
3423 * kern/powerpc/ieee1275/cmain.c: Move from here ...
3424 * kern/ieee1275/cmain.c: ... to here. Update all users.
3426 * kern/powerpc/ieee1275/openfw.c: Move from here ...
3427 * kern/ieee1275/openfw.c: ... to here. Update all users.
3429 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
3430 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
3432 2008-04-10 Pavel Roskin <proski@gnu.org>
3434 * configure.ac: Always use "_cv_" in cache variables for
3435 compatibility with Autoconf 2.62.
3437 2008-04-07 Robert Millan <rmh@aybabtu.com>
3439 Revert grub/machine/init.h addition by Pavel (since it breaks on
3440 i386-ieee1275 and others):
3441 * util/i386/pc/misc.c: Remove grub/machine/init.h.
3442 * util/powerpc/ieee1275/misc.c: Likewise.
3444 2008-04-07 Robert Millan <rmh@aybabtu.com>
3446 * util/grub-probe.c (probe): Improve error message.
3448 2008-04-07 Robert Millan <rmh@aybabtu.com>
3450 * util/biosdisk.c (read_device_map): Skip devices that don't exist
3451 (this prevents the presence of a bogus entry from ruining the whole
3454 2008-04-06 Pavel Roskin <proski@gnu.org>
3456 * util/biosdisk.c: Include grub/util/biosdisk.h.
3457 * util/grub-fstest.c (execute_command): Make static.
3458 * util/grub-mkdevicemap.c (check_device): Likewise.
3459 * util/i386/pc/misc.c: Include grub/machine/init.h.
3460 * util/powerpc/ieee1275/misc.c: Likewise.
3461 * util/lvm.c: Include grub/util/lvm.h.
3462 * util/misc.c: Include grub/kernel.h, grub/misc.h and
3464 * util/raid.c: Include grub/util/raid.h.
3465 (grub_util_getdiskname): Make static.
3467 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
3468 grub_hostfs_fini(), as they are called from grub_init_all() and
3469 grub_fini_all() respectively. This fixes an infinite loop in
3470 grub-fstest due to double registration of hostfs.
3471 Reported by Christian Franke <Christian.Franke@t-online.de>
3473 2008-04-05 Pavel Roskin <proski@gnu.org>
3475 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
3476 all 8 functions. Otherwise, probe function 0 only.
3478 2008-04-04 Pavel Roskin <proski@gnu.org>
3480 * commands/lspci.c (grub_lspci_iter): Print the bus number
3483 * commands/lspci.c (grub_pci_classes): Fix typos.
3484 (grub_lspci_iter): Don't print func twice. Print vendor ID
3485 before device ID, as it's normally done.
3487 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3488 Fix signedness warnings.
3489 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
3491 * util/ieee1275/get_disk_name.c: Include config.h so that
3492 _GNU_SOURCE is defined and getline() is declared. Mark an
3493 unused argument as such. Fix a signedness warning.
3495 2008-04-02 Pavel Roskin <proski@gnu.org>
3497 * genkernsyms.sh.in: Use more robust assignments for CC and
3498 srcdir. Quote srcdir.
3499 * gensymlist.sh.in: Likewise. Assert at the compile time that
3500 the symbol table is not empty.
3502 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
3503 * fs/cpio.c (grub_cpio_read): Likewise.
3505 2008-04-01 Pavel Roskin <proski@gnu.org>
3507 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
3508 * disk/host.c (grub_host_open): Likewise.
3509 * disk/loopback.c (grub_loopback_open): Likewise.
3510 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
3511 disk->id as in disk/host.c, not a multi-character constant.
3513 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
3514 later is obsolete, potentially dangerous and sets a bad example.
3515 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
3516 * util/misc.c (grub_util_get_image_size): Likewise.
3518 * disk/loopback.c (options): Improve help for "--partitions".
3520 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
3521 options to align them with the short options, e.g. "echo -e".
3523 2008-03-31 Bean <bean123ch@gmail.com>
3525 * video/reader/png.c (grub_png_data): New member is_16bit and
3527 (grub_png_decode_image_header): Detect 16 bit png image.
3528 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
3529 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
3530 (grub_video_reader_png): Release memory occupied by image_data.
3532 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
3534 (grub_nfs_mount): Skip the test for sector per cluster.
3536 * include/grub/ntfs.h (MAX_SPC): Removed.
3538 2008-03-31 Bean <bean123ch@gmail.com>
3540 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
3541 (grub_probe_SOURCES): Add fs/afs.c.
3542 (grub_fstest_SOURCES): Likewise.
3543 (afs_mod_SOURCES): New variable.
3544 (afs_mod_CFLAGS): Likewise.
3545 (afs_mod_LDFLAGS): Likewise.
3547 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
3548 (grub_emu_SOURCES): Likewise.
3550 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3552 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3554 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3556 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3558 * fs/afs.c: New file.
3560 2008-03-30 Pavel Roskin <proski@gnu.org>
3562 * disk/host.c: Include grub/misc.h to fix a warning.
3563 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
3564 warnings about implicit declarations.
3566 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
3568 * include/grub/i386/loader.h: Change declaration of
3569 grub_linux_boot() to match what grub_loader_set() expects.
3570 * util/getroot.c (grub_guess_root_device): Return const char* to
3572 * util/grub-probe.c (probe): Fix a warning about uninitialized
3573 abstraction_name variable.
3574 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
3575 second argument as unused to fix a warning.
3577 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
3578 missing grub_error() call.
3580 * util/update-grub_lib.in: Define datarootdir, since Autoconf
3581 2.60 and newer uses it to define datadir.
3583 * commands/sleep.c: Fix warning about implicit declaration.
3584 * disk/memdisk.c: Likewise.
3585 * loader/aout.c: Likewise.
3586 * loader/i386/bsd_normal.c: Likewise.
3587 * util/grub-probe.c: Likewise.
3589 * commands/i386/cpuid.c (has_longmode): Make static.
3590 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
3591 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
3593 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
3594 GDT. This is more robust, as %ds can change.
3595 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
3596 calling real_to_prot().
3597 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
3599 2008-03-28 Pavel Roskin <proski@gnu.org>
3601 * kern/i386/pc/startup.S: Assert that uncompressed functions
3602 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
3603 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
3604 code, as they push parts of the code (error handlers) beyond
3605 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
3606 code as correctness and size.
3608 2008-03-28 Pavel Roskin <proski@gnu.org>
3610 * kern/i386/pc/startup.S
3611 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
3612 data block address to the real mode, keep offset minimal. This
3613 works around a bug in AWARD BIOS on old Athlon systems, which
3614 makes CD detection hang.
3616 2008-03-26 Pavel Roskin <proski@gnu.org>
3618 * normal/color.c (grub_parse_color_name_pair): Make `name' a
3620 * include/grub/normal.h: Add grub_parse_color_name_pair()
3623 2008-03-24 Bean <bean123ch@gmail.com>
3625 * disk/i386/pc/biosdisk.c (cd_start): Removed.
3626 (cd_count): Removed.
3627 (cd_drive): New variable.
3628 (grub_biosdisk_get_drive): Don't check for (cdN) device.
3629 (grub_biosdisk_call_hook): Likewise.
3630 (grub_biosdisk_iterate): Change cdrom detection method.
3631 (grub_biosdisk_open): Replace cd_start with cd_drive.
3632 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
3633 detect cdrom device.
3635 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
3637 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
3638 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
3639 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
3640 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
3641 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
3642 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
3643 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
3644 (grub_biosdisk_cdrp): New structure.
3645 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
3647 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
3649 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
3652 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
3655 2008-03-20 Robert Millan <rmh@aybabtu.com>
3657 Remove 2 TiB limit in ata.mod.
3658 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
3659 (grub_ata_dumpinfo): Print sector count with 0x%llx.
3660 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
3661 grub_uint64_t instead of grub_uint32_t.
3663 2008-03-05 Bean <bean123ch@gmail.com>
3665 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
3666 (grub_multiboot): Set boot device.
3668 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
3670 2008-03-02 Bean <bean123ch@gmail.com>
3672 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
3675 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
3677 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
3680 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
3683 * docs/fdl.texi: New file.
3685 * docs/mdate-sh: New file. Copied from gnulib.
3686 * docs/texinfo.tex: Likewise.
3688 * config.guess: Updated from gnulib.
3689 * install-sh: Likewise.
3691 2008-02-28 Robert Millan <rmh@aybabtu.com>
3693 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
3694 (aout_mod_SOURCES): New variable.
3695 (aout_mod_CFLAGS): Likewise.
3696 (aout_mod_LDFLAGS): Likewise.
3698 * conf/i386-ieee1275.rmk: Likewise.
3700 2008-02-28 Robert Millan <rmh@aybabtu.com>
3702 * util/update-grub.in: Reorganise terminal validity check. Accept
3703 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
3704 Based on suggestion by Franklin PIAT.
3706 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
3708 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
3710 * util/getroot.c (grub_util_check_block_device): New function that
3711 returns the given argument if it is a block device and returns NULL else.
3712 * util/grub-probe.c (argument_is_device): New variable.
3713 (probe): Promote device_name from a variable to an argument. Receive
3714 device_name from grub_util_check_block_device() if path is NULL and from
3715 grub_guess_root_device() else. Do not free() device_name anymore.
3716 (options): Introduce new parameter '-d, --device'.
3717 (main): Add description of the new parameter to the help screen.
3718 Rename path variable to argument. Set argument_is_device if the '-d'
3719 option is given. Pass argument to probe() depending on
3722 2008-02-24 Bean <bean123ch@gmail.com>
3724 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
3725 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
3726 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
3727 (GRUB_ISO9660_VOLDESC_PART): Likewise.
3728 (GRUB_ISO9660_VOLDESC_END): Likewise.
3729 (grub_iso9660_primary_voldesc): New member escape.
3730 (grub_iso9660_data): New member joliet.
3731 (grub_iso9660_convert_string): New function.
3732 (grub_iso9660_mount): Detect joliet extension.
3733 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
3734 (grub_iso9660_iso9660_label): Likewise.
3736 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
3737 (grub_setup_SOURCES): Add fs/udf.c.
3738 (grub_fstest_SOURCES): Likewise.
3739 (udf_mod_SOURCES): New variable.
3740 (udf_mod_CFLAGS): Likewise.
3741 (udf_mod_LDFLAGS): Likewise.
3743 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
3744 (grub_emu_SOURCES): Likewise.
3746 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3748 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3750 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3752 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3754 * fs/udf.c: New file.
3756 2008-02-24 Robert Millan <rmh@aybabtu.com>
3758 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
3759 (normal/lexer.c_DEPENDENCIES): New variables.
3760 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3761 (normal/lexer.c_DEPENDENCIES): Likewise.
3762 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
3763 (normal/lexer.c_DEPENDENCIES): Likewise.
3764 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
3765 (normal/lexer.c_DEPENDENCIES): Likewise.
3766 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3767 (normal/lexer.c_DEPENDENCIES): Likewise.
3768 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3769 (normal/lexer.c_DEPENDENCIES): Likewise.
3771 2008-02-23 Robert Millan <rmh@aybabtu.com>
3773 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
3774 since they were intended to be in hex. This didn't break previously
3775 because of a bug in gpt_partition_map_iterate() (see below).
3777 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
3778 when checking the validity of GPT header.
3779 Remove `partno', since it always provides the same information as `i'.
3781 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
3783 * include/grub/efi/time.h: Fix a wrong comment.
3785 2008-02-19 Pavel Roskin <proski@gnu.org>
3787 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
3790 2008-02-19 Bean <bean123ch@gmail.com>
3792 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
3793 (aout_mod_SOURCES): New variable.
3794 (aout_mod_CFLAGS): Likewise.
3795 (aout_mod_LDFLAGS): Likewise.
3796 (_bsd_mod_SOURCES): New variable.
3797 (_bsd_mod_CFLAGS): Likewise.
3798 (_bsd_mod_LDFLAGS): Likewise.
3799 (bsd_mod_SOURCES): New variable.
3800 (bsd_mod_CFLAGS): Likewise.
3801 (bsd_mod_LDFLAGS): Likewise.
3803 * include/grub/aout.h: New file.
3805 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
3807 * include/grub/i386/bsd.h: New file.
3809 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
3812 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
3813 function is called, so that it's possible to change it inside the hook.
3814 (grub_elf64_load): Likewise.
3815 (grub_elf_file): Don't close the file if elf header is not found.
3816 (grub_elf_close): Close the file if grub_elf_file fails (The new
3817 grub_elf_file won't close it).
3818 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
3819 (grub_elf64_size): Likewise.
3821 * kern/i386/loader.S (grub_unix_real_boot): New function.
3823 * loader/aout.c: New file.
3825 * loader/i386/bsd.c: New file.
3827 * loader/i386/bsd_normal.c: New file.
3829 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
3831 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
3832 can test other formats.
3834 2008-02-19 Robert Millan <rmh@aybabtu.com>
3836 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
3837 (grub_gpt_partition_type_empty): Redefine with macro from
3838 `<grub/gpt_partition.h>'.
3839 (gpt_partition_map_iterate): Adjust partition type comparison.
3841 Export `entry' as partmap-specific `part.data' struct.
3842 (grub_gpt_header, grub_gpt_partentry): Move from here ...
3844 * include/grub/gpt_partition.h (grub_gpt_header)
3845 (grub_gpt_partentry): ... to here (new file).
3847 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
3849 (grub_gpt_partition_type_bios_boot): New const variable, defined
3850 with macro from `<grub/gpt_partition.h>'.
3852 (setup): Replace `first_start' with `embed_region', which keeps
3853 track of the embed region (and is partmap-agnostic).
3855 Replace find_first_partition_start() with find_usable_region(),
3856 which finds a usable region for embedding using partmap-specific
3857 knowledge (supports PC/MSDOS and GPT).
3859 Fix all assumptions that the embed region start at sector 1, using
3860 `embed_region.start' from now on. Similarly, use `embed_region.end'
3861 rather than `first_start' to calculate available size.
3863 In grub_util_info() message, replace "into after the MBR" with an
3864 indication of the specific sector our embed region starts at.
3866 2008-02-19 Robert Millan <rmh@aybabtu.com>
3868 * DISTLIST: Replace `commands/ieee1275/halt.c' and
3869 `commands/ieee1275/reboot.c' with `commands/halt.c' and
3870 `commands/reboot.c'.
3871 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3872 (halt_mod_SOURCES): Likewise.
3873 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3874 (halt_mod_SOURCES): Likewise.
3876 2008-02-17 Christian Franke <franke@computer.org>
3878 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
3880 2008-02-17 Robert Millan <rmh@aybabtu.com>
3882 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3883 set `first_start' to 0 for non-PC/MSDOS partition maps.
3885 2008-02-16 Robert Millan <rmh@aybabtu.com>
3887 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3888 do not assume partition map is PC/MSDOS before performing checks that
3889 are specific to that layout.
3891 2008-02-13 Robert Millan <rmh@aybabtu.com>
3893 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
3894 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
3895 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
3897 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
3899 * configure.ac: Only a cosmetic change on the handling of
3900 -fno-stack-protector.
3902 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
3904 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
3905 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
3907 (grub_install_SOURCES): Add halt.mod and reboot.mod.
3908 (halt_mod_SOURCES): New variable.
3909 (halt_mod_CFLAGS): Likewise.
3910 (halt_mod_LDFLAGS): Likewise.
3911 (reboot_mod_SOURCES): Likewise.
3912 (reboot_mod_CFLAGS): Likewise.
3913 (reboot_mod_LDFLAGS): Likewise.
3915 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
3916 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
3918 (halt_mod_SOURCES): Likewise.
3919 (reboot_mod_SOURCES): Likewise.
3921 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
3922 commands/i386/pc/reboot.c by commands/reboot.c.
3923 (reboot_mod_SOURCES): Likewise.
3925 * commands/i386/pc/reboot.c: merge this file ...
3927 * commands/ieee1275/reboot.c: ... and this file ...
3929 * commands/reboot.c: ... to this file.
3930 Add some precompiler directive to include the correct header for
3933 * commands/ieee1275/halt.c: move this file ...
3935 * commands/halt.c: ... to here.
3936 Add some precompiler directive to include the correct header for
3939 * include/grub/efi/efi.h (grub_reboot): New function declaration.
3940 (grub_halt): Likewise.
3942 * kern/efi/efi.c (grub_reboot): New function.
3943 (grub_halt): Likewise.
3945 2008-02-12 Robert Millan <rmh@aybabtu.com>
3947 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
3948 /dev (like it is done for /dev/mapper). This doesn't provide support
3949 for EVMS, but at least it is now easy to identify the problem when it
3952 2008-02-11 Robert Millan <rmh@aybabtu.com>
3954 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
3955 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
3956 comparing it with -1, not 0.
3958 2008-02-10 Robert Millan <rmh@aybabtu.com>
3960 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
3962 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3963 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
3965 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
3966 `disk/lvm.c' to the end of the list.
3967 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3968 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3970 2008-02-10 Robert Millan <rmh@aybabtu.com>
3972 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
3973 grub_print_error() instead. This will let user know why we're entering
3975 Based on suggestions from Sam Morris.
3977 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
3979 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
3980 on remaining N args, instead of "--" arg N times.
3982 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
3984 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
3985 (fill_with_default_glyph): Changed to use unknown_glyph for fill
3986 pattern for unknown glyphs.
3988 2008-02-09 Robert Millan <rmh@aybabtu.com>
3990 * configure.ac: Probe for `help2man'.
3991 * Makefile.in (builddir): New variable.
3992 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
3993 or otherwise add a few flags/options to it.
3994 (install-local): For every executable utility or script that is
3995 installed, invoke $(HELP2MAN) to install a manpage based on --help
3998 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
3999 that it doesn't prevent --help from working in build tree.
4001 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
4002 with `bug-grub@gnu.org'.
4003 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
4004 * util/update-grub.in (usage): New function.
4005 Implement proper argument check, with support for --help and --version
4006 (as well as existing -y).
4008 2008-02-09 Christian Franke <franke@computer.org>
4010 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
4011 avoid overwriting previous output.
4012 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
4014 2008-02-09 Robert Millan <rmh@aybabtu.com>
4016 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
4019 2008-02-09 Robert Millan <rmh@aybabtu.com>
4021 * commands/sleep.c: New file.
4022 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
4023 (sleep_mod_SOURCES): New variable.
4024 (sleep_mod_CFLAGS): Likewise.
4025 (sleep_mod_LDFLAGS): Likewise.
4027 2008-02-09 Robert Millan <rmh@aybabtu.com>
4029 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
4030 situations in which we can deduce the RAID size and the superblock
4033 2008-02-09 Robert Millan <rmh@aybabtu.com>
4035 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
4036 and return a grub_diskmemberlist_t composed of LVM physical volumes.
4037 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
4039 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
4040 and return a grub_diskmemberlist_t composed of physical array members.
4041 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
4043 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
4045 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
4046 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
4047 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
4049 * util/grub-probe.c (probe): Move partmap probing code from here ...
4050 (probe_partmap): ... to here.
4051 (probe): Use probe_partmap() once for the disk we're probing, and
4052 additionally, when such disk contains a memberlist() struct member,
4053 once for each disk that is contained in the structure returned by
4056 2008-02-09 Robert Millan <rmh@aybabtu.com>
4058 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
4059 environment variable to 'all' in order to obtain debug output from
4061 * util/i386/pc/grub-setup.c (main): Likewise.
4063 2008-02-08 Robert Millan <rmh@aybabtu.com>
4065 * disk/raid.c (grub_raid_scan_device): Check for
4066 `array->device[sb.this_disk.number]' rather than for
4067 `array->device[sb.this_disk.number]->name', since the latter is not
4068 guaranteed to be accessible.
4070 2008-02-08 Robert Millan <rmh@aybabtu.com>
4072 * disk/raid.c: Update copyright.
4073 * fs/cpio.c: Likewise.
4074 * include/grub/raid.h: Likewise.
4075 * loader/i386/pc/multiboot.c: Likewise.
4076 * util/hostfs.c: Likewise.
4078 2008-02-08 Robert Millan <rmh@aybabtu.com>
4080 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
4081 to a grub_disk_t array.
4082 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
4084 (grub_raid_scan_device): Replace `device[x].name' accesses with
4085 `device[x]->name'. Simplify initialization of `array->device[x]'.
4087 2008-02-08 Robert Millan <rmh@aybabtu.com>
4089 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
4090 grub_dprintf() calls.
4091 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
4094 2008-02-07 Christian Franke <franke@computer.org>
4096 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
4097 instead of fseek and ftell to support large files.
4098 (grub_hostfs_read): Likewise.
4100 2008-02-07 Robert Millan <rmh@aybabtu.com>
4102 Patch from Jeroen Dekkers.
4103 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
4104 failure, since successfully reading all array members might not be
4107 2008-02-06 Robert Millan <rmh@aybabtu.com>
4109 * util/grub-probe.c (probe): Simplify partmap probing (with the
4110 assumption that the first word up to the underscore equals to
4113 2008-02-06 Christian Franke <franke@computer.org>
4115 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
4116 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
4117 last block of a cpio or tar stream.
4118 Check for "TRAILER!!!" instead of any empty data
4119 block to detect last block of a cpio stream.
4120 (grub_cpio_dir): Fix constness of variable np.
4121 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
4122 cpio or tar trailer is detected. This fixes a crash
4123 on open of a non existing file.
4125 2008-02-05 Bean <bean123ch@gmail.com>
4127 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
4129 (grub_multiboot_load_elf64): Likewise.
4130 (grub_multiboot): Initialize mbi structure.
4132 * util/grub-fstest.c: Don't include unused header file script.h.
4134 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
4136 (grub_fstest_SOURCES): Likewise.
4138 2008-02-05 Robert Millan <rmh@aybabtu.com>
4140 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
4141 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
4142 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
4143 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
4145 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
4146 (translation_table): Replace hardcoded values with macros
4147 provided by `<grub/term.h>'.
4149 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
4150 (keyboard_map): Correct/add a few values, with macros provided
4152 (keyboard_map_shift): Zero values that don't differ from their
4153 `keyboard_map' equivalents.
4154 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
4155 Discard the second scan code that is always sent by Caps lock.
4156 Only use `keyboard_map_shift' when it provides a non-zero value,
4157 otherwise fallback to `keyboard_map'.
4159 2008-02-04 Bean <bean123ch@gmail.com>
4161 * Makefile.in (enable_grub_fstest): New variable.
4163 * conf/common.rmk (grub_fstest_init.lst): New rule.
4164 (grub_fstest_init.h): Likewise.
4165 (grub_fstest_init.c): Likewise.
4166 (util/grub-fstest.c_DEPENDENCIES): New variable.
4167 (grub_fstest_SOURCES): Likewise.
4169 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
4171 * util/grub-fstest.c: New file.
4173 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4175 Make grub-setup handle a separate root device.
4177 * util/i386/pc/grub-setup.c (setup): Always open the root device,
4178 so that the root device can be compared with the destination
4180 When embedding the core image, if the root and destination devices
4181 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
4183 When not embedding, set ROOT_DRIVE to 0xFF.
4185 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4187 Add support for having a grub directory in a different drive. This
4188 is still only the data handling part.
4190 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
4191 (codestart): Save %dh in GRUB_ROOT_DRIVE.
4192 (grub_root_drive): New variable.
4194 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
4195 instead of GRUB_BOOT_DRIVE to construct a device name. Set
4196 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
4199 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
4201 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
4203 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
4205 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
4206 is bogus, because PXE booting does not specify any drive
4209 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
4210 am not sure if this is really correct.
4212 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
4213 is always identical to the boot drive when booting from a CD.
4215 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
4217 (root_drive): New variable.
4218 (real_start): Unconditionally set %dh to ROOT_DRIVE.
4219 (setup_sectors): Push %dx right after popping it, because %dh will
4221 (copy_buffer): Restore %dx.
4223 2008-02-03 Robert Millan <rmh@aybabtu.com>
4225 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
4226 use `cdboot.img' for cdrom images.
4228 2008-02-03 Robert Millan <rmh@aybabtu.com>
4230 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
4231 only setup gfxterm when `font' command has succeeded.
4233 2008-02-03 Robert Millan <rmh@aybabtu.com>
4235 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
4236 (grub_rescue_cmd_multiboot_loader)
4237 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
4239 2008-02-03 Pavel Roskin <proski@gnu.org>
4241 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
4242 %edx and %esi from stack only after grub_gate_a20() is called.
4243 grub_gate_a20() clobbers %edx.
4245 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
4247 * configure.ac (AC_INIT): Bumped to 1.96.
4249 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
4250 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
4251 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
4252 video/readers/png.c.
4254 2008-02-03 Bean <bean123ch@gmail.com>
4256 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
4257 (cdboot_img_SOURCES): New variable.
4258 (cdboot_img_ASFLAGS): New variable.
4259 (cdboot_img_LDFLAGS): New variable.
4261 * boot/i386/pc/cdboot.S: New file.
4263 * disk/i386/pc/biosdisk.c (cd_start): New variable.
4264 (cd_count): Likewise.
4265 (grub_biosdisk_get_drive): Add support for cd device.
4266 (grub_biosdisk_call_hook): Likewise.
4267 (grub_biosdisk_iterate): Likewise.
4268 (grub_biosdisk_open): Likewise.
4269 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
4270 (grub_biosdisk_rw): Support reading from cd device.
4271 (GRUB_MOD_INIT): Iterate cd devices.
4273 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
4274 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
4275 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
4277 * kern/i386/pc/init.c (make_install_device): Check for cd device.
4279 2008-02-02 Robert Millan <rmh@aybabtu.com>
4281 * commands/read.c: New file.
4282 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
4283 (read_mod_SOURCES): New variable.
4284 (read_mod_CFLAGS): Likewise.
4285 (read_mod_LDFLAGS): Likewise.
4287 2008-02-02 Robert Millan <rmh@aybabtu.com>
4289 * normal/main.c (grub_normal_execute): Check for `menu->size' when
4290 determining whether menu has to be displayed.
4292 2008-02-02 Marco Gerards <marco@gnu.org>
4294 * bus/pci.c: New file.
4296 * include/grub/pci.h: Likewise.
4298 * include/grub/i386/pc/pci.h: Likewise.
4300 * commands/lspci.c: Likewise.
4302 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
4304 (pci_mod_SOURCES): New variable.
4305 (pci_mod_CFLAGS): Likewise.
4306 (pci_mod_LDFLAGS): Likewise.
4307 (lspci_mod_SOURCES): Likewise.
4308 (lspci_mod_CFLAGS): Likewise.
4309 (lspci_mod_LDFLAGS): Likewise.
4311 2008-02-02 Bean <bean123ch@gmail.com>
4313 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
4314 (grub_ufs_get_file_block): Fix indirect block calculation problem.
4316 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
4317 (grub_xfs_btree_node): New structure.
4318 (grub_xfs_btree_root): New structure.
4319 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
4320 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
4321 (GRUB_XFS_EXTENT_BLOCK): Likewise.
4322 (GRUB_XFS_EXTENT_SIZE): Likewise.
4323 (grub_xfs_read_block): Support btree format type.
4324 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
4325 Use directory block as basic unit.
4327 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
4329 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
4330 __attribute__ ((__regparm__ (1))).
4332 2008-02-01 Robert Millan <rmh@aybabtu.com>
4334 Correct a mistake in previous commit.
4336 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
4338 (normal/command.c_DEPENDENCIES): New variable.
4340 2008-02-01 Robert Millan <rmh@aybabtu.com>
4342 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
4344 (normal/command.c_DEPENDENCIES): New variable.
4345 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
4346 * conf/i386-ieee1275.rmk: Likewise.
4347 * conf/i386-linuxbios.rmk: Likewise.
4348 * conf/i386-pc.rmk: Likewise.
4349 * conf/sparc64-ieee1275.rmk: Likewise.
4350 * conf/powerpc-ieee1275.rmk: Likewise.
4351 (grub_emu_SOURCES): Add `fs/fshelp.c'.
4353 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
4355 2008-02-01 Robert Millan <rmh@aybabtu.com>
4357 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
4358 call at beginning of function.
4360 2008-01-31 Pavel Roskin <proski@gnu.org>
4362 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
4363 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
4364 (grub_mkrescue_SOURCES): Likewise.
4365 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
4367 2008-01-30 Robert Millan <rmh@aybabtu.com>
4369 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
4370 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
4371 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
4372 (grub_probe_SOURCES): ... to here.
4374 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
4375 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
4376 * conf/i386-ieee1275.rmk: Likewise.
4377 * conf/i386-linuxbios.rmk: Likewise.
4378 * conf/powerpc-ieee1275.rmk: Likewise.
4380 2008-01-30 Tristan Gingold <gingold@free.fr>
4382 * kern/rescue.c: Silently accept empty lines.
4384 2008-01-29 Bean <bean123ch@gmail.com>
4386 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
4387 (real_code_2): Code cleanup and change comment style.
4388 (move_memory): Avoid using 32-bit address mode.
4390 2008-01-29 Bean <bean123ch@gmail.com>
4392 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
4393 (png_mod_SOURCES): New variable.
4394 (png_mod_CFLAGS): Likewise.
4395 (png_mod_LDFLAGS): Likewise.
4397 * video/readers/png.c: New file.
4399 2008-01-28 Robert Millan <rmh@aybabtu.com>
4401 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
4402 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
4403 `ifndef GRUB_MOD_GAP' hack.
4404 * util/elf/grub-mkimage.c (add_segments): Likewise.
4406 2008-01-27 Robert Millan <rmh@aybabtu.com>
4408 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
4409 `GRUB_MOD_GAP' for platforms in which it's not defined.
4410 * util/elf/grub-mkimage.c (add_segments): Likewise.
4412 2008-01-27 Robert Millan <rmh@aybabtu.com>
4414 Get grub-emu to build again (including parallel builds).
4416 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
4418 (util/grub-emu.c_DEPENDENCIES): ... this, ...
4419 (normal/execute.c_DEPENDENCIES): ... this, ...
4420 (grub-emu_DEPENDENCIES): ... and this.
4422 * conf/i386-efi.rmk: Likewise.
4423 * conf/i386-linuxbios.rmk: Likewise.
4424 * conf/i386-ieee1275.rmk: Likewise.
4425 * conf/powerpc-ieee1275.rmk: Likewise.
4426 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
4428 2008-01-27 Robert Millan <rmh@aybabtu.com>
4430 * NEWS: Add a few items.
4432 2008-01-27 Robert Millan <rmh@aybabtu.com>
4434 Fix parallel builds with grub-emu. Based on earlier commit for
4435 grub-probe and grub-setup.
4437 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4438 (util/grub-emu.c_DEPENDENCIES): ... this.
4439 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4440 (util/grub-emu.c_DEPENDENCIES): ... this.
4441 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4442 (util/grub-emu.c_DEPENDENCIES): ... this.
4443 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4444 (util/grub-emu.c_DEPENDENCIES): ... this.
4445 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4446 (util/grub-emu.c_DEPENDENCIES): ... this.
4448 2008-01-27 Pavel Roskin <proski@gnu.org>
4450 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
4451 to create a gap between _end and the modules added to the image
4452 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
4453 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
4454 * util/elf/grub-mkimage.c (add_segments): Likewise.
4456 2008-01-26 Pavel Roskin <proski@gnu.org>
4458 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
4459 just return an error.
4461 2008-01-26 Bean <bean123ch@gmail.com>
4463 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
4464 (grub_reiserfs_get_item): Save offset of the next item.
4465 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
4467 2008-01-25 Robert Millan <rmh@aybabtu.com>
4469 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
4470 make all filesystem sources appear together (possibly fixing omissions
4472 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4473 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4474 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4475 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4477 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
4479 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
4480 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4481 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
4482 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4484 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
4485 (probe): Add a sanity check to make sure of our ability to read
4486 requested files when probing for filesystem type.
4488 * genmk.rb: Update copyright year (2007).
4490 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
4491 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
4492 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
4493 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
4494 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
4495 : Remove function prototypes.
4497 2008-01-25 Robert Millan <rmh@aybabtu.com>
4499 Revert my previous commits (based on wrong assumption of how grub_errno
4502 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
4503 * kern/file.c (grub_file_open): Likewise.
4505 2008-01-24 Pavel Roskin <proski@gnu.org>
4507 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
4508 that hang if GRUB tries to setup colors.
4509 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
4510 colors for firmwares that don't support it.
4511 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
4512 Recognize Open Hack'Ware, set flags to work around its
4515 2008-01-24 Robert Millan <rmh@aybabtu.com>
4517 * kern/file.c (grub_file_open): Do not account previous failures of
4518 unrelated functions when grub_errno is checked for.
4519 Reported by Oleg Strikov.
4521 2008-01-24 Bean <bean123ch@gmail.com>
4523 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
4524 (grub_ufs_sblock): New member volume name.
4525 (grub_ufs_find_file): Fix string copy bug.
4526 (grub_ufs_label): Implement this function properly.
4528 * fs/hfs.c (grub_hfs_cnid_type): New enum.
4529 (grub_hfs_iterate_records): Use the correct file number for extents
4530 and catalog file. Fix problem in next index calculation.
4531 (grub_hfs_find_node): Replace recursive function call with loop.
4532 (grub_hfs_iterate_dir): Replace recursive function call with loop.
4534 2008-01-23 Robert Millan <rmh@aybabtu.com>
4536 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
4537 `<grub/symbol.h>' and `<grub/multiboot.h>'.
4538 (grub_multiboot2_real_boot): New function prototype.
4540 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
4541 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
4543 * kern/i386/ieee1275/init.c (grub_os_area_addr)
4544 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
4546 2008-01-23 Robert Millan <rmh@aybabtu.com>
4548 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
4549 #ifdef'ed out grub_printf().
4551 2008-01-23 Robert Millan <rmh@aybabtu.com>
4553 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
4554 grub_dprintf calls, since they make "debug=all" mode unusable.
4555 (grub_console_checkkey): Likewise.
4557 2008-01-23 Robert Millan <rmh@aybabtu.com>
4559 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4560 `term/i386/pc/at_keyboard.c'.
4561 (pkglib_MODULES): Add `serial.mod'.
4562 (serial_mod_SOURCES): New variable.
4563 (serial_mod_CFLAGS): Likewise.
4564 (serial_mod_LDFLAGS): Likewise.
4566 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
4567 `<grub/powerpc/ieee1275/console.h>'.
4568 (grub_keyboard_controller_init): New function prototype.
4569 (grub_console_checkkey): Likewise.
4570 (grub_console_getkey): Likewise.
4572 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
4575 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
4576 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
4578 2008-01-23 Robert Millan <rmh@aybabtu.com>
4580 * kern/i386/pc/init.c (make_install_device): When memdisk image is
4581 present, "(memdisk)/boot/grub" becomes the default prefix.
4583 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
4584 a memdisk tarball with all the modules. Add --overlay=DIR option that
4585 allows users to overlay additional files into the image.
4587 2008-01-23 Robert Millan <rmh@aybabtu.com>
4589 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
4590 and `machine/memory.h'.
4591 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
4592 (_multiboot_mod_SOURCES): New variable.
4593 (_multiboot_mod_CFLAGS): Likewise.
4594 (_multiboot_mod_LDFLAGS): Likewise.
4595 (multiboot_mod_SOURCES): Likewise.
4596 (multiboot_mod_CFLAGS): Likewise.
4597 (multiboot_mod_LDFLAGS): Likewise.
4599 * include/grub/i386/ieee1275/loader.h: New file.
4601 * include/grub/i386/ieee1275/machine.h: Likewise.
4603 * include/grub/i386/ieee1275/memory.h: Likewise.
4605 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
4606 variable declaration.
4607 (grub_os_area_size): Likewise.
4609 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
4610 (grub_lower_mem, grub_upper_mem): New variables.
4611 (grub_stop_floppy): New function (just to make
4612 grub_multiboot2_real_boot() happy).
4614 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
4615 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
4616 (grub_stop): New function.
4617 Include `"../realmode.S"' and `"../loader.S"'.
4619 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
4620 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
4622 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
4623 rely on grub_multiboot2_real_boot() for final boot.
4625 2008-01-22 Robert Millan <rmh@aybabtu.com>
4627 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
4628 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
4629 device that doesn't look like an SD card.
4630 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4631 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
4632 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
4633 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
4636 2008-01-22 Robert Millan <rmh@aybabtu.com>
4638 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
4639 avoid claiming over our own code.
4641 2008-01-22 Bean <bean123ch@gmail.com>
4643 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
4644 (jpeg_mod_SOURCES): New variable.
4645 (jpeg_mod_CFLAGS): Likewise.
4646 (jpeg_mod_LDFLAGS): Likewise.
4648 * video/readers/jpeg.c : New file.
4650 2008-01-22 Bean <bean123ch@gmail.com>
4652 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
4653 there are no more items.
4655 2008-01-21 Robert Millan <rmh@aybabtu.com>
4657 * kern/mm.c (grub_mm_init_region): Improve debug message.
4659 2008-01-21 Robert Millan <rmh@aybabtu.com>
4661 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
4662 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
4664 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
4666 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
4667 Indicates start of upper memory.
4668 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
4669 (generate_image): Abort when image size is big enough to corrupt
4672 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
4673 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
4674 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4675 instead of hardcoding 0xA0000.
4676 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
4677 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4678 instead of hardcoding 0xA0000.
4680 2008-01-21 Robert Millan <rmh@aybabtu.com>
4682 * disk/memdisk.c (memdisk_size): New variable.
4683 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
4685 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
4686 image to dynamic memory.
4687 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
4688 `memdisk_size'. Free memdisk block.
4690 2008-01-21 Robert Millan <rmh@aybabtu.com>
4692 Fix detection of very small filesystems (like tar).
4694 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
4695 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
4696 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
4697 a problem with this disk).
4699 2008-01-21 Robert Millan <rmh@aybabtu.com>
4701 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
4702 on grub_biosdisk_rw_standard() error.
4704 2008-01-21 Robert Millan <rmh@aybabtu.com>
4706 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
4708 * kern/elf.c: Likewise.
4709 * kern/ieee1275/ieee1275.c: Likewise.
4710 * kern/powerpc/ieee1275/openfw.c: Likewise.
4711 * term/ieee1275/ofconsole.c: Likewise.
4713 2008-01-21 Robert Millan <rmh@aybabtu.com>
4715 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
4717 * include/grub/kernel.h (grub_arch_memdisk_addr)
4718 (grub_arch_memdisk_size): Moved from here ...
4720 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
4721 (grub_arch_memdisk_size): ... to here.
4723 2008-01-21 Robert Millan <rmh@aybabtu.com>
4725 Mostly based on bugfix from Bean.
4727 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
4728 attribute with hook() parameter.
4729 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
4731 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
4732 attribute with hook() parameter.
4733 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
4736 2008-01-21 Robert Millan <rmh@aybabtu.com>
4738 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
4739 (pkglib_MODULES): Add `memdisk.mod'.
4740 (memdisk_mod_SOURCES): New variable.
4741 (memdisk_mod_CFLAGS): Likewise.
4742 (memdisk_mod_LDFLAGS): Likewise.
4744 * disk/memdisk.c: New file.
4746 * include/grub/disk.h (grub_disk_dev_id): Add
4747 `GRUB_DISK_DEVICE_MEMDISK_ID'.
4749 * include/grub/i386/pc/kernel.h
4750 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
4751 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
4752 (grub_kernel_image_size): New variable declaration.
4753 (grub_total_module_size): Likewise.
4754 (grub_memdisk_image_size): Likewise.
4756 * include/grub/i386/pc/memory.h
4757 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
4759 * include/grub/kernel.h: Include `<grub/symbol.h>'.
4760 (grub_arch_memdisk_addr): New variable declaration.
4761 (grub_arch_memdisk_size): Likewise.
4763 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
4764 (grub_arch_memdisk_size): Likewise.
4766 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
4767 (codestart): Replace hardcoded `0x100000' with
4768 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
4770 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
4771 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
4772 not NULL, append the contents of the file it refers to, at the end of
4773 the compressed kernel image. Initialize `grub_memdisk_image_size'
4774 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
4775 (options): Add "memdisk"|'m' option.
4776 (main): Parse --memdisk|-m option, and pass user-provided path as
4777 parameter to generate_image().
4779 2008-01-20 Robert Millan <rmh@aybabtu.com>
4781 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
4782 grub_dprintf() calls from here ...
4783 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
4785 2008-01-20 Robert Millan <rmh@aybabtu.com>
4787 Fix detection of "real mode" when /options/real-mode? doesn't exist.
4789 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
4791 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
4792 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
4793 `GRUB_IEEE1275_FLAG_REAL_MODE'.
4794 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
4796 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
4797 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
4799 2008-01-19 Robert Millan <rmh@aybabtu.com>
4801 Get rid of confusing function (superseded by
4802 `grub_ieee1275_get_integer_property')
4803 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
4805 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
4807 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
4808 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
4809 in native endianness from grub_ieee1275_get_integer_property().
4811 2008-01-19 Robert Millan <rmh@aybabtu.com>
4813 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
4814 command after "shut-down", since implementations differ on which
4815 the command for halt is.
4817 2008-01-19 Robert Millan <rmh@aybabtu.com>
4819 * include/grub/i386/linuxbios/console.h: Add header protection.
4820 (grub_keyboard_controller_init): New function prototype.
4821 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
4822 (KEYBOARD_COMMAND_READ): Likewise.
4823 (KEYBOARD_COMMAND_WRITE): Likewise.
4824 (KEYBOARD_SCANCODE_SET1): Likewise.
4825 (grub_keyboard_controller_write): New function.
4826 (grub_keyboard_controller_read): Likewise.
4827 (grub_keyboard_controller_init): Likewise.
4829 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
4830 (grub_console_init): On coreboot/LinuxBIOS, call
4831 grub_keyboard_controller_init().
4833 2008-01-19 Robert Millan <rmh@aybabtu.com>
4835 PowerPC changes provided by Pavel Roskin.
4837 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
4838 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
4839 don't rely on cmain() doing it.
4840 * kern/i386/ieee1275/startup.S (_start): Store %eax in
4841 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
4843 2008-01-16 Robert Millan <rmh@aybabtu.com>
4845 * include/grub/i386/linuxbios/memory.h
4846 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
4847 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
4848 receive `table_header' as argument. Instead, probe for it in the
4849 known memory ranges where it can be present.
4850 (grub_available_iterate): Do not pass a fixed `table_header' address
4851 to grub_linuxbios_table_iterate().
4853 2008-01-15 Robert Millan <rmh@aybabtu.com>
4855 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
4856 * conf/i386-ieee1275.rmk: New file.
4857 * include/grub/i386/ieee1275/console.h: Likewise.
4858 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
4859 * include/grub/i386/ieee1275/kernel.h: Likewise.
4860 * include/grub/i386/ieee1275/time.h: Likewise.
4861 * kern/i386/ieee1275/init.c: Likewise.
4862 * kern/i386/ieee1275/startup.S: Likewise.
4864 2008-01-15 Robert Millan <rmh@aybabtu.com>
4866 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
4867 when pointers are 32-bit (but still do set it to one when they are
4870 2008-01-15 Robert Millan <rmh@aybabtu.com>
4872 * include/grub/ieee1275/ieee1275.h
4873 (grub_ieee1275_get_integer_property): New function prototype.
4875 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
4876 (grub_ieee1275_get_integer_property): New function. Wraps around
4877 grub_ieee1275_get_property() to handle endianness.
4879 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
4880 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
4882 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
4883 (grub_map): Likewise.
4884 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
4886 2008-01-15 Bean <bean123ch@gmail.com>
4888 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
4889 (grub_script_execute_cmdline): Reset grub_errno.
4891 * normal/main.c (read_config_file): Reset grub_errno.
4893 * normal/parse.y (script_init): New.
4894 (script): Move function and menuentry here.
4896 (command): Add delimiter at the end of command.
4897 (commands): Adjust to match the new command.
4898 (commandblock): Remove grub_script_lexer_record_start.
4899 (menuentry): Add grub_script_lexer_record_start, use the new commands.
4900 (if): Use the new commands.
4902 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
4904 2008-01-15 Robert Millan <rmh@aybabtu.com>
4906 * normal/menu.c (run_menu): Move timeout message from here ...
4907 (print_timeout): ... to here.
4908 (run_menu): Use print_timeout() once during initial draw to print
4909 the whole message, and again in every clock tick to update only
4910 the number of seconds.
4912 2008-01-15 Robert Millan <rmh@aybabtu.com>
4914 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
4915 actual size of `available' from grub_ieee1275_get_property(), and
4916 restrict parsing to that bound.
4918 2008-01-15 Christian Franke <franke@computer.org>
4920 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
4921 (argp_program_version): Remove variable.
4922 (argp_program_bug_address): Likewise.
4923 (options): Convert from struct argp_option to struct option.
4924 (struct arguments): Remove.
4925 (parse_opt): Remove.
4926 (usage): New function.
4927 (main): Replace struct args members by simple variables.
4928 Replace argp_parse() by getopt_long().
4929 Add switch to evaluate options.
4930 Add missing "(...)" around root_dev in prefix string.
4932 2008-01-14 Robert Millan <rmh@aybabtu.com>
4934 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
4935 for grub_ieee1275_exit(), in order to improve portability.
4937 2008-01-14 Robert Millan <rmh@aybabtu.com>
4939 * util/grub.d/10_linux.in (prefix): Define.
4940 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
4942 2008-01-13 Pavel Roskin <proski@gnu.org>
4944 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
4945 grub_errno if no errors have been detected.
4947 2008-01-12 Robert Millan <rmh@aybabtu.com>
4949 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
4950 (grub_util_get_dev_abstraction): New function prototype.
4952 * util/getroot.c: Include `<grub/util/getroot.h>'
4953 (grub_util_get_grub_dev): Move detection of abstraction type to ...
4954 (grub_util_get_dev_abstraction): ... here (new function).
4956 * util/grub-probe.c: Convert PRINT_* to an enum. Add
4957 `PRINT_ABSTRACTION'.
4958 (probe): Probe for abstraction type when requested.
4959 (main): Understand `--target=abstraction'.
4961 * util/i386/efi/grub-install.in: Add abstraction module to core
4962 image when it is found to be necessary.
4963 * util/i386/pc/grub-install.in: Likewise.
4964 * util/powerpc/ieee1275/grub-install.in: Likewise.
4966 * util/update-grub_lib.in (font_path): Return system path without
4967 converting to GRUB path.
4968 * util/update-grub.in: Convert system path returned by font_path()
4969 to a GRUB path. Use `grub-probe -t abstraction' to determine what
4970 abstraction module is needed for loading fonts (if any). Export
4971 that as `GRUB_PRELOAD_MODULES'.
4972 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
4975 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
4977 Remove some unused code from reiserfs.
4979 * fs/reiserfs.c (struct grub_reiserfs_key)
4980 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
4981 (struct grub_reiserfs_node_body): Removed.
4982 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4984 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4986 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4988 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4990 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4992 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
4994 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4995 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4996 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4998 2008-01-10 Robert Millan <rmh@aybabtu.com>
5000 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
5001 Determines if a file is garbage left by packaging systems, etc.
5002 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
5003 for processing /etc/grub.d scripts.
5004 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
5005 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
5006 as a condition for processing Linux images.
5008 2008-01-10 Pavel Roskin <proski@gnu.org>
5010 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
5011 to compile reiserfs.c on PowerPC.
5013 2008-01-10 Robert Millan <rmh@aybabtu.com>
5015 * kern/device.c (grub_device_iterate): Do not abort device iteration
5016 when one of the devices cannot be opened.
5017 * kern/disk.c (grub_disk_open): Do not account previous failures of
5018 unrelated functions when grub_errno is checked for.
5020 2008-01-08 Robert Millan <rmh@aybabtu.com>
5022 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
5023 `! grub_linux_is_bzimage', change order of address comparison to make
5024 it more intuitive, and improve "too big zImage" error message.
5026 2008-01-08 Robert Millan <rmh@aybabtu.com>
5028 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
5029 `$(update-grub_DATA)'.
5030 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
5033 2008-01-07 Robert Millan <rmh@aybabtu.com>
5035 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
5036 which instruction is modified by grub-setup during installation
5037 (since it wasn't obvious by only looking at this file).
5039 2008-01-07 Robert Millan <rmh@aybabtu.com>
5041 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
5042 listing actual TODO items.
5044 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5046 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
5048 (grub_reiserfs_get_key_offset): Likewise.
5049 (grub_reiserfs_set_key_offset): Likewise.
5050 (grub_reiserfs_set_key_type): Likewise.
5051 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
5053 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
5054 better to remove the bitfield version completely.
5056 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5058 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
5059 allocated from the heap, due to the fshelp implementation.
5060 (grub_reiserfs_dir): Free NODE, due to the same reason.
5062 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5064 Mostly from Vincent Pelletier:
5066 * fs/reiserfs.c: New file.
5068 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
5069 (reiserfs_mod_SOURCES): New variable.
5070 (reiserfs_mod_CFLAGS): Likewise.
5071 (reiserfs_mod_LDFLAGS): Likewise.
5073 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
5074 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
5075 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
5078 2008-01-06 Robert Millan <rmh@aybabtu.com>
5080 * normal/color.c: Remove `<grub/env.h>'.
5082 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
5084 * include/grub/normal.h: Include <grub/env.h>.
5086 2008-01-05 Robert Millan <rmh@aybabtu.com>
5088 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
5089 usage example with `(hd0,1)'.
5090 Reported by Samuel Thibault.
5092 2008-01-05 Robert Millan <rmh@aybabtu.com>
5094 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
5095 (grub_linux_boot_zimage): Rename to ...
5096 (grub_linux_boot): ... this.
5097 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
5098 (grub_linux_boot_zimage): Conditionalize zImage copy.
5100 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
5101 (grub_linux_boot_bzimage): Remove prototype.
5102 (grub_linux_boot_zimage): Rename to ...
5103 (grub_linux_boot): ... this.
5105 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
5106 (grub_linux_boot): Remove function.
5108 2008-01-05 Robert Millan <rmh@aybabtu.com>
5110 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
5111 (grub_env_write_color_highlight): Likewise.
5112 (grub_wait_after_message): Likewise.
5114 * normal/color.c: New file.
5116 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5117 (normal_mod_DEPENDENCIES): Likewise.
5119 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5120 (normal_mod_DEPENDENCIES): Likewise.
5122 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5123 (normal_mod_DEPENDENCIES): Likewise.
5125 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
5126 (normal_mod_DEPENDENCIES): Likewise.
5128 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
5129 for waiting after a message is printed.
5130 * normal/main.c (read_config_file): Likewise.
5131 (grub_normal_init): Register grub_env_write_color_normal() and
5132 grub_env_write_color_highlight() hooks. Mark `color_normal' and
5133 `color_highlight' variables as global.
5135 * normal/menu.c (grub_wait_after_message): New function.
5136 (grub_color_menu_normal): New variable. Replaces ...
5137 (GRUB_COLOR_MENU_NORMAL): ... this macro.
5138 (grub_color_menu_highlight): New variable. Replaces ...
5139 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
5140 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
5141 `GRUB_TERM_COLOR_STANDARD'.
5142 (print_message): Use `grub_setcolorstate' to reload colors. Rename
5143 `normal_code' and `highlight_code' to `old_color_normal' and
5144 `old_color_highlight', respectively.
5145 (grub_menu_init_page): Update colors when drawing the menu, based on
5146 `menu_color_normal' and `menu_color_highlight' variables.
5147 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
5148 a message is printed.
5150 2008-01-05 Robert Millan <rmh@aybabtu.com>
5152 * kern/env.c (grub_env_context_open): Propagate hooks for global
5153 variables to new context.
5155 * kern/main.c (grub_set_root_dev): Export `root' variable.
5157 2008-01-05 Robert Millan <rmh@aybabtu.com>
5159 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
5160 discs unconditionally, since udev and others have options to provide
5163 2008-01-05 Robert Millan <rmh@aybabtu.com>
5165 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
5167 2008-01-04 Christian Franke <franke@computer.org>
5169 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
5172 2008-01-03 Pavel Roskin <proski@gnu.org>
5174 * kern/i386/linuxbios/init.c: Put "void" to all function
5175 declarations with no arguments.
5176 * kern/powerpc/ieee1275/init.c: Likewise.
5177 * term/i386/pc/at_keyboard.c: Likewise.
5178 * term/i386/pc/vga_text.c: Likewise.
5179 * util/grub-mkdevicemap.c: Likewise.
5181 2008-01-02 Robert Millan <rmh@aybabtu.com>
5183 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
5184 message when loaded image is out of bounds.
5185 (grub_multiboot_load_elf64): Likewise.
5187 2008-01-02 Pavel Roskin <proski@gnu.org>
5189 * util/grub.d/10_linux.in: Try version without ".old" when
5190 looking for initrd. It's better to use initrd from the newer
5191 kernel of the same version than no initrd at all.
5193 2008-01-01 Robert Millan <rmh@aybabtu.com>
5195 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
5197 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
5199 * include/grub/video.h: Added grub_video_unmap_color and
5200 grub_video_get_active_render_target.
5201 (grub_video_adapter): Added unmap_color and get_active_render_target.
5203 * video/video.c: Added grub_video_unmap_color and
5204 grub_video_get_active_render_target.
5205 (grub_video_get_info): Changed method to accept NULL pointer as an
5206 argument to allow detection of active video adapter.
5208 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
5209 grub_video_vbe_unmap_color_int.
5210 Added grub_video_vbe_unmap_color and
5211 grub_video_vbe_get_active_render_target.
5212 (grub_video_vbe_adapter): Added unmap_color and
5213 get_active_render_target.
5215 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
5216 with grub_video_vbe_unmap_color_int.
5218 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
5219 (DEFAULT_NORMAL_COLOR): Likewise.
5220 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
5221 (DEFAULT_FG_COLOR): Removed.
5222 (DEFAULT_BG_COLOR): Likewise.
5223 (DEFAULT_CURSOR_COLOR): Changed value.
5224 (grub_virtual_screen): Added standard_color_setting,
5225 normal_color_setting, highlight_color_setting and term_color.
5226 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
5227 (bitmap_width): Added.
5228 (bitmap_height): Likewise.
5230 (set_term_color): Likewise.
5231 (grub_virtual_screen_setup): Changed to use new terminal coloring
5233 (grub_gfxterm_init): Added init for bitmap.
5234 (grub_gfxterm_fini): Added destroy for bitmap.
5235 (redraw_screen_rect): Updated to use background bitmap and new
5237 (scroll_up): Added optimization for case when there is no bitmap.
5238 (grub_gfxterm_cls): Fixed to use correct background color.
5239 (grub_virtual_screen_setcolorstate): Changed to use new terminal
5241 (grub_virtual_screen_setcolor): Likewise.
5242 (grub_virtual_screen_getcolor): Added.
5243 (grub_gfxterm_background_image_cmd): Likewise.
5244 (grub_video_term): Added setcolor and getcolor.
5245 (MOD_INIT): Added registration of background_image command.
5246 (MOD_TERM): Added unregistration for background_image command.
5248 2007-12-30 Pavel Roskin <proski@gnu.org>
5250 * loader/multiboot_loader.c: Fix multiboot command
5251 unregistration. Fix all typos in the word "multiboot".
5253 2007-12-29 Pavel Roskin <proski@gnu.org>
5255 * util/grub.d/10_linux.in: Refactor search for initrd. Add
5256 support for initrd names used in Fedora.
5258 2007-12-26 Bean <bean123ch@gmail.com>
5260 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
5261 (cpio_mod_SOURCES): New variable.
5262 (cpio_mod_CFLAGS): Likewise.
5263 (cpio_mod_LDFLAGS): Likewise.
5265 * fs/cpio.c: New file.
5267 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
5269 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5271 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5273 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5275 2007-12-25 Robert Millan <rmh@aybabtu.com>
5277 * include/grub/term.h (struct grub_term): Add `getcolor' function.
5278 (grub_getcolor): New function.
5280 * kern/term.c (grub_getcolor): New function.
5281 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
5282 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
5283 (print_entry): Set normal and highlight colors to
5284 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
5285 respectively, before printing and restore them to old
5287 (grub_menu_init_page): Likewise. Fill an additional colored space
5288 that would otherwise be left blank.
5290 * term/efi/console.c (grub_console_getcolor): New function.
5291 (struct grub_console_term.getcolor): New variable.
5292 * term/i386/pc/console.c (grub_console_getcolor): New function.
5293 (struct grub_console_term.getcolor): New variable.
5294 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
5295 (struct grub_console_term.getcolor): New variable.
5297 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
5298 (struct grub_console_term.setcolor): Remove variable.
5299 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
5300 (struct grub_console_term.setcolor): Remove variable.
5301 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
5302 (struct grub_console_term.setcolor): Remove variable.
5303 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
5304 (struct grub_console_term.setcolor): Remove variable.
5306 2007-12-25 Robert Millan <rmh@aybabtu.com>
5308 * configure.ac: Search for possible unifont.hex locations, and
5309 define UNIFONT_HEX if found.
5311 * Makefile.in (UNIFONT_HEX): Define variable.
5312 (DATA): Rename to ...
5313 (PKGLIB): ... this. Update all users.
5314 (PKGDATA): New variable.
5315 (pkgdata_IMAGES): Rename to ...
5316 (pkglib_IMAGES): ... this. Update all users.
5317 (pkgdata_MODULES): Rename to ...
5318 (pkglib_MODULES): ... this. Update all users.
5319 (pkgdata_PROGRAMS): Rename to ...
5320 (pkglib_PROGRAMS): ... this. Update all users.
5321 (pkgdata_DATA): Rename to ...
5322 (pkglib_DATA): ... this. Update all users.
5323 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
5324 (unicode.pff, ascii.pff): New rules.
5325 (all-local): Add `$(PKGDATA)' dependency.
5326 (install-local): Process `$(PKGDATA)'.
5328 * util/update-grub_lib.in (font_path): Search for *.pff files in
5329 a few more locations, including `${pkgdata}'.
5331 2007-12-23 Robert Millan <rmh@aybabtu.com>
5333 Patch from Bean <bean123ch@gmail.com>:
5334 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
5337 2007-12-21 Bean <bean123ch@gmail.com>
5339 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
5340 (ntfscomp_mod_SOURCES): New variable.
5341 (ntfscomp_mod_CFLAGS): Likewise.
5342 (ntfscomp_mod_LDFLAGS): Likewise.
5344 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
5345 (grub_probe_SOURCES): Likewise.
5346 (grub_emu_SOURCES): Likewise.
5348 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5349 (grub_emu_SOURCES): Likewise.
5351 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5352 (grub_emu_SOURCES): Likewise.
5354 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5355 (grub_emu_SOURCES): Likewise.
5357 * fs/ntfs.c (grub_ntfscomp_func): New variable.
5358 (read_run_list): Renamed to grub_ntfs_read_run_list.
5359 (decomp_nextvcn): Moved to ntfscomp.c.
5360 (decomp_getch): Likewise.
5361 (decomp_get16): Likewise.
5362 (decomp_block): Likewise.
5363 (read_block): Likewise.
5364 (read_data): Partially moved to ntfscomp.c.
5365 (fixup): Change unsigned to grub_uint16_t.
5366 (read_mft): Change unsigned long to grub_uint32_t.
5367 (read_attr): Likewise.
5368 (read_data): Likewise.
5369 (read_run_data): Likewise.
5370 (read_run_list): Likewise.
5371 (read_mft): Likewise.
5373 * fs/ntfscomp.c: New file.
5375 * include/grub/ntfs.h: New file.
5377 2007-12-16 Robert Millan <rmh@aybabtu.com>
5379 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
5380 IDE disk check, since Linux is known to support 20 IDE disks.
5381 Reported by Colin Watson.
5383 2007-12-15 Bean <bean123ch@gmail.com>
5385 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
5386 (lnxboot_img_SOURCES): New variable.
5387 (lnxboot_img_ASFLAGS): Likewise.
5388 (lnxboot_img_LDFLAGS): Likewise.
5390 * boot/i386/pc/lnxboot.S: New file.
5392 2007-11-24 Pavel Roskin <proski@gnu.org>
5394 * configure.ac: Test if '--build-id=none' is supported by the
5395 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
5396 objcopy to generate incorrect binary files (binutils
5397 2.17.50.0.18-1 as shipped by Fedora 8).
5398 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
5399 linking, so that build ID doesn't break the test.
5401 2007-11-24 Pavel Roskin <proski@gnu.org>
5403 * include/grub/i386/time.h: use "void" in the argument list
5405 * include/grub/powerpc/time.h: Likewise.
5406 * include/grub/sparc64/time.h: Likewise.
5408 2007-11-18 Christian Franke <franke@computer.org>
5410 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
5411 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
5412 This fixes the problem that function keys did not work in grub-emu.
5414 2007-11-18 Christian Franke <franke@computer.org>
5416 * disk/host.c (grub_host_open): Remove attribute unused from
5417 name parameter. Add check for "host". This fixes the problem
5418 that grub-emu does not find partitions.
5420 2007-11-18 Christian Franke <franke@computer.org>
5422 * util/hostfs.c (is_dir): New function.
5423 (grub_hostfs_dir): Handle missing dirent.d_type case.
5424 (grub_hostfs_read): Add missing fseek().
5425 (grub_hostfs_label): Clear label pointer. This fixes a crash
5426 of grub-emu on "ls (host)".
5428 2007-11-18 Christian Franke <franke@computer.org>
5430 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
5431 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
5432 to 64 bit boundary by default.
5434 2007-11-18 Bean <bean123ch@gmail.com>
5436 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
5437 (hexdump_mod_SOURCES): New variable.
5438 (hexdump_mod_CFLAGS): Likewise.
5439 (hexdump_mod_LDFLAGS): Likewise.
5441 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5443 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5445 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5447 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5449 * include/grub/hexdump.h: New file.
5451 * commands/hexdump.c: New file.
5453 2007-11-10 Robert Millan <rmh@aybabtu.com>
5455 * commands/i386/pc/play.c (beep_off): Switch order of arguments
5456 in grub_outb() calls.
5457 (beep_on): Likewise.
5459 2007-11-10 Christian Franke <franke@computer.org>
5461 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
5462 (grub_menu_run): Likewise.
5464 2007-11-10 Robert Millan <rmh@aybabtu.com>
5466 * include/grub/i386/efi/machine.h: New file.
5467 * include/grub/i386/linuxbios/machine.h: Likewise.
5468 * include/grub/i386/pc/machine.h: Likewise.
5469 * include/grub/powerpc/ieee1275/machine.h: Likewise.
5470 * include/grub/sparc64/ieee1275/machine.h: Likewise.
5472 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
5473 (serial_hw_io_addr): New variable.
5474 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
5475 instead of `(unsigned short *) 0x400'.
5477 2007-11-10 Bean <bean123ch@gmail.com>
5479 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
5481 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5483 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
5484 (vga_mod_SOURCES): Added.
5485 (vga_mod_CFLAGS): Likewise.
5486 (vga_mod_LDFLAGS): Likewise.
5488 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
5490 (set_map_mask): Likewise.
5491 (set_read_map): Likewise.
5492 (set_read_address): Likewise.
5493 (vga_font): Removed variable.
5494 (get_vga_glyph): Removed function.
5495 (invalidate_char): Likewise.
5496 (write_char): Changed to use grub_font_get_glyph() for font
5498 (grub_vga_putchar): Likewise.
5499 (grub_vga_getcharwidth): Likewise.
5501 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5503 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
5505 (pxeboot_img_LDFLAGS): Likewise.
5506 (diskboot_img_LDFLAGS): Likewise.
5507 (kernel_img_LDFLAGS): Likewise.
5509 2007-11-06 Robert Millan <rmh@aybabtu.com>
5511 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
5512 in grub_outb() calls.
5513 (serial_hw_init): Likewise.
5515 2007-11-05 Robert Millan <rmh@aybabtu.com>
5517 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
5518 spaces. Skip non-regular files.
5520 2007-11-05 Robert Millan <rmh@aybabtu.com>
5522 * kern/disk.c (grub_disk_firmware_fini)
5523 (grub_disk_firmware_is_tainted): New variables.
5525 * include/grub/disk.h (grub_disk_firmware_fini)
5526 (grub_disk_firmware_is_tainted): Likewise.
5528 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
5529 (grub_disk_biosdisk_fini): ... to here.
5530 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
5531 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
5532 is set. Register grub_disk_biosdisk_fini() in
5533 `grub_disk_firmware_fini'.
5535 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
5536 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
5537 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
5538 to finish existing firmware disk interface.
5540 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
5541 (ata_mod_SOURCES): New variable.
5542 (ata_mod_CFLAGS): Likewise.
5543 (ata_mod_LDFLAGS): Likewise.
5545 2007-11-05 Robert Millan <rmh@aybabtu.com>
5547 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
5548 (grub_ata_wait): Reimplement using grub_millisleep().
5550 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
5551 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
5553 2007-11-03 Marco Gerards <marco@gnu.org>
5555 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
5556 (CRTC_ADDR_PORT): New macro.
5557 (CRTC_DATA_PORT): Likewise.
5558 (CRTC_CURSOR): Likewise.
5559 (CRTC_CURSOR_ADDR_HIGH): Likewise.
5560 (CRTC_CURSOR_ADDR_LOW): Likewise.
5561 (update_cursor): New function.
5562 (grub_console_real_putchar): Call `update_cursor'.
5563 (grub_console_gotoxy): Likewise.
5564 (grub_console_cls): Set the default color when clearing the
5566 (grub_console_setcursor): Implemented.
5568 2007-11-03 Marco Gerards <marco@gnu.org>
5570 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
5572 (grub_ata_pio_write): Likewise.
5574 (grub_atapi_identify): Wait after issuing an ATA command.
5575 (grub_atapi_packet): Likewise.
5576 (grub_ata_identify): Likewise.
5577 (grub_ata_readwrite): Likewise.
5579 2007-11-03 Marco Gerards <marco@gnu.org>
5581 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
5582 (grub_ata_pio_write): Likewise.
5583 (grub_ata_readwrite): Use `grub_error', instead of
5584 returning `grub_errno'.
5586 2007-11-03 Marco Gerards <marco@gnu.org>
5588 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
5589 grub_ata_pio_write once for every single sector, instead of for
5592 2007-10-31 Robert Millan <rmh@aybabtu.com>
5594 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
5596 * conf/i386-linuxbios.rmk: New file.
5598 * kern/i386/pc/hardware.c: Likewise.
5599 * term/i386/pc/at_keyboard.c: Likewise.
5600 * term/i386/pc/vga_text.c: Likewise.
5602 * include/grub/i386/linuxbios/boot.h: Likewise.
5603 * include/grub/i386/linuxbios/console.h: Likewise.
5604 * include/grub/i386/linuxbios/init.h: Likewise.
5605 * include/grub/i386/linuxbios/kernel.h: Likewise.
5606 * include/grub/i386/linuxbios/loader.h: Likewise.
5607 * include/grub/i386/linuxbios/memory.h: Likewise.
5608 * include/grub/i386/linuxbios/serial.h: Likewise.
5609 * include/grub/i386/linuxbios/time.h: Likewise.
5611 * kern/i386/linuxbios/init.c: Likewise.
5612 * kern/i386/linuxbios/startup.S: Likewise.
5613 * kern/i386/linuxbios/table.c: Likewise.
5615 2007-10-31 Marco Gerards <marco@gnu.org>
5617 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
5618 (ata_mod_SOURCES): New variable.
5619 (ata_mod_CFLAGS): Likewise.
5620 (ata_mod_LDFLAGS): Likewise.
5622 * disk/ata.c: New file.
5624 * include/grub/disk.h (grub_disk_dev_id): Add
5625 `GRUB_DISK_DEV_ATA_ID'.
5627 2007-10-31 Robert Millan <rmh@aybabtu.com>
5629 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
5630 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
5632 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
5633 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
5635 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
5638 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
5640 2007-10-27 Robert Millan <rmh@aybabtu.com>
5642 * include/grub/types.h (ULONG_MAX): Define macro.
5644 2007-10-22 Robert Millan <rmh@aybabtu.com>
5646 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
5648 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
5650 2007-10-22 Robert Millan <rmh@aybabtu.com>
5652 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
5653 (pkgdata_MODULES): Add `biosdisk.mod'.
5654 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
5657 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
5658 (grub_biosdisk_init): Replace with ...
5659 (GRUB_MOD_INIT(biosdisk)): ... this.
5660 (grub_biosdisk_fini): Replace with ...
5661 (GRUB_MOD_FINI(biosdisk)): ... this.
5663 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
5664 (grub_machine_init): Remove call to grub_biosdisk_init().
5665 (grub_machine_fini): Remove call to grub_machine_fini().
5667 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
5669 2007-10-22 Robert Millan <rmh@aybabtu.com>
5671 * include/grub/time.h: New file.
5672 * include/grub/i386/time.h: Likewise.
5673 * include/grub/powerpc/time.h: Likewise.
5674 * include/grub/sparc64/time.h: Likewise.
5676 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
5678 (KERNEL_MACHINE_TIME_HEADER): ... this.
5679 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5681 (KERNEL_MACHINE_TIME_HEADER): ... this.
5682 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5684 (KERNEL_MACHINE_TIME_HEADER): ... this.
5686 * kern/i386/efi/init.c: Include `<grub/time.h>'.
5687 (grub_millisleep): New function.
5688 * kern/i386/pc/init.c: Include `<grub/time.h>'.
5689 (grub_millisleep): New function.
5690 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
5691 Remove `grub/machine/time.h' include.
5692 (grub_millisleep): New function.
5693 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
5694 Remove `grub/machine/time.h' include.
5695 (grub_millisleep): New function.
5697 * include/grub/misc.h (grub_div_roundup): New function.
5699 * kern/misc.c: Include `<grub/time.h>'.
5700 (grub_millisleep_generic): New function.
5702 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
5704 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
5706 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
5707 `machine/time.h'. Add `time.h'.
5708 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5710 2007-10-21 Robert Millan <rmh@aybabtu.com>
5712 * include/grub/misc.h (grub_max): New function.
5714 2007-10-21 Robert Millan <rmh@aybabtu.com>
5716 * util/misc.c (grub_util_info): Call fflush() before returning.
5718 2007-10-20 Robert Millan <rmh@aybabtu.com>
5720 * genmk.rb (Image): Copy `extra_flags' from here ...
5721 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
5723 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
5724 to `argc' and `args' arguments.
5726 2007-10-17 Robert Millan <rmh@aybabtu.com>
5728 * kern/i386/loader.S: New file.
5730 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
5731 * kern/i386/loader.S (grub_linux_prot_size)... to here.
5732 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
5733 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
5734 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
5735 * kern/i386/loader.S (grub_linux_real_addr)... to here.
5736 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
5737 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
5738 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
5739 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
5740 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
5741 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
5742 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
5743 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
5745 * kern/i386/realmode.S: New file.
5747 * kern/i386/pc/startup.S (protstack): Moved from here ...
5748 * kern/i386/realmode.S (protstack)... to here.
5749 * kern/i386/pc/startup.S (gdt): Moved from here ...
5750 * kern/i386/realmode.S (gdt)... to here.
5751 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
5752 * kern/i386/realmode.S (prot_to_real)... to here.
5754 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
5755 `kern/i386/realmode.S'.
5757 2007-10-17 Robert Millan <rmh@aybabtu.com>
5759 * include/grub/i386/loader.h: New file.
5761 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
5762 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5763 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5764 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5765 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
5766 * include/grub/i386/loader.h (grub_linux_prot_size)
5767 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5768 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5769 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5770 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
5772 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
5774 2007-10-15 Robert Millan <rmh@aybabtu.com>
5776 * normal/misc.c (grub_normal_print_device_info): Do not probe for
5777 filesystem when dev->disk is unset.
5778 Do probe for filesystem even when dev->disk->has_partitions is set.
5779 In case a filesystem is found, always report it.
5780 In case it isn't, if dev->disk->has_partitions is set, report that
5781 a partition table was found instead of reporting that no filesystem
5782 could be identified.
5784 2007-10-12 Robert Millan <rmh@aybabtu.com>
5786 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
5787 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
5789 * include/grub/types.h (grub_host_to_target16): New macro.
5790 (grub_host_to_target32): Likewise.
5791 (grub_host_to_target64): Likewise.
5792 (grub_target_to_host16): Likewise.
5793 (grub_target_to_host32): Likewise.
5794 (grub_target_to_host64): Likewise.
5796 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5798 (GRUB_MOD_ALIGN): ...this. Update all users.
5800 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
5801 grub_host_to_target32.
5802 Replace grub_be_to_cpu32 with grub_target_to_host32.
5803 (load_modules): Likewise.
5804 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
5805 Replace grub_be_to_cpu32 with grub_target_to_host32.
5806 Replace grub_cpu_to_be16 with grub_host_to_target16.
5807 Replace grub_cpu_to_be32 grub_host_to_target32.
5809 2007-10-12 Robert Millan <rmh@aybabtu.com>
5811 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
5812 * util/elf/grub-mkimage.c: ... here.
5814 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
5815 `util/powerpc/ieee1275/grub-mkimage.c'.
5817 2007-10-07 Robert Millan <rmh@aybabtu.com>
5819 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
5820 and make it easier to figure out.
5821 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
5822 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
5823 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
5824 leave us with less than HEAP_MIN_SIZE total heap.
5825 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
5827 2007-10-03 Robert Millan <rmh@aybabtu.com>
5829 * include/grub/i386/io.h: New file.
5830 * commands/i386/pc/play.c (inb): Removed.
5832 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5834 * term/i386/pc/serial.c (inb): Removed.
5836 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5838 * term/i386/pc/vga.c (inb): Removed.
5840 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5843 2007-10-02 Robert Millan <rmh@aybabtu.com>
5845 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
5846 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5847 Reported by Marcin Kurek.
5849 2007-09-07 Robert Millan <rmh@aybabtu.com>
5851 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
5852 SmartFirmware version updates (as released by Sven Luther), and avoid
5853 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
5854 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
5857 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5860 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
5861 when merging two regions.
5863 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5865 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
5866 * normal/completion.c (grub_normal_do_completion): Likewise.
5867 Reported by Hitoshi Ozeki.
5869 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5871 Do not use devices at boot in chainloading.
5873 * loader/i386/pc/chainloader.c (boot_drive): New variable.
5874 (boot_part_addr): Likewise.
5875 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
5876 with BOOT_DRIVE and BOOT_PART_ADDR.
5877 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
5878 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
5880 2007-08-29 Robert Millan <rmh@aybabtu.com>
5882 Patch from Simon Peter <dn.tlp@gmx.net>:
5883 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
5884 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
5885 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
5886 util/i386/pc/grub-setup.c_DEPENDENCIES.
5887 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
5888 util/grub-probe.c_DEPENDENCIES.
5889 * conf/powerpc-ieee1275.rmk: Likewise.
5891 2007-08-28 Robert Millan <rmh@aybabtu.com>
5893 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
5894 to tell grub-mkdevicemap how to name devices.
5895 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
5898 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
5899 util/i386/get_disk_name.c.
5900 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
5901 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
5902 util/ieee1275/get_disk_name.c.
5904 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
5906 * DISTLIST: Add util/i386/get_disk_name.c and
5907 util/ieee1275/get_disk_name.c.
5909 * util/grub-mkdevicemap.c: Replace device naming logic with
5910 grub_util_get_disk_name() calls.
5912 2007-08-20 Robert Millan <rmh@aybabtu.com>
5914 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
5915 (so that it works for both plural and singular quantities).
5917 2007-08-05 Robert Millan <rmh@aybabtu.com>
5919 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
5920 so that [xz] isn't taken into account when determining order.
5922 2007-08-02 Marco Gerards <marco@gnu.org>
5924 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
5925 `include/multiboot2.h', `include/grub/elfload.h',
5926 `include/multiboot.h', `include/grub/multiboot.h',
5927 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
5928 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
5929 `kern/elf.c', `loader/multiboot_loader.c',
5930 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
5931 `loader/i386/pc/multiboot2.c',
5932 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
5933 `util/i386/pc/grub-mkrescue.in'. Remove
5934 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
5935 `include/grub/i386/pc/util/biosdisk.h' and
5936 `include/grub/powerpc/ieee1275/multiboot.h'.
5938 2007-08-02 Bean <bean123ch@gmail.com>
5940 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
5941 (ntfs_mod_SOURCES): New variable.
5942 (ntfs_mod_CFLAGS): Likewise.
5943 (ntfs_mod_LDFLAGS): Likewise.
5945 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
5946 (grub_probe_SOURCES): Likewise.
5947 (grub_emu_SOURCES): Likewise.
5949 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5950 (grub_emu_SOURCES): Likewise.
5952 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5953 (grub_emu_SOURCES): Likewise.
5955 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
5957 * fs/ntfs.c: New file.
5959 2007-08-02 Bean <bean123ch@gmail.com>
5961 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
5963 * file.h (grub_file): Likewise.
5965 * fshelp.h (grub_fshelp_read_file): Likewise.
5967 * util/i386/pc/grub-setup.c (setup): Likewise.
5968 (save_first_sector): Likewise.
5969 (save_blocklists): Likewise.
5971 * fs/affs.c (grub_affs_read_file): Likewise.
5973 * fs/ext2.c (grub_ext2_read_file): Likewise.
5975 * fs/fat.c (grub_fat_read_data): Likewise.
5977 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
5979 * fs/hfs.c (grub_hfs_read_file): Likewise.
5981 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
5983 * fs/jfs.c (grub_jfs_read_file): Likewise.
5985 * fs/minix.c (grub_minix_read_file): Likewise.
5987 * fs/sfs.c (grub_sfs_read_file): Likewise.
5989 * fs/ufs.c (grub_ufs_read_file): Likewise.
5991 * fs/xfs.c (grub_xfs_read_file): Likewise.
5993 * command/blocklist.c (read_blocklist): Likewise.
5994 (print_blocklist): Likewise.
5996 2007-08-02 Marco Gerards <marco@gnu.org>
5998 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
6001 * disk/host.c: New file.
6003 * util/hostfs.c: Likewise.
6005 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
6006 return `GRUB_ERR_BAD_FS'.
6007 * fs/sfs.c (grub_sfs_mount): Likewise.
6008 * fs/xfs.c (grub_xfs_mount): Likewise.
6010 * include/grub/disk.h (enum grub_disk_dev_id): Add
6011 `GRUB_DISK_DEVICE_HOST_ID'.
6013 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
6015 2007-07-24 Jerone Young <jerone@gmail.com>
6017 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
6018 modules for compilation.
6019 * conf/powerpc-ieee1275.rmk: Likewise.
6021 * include/multiboot.h: Move multiboot definitions to one file. Rename
6022 many definitions to not get grub specific.
6023 * include/multiboot2.h: Create header with multiboot 2 definitions.
6024 * include/grub/multiboot.h: Header for grub specific function
6025 prototypes and definitions.
6026 * include/grub/multiboot2.h: Likewise.
6027 * include/grub/multiboot_loader.h: Likewise.
6028 * include/grub/i386/pc/multiboot.h: Removed.
6029 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
6031 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
6032 and 2 to allow for one multiboot and module commands.
6033 * loader/multiboot2.c: Add multiboot2 functionality.
6034 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
6035 and definition names.
6036 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
6038 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
6039 ieee1275 specific multiboot2 code.
6041 * kern/i386/pc/startup.S: Change headers and definition names for
6042 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
6044 2007-07-22 Robert Millan <rmh@aybabtu.com>
6046 * geninitheader.sh: Process file specified in first parameter rather
6047 than hardcoding grub_modules_init.lst.
6048 * geninit.sh: Likewise. Also, construct header name dynamically rather
6049 than hardcoding grub_modules_init.h.
6051 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
6052 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
6053 grub_probe_init.[ch] and grub_setup_init.[ch].
6055 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
6056 grub_modules_init.h with grub_emu_init.h.
6057 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
6058 grub_probe_init.[ch] files.
6059 * conf/i386-efi.rmk: Likewise.
6060 * conf/i386-pc.rmk: Likewise.
6061 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
6062 grub_setup_init.[ch] files.
6064 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
6065 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
6066 to initialize modules rather than a list of hardcoded functions.
6067 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
6068 grub_init_all() to initialize modules rather than a list of hardcoded
6071 2007-07-22 Robert Millan <rmh@aybabtu.com>
6073 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
6074 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
6076 2007-07-22 Robert Millan <rmh@aybabtu.com>
6078 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6079 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
6080 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
6081 flag when running on SmartFirmware.
6082 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
6083 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
6086 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6087 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
6088 rather than decreasing it.
6090 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
6091 there's not enough space to do it, fail in the same way as when it
6092 can't be done because there are no partitions.
6094 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
6095 when nvsetenv failed.
6097 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6099 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
6100 because this rule is automatically generated.
6101 (grub-mkrescue): Removed for the same reason as above.
6103 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
6105 Migrate to GNU General Public License Version 3.
6107 * COPYING: Replaced with the plain text version of GPLv3.
6109 * config.guess: Updated from gnulib.
6110 * config.sub: Likewise.
6112 * geninit.sh: Output a GPLv3 copyright notice.
6113 * geninitheader.sh: Likewise.
6114 * genmodsrc.sh: Likewise.
6115 * gensymlist.sh.in: Likewise.
6117 * boot/i386/pc/boot.S: Upgraded to GPLv3.
6118 * boot/i386/pc/diskboot.S: Likewise.
6119 * boot/i386/pc/pxeboot.S: Likewise.
6120 * commands/blocklist.c: Likewise.
6121 * commands/boot.c: Likewise.
6122 * commands/cat.c: Likewise.
6123 * commands/cmp.c: Likewise.
6124 * commands/configfile.c: Likewise.
6125 * commands/echo.c: Likewise.
6126 * commands/help.c: Likewise.
6127 * commands/ls.c: Likewise.
6128 * commands/search.c: Likewise.
6129 * commands/terminal.c: Likewise.
6130 * commands/test.c: Likewise.
6131 * commands/videotest.c: Likewise.
6132 * commands/i386/cpuid.c: Likewise.
6133 * commands/i386/pc/halt.c: Likewise.
6134 * commands/i386/pc/play.c: Likewise.
6135 * commands/i386/pc/reboot.c: Likewise.
6136 * commands/i386/pc/vbeinfo.c: Likewise.
6137 * commands/i386/pc/vbetest.c: Likewise.
6138 * commands/ieee1275/halt.c: Likewise.
6139 * commands/ieee1275/reboot.c: Likewise.
6140 * commands/ieee1275/suspend.c: Likewise.
6141 * disk/loopback.c: Likewise.
6142 * disk/lvm.c: Likewise.
6143 * disk/raid.c: Likewise.
6144 * disk/efi/efidisk.c: Likewise.
6145 * disk/i386/pc/biosdisk.c: Likewise.
6146 * disk/ieee1275/ofdisk.c: Likewise.
6147 * font/manager.c: Likewise.
6148 * fs/affs.c: Likewise.
6149 * fs/ext2.c: Likewise.
6150 * fs/fat.c: Likewise.
6151 * fs/fshelp.c: Likewise.
6152 * fs/hfs.c: Likewise.
6153 * fs/hfsplus.c: Likewise.
6154 * fs/iso9660.c: Likewise.
6155 * fs/jfs.c: Likewise.
6156 * fs/minix.c: Likewise.
6157 * fs/sfs.c: Likewise.
6158 * fs/ufs.c: Likewise.
6159 * fs/xfs.c: Likewise.
6160 * hello/hello.c: Likewise.
6161 * include/grub/acorn_filecore.h: Likewise.
6162 * include/grub/arg.h: Likewise.
6163 * include/grub/bitmap.h: Likewise.
6164 * include/grub/boot.h: Likewise.
6165 * include/grub/cache.h: Likewise.
6166 * include/grub/device.h: Likewise.
6167 * include/grub/disk.h: Likewise.
6168 * include/grub/dl.h: Likewise.
6169 * include/grub/elfload.h: Likewise.
6170 * include/grub/env.h: Likewise.
6171 * include/grub/err.h: Likewise.
6172 * include/grub/file.h: Likewise.
6173 * include/grub/font.h: Likewise.
6174 * include/grub/fs.h: Likewise.
6175 * include/grub/fshelp.h: Likewise.
6176 * include/grub/gzio.h: Likewise.
6177 * include/grub/hfs.h: Likewise.
6178 * include/grub/kernel.h: Likewise.
6179 * include/grub/loader.h: Likewise.
6180 * include/grub/lvm.h: Likewise.
6181 * include/grub/misc.h: Likewise.
6182 * include/grub/mm.h: Likewise.
6183 * include/grub/net.h: Likewise.
6184 * include/grub/normal.h: Likewise.
6185 * include/grub/parser.h: Likewise.
6186 * include/grub/partition.h: Likewise.
6187 * include/grub/pc_partition.h: Likewise.
6188 * include/grub/raid.h: Likewise.
6189 * include/grub/rescue.h: Likewise.
6190 * include/grub/script.h: Likewise.
6191 * include/grub/setjmp.h: Likewise.
6192 * include/grub/symbol.h: Likewise.
6193 * include/grub/term.h: Likewise.
6194 * include/grub/terminfo.h: Likewise.
6195 * include/grub/tparm.h: Likewise.
6196 * include/grub/types.h: Likewise.
6197 * include/grub/video.h: Likewise.
6198 * include/grub/efi/api.h: Likewise.
6199 * include/grub/efi/chainloader.h: Likewise.
6200 * include/grub/efi/console.h: Likewise.
6201 * include/grub/efi/console_control.h: Likewise.
6202 * include/grub/efi/disk.h: Likewise.
6203 * include/grub/efi/efi.h: Likewise.
6204 * include/grub/efi/pe32.h: Likewise.
6205 * include/grub/efi/time.h: Likewise.
6206 * include/grub/i386/linux.h: Likewise.
6207 * include/grub/i386/setjmp.h: Likewise.
6208 * include/grub/i386/types.h: Likewise.
6209 * include/grub/i386/efi/kernel.h: Likewise.
6210 * include/grub/i386/efi/loader.h: Likewise.
6211 * include/grub/i386/efi/time.h: Likewise.
6212 * include/grub/i386/pc/biosdisk.h: Likewise.
6213 * include/grub/i386/pc/boot.h: Likewise.
6214 * include/grub/i386/pc/chainloader.h: Likewise.
6215 * include/grub/i386/pc/console.h: Likewise.
6216 * include/grub/i386/pc/init.h: Likewise.
6217 * include/grub/i386/pc/kernel.h: Likewise.
6218 * include/grub/i386/pc/loader.h: Likewise.
6219 * include/grub/i386/pc/memory.h: Likewise.
6220 * include/grub/i386/pc/multiboot.h: Likewise.
6221 * include/grub/i386/pc/serial.h: Likewise.
6222 * include/grub/i386/pc/time.h: Likewise.
6223 * include/grub/i386/pc/vbe.h: Likewise.
6224 * include/grub/i386/pc/vbeblit.h: Likewise.
6225 * include/grub/i386/pc/vbefill.h: Likewise.
6226 * include/grub/i386/pc/vbeutil.h: Likewise.
6227 * include/grub/i386/pc/vga.h: Likewise.
6228 * include/grub/ieee1275/ieee1275.h: Likewise.
6229 * include/grub/ieee1275/ofdisk.h: Likewise.
6230 * include/grub/powerpc/libgcc.h: Likewise.
6231 * include/grub/powerpc/setjmp.h: Likewise.
6232 * include/grub/powerpc/types.h: Likewise.
6233 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
6234 * include/grub/powerpc/ieee1275/console.h: Likewise.
6235 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
6236 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
6237 * include/grub/powerpc/ieee1275/loader.h: Likewise.
6238 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
6239 * include/grub/powerpc/ieee1275/time.h: Likewise.
6240 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
6241 * include/grub/sparc64/libgcc.h: Likewise.
6242 * include/grub/sparc64/setjmp.h: Likewise.
6243 * include/grub/sparc64/types.h: Likewise.
6244 * include/grub/sparc64/ieee1275/console.h: Likewise.
6245 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6246 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6247 * include/grub/sparc64/ieee1275/time.h: Likewise.
6248 * include/grub/util/biosdisk.h: Likewise.
6249 * include/grub/util/getroot.h: Likewise.
6250 * include/grub/util/lvm.h: Likewise.
6251 * include/grub/util/misc.h: Likewise.
6252 * include/grub/util/raid.h: Likewise.
6253 * include/grub/util/resolve.h: Likewise.
6254 * io/gzio.c: Likewise.
6255 * kern/device.c: Likewise.
6256 * kern/disk.c: Likewise.
6257 * kern/dl.c: Likewise.
6258 * kern/elf.c: Likewise.
6259 * kern/env.c: Likewise.
6260 * kern/err.c: Likewise.
6261 * kern/file.c: Likewise.
6262 * kern/fs.c: Likewise.
6263 * kern/loader.c: Likewise.
6264 * kern/main.c: Likewise.
6265 * kern/misc.c: Likewise.
6266 * kern/mm.c: Likewise.
6267 * kern/parser.c: Likewise.
6268 * kern/partition.c: Likewise.
6269 * kern/rescue.c: Likewise.
6270 * kern/term.c: Likewise.
6271 * kern/efi/efi.c: Likewise.
6272 * kern/efi/init.c: Likewise.
6273 * kern/efi/mm.c: Likewise.
6274 * kern/i386/dl.c: Likewise.
6275 * kern/i386/efi/init.c: Likewise.
6276 * kern/i386/efi/startup.S: Likewise.
6277 * kern/i386/pc/init.c: Likewise.
6278 * kern/i386/pc/lzo1x.S: Likewise.
6279 * kern/i386/pc/startup.S: Likewise.
6280 * kern/ieee1275/ieee1275.c: Likewise.
6281 * kern/powerpc/cache.S: Likewise.
6282 * kern/powerpc/dl.c: Likewise.
6283 * kern/powerpc/ieee1275/cmain.c: Likewise.
6284 * kern/powerpc/ieee1275/crt0.S: Likewise.
6285 * kern/powerpc/ieee1275/init.c: Likewise.
6286 * kern/powerpc/ieee1275/openfw.c: Likewise.
6287 * kern/sparc64/cache.S: Likewise.
6288 * kern/sparc64/dl.c: Likewise.
6289 * kern/sparc64/ieee1275/init.c: Likewise.
6290 * kern/sparc64/ieee1275/openfw.c: Likewise.
6291 * loader/efi/chainloader.c: Likewise.
6292 * loader/efi/chainloader_normal.c: Likewise.
6293 * loader/i386/efi/linux.c: Likewise.
6294 * loader/i386/efi/linux_normal.c: Likewise.
6295 * loader/i386/pc/chainloader.c: Likewise.
6296 * loader/i386/pc/chainloader_normal.c: Likewise.
6297 * loader/i386/pc/linux.c: Likewise.
6298 * loader/i386/pc/linux_normal.c: Likewise.
6299 * loader/i386/pc/multiboot.c: Likewise.
6300 * loader/i386/pc/multiboot_normal.c: Likewise.
6301 * loader/powerpc/ieee1275/linux.c: Likewise.
6302 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
6303 * normal/arg.c: Likewise.
6304 * normal/cmdline.c: Likewise.
6305 * normal/command.c: Likewise.
6306 * normal/completion.c: Likewise.
6307 * normal/execute.c: Likewise.
6308 * normal/function.c: Likewise.
6309 * normal/lexer.c: Likewise.
6310 * normal/main.c: Likewise.
6311 * normal/menu.c: Likewise.
6312 * normal/menu_entry.c: Likewise.
6313 * normal/misc.c: Likewise.
6314 * normal/parser.y: Likewise.
6315 * normal/script.c: Likewise.
6316 * normal/i386/setjmp.S: Likewise.
6317 * normal/powerpc/setjmp.S: Likewise.
6318 * normal/sparc64/setjmp.S: Likewise.
6319 * partmap/acorn.c: Likewise.
6320 * partmap/amiga.c: Likewise.
6321 * partmap/apple.c: Likewise.
6322 * partmap/gpt.c: Likewise.
6323 * partmap/pc.c: Likewise.
6324 * partmap/sun.c: Likewise.
6325 * term/gfxterm.c: Likewise.
6326 * term/terminfo.c: Likewise.
6327 * term/efi/console.c: Likewise.
6328 * term/i386/pc/console.c: Likewise.
6329 * term/i386/pc/serial.c: Likewise.
6330 * term/i386/pc/vesafb.c: Likewise.
6331 * term/i386/pc/vga.c: Likewise.
6332 * term/ieee1275/ofconsole.c: Likewise.
6333 * util/biosdisk.c: Likewise.
6334 * util/console.c: Likewise.
6335 * util/genmoddep.c: Likewise.
6336 * util/getroot.c: Likewise.
6337 * util/grub-emu.c: Likewise.
6338 * util/grub-mkdevicemap.c: Likewise.
6339 * util/grub-probe.c: Likewise.
6340 * util/lvm.c: Likewise.
6341 * util/misc.c: Likewise.
6342 * util/raid.c: Likewise.
6343 * util/resolve.c: Likewise.
6344 * util/update-grub.in: Likewise.
6345 * util/update-grub_lib.in: Likewise.
6346 * util/grub.d/00_header.in: Likewise.
6347 * util/grub.d/10_hurd.in: Likewise.
6348 * util/grub.d/10_linux.in: Likewise.
6349 * util/i386/efi/grub-install.in: Likewise.
6350 * util/i386/efi/grub-mkimage.c: Likewise.
6351 * util/i386/pc/grub-install.in: Likewise.
6352 * util/i386/pc/grub-mkimage.c: Likewise.
6353 * util/i386/pc/grub-mkrescue.in: Likewise.
6354 * util/i386/pc/grub-setup.c: Likewise.
6355 * util/i386/pc/misc.c: Likewise.
6356 * util/powerpc/ieee1275/grub-install.in: Likewise.
6357 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
6358 * util/powerpc/ieee1275/misc.c: Likewise.
6359 * video/bitmap.c: Likewise.
6360 * video/video.c: Likewise.
6361 * video/i386/pc/vbe.c: Likewise.
6362 * video/i386/pc/vbeblit.c: Likewise.
6363 * video/i386/pc/vbefill.c: Likewise.
6364 * video/i386/pc/vbeutil.c: Likewise.
6365 * video/readers/tga.c: Likewise.
6367 2007-07-02 Robert Millan <rmh@aybabtu.com>
6369 * conf/i386-efi.rmk: Replace obsolete reference to
6370 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
6371 with util/getroot.c.
6372 * conf/powerpc-ieee1275.rmk: Likewise.
6373 * conf/sparc64-ieee1275.rmk: Likewise.
6375 * util/grub-emu.c (main): Fix unchecked pointer handling.
6377 2007-07-02 Robert Millan <rmh@aybabtu.com>
6379 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
6380 invocation to fail, in order to support partition-less media.
6382 * util/i386/pc/grub-install.in: Likewise.
6384 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
6385 which fs or partmap modules are needed (akin to its sister scripts).
6387 Also use grub-probe to get rid of unportable /proc/mounts check.
6389 Print the same informational message that the other scripts do, before
6392 2007-06-23 Robert Millan <rmh@aybabtu.com>
6394 * util/update-grub_lib.in (font_path): New function. Determine whether
6395 a font file can be found and, if so, echo the GRUB path to it.
6397 * util/update-grub.in: Handle multiple terminals depending on user
6398 input, platform availability and font file presence. Propagate
6399 variables of our findings to /etc/grub.d/ children.
6401 * util/grub.d/00_header.in: Handle multiple terminals, based on
6402 environment setup by update-grub.
6404 2007-06-23 Robert Millan <rmh@aybabtu.com>
6406 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
6408 2007-06-21 Robert Millan <rmh@aybabtu.com>
6410 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
6411 indicate end of data section in kernel image.
6412 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
6413 GRUB_KERNEL_MACHINE_DATA_END.
6415 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
6417 * kern/i386/efi/startup.S: Likewise.
6419 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
6420 during image generation. Implement --prefix option to override this
6422 * util/i386/efi/grub-mkimage.c: Likewise.
6424 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
6425 code to make path relative to its root into a separate function.
6427 * util/i386/pc/grub-install.in: Use newly provided
6428 make_system_path_relative_to_its_root() to convert ${grubdir}, then
6429 pass the result to grub-install --prefix.
6431 2007-06-13 Robert Millan <rmh@aybabtu.com>
6433 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
6435 * util/grub-emu.c: Use above definitions from misc.h instead of
6437 * util/grub-mkdevicemap.c: Likewise.
6438 * util/i386/pc/grub-setup.c: Likewise.
6439 * util/grub-probe.c: Likewise.
6440 (probe): Abort with grub_util_error() when either
6441 grub_guess_root_device or grub_util_get_grub_dev fails.
6443 2007-06-12 Robert Millan <rmh@aybabtu.com>
6445 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
6447 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
6449 * util/grub-probe.c (probe): Likewise for "drive_name".
6451 2007-06-11 Robert Millan <rmh@aybabtu.com>
6453 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
6454 not just the cdrom one.
6456 2007-06-11 Robert Millan <rmh@aybabtu.com>
6458 * util/i386/pc/grub-mkrescue.in: Add "set -e".
6459 Add --pkglibdir=DIR option to override pkglibdir.
6460 Mention --image-type=TYPE in help output.
6461 Fix --grub-mkimage (it was a no-op).
6462 Abort gracefully when no parameter is given.
6464 2007-06-11 Robert Millan <rmh@aybabtu.com>
6466 * util/i386/pc/grub-mkrescue.in: New file.
6467 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
6468 * Makefile.in: Handle bin_SCRIPTS.
6470 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
6472 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
6473 list of video modes.
6475 2007-06-06 Robert Millan <rmh@aybabtu.com>
6477 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
6478 file doesn't exist, or if it is in a filesystem grub can't read.
6480 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
6481 not abort if GRUB_DRIVE could not be defined. Rearrange generated
6482 header comment to fit in 80 columns when the variables are resolved.
6484 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
6485 could be identified by update-grub. Remove redundant check for
6486 unifont.pff existence (since convert_system_path_to_grub_path now
6489 2007-06-04 Robert Millan <rmh@aybabtu.com>
6491 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
6493 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
6495 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
6497 2007-06-04 Robert Millan <rmh@aybabtu.com>
6499 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
6501 * include/grub/partition.h: Declare grub_apple_partition_map_init and
6502 grub_apple_partition_map_fini.
6505 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
6506 to access >2 TiB disks).
6508 Print disk->total_sectors with %llu instead of %lu, since this
6509 variable is always 64-bit (prevents wrong disk size from being displayed
6510 on either >2 TiB disk or big-endian CPU).
6512 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
6513 into a generic case that supports all (sane) partition maps.
6515 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
6518 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
6519 and grub_apple_partition_map_fini() after that.
6521 2007-06-01 Robert Millan <rmh@aybabtu.com>
6523 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
6525 * util/grub.d/00_header.in: Only enable gfxterm when
6526 convert_system_path_to_grub_path() succeeds.
6528 2007-05-20 Robert Millan <rmh@aybabtu.com>
6530 * util/update-grub_lib.in: New file.
6531 * DISTLIST: Add update-grub_lib.in.
6532 * conf/common.rmk: Generate update-grub_lib and install it in
6534 * Makefile.in: Add install routine for $(lib_DATA).
6536 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
6537 function provided by update-grub_lib to support arbitrary paths of
6539 * util/update-grub.in: Use convert_system_path_to_grub_path() to
6540 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
6542 2007-05-19 Robert Millan <rmh@aybabtu.com>
6544 * commands/i386/cpuid.c: New module.
6546 * conf/i386-efi.rmk: Enable cpuid.mod.
6547 * conf/i386-pc.rmk: Likewise.
6549 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6551 * kern/disk.c (grub_disk_read): Check return value of
6554 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6556 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
6558 * disk/raid.c (grub_raid_open): Likewise.
6560 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6562 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
6563 stack instead of on the heap.
6565 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
6566 before doing a read on it.
6568 * configure.ac: Only use -fno-stack-protector for the target
6571 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6573 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
6574 __attribute_ ((unused)) to mode_type argument.
6576 * util/getroot.c (grub_guess_root_device): Fix #endif.
6578 * kern/misc.c (memcmp): Fix prototype.
6580 * include/grub/partition.h [GRUB_UTIL]
6581 (grub_gpt_partition_map_init): Add prototype.
6582 (grub_gpt_partition_map_fini): Likewise.
6584 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
6587 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
6588 (grub_fat_read_data): Likewise.
6589 (grub_fat_find_dir): Likewise.
6591 * font/manager.c (find_glyph): Make table a const.
6592 (grub_font_get_glyph): Remove bitmap from if statement.
6594 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
6596 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
6597 code, first search for device in /dev/mapper, then in /dev.
6598 (grub_util_get_grub_dev): New function.
6599 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
6601 * util/grub-probe.c (probe): Remove check for RAID, call
6602 grub_util_get_grub_dev() instead of
6603 grub_util_biosdisk_get_grub_dev().
6604 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
6605 grub_util_biosdisk_get_grub_dev().
6606 * util/i386/pc/grub-setup.c (main): Likewise.
6608 2007-05-16 Robert Millan <rmh@aybabtu.com>
6610 * DISTLIST: Update for the latest changes.
6611 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
6612 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
6613 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
6614 grub/util/biosdisk.h.
6615 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
6616 grub/util/biosdisk.h.
6618 2007-05-16 Robert Millan <rmh@aybabtu.com>
6620 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
6622 2007-05-16 Robert Millan <rmh@aybabtu.com>
6624 * util/i386/efi/grub-install.in: New.
6625 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
6626 newly added grub-install.
6627 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
6629 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
6630 grub/util/biosdisk.h.
6631 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
6632 grub/util/biosdisk.h.
6634 2007-05-16 Robert Millan <rmh@aybabtu.com>
6636 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
6637 * include/grub/util/biosdisk.h: ... here.
6638 * util/i386/pc/biosdisk.c: Moved to ...
6639 * util/biosdisk.c: ... here.
6640 * util/i386/pc/getroot.c: Moved to ...
6641 * util/getroot.c: ... here.
6642 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
6643 * util/grub-mkdevicemap.c: ... here.
6644 * util/i386/pc/grub-probe.c: Moved to ...
6645 * util/grub-probe.c: ... here.
6647 2007-05-15 Robert Millan <rmh@aybabtu.com>
6649 * util/update-grub.in: Remove duplicated line in grub.cfg header
6652 2007-05-13 Robert Millan <rmh@aybabtu.com>
6654 * util/update-grub.in: Fix a few assumptions about the devices holding
6655 /, /boot and /boot/grub being the same.
6656 * util/grub.d/00_header.in: Likewise.
6657 * util/grub.d/10_hurd.in: Likewise.
6658 * util/grub.d/10_linux.in: Likewise.
6660 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
6661 patterns. Use that to define the `.old' suffix as older than `'.
6663 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
6665 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
6666 the grub.cfg header message.
6668 2007-05-11 Robert Millan <rmh@aybabtu.com>
6670 * util/update-grub.in: Create device.map if it doesn't already exist,
6671 before attempting to run grub-probe.
6672 Check for grub-probe and grub-mkdevicemap with the same code
6673 grub-install is using.
6676 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
6678 * Makefile.in: Add the datarootdir autoconf variable.
6680 2007-05-09 Robert Millan <rmh@aybabtu.com>
6682 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
6683 fail gracefully if dev->disk->partition == NULL.
6685 2007-05-07 Robert Millan <rmh@aybabtu.com>
6687 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
6688 determine partition map module.
6689 * util/i386/pc/grub-install.in: Use this feature to decide which
6690 partition module to load, instead of hardcoding pc and gpt.
6692 2007-05-07 Robert Millan <rmh@aybabtu.com>
6694 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
6695 source directory differs from build directory.
6697 2007-05-05 Robert Millan <rmh@aybabtu.com>
6699 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
6702 2007-05-05 Robert Millan <rmh@aybabtu.com>
6704 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
6706 2007-05-05 Robert Millan <rmh@aybabtu.com>
6708 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
6709 command-line arguments via ${GRUB_CMDLINE_LINUX}.
6711 2007-05-05 Robert Millan <rmh@aybabtu.com>
6713 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
6714 (grub_probe_SOURCES): Likewise.
6715 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
6716 GPT and initialize dos_part and bsd_part accordingly.
6717 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
6719 (main): Activate gpt module for use during partition identification,
6720 and deactivate it afterwards.
6721 * util/i386/pc/grub-install.in: Add gpt module to core.img.
6722 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
6723 partition identification, and deactivate it afterwards.
6725 2007-05-05 Robert Millan <rmh@aybabtu.com>
6727 * term/i386/pc/console.c (grub_console_fini): Call
6728 grub_term_set_current() before grub_term_unregister().
6730 2007-05-04 Robert Millan <rmh@aybabtu.com>
6732 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
6733 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
6734 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
6735 and update-grub_DATA.
6736 * conf/common.rmk: Build and install update-grub components.
6737 * conf/common.mk: Regenerate.
6738 * util/update-grub.in: New. Core of update-grub.
6739 * util/grub.d/00_header.in: New. Generates grub.cfg header.
6740 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
6741 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
6742 * util/grub.d/README: New. Document grub.d directory layout.
6744 2007-05-01 Robert Millan <rmh@aybabtu.com>
6746 * util/grub-emu.c: Move initialization functions
6747 grub_util_biosdisk_init() and grub_init_all() before
6748 grub_util_biosdisk_get_grub_dev(), which relies on them.
6750 2007-04-19 Robert Millan <rmh@aybabtu.com>
6752 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
6755 2007-04-18 Jerone Young <jerone@gmail.com>
6757 * kernel/elf.c: Add missing parenthesis for conditional statement
6760 2007-04-10 Jerone Young <jerone@gmail.com>
6762 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
6763 continue on and look for device node with real device name.
6765 2007-04-10 Jerone Young <jerone@gmail.com>
6767 * configure.ac: Add argument for autoconf to use transformation
6769 * Makefile.in: Add autoconf package transformation code.
6770 * util/i386/pc/grub-install.in: Likewise.
6771 * util/powerpc/ieee1275/grub-install.in: Likewise.
6773 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
6775 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
6776 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
6777 (EXT2_REVISION): Likewise.
6778 (EXT2_INODE_SIZE): Likewise.
6779 (struct grub_ext2_block_group): Added a missing member
6781 (grub_ext2_read_inode): Divide by the inode size in a superblock
6782 instead of 128 to obtain INODES_PER_BLOCK.
6783 Use the macro EXT2_INODE_SIZE instead of directly using
6786 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
6788 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
6789 superblock instead of the structure size to compute an
6790 offset. This fixes the problem that GRUB could not read a
6791 filesystem when inode size is different from 128-byte.
6793 2007-03-05 Marco Gerards <marco@gnu.org>
6795 * normal/main.c (read_config_file): When "menu" is not set, create
6798 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6800 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
6801 (HEAP_LIMIT): New macro.
6802 (grub_claim_heap): Claim memory up to `heaplimit'.
6804 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6806 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
6807 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
6809 (grub_arch_modules_addr): Return address after `_end'.
6810 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
6811 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
6812 (add_segments): Calculate `_end' from phdr size and location.
6813 (ALIGN_UP): Moved to ...
6814 * include/grub/misc.h: here.
6815 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6817 (GRUB_IEEE1275_MODULE_BASE): Removed.
6819 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6821 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
6824 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6826 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
6828 (grub_elf64_load_hook_t): Likewise.
6829 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
6832 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6834 * kern/mm.c: Update copyright.
6835 (grub_mm_debug): Correct syntax error.
6836 (grub_mm_dump_free): New function.
6837 (grub_debug_free): Call `grub_free'.
6838 * include/grub/mm.h: Update copyright.
6839 (grub_mm_dump_free): Add declaration.
6841 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6843 * include/grub/ieee1275/ieee1275.h: Update copyright.
6844 * kern/powerpc/ieee1275/init.c: Likewise.
6845 * kern/powerpc/ieee1275/openfw.c: Likewise.
6847 * loader/powerpc/ieee1275/linux.c: Likewise.
6848 * include/grub/elfload.h: Likewise.
6849 * kern/elf.c: Likewise.
6850 (grub_elf32_load): Pass `base' and `size' parameters. Update all
6852 (grub_elf64_load): Likewise.
6853 (grub_elf32_load_segment): Move to a nested function.
6854 (grub_elf64_load_segment): Likewise.
6856 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6858 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
6860 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
6861 (grub_heap_len): Likewise.
6862 (HEAP_SIZE): New macro.
6863 (grub_claim_heap): New function.
6864 (grub_machine_init): Don't claim heap directly. Call
6866 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
6867 (grub_available_iterate): New function.
6869 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
6871 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
6872 * configure.ac: Use it for testing the HOST and TARGET compilers.
6874 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
6876 * Makefile.in (enable_grub_emu): New variable.
6877 * configure.ac (--enable-grub-emu): New option.
6878 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
6879 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
6880 * conf/i386-pc.rmk: Likewise.
6881 * conf/powerpc-ieee1275.rmk: Likewise.
6882 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
6884 2006-12-12 Marco Gerards <marco@gnu.org>
6886 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
6888 * kern/env.c (grub_env_unset): Don't free the member `value' when
6889 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
6892 * normal/main.c (current_menu): Removed.
6893 (free_menu): Unset the `menu' environment variable.
6894 (grub_normal_menu_addentry): Make use of the environment variable
6895 `menu', instead of using the global `current_menu'. Allocate
6896 memory for the sourcecode of this entry.
6897 (read_config_file): New argument `nested', changed all callers.
6898 Only in the case of a new context, initialize a new menu. Set the
6899 `menu' environment variable.
6900 (grub_normal_execute): Don't set and unset the environment
6901 variable `menu' here anymore. Only free the menu when leaving the
6904 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
6907 2006-12-11 Marco Gerards <marco@gnu.org>
6909 * normal/menu_entry.c (run): Fix off by one bug so the last line
6910 is executed. Move the loader check to outside the loop.
6912 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
6914 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
6916 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
6918 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
6919 the number of sectors. Reported by Andrey Shuvikov
6920 <mr_hyro@yahoo.com>.
6922 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
6924 * kern/disk.c (grub_disk_read): When there is a read error, always
6925 try to read only the necessary data.
6927 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
6929 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
6931 [GRUB_UTIL] (grub_raid_fini): Likewise.
6932 [GRUB_UTIL] (grub_lvm_init): Likewise.
6933 [GRUB_UTIL] (grub_lvm_fini): Likewise.
6934 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
6935 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
6936 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
6937 and grub_raid_fini().
6939 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
6941 * include/grub/types.h (__unused): Rename to UNUSED.
6942 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
6943 (grub_elf64_size): Likewise.
6945 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6947 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
6948 grub_error_push and grub_error_pop in the error-handling path.
6949 (grub_elf32_load_segment): Only call grub_file_read with non-zero
6952 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6954 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
6955 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6956 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6957 (kernel_elf_SOURCES): Likewise.
6958 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
6959 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
6960 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6961 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6962 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
6963 (elf_mod_SOURCES): New variable.
6964 (elf_mod_CFLAGS): Likewise.
6965 (elf_mod_LDFLAGS): Likewise.
6966 * include/grub/types.h (__unused): New macro.
6967 * include/grub/elfload.h: New file.
6968 * kern/elf.c: Likewise.
6969 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
6970 (ELF32_LOADMASK): New macro.
6971 (ELF64_LOADMASK): Likewise.
6973 (grub_linux_load32): New function.
6974 (grub_linux_load64): Likewise.
6975 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
6976 Use grub_elf_t instead of grub_file_t.
6978 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
6980 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
6981 `catch_result' to struct set_color_args.
6983 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
6985 * normal/menu.c: Include grub/script.h.
6986 * normal/menu_entry.c: Likewise.
6987 * include/grub/normal.h: Do not include grub/script.h.
6989 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6991 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
6993 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6995 * kern/disk.c (grub_disk_open): Print debug messages when opening a
6997 (grub_disk_close): Print debug messages when closing a disk.
6998 (grub_disk_read): Print debug messages when disk read fails.
6999 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
7001 * kern/partition.c: Include misc.h.
7002 (grub_partition_iterate): Print debug messages when detecting
7005 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
7007 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
7009 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
7011 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
7013 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7014 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
7016 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
7018 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
7019 instead of sizeof(lv). Patch by Michael Guntsche.
7021 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
7023 * disk/lvm.c: Rename VGS to VG_LIST.
7024 (grub_lvm_iterate): Change VGS->LV to VG-LV.
7025 (grub_lvm_open): Likewise.
7026 Thanks to Michael Guntsche for finding this bug.
7028 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7030 * configure.ac (AC_INIT): Bumped to 1.95.
7032 2006-10-14 Robert Millan <rmh@aybabtu.com>
7034 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
7035 with "/dev/.static/dev/md".
7037 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7039 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
7040 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
7041 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
7042 DRIVE_NAME are always freed.
7044 * util/i386/pc/biosdisk.c (make_device_name): Add one into
7045 DOS_PART, as a DOS partition is counted from one instead of zero
7046 now. Reported by Robert Millan.
7048 2006-10-14 Robert Millan <rmh@aybabtu.com>
7050 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
7051 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
7052 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
7053 string returned by grub_guess_root_device.
7054 * util/i386/pc/grub-setup.c: Likewise.
7055 * util/i386/pc/grub-probefs.c: Likewise.
7057 * util/i386/pc/grub-probefs.c: Rename to ...
7058 * util/i386/pc/grub-probe.c: ... this.
7059 * DISTLIST: Remove grub-probefs, add grub-probe.
7060 * conf/i386-efi.rmk: Likewise.
7061 * conf/i386-pc.rmk: Likewise.
7062 * util/i386/pc/grub-install.in: Likewise.
7064 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
7065 choose which information we want to print.
7067 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
7069 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
7070 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
7071 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
7072 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
7073 video/readers/tga.c and video/i386/pc/vbeutil.c.
7075 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
7077 Added support for RAID and LVM.
7079 * disk/lvm.c: New file.
7080 * disk/raid.c: Likewise.
7081 * include/grub/lvm.h: Likewise.
7082 * include/grub/raid.h: Likewise.
7083 * include/grub/util/lvm.h: Likewise.
7084 * include/grub/util/raid.h: Likewise.
7085 * util/lvm.c: Likewise.
7086 * util/raid.c: Likewise.
7088 * include/grub/disk.h (grub_disk_dev_id): Add
7089 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
7090 (grub_disk_get_size): New prototype.
7091 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
7092 returns a partition.
7093 (grub_disk_get_size): New function.
7095 * kern/i386/pc/init.c (make_install_device): Copy the prefix
7096 verbatim if grub_install_dos_part is -2.
7098 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
7101 * util/i386/pc/grub-setup.c (setup): New argument
7102 MUST_EMBED. Force embedding of GRUB when the argument is
7103 true. Close FILE before returning.
7104 (main): Add support for RAID and LVM.
7106 * conf/common.rmk: Add RAID and LVM modules.
7107 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
7109 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
7111 * kern/misc.c (grub_strstr): New function.
7112 * include/grub/misc.h (grub_strstr): New prototype.
7114 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
7116 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
7118 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
7120 * kern/misc.c (grub_strtoull): Guess the base only if not
7123 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7125 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
7128 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7130 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
7132 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
7133 Remove `flags' argument. All callers changed.
7134 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
7135 (IEEE1275_IHANDLE_INVALID): New variable.
7136 (IEEE1275_CELL_INVALID): New variable.
7137 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
7138 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
7139 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
7140 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
7141 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
7142 codes from Open Firmware. All callers updated.
7143 (grub_ieee1275_next_property): Directly return Open Firmware return
7145 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7146 Standardize error checking from `grub_ieee1275_get_property'.
7147 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
7148 `devalias' to `aliases'. Correct comments. Consolidate error paths.
7150 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
7152 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
7153 `instance_to_package_args' to `instance_to_path_args'.
7155 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
7156 `grub_ieee1275_chosen'.
7158 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
7159 `grub_ieee1275_interpret'.
7161 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7163 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
7165 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
7167 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
7168 (__cmpdi): Likewise.
7170 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
7171 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
7174 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
7176 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
7177 to type `grub_ssize_t'.
7178 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
7180 2006-09-22 Marco Gerards <marco@gnu.org>
7182 * normal/script.c (grub_script_create_cmdmenu): Skip leading
7185 2006-09-22 Marco Gerards <marco@gnu.org>
7187 * commands/echo.c: New file.
7189 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
7191 * conf/common.rmk (echo_mod_SOURCES): New variable.
7192 (echo_mod_CFLAGS): Likewise.
7193 (echo_mod_LDFLAGS): Likewise.
7195 2006-09-22 Marco Gerards <marco@gnu.org>
7197 * normal/main.c (get_line): Malloc memory instead of using
7198 preallocated memory. Removed the arguments `cmdline' and
7199 `max_len'. Updated all callers.
7201 2006-09-22 Marco Gerards <marco@gnu.org>
7203 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
7204 (normal_mod_DEPENDENCIES): Likewise.
7206 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
7207 (normal_mod_DEPENDENCIES): Likewise.
7209 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
7211 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
7213 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
7215 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
7216 (normal_mod_DEPENDENCIES): Likewise.
7217 * conf/i386-pc.mk: Regenerate.
7218 * conf/i386-efi.mk: Likewise
7219 * conf/common.mk: Likewise.
7220 * conf/powerpc-ieee1275.mk: Likewise.
7221 * conf/sparc64-ieee1275.mk: Likewise.
7223 2006-09-22 Robert Millan <rmh@aybabtu.com>
7225 Sync with i386 version.
7226 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
7227 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
7229 2006-09-21 Robert Millan <rmh@aybabtu.com>
7231 Import from GRUB Legacy (lib/device.c):
7232 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
7233 (init_device_map) [__linux__]: Add support for I2O devices.
7235 2006-09-14 Marco Gerards <marco@gnu.org>
7237 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
7240 2006-09-14 Robert Millan <rmh@aybabtu.com>
7242 * util/i386/pc/grub-install.in: Skip menu.lst when removing
7245 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
7247 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
7248 before adding it to device.map.
7250 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
7252 * genmk.rb: Let GCC generate dependencies the first time it
7253 compiles a file; using the -MD option.
7254 * conf/common.mk: Regenerate.
7255 * conf/i386-pc.mk: Likewise.
7256 * conf/i386-efi.mk: Likewise.
7257 * conf/powerpc-ieee1275.mk: Likewise.
7258 * conf/sparc64-ieee1275.mk: Likewise.
7260 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
7262 Move the prototypes of grub_setjmp and grub_longjmp to
7263 cpu/setjmp.h, so that each architecture may specify different
7266 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
7267 (grub_longjmp): Likewise.
7268 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
7269 (grub_longjmp): Likewise.
7270 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
7271 (grub_longjmp): Likewise.
7273 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
7274 [!GRUB_UTIL] (grub_longjmp): Removed.
7276 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
7278 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
7279 "color!" method does not return any value.
7281 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7283 * include/grub/bitmap.h: New file.
7285 * include/grub/i386/pc/vbeutil.h: Likewise.
7287 * video/bitmap.c: Likewise.
7289 * video/readers/tga.c: Likewise.
7291 * video/i386/pc/vbeutil.c: Likewise.
7293 * commands/videotest.c: Code cleanup and updated to reflect to new
7296 * term/gfxterm.c: Likewise.
7298 * video/video.c: Likewise.
7300 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
7301 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
7302 (bitmap_mod_SOURCES): New entry.
7303 (bitmap_mod_CFLAGS): Likewise.
7304 (bitmap_mod_LDFLAGS): Likewise.
7305 (tga_mod_SOURCES): Likewise.
7306 (tga_mod_CFLAGS): Likewise.
7307 (tga_mod_LDFLAGS): Likewise.
7309 * include/grub/video.h (grub_video_blit_operators): New enum type.
7310 (grub_video_render_target): Changed as forward declaration and moved
7311 actual definition to be video driver specific.
7312 (grub_video_adapter.blit_bitmap): Added blitting operator.
7313 (grub_video_adapter.blit_render_target): Likewise.
7314 (grub_video_blit_bitmap): Likewise.
7315 (grub_video_blit_render_target): Likewise.
7317 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
7318 driver specific render target definition.
7319 (grub_video_vbe_map_rgba): Added driver internal helper.
7320 (grub_video_vbe_unmap_color): Updated to use
7321 grub_video_i386_vbeblit_info.
7322 (grub_video_vbe_get_video_ptr): Likewise.
7324 * include/grub/i386/pc/vbeblit.h
7325 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
7326 grub_video_i386_vbeblit_info.
7327 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
7328 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
7329 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7330 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7331 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7332 (grub_video_i386_vbeblit_index_index): Likewise.
7333 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
7334 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7335 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7336 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
7338 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
7341 * video/i386/pc/vbeblit.c: Updated to reflect changes on
7342 include/grub/i386/pc/vbeblit.h.
7344 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
7345 Updated to use grub_video_i386_vbeblit_info.
7346 (grub_video_i386_vbefill_R8G8B8): Likewise.
7347 (grub_video_i386_vbefill_index): Likewise.
7348 (grub_video_i386_vbefill): Added generic filler.
7350 * video/i386/pc/vbefill.c: Updated to reflect changes on
7351 include/grub/i386/pc/vbefill.h.
7353 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
7354 grub_video_i386_vbeblit_info.
7355 (grub_video_vbe_unmap_color): Likewise.
7356 (grub_video_vbe_blit_glyph): Likewise.
7357 (grub_video_vbe_scroll): Likewise.
7358 (grub_video_vbe_draw_pixel): Removed function.
7359 (grub_video_vbe_get_pixel): Likewise.
7360 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
7361 updated code to use it.
7362 (common_blitter): Added common blitter for render target and bitmap.
7363 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
7364 (grub_video_vbe_blit_render_target): Likewise.
7366 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
7368 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
7369 is in text mode if there is no console control protocol instance
7372 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7374 * include/grub/video.h: Code cleanup.
7376 * include/grub/i386/pc/vbe.h: Likewise.
7378 * video/i386/pc/vbe.c: Likewise.
7380 * video/i386/pc/vbeblit.c: Likewise.
7382 * video/i386/pc/vbefill.c: Likewise.
7384 * video/video.c: Likewise. Also added more comments.
7386 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7388 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
7389 (struct grub_biosdisk_dap): Likewise.
7391 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
7392 linkage settings for all functions.
7394 2006-07-12 Marco Gerards <marco@gnu.org>
7396 * configure.ac (--enable-mm-debug): Fix typo.
7398 * genkernsyms.sh.in: Use proper quoting for `CC'.
7400 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
7402 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
7403 (normal_mod_ASFLAGS): Remove "-m32".
7405 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
7407 * util/misc.c: Include config.h.
7408 [!HAVE_MEMALIGN]: Do not include malloc.h.
7409 (grub_memalign): Use posix_memalign, if present. Then, use
7410 memalign, if present. Otherwise, emit an error.
7412 * util/grub-emu.c: Do not include malloc.h.
7414 * include/grub/util/misc.h: Include unistd.h. This is required for
7415 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
7416 D. Eades III <hde@foobar-qux.org>.
7418 * configure.ac (AC_GNU_SOURCE): Added.
7419 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
7422 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
7424 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
7425 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
7427 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
7429 * include/grub/types.h (grub_host_addr_t): Rename to
7431 (grub_host_off_t): Rename to grub_target_off_t.
7432 (grub_host_size_t): Rename to grub_target_size_t.
7433 (grub_host_ssize_t): Rename to grub_target_ssize_t.
7434 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
7436 * include/grub/kernel.h (struct grub_module_header): Change type
7437 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
7438 (grub_module_info): Likewise.
7440 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7442 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
7443 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
7444 Velazquez <jesus.velazquez@gmail.com>.
7446 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7448 Count partitions from 1 instead of 0 in the string representation
7449 of partitions. Still use 0-based internally.
7451 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
7452 (sun_partition_map_iterate): Use grub_partition_t instead of
7453 struct grub_partition *. Cast DESC->START_CYLINDER to
7454 grub_uint64_t after converting the endian.
7455 (sun_partition_map_probe): Subtract 1 for PARTNUM.
7456 (sun_partition_map_get_name): Add 1 to P->INDEX.
7458 * partmap/pc.c (grub_partition_parse): Subtract 1 for
7460 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
7462 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
7463 zero instead of one.
7464 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
7465 (gpt_partition_map_get_name): Add 1 into P->INDEX.
7467 * partmap/apple.c (apple_partition_map_iterate): Change the type
7469 (apple_partition_map_probe): Subtract 1 for PARTNUM.
7470 (apple_partition_map_get_name): Add 1 into P->INDEX.
7472 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
7474 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
7475 calculate the offset of a partition.
7476 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
7477 (amiga_partition_map_get_name): Add 1 into P->INDEX.
7479 * partmap/acorn.c (acorn_partition_map_find): Change the type of
7480 SECTOR to grub_disk_addr_t.
7481 (acorn_partition_map_iterate): Likewise.
7482 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
7483 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
7485 (acorn_partition_map_get_name): Add 1 into P->INDEX.
7487 * kern/i386/pc/init.c (make_install_device): Add 1 into
7488 GRUB_INSTALL_DOS_PART.
7490 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
7493 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7495 Clean up the code to support 64-bit addressing in disks and
7496 files. This change is not enough for filesystems yet.
7498 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
7499 type of "start" to grub_uint64_t.
7500 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
7501 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
7502 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
7505 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
7506 to grub_disk_addr_t.
7508 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
7511 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7513 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
7516 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
7518 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
7520 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
7522 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
7523 to grub_off_t, to detect an error from grub_file_seek.
7524 (grub_multiboot_load_elf32): Likewise.
7526 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
7527 maximum unsigned long value when an overflow is detected.
7528 (grub_strtoull): New function.
7529 (grub_divmod64): Likewise.
7530 (grub_lltoa): use grub_divmod64.
7532 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
7534 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
7535 the pointer to next character. Use grub_strtoull instead of
7537 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
7538 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
7541 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
7542 return value is signed.
7543 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
7544 test if OFFSET is less than zero, as OFFSET is unsigned now.
7546 * kern/disk.c (struct grub_disk_cache): Change the type of
7547 "sector" to grub_disk_addr_t.
7548 (grub_disk_cache_get_index): Change the type of SECTOR to
7549 grub_disk_addr_t. Calculate the hash with SECTOR casted to
7550 unsigned after shifting.
7551 (grub_disk_cache_invalidate): Change the type of SECTOR to
7553 (grub_disk_cache_unlock): Likewise.
7554 (grub_disk_cache_store): Likewise.
7555 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
7556 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
7557 grub_disk_addr_t and grub_uint64_t, respectively.
7558 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
7559 body, as the value of OFFSET is tweaked by
7560 grub_disk_check_range. Change the types of START_SECTOR, LEN and
7561 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
7563 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
7564 body, as the value of OFFSET is tweaked by
7565 grub_disk_check_range. Change the types of LEN and N to
7568 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
7569 and "saved_offset" to grub_off_t.
7570 (test_header): Cast BUF to char *.
7571 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
7573 (grub_gzio_read): Change the types of OFFSET and SIZE to
7574 grub_off_t and grub_size_t, respectively.
7576 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
7578 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
7579 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
7580 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
7581 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
7582 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
7584 * include/grub/types.h (grub_off_t): Unconditionally set to
7586 (grub_disk_addr_t): Changed to grub_uint64_t.
7588 * include/grub/partition.h (struct grub_partition): Change the
7589 types of "start", "len" and "offset" to grub_disk_addr_t,
7590 grub_uint64_t and grub_disk_addr_t, respectively.
7591 (grub_partition_get_start): Return grub_disk_addr_t.
7592 (grub_partition_get_len): Return grub_uint64_t.
7594 * include/grub/misc.h (grub_strtoull): New prototype.
7595 (grub_divmod64): Likewise.
7597 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
7598 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
7599 grub_off_t, respectively.
7600 All callers and references changed.
7602 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
7603 grub_size_t in "read".
7604 All callers and references changed.
7606 * include/grub/file.h (struct grub_file): Change the types of
7607 "offset" and "size" to grub_off_t and grub_off_t,
7608 respectively. Change the type of SECTOR to grub_disk_addr_t in
7610 (grub_file_read): Change the type of LEN to grub_size_t.
7611 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
7613 (grub_file_size): Return grub_off_t.
7614 (grub_file_tell): Likewise.
7615 All callers and references changed.
7617 * include/grub/disk.h (struct grub_disk_dev): Change the types of
7618 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
7620 (struct grub_disk): Change the type of "total_sectors" to
7621 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
7623 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
7624 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
7625 (grub_disk_write): Likewise.
7626 All callers and references changed.
7628 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
7629 char * for grub_strncmp to silence gcc.
7630 (grub_iso9660_mount): Likewise.
7631 (grub_iso9660_mount): Likewise.
7632 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
7634 (grub_iso9660_iterate_dir): Likewise.
7635 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
7637 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
7638 LEN to grub_disk_addr_t and grub_size_t, respectively.
7640 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7642 * fs/jfs.c (grub_jfs_read_file): Likewise.
7644 * fs/minix.c (grub_jfs_read_file): Likewise.
7646 * fs/sfs.c (grub_jfs_read_file): Likewise.
7648 * fs/ufs.c (grub_jfs_read_file): Likewise.
7650 * fs/xfs.c (grub_jfs_read_file): Likewise.
7652 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
7653 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
7656 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
7657 BLKNR to -1 instead of returning GRUB_ERRNO.
7658 (grub_ext2_read_file): Change the types of SECTOR and
7659 LEN to grub_disk_addr_t and grub_size_t, respectively.
7661 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
7662 LEN to grub_disk_addr_t and grub_size_t, respectively.
7664 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
7667 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
7668 string. Do not cast SECTOR explicitly.
7670 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
7671 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
7672 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
7673 grub_disk_addr_t and grub_size_t, respectively. If the sector is
7674 over 2TB and LBA mode is not supported, raise an error.
7675 (get_safe_sectors): New function.
7676 (grub_biosdisk_read): Use get_safe_sectors.
7677 (grub_biosdisk_write): Likewise.
7679 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
7680 (grub_efidisk_write): Likewise.
7682 * disk/loopback.c (delete_loopback): Cosmetic changes.
7683 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
7685 (grub_loopback_open): Likewise.
7686 (grub_loopback_read): Likewise. Also, change the type of POS to
7687 grub_off_t, and fix the usage of grub_memset.
7689 * commands/i386/pc/play.c: Include grub/machine/time.h.
7691 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
7694 * commands/configfile.c: Include grub/env.h.
7696 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
7697 GRUB_ERRNO directly instead. Change the type of POS to
7698 grub_off_t. Follow the coding standard.
7700 * commands/blocklist.c: Include grub/partition.h.
7701 (grub_cmd_blocklist): Return an error if the underlying device is
7702 not a disk. Take the starting sector of a partition into account,
7703 if a partition is used.
7705 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
7707 (lba_mode): Support 64-bit addresses.
7708 (chs_mode): Likewise.
7709 (copy_buffer): Adapted to the new offsets of a length field and a
7711 (blocklist_default_start): Allocate 64-bit space.
7713 * boot/i386/pc/boot.S (force_lba): Removed.
7714 (boot_drive): Moved to under KERNEL_SECTOR.
7715 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
7717 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
7719 (lba_mode): Refactored to support a 64-bit address. More size
7721 (setup_sectors): Likewise.
7723 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7725 * DISTLIST: Added include/grub/i386/linux.h. Removed
7726 include/grub/i386/pc/linux.h
7728 * configure.ac (AC_INIT): Bumped to 1.94.
7730 * config.guess: Updated from gnulib.
7731 * config.sub: Likewise.
7732 * install-sh: Likewise.
7733 * mkinstalldirs: Likewise.
7735 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7737 * conf/common.rmk (grub_modules_init.lst): Depended on
7738 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
7741 * genmk.rb (PModule::rule): Reverted the previous change.
7743 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7745 * conf/common.rmk (grub_modules_init.lst): Depends on
7746 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
7747 that the target does not exist before producing.
7748 (grub_modules_init.h): Remove the target before generating.
7749 (grub_emu_init.c): Likewise.
7751 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
7753 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
7755 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
7756 for the target-specific tests. Make sure that we also have the
7757 up-to-date target variables for those tests.
7759 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7761 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
7762 (PModule::rule): Likewise.
7764 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7766 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
7767 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
7768 target-specific flags should be prefixed.
7769 (PModule::rule): Likewise.
7771 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
7773 * configure.ac (CMP): Check if cmp is available explicitly.
7775 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
7777 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
7778 (target_cpu): New variable.
7779 (pkglibdir): Use target_cpu instead of host_cpu.
7781 * util/i386/pc/grub-install.in (host_cpu): Removed.
7782 (target_cpu): New variable.
7783 (pkglibdir): Use target_cpu instead of host_cpu.
7785 * util/genmoddep.c: Removed.
7787 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
7788 instead of GRUB_HOST_SIZEOF_VOID_P.
7789 * kern/dl.c: Likewise.
7791 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
7793 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7794 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7795 (GRUB_TARGET_SIZEOF_LONG): ... this.
7796 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7797 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7798 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7800 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7801 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7802 (GRUB_TARGET_SIZEOF_LONG): ... this.
7803 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7804 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7805 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7807 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7808 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7809 (GRUB_TARGET_SIZEOF_LONG): ... this.
7810 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7811 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7813 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
7814 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
7815 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
7816 instead of GRUB_HOST_SIZEOF_LONG.
7817 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
7818 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
7819 GRUB_CPU_WORDS_BIGENDIAN.
7820 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
7821 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
7824 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
7825 (genmoddep_SOURCES): Likewise.
7826 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
7827 (genmoddep_SOURCES): Likewise.
7828 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
7829 (genmoddep_SOURCES): Likewise.
7830 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
7832 (genmoddep_SOURCES): Likewise.
7834 * genmoddep.awk: New file.
7836 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
7837 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
7838 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
7839 (PModule::rule): Likewise.
7840 (Program::rule): Likewise.
7841 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
7842 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
7845 * configure.ac: Rewritten intensively to use host and target
7846 instead of build and host, respectively.
7848 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
7849 (host_cpu): Removed.
7850 (target_cpu): New variable.
7851 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
7852 (BUILD_CC): Removed.
7853 (BUILD_CFLAGS): Likewise.
7854 (BUILD_CPPFLAGS): Likewise.
7855 (TARGET_CC): New variable.
7856 (TARGET_CFLAGS): Likewise.
7857 (TARGET_CPPFLAGS): Likewise.
7858 (TARGET_LDFLAGS): Likewise.
7860 (include): Use target_cpu instead of host_cpu.
7861 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
7863 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
7865 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
7867 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
7868 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
7869 field 'false' to 'exec_on_false'.
7870 (grub_script_create_cmdif): Renamed argument names to reflect above
7873 * normal/execute.c (grub_script_execute_cmdif): Likewise.
7875 * normal/script.c (grub_script_create_cmdif): Likewise.
7877 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
7879 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
7881 (grub_hfsplus_btree_recptr): Likewise.
7882 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
7883 FILEBLOCK both to pass a block number and store next block
7885 (grub_hfsplus_read_block): Rewritten heavily to support an extent
7886 overflow file correctly. Specify errors appropriately, because
7887 fshelp expects that GRUB_ERRNO is set when fails. Reuse
7888 grub_hfsplus_btree_recptr to get the pointer to a found key.
7889 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
7892 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
7894 (_linux_mod_SOURCES): New variable.
7895 (_linux_mod_CFLAGS): Likewise.
7896 (_linux_mod_LDFLAGS): Likewise.
7897 (linux_mod_SOURCES): Likewise.
7898 (linux_mod_CFLAGS): Likewise.
7899 (linux_mod_LDFLAGS): Likewise.
7901 * DISTLIST: Added loader/i386/efi/linux.c,
7902 loader/i386/efi/linux_normal.c and
7903 include/grub/i386/efi/loader.h.
7905 * loader/i386/efi/linux.c: New file.
7906 * loader/i386/efi/linux_normal.c: Likewise.
7907 * include/grub/i386/efi/loader.h: Likewise.
7909 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
7911 * commands/blocklist.c: New file.
7913 * DISTLIST: Added commands/blocklist.c.
7915 * term/efi/console.c (grub_console_highlight_color): Use a lighter
7916 color for the background, and a darker color for the foreground.
7917 (grub_console_checkkey): Return READ_KEY.
7918 (grub_console_cls): Set the background to
7919 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
7921 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
7923 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
7924 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
7926 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
7929 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
7930 BG. The spec is wrong again.
7932 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
7934 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
7936 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7937 commands/blocklist.c.
7938 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7940 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
7941 (blocklist_mod_SOURCES): New variable.
7942 (blocklist_mod_CFLAGS): Likewise.
7943 (blocklist_mod_LDFLAGS): Likewise.
7945 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
7947 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
7949 (lba_mode): Use %eax more intensively to reduce the code size.
7951 2006-05-20 Marco Gerards <marco@gnu.org>
7953 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
7955 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
7957 (script): Accept leading newlines.
7958 (newlines): New rule to describe 0 or more newlines.
7959 (commands): Accept `command' with trailing newline. Fixed the
7960 order in which arguments were passed to `grub_script_add_cmd'.
7961 Accept commands separated by newlines.
7962 (function): Changed to accept newlines.
7963 (menuentry) Rewritten.
7965 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
7966 front of the list, instead of to the end.
7968 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
7970 * util/i386/pc/grub-install.in (bindir): New variable.
7971 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
7972 Shaver <lbgwjl@gmail.com>.
7974 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
7976 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
7977 grub/machine/linux.h
7978 * loader/i386/pc/linux.c: Likewise.
7980 * include/grub/i386/pc/linux.h: Moved to ...
7981 * include/grub/i386/linux.h: ... here.
7983 * include/grub/i386/linux.h (struct linux_kernel_params): New
7986 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
7988 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
7990 (grub_video_vbe_blit_glyph): Likewise.
7991 (grub_video_vbe_blit_bitmap): Likewise.
7992 (grub_video_vbe_blit_render_target): Likewise.
7994 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
7996 * configure.ac (--with-platform): Properly quote the square
7999 2006-05-08 Marco Gerards <marco@gnu.org>
8001 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
8003 (kernel_elf_HEADERS): ...to this. Updated all users.
8004 (grubof_symlist.c): Renamed from this...
8005 (kernel_elf_symlist.c): ...to this. Updated all users.
8006 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8007 (grubof_SOURCES): Renamed from this...
8008 (kernel_elf_SOURCES): ...to this.
8009 (grubof_HEADERS): Renamed from this...
8010 (kernel_elf_HEADERS): ...to this.
8011 (grubof_CFLAGS): Renamed from this...
8012 (kernel_elf_CFLAGS): ...to this.
8013 (grubof_ASFLAGS): Renamed from this...
8014 (kernel_elf_ASFLAGS): ...to this.
8015 (grubof_LDFLAGS): Renamed from this...
8016 (kernel_elf_LDFLAGS): ...to this.
8018 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
8020 (kernel_elf_HEADERS): ...to this. Updated all users.
8021 (grubof_symlist.c): Renamed from this...
8022 (kernel_elf_symlist.c): ...to this. Updated all users.
8023 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
8024 (grubof_SOURCES): Renamed from this...
8025 (kernel_elf_SOURCES): ...to this.
8026 (grubof_HEADERS): Renamed from this...
8027 (kernel_elf_HEADERS): ...to this.
8028 (grubof_CFLAGS): Renamed from this...
8029 (kernel_elf_CFLAGS): ...to this.
8030 (grubof_ASFLAGS): Renamed from this...
8031 (kernel_elf_ASFLAGS): ...to this.
8032 (grubof_LDFLAGS): Renamed from this...
8033 (kernel_elf_LDFLAGS): ...to this.
8035 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
8036 `kernel.elf' instead of `grubof'.
8038 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
8040 Add --with-platform to configure. Use pkglibdir instead of
8041 pkgdatadir. This is reported by Roger Leigh.
8043 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
8044 (host_vendor): Likewise.
8045 (host_os): Likewise.
8046 (pkgdatadir): Likewise.
8047 (platform): New variable.
8048 (pkglibdir): Likewise.
8049 Use PKGLIBDIR instead of PKGDATADIR.
8051 * util/i386/pc/grub-install.in (datadir): Removed.
8052 (host_vendor): Likewise.
8053 (host_os): Likewise.
8054 (pkgdatadir): Likewise.
8055 (platform): New variable.
8056 (pkglibdir): Likewise.
8057 Use PKGLIBDIR instead of PKGDATADIR.
8059 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
8060 instead of GRUB_DATADIR.
8062 * util/i386/pc/grub-mkimage.c (usage): Likewise.
8064 * util/i386/efi/grub-mkimage.c (usage): Likewise.
8067 * configure.ac (--with-platform): New option.
8068 Use PLATFORM instead of HOST_VENDOR to specify a platform.
8070 * Makefile.in: Include a makefile based on PLATFORM instead of
8072 (pkgdatadir): Not appended by the machine type.
8073 (pkglibdir): Appended by the machine type.
8074 (host_vendor): Removed.
8075 (platform): New variable.
8076 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
8077 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
8078 (uninstall): Likewise.
8080 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
8082 Use the environment context in the menu. Remove the commands
8083 "default" and "timeout", and use variables instead.
8085 * normal/menu.c: Include grub/env.h.
8086 (print_entry): Cast TITLE to silence gcc.
8087 (get_timeout): New function.
8088 (set_timeout): Likewise.
8089 (get_entry_number): Likewise.
8090 (run_menu): Use a default entry, a fallback entry and a timeout
8091 in the environment variables "default", "fallback" and
8092 "timeout". Also, tweak the default entry if it is not within the
8093 current menu entries.
8094 (grub_menu_run): Use a fallback entry in the environment variable
8097 * normal/main.c (read_config_file): Do not initialize
8098 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
8100 (grub_normal_execute): Use a data slot to store the menu.
8102 * include/grub/normal.h (struct grub_menu): Removed default_entry,
8103 fallback_entry and timeout.
8104 (struct grub_menu_list): Removed.
8105 (grub_menu_list_t): Likewise.
8106 (struct grub_context): Likewise.
8107 (grub_context_t): Likewise.
8108 (grub_context_get): Likewise.
8109 (grub_context_get_current_menu): Likewise.
8110 (grub_context_push_menu): Likewise.
8111 (grub_context_pop_menu): Likewise.
8112 (grub_default_init): Likewise.
8113 (grub_default_fini): Likewise.
8114 (grub_timeout_init): Likewise.
8115 (grub_timeout_fini): Likewise.
8117 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
8119 (normal_mod_SOURCES): Removed normal/context.c.
8121 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
8122 commands/default.c, commands/timeout.c and normal/context.c.
8123 (normal_mod_SOURCES): Removed normal/context.c.
8125 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
8126 commands/timeout.c and normal/context.c.
8127 (normal_mod_SOURCES): Removed normal/context.c.
8129 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
8130 commands/default.c, commands/timeout.c and normal/context.c.
8131 (normal_mod_SOURCES): Removed normal/context.c.
8133 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
8135 (default_mod_SOURCES): Removed.
8136 (default_mod_CFLAGS): Likewise.
8137 (default_mod_LDFLAGS): Likewise.
8138 (timeout_mod_SOURCES): Removed.
8139 (timeout_mod_CFLAGS): Likewise.
8140 (timeout_mod_LDFLAGS): Likewise.
8142 * DISTLIST: Removed commands/default.c, commands/timeout.c and
8145 * commands/default.c: Removed.
8146 * commands/timeout.c: Likewise.
8147 * normal/context.c: Likewise.
8149 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
8151 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
8153 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
8155 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
8156 "next" to "prev" for readability.
8157 (struct grub_env_sorted_var): New struct.
8158 (grub_env_context): Renamed to ...
8159 (initial_context): ... this.
8160 (grub_env_var_context): Renamed to ...
8161 (current_context): ... this.
8162 (grub_env_find): Look only at CURRENT_CONTEXT.
8163 (grub_env_context_open): Rewritten to copy exported variables from
8165 (grub_env_context_close): Rewritten according to the new
8166 scheme. Also, add an assertion to prevent the initial context from
8168 (grub_env_insert): Removed the code for the sorted list.
8169 (grub_env_remove): Likewise.
8170 (grub_env_export): Simply mark the variable with
8171 GRUB_ENV_VAR_GLOBAL.
8172 (grub_env_set): A cosmetic change for naming consistency.
8173 (grub_env_get): Likewise.
8174 (grub_env_unset): Likewise.
8175 (grub_env_iterate): Rewritten to sort variables within this
8177 (grub_register_variable_hook): Fixed for naming consistency. Call
8178 grub_env_find again, only if NAME is not found at the first time.
8179 (mangle_data_slot_name): New function.
8180 (grub_env_set_data_slot): Likewise.
8181 (grub_env_get_data_slot): Likewise.
8182 (grub_env_unset_data_slot): Likewise.
8184 * include/grub/env.h (grub_env_var_type): New enum.
8185 (GRUB_ENV_VAR_LOCAL): New constant.
8186 (GRUB_ENV_VAR_GLOBAL): Likewise.
8187 (GRUB_ENV_VAR_DATA): Likewise.
8188 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
8190 (grub_env_set): Replace VAR with NAME for consistency.
8191 (grub_register_variable_hook): Likewise.
8192 (grub_env_export): Specify the name of the argument.
8193 (grub_env_set_data_slot): New prototype.
8194 (grub_env_get_data_slot): Likewise.
8195 (grub_env_unset_data_slot): Likewise.
8197 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8199 Extend the loader so that GRUB can accept a loader which comes
8200 back to GRUB when a loaded image exits. Also, this change adds
8201 support for a chainloader on EFI.
8203 * term/efi/console.c: Include grub/misc.h.
8204 (grub_console_checkkey): Display a scan code on the top for
8205 debugging. This will be removed once the EFI port gets stable.
8206 Correct the scan code mapping.
8208 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
8209 allocate memory from larger regions, in order to reduce the number
8210 of allocated regions. Otherwise, the MacOSX loader panics.
8211 (filter_memory_map): Avoid less than 1MB for compatibility with
8213 (add_memory_regions): Allocate from the tail of a region, if
8214 possible, to avoid allocating a region near to 1MB, for the MacOSX
8217 * kern/efi/init.c (grub_efi_set_prefix): Specify
8218 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
8220 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
8221 argument IMAGE_HANDLE and specify it to get a loaded image.
8222 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
8223 grub_efi_get_loaded_image.
8224 (grub_efi_get_filename): Divide the length by the size of
8226 (grub_efi_get_device_path): New function.
8227 (grub_efi_print_device_path): Print End Device Path nodes. Divide
8228 the length by the size of grub_efi_char16_t for a file path device
8231 * kern/loader.c (grub_loader_noreturn): New variable.
8232 (grub_loader_set): Accept a new argument NORETURN. Set
8233 GRUB_LOADER_NORETURN to NORETURN.
8234 All callers changed.
8235 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
8238 * include/grub/efi/efi.h (grub_efi_get_device_path): New
8240 (grub_efi_get_loaded_image): Take an argument to specify an image
8243 * include/grub/loader.h (grub_loader_set): Added one more argument
8246 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
8247 instead of grub_efi_open_protocol.
8248 (grub_efidisk_get_device_name): Likewise.
8249 (grub_efidisk_close): Print a newline.
8250 (grub_efidisk_get_device_handle): Fixed to use
8251 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
8252 GRUB_EFI_DEVICE_PATH_TYPE.
8254 * disk/efi/efidisk.c (device_path_guid): Moved to ...
8255 * kern/efi/efi.c (device_path_guid): ... here.
8257 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
8259 (kernel_mod_HEADERS): Added efi/disk.h.
8260 (_chain_mod_SOURCES): New variable.
8261 (_chain_mod_CFLAGS): Likewise.
8262 (_chain_mod_LDFLAGS): Likewise.
8263 (chain_mod_SOURCES): Likewise.
8264 (chain_mod_CFLAGS): Likewise.
8265 (chain_mod_LDFLAGS): Likewise.
8267 * DISTLIST: Added include/grub/efi/chainloader.h,
8268 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
8270 * include/grub/efi/chainloader.h: New file.
8271 * loader/efi/chainloader.c: Likewise.
8272 * loader/efi/chainloader_normal.c: Likewise.
8274 2006-04-30 Marco Gerards <marco@gnu.org>
8276 * commands/configfile.c (grub_cmd_source): New function.
8277 (GRUB_MOD_INIT): Register the commands `source' and `.'.
8278 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
8280 2006-04-30 Marco Gerards <marco@gnu.org>
8282 * normal/execute.c (grub_script_execute_cmd): Change the return
8283 type to `grub_err_t'. Correctly return the error.
8284 (grub_script_execute_cmdline): In case a command line is not a
8285 command or a function, try to interpret it as an assignment.
8287 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
8289 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
8290 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
8291 skip a node whose name is obviously invalid as UTF-16,
8292 i.e. contains a NUL character. Stop the iteration when the last
8293 directory entry is found. Instead of using the return value of
8294 grub_hfsplus_btree_iterate_node, store the value in RET and use
8295 it, because the iterator can be stopped by the last directory
8298 2006-04-30 Marco Gerards <marco@gnu.org>
8300 * include/grub/env.h (grub_env_export): New prototype. Reported
8301 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
8303 2006-04-30 Marco Gerards <marco@gnu.org>
8305 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
8306 size of the extents in a catalog file record.
8308 2006-04-29 Marco Gerards <marco@gnu.org>
8310 * commands/configfile.c (grub_cmd_configfile): Execute the
8311 configfile within its own context.
8313 * include/grub/env.h (grub_env_context_open): New prototype.
8314 (grub_env_context_close): Likewise.
8316 * kern/env.c (grub_env): Removed.
8317 (grub_env_sorted): Likewise.
8318 (grub_env_context): New variable.
8319 (grub_env_var_context): Likewise.
8320 (grub_env_find): Search both the active context and the global
8322 (grub_env_context_open): New function.
8323 (grub_env_context_close): Likewise.
8324 (grub_env_insert): Likewise.
8325 (grub_env_remove): Likewise.
8326 (grub_env_export): Likewise.
8327 (grub_env_set): Changed to use helper functions to avoid code
8329 (grub_env_iterate): Rewritten so both the current context and the
8330 global context are being used.
8332 * normal/command.c (export_command): New function.
8333 (grub_command_init): Register the `export' function.
8335 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
8337 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
8338 explicitly to suppress gcc's warnings.
8339 * fs/fat.c (grub_fat_find_dir): Likewise.
8340 (grub_fat_label): Likewise.
8341 * fs/xfs.c (grub_xfs_read_inode): Likewise.
8342 (grub_xfs_mount): Likewise.
8343 (grub_xfs_label): Likewise.
8344 * fs/affs.c (grub_affs_mount): Likewise.
8345 (grub_affs_label): Likewise.
8346 (grub_affs_iterate_dir): Likewise.
8347 * fs/sfs.c (grub_sfs_mount): Likewise.
8348 (grub_sfs_iterate_dir): Likewise.
8349 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
8350 * fs/hfs.c (grub_hfs_mount): Likewise.
8351 (grub_hfs_cmp_catkeys): Likewise.
8352 (grub_hfs_find_dir): Likewise.
8353 (grub_hfs_dir): Likewise.
8354 (grub_hfs_label): Likewise.
8355 * fs/jfs.c (grub_jfs_mount): Likewise.
8356 (grub_jfs_opendir): Likewise.
8357 (grub_jfs_getent): Likewise.
8358 (grub_jfs_lookup_symlink): Likewise.
8359 (grub_jfs_label): Likewise.
8360 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
8361 (grub_hfsplus_iterate_dir): Likewise.
8362 (grub_hfsplus_btree_iterate_node): Made static.
8364 * util/grub-emu.c (prefix): New variable.
8365 (grub_machine_set_prefix): New function.
8366 (main): Do not set the environment variable "prefix" here. Only
8367 set PREFIX, which is used later by grub_machine_set_prefix.
8369 * include/grub/video.h: Do not include grub/symbol.h.
8370 (grub_video_register): Not exported. This symbol is not defined in
8372 (grub_video_unregister): Likewise.
8373 (grub_video_iterate): Likewise.
8374 (grub_video_setup): Likewise.
8375 (grub_video_restore): Likewise.
8376 (grub_video_get_info): Likewise.
8377 (grub_video_get_blit_format): Likewise.
8378 (grub_video_set_palette): Likewise.
8379 (grub_video_get_palette): Likewise.
8380 (grub_video_set_viewport): Likewise.
8381 (grub_video_get_viewport): Likewise.
8382 (grub_video_map_color): Likewise.
8383 (grub_video_map_rgb): Likewise.
8384 (grub_video_map_rgba): Likewise.
8385 (grub_video_fill_rect): Likewise.
8386 (grub_video_blit_glyph): Likewise.
8387 (grub_video_blit_bitmap): Likewise.
8388 (grub_video_blit_render_target): Likewise.
8389 (grub_video_scroll): Likewise.
8390 (grub_video_swap_buffers): Likewise.
8391 (grub_video_create_render_target): Likewise.
8392 (grub_video_delete_render_target): Likewise.
8393 (grub_video_set_active_render_target): Likewise.
8395 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
8397 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
8399 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
8400 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8401 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8402 instead of $(srcdir)/genkernsyms.sh.
8404 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
8405 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8406 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8407 instead of $(srcdir)/genkernsyms.sh.
8409 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
8410 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8411 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8412 instead of $(srcdir)/genkernsyms.sh.
8414 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
8415 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8416 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8417 instead of $(srcdir)/genkernsyms.sh.
8419 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
8422 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
8424 (gensymlist.sh): New target.
8425 (genkernsyms.sh): Likewise.
8427 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
8428 genkernsyms.sh.in and gensymlist.sh.in.
8430 * genkernsyms.sh: Removed.
8431 * gensymlist.sh: Likewise.
8433 * genkernsyms.sh.in: New file.
8434 * gensymlist.sh.in: Likewise.
8436 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8438 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
8439 clobber "prefix", since we may have already set it manually.
8441 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8443 * kern/misc.c (abort): New alias for grub_abort.
8445 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
8447 A new machine-specific function "grub_machine_set_prefix" is
8448 defined. This is called after loading modules, so that a prefix
8449 initialization can use modules. Also, this change adds an
8450 intensive debugging feature for the memory manager via the
8451 configure option "--enable-mm-debug".
8453 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
8456 * kern/sparc64/ieee1275/init.c (abort): Removed.
8457 (grub_stop): Likewise.
8458 (grub_exit): New function.
8459 (grub_set_prefix): Renamed to ...
8460 (grub_machine_set_prefix): ... this.
8461 (grub_machine_init): Do not call grub_set_prefix.
8463 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
8464 (grub_machine_set_prefix): ... this.
8465 (grub_machine_init): Do not call grub_set_prefix.
8467 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
8468 (grub_machine_init): Do not set the prefix here.
8470 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
8472 * kern/efi/init.c: Include grub/mm.h.
8473 (grub_efi_set_prefix): New function.
8475 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
8476 (grub_efi_get_filename): New function.
8477 (grub_print_device_path): Renamed to ...
8478 (grub_efi_print_device_path): ... this.
8480 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
8481 [MM_DEBUG] (grub_realloc): Likewise.
8482 [MM_DEBUG] (grub_free): Likewise.
8483 [MM_DEBUG] (grub_memalign): Likewise.
8484 [MM_DEBUG] (grub_mm_debug): New variable.
8485 [MM_DEBUG] (grub_debug_malloc): New function.
8486 [MM_DEBUG] (grub_debug_free): New function.
8487 [MM_DEBUG] (grub_debug_realloc): New function.
8488 [MM_DEBUG] (grub_debug_memalign): New function.
8490 * kern/misc.c (grub_abort): Print a newline to distinguish
8493 * kern/main.c (grub_main): Call grub_machine_set_prefix and
8494 grub_set_root_dev after loading modules. This is necessary when
8495 setting a prefix depends on modules.
8497 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
8498 (grub_efi_print_device_path): ... this.
8499 (grub_efi_get_filename): New prototype.
8500 (grub_efi_set_prefix): Likewise.
8502 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
8504 (grub_efidisk_get_device_handle): New prototype.
8505 (grub_efidisk_get_device_name): Likewise.
8507 * include/grub/mm.h: Include config.h.
8508 (MM_DEBUG): Removed.
8509 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
8510 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
8511 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
8512 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
8513 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
8514 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
8515 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
8516 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
8517 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
8519 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
8521 * disk/efi/efidisk.c: Include grub/partition.h.
8522 (iterate_child_devices): New function.
8523 (add_device): First, compare only last device path nodes, so that
8524 devices are sorted by the types.
8525 (grub_efidisk_get_device_handle): New function.
8526 (grub_efidisk_get_device_name): Likewise.
8528 * configure.ac (--enable-mm-debug): New option to enable the
8529 memory manager debugging feature. This makes the binary much
8530 bigger, so is disabled by default.
8532 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
8534 Use grub_abort instead of grub_stop, and grub_exit must be
8535 define in each architecture now. Also, this change adds support
8538 * util/i386/pc/grub-probefs.c: Include grub/term.h.
8539 (grub_getkey): New function.
8540 (grub_term_get_current): Likewise.
8542 * util/i386/pc/grub-setup.c: Include grub/term.h.
8543 (grub_getkey): New function.
8544 (grub_term_get_current): Likewise.
8546 * util/misc.c (grub_stop): Renamed to ...
8547 (grub_exit): ... this.
8549 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
8550 (grub_exit): ... this.
8551 (grub_machine_init): Use grub_abort instead of abort.
8552 (grub_stop): Removed.
8554 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
8557 * kern/i386/pc/startup.S (grub_exit): New function.
8558 (cold_reboot): New label.
8560 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
8561 (grub_efi_init): Call grub_efidisk_init.
8562 (grub_efi_fini): Call grub_efidisk_fini.
8564 * kern/efi/efi.c: Include grub/mm.h.
8565 (grub_efi_console_control_guid): Renamed to ...
8566 (console_control_guid): ... this.
8567 (grub_efi_loaded_image_guid): Renamed to ...
8568 (loaded_image_guid): ... this.
8569 (grub_efi_locate_handle): New function.
8570 (grub_efi_open_protocol): Likewise.
8571 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
8572 GRUB_EFI_CONSOLE_CONTROL_GUID.
8573 (grub_efi_exit): Removed.
8574 (grub_stop): Likewise.
8575 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
8576 (grub_exit): New function.
8577 (grub_print_device_path): Likewise.
8579 * kern/rescue.c (grub_rescue_cmd_exit): New function.
8580 (grub_enter_rescue_mode): Register "exit".
8582 * kern/misc.c (grub_real_dprintf): A cosmetic change.
8583 (grub_abort): New function.
8585 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
8587 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
8589 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
8591 * include/grub/efi/efi.h (grub_efi_exit): Removed.
8592 (grub_print_device_path): New prototype.
8593 (grub_efi_locate_handle): Likewise.
8594 (grub_efi_open_protocol): Likewise.
8596 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
8597 * disk/efi/efidisk.c: Likewise.
8599 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
8601 * include/grub/efi/console_control.h
8602 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
8604 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
8605 last 8 bytes as an array.
8606 (GRUB_EFI_DISK_IO_GUID): New macro.
8607 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
8608 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
8609 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
8611 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
8612 (struct grub_efi_device_path): Rename the member "sub_type" to
8614 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
8615 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
8616 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
8617 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
8618 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
8619 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
8620 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
8621 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
8622 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
8623 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
8624 (struct grub_efi_pci_device_path): New structure.
8625 (grub_efi_pci_device_path_t): New type.
8626 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
8627 (struct grub_efi_pccard_device_path): New structure.
8628 (grub_efi_pccard_device_path_t): New type.
8629 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
8630 (struct grub_efi_memory_mapped_device_path): New structure.
8631 (grub_efi_memory_mapped_device_path_t): New type.
8632 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
8633 (struct grub_efi_vendor_device_path): New structure.
8634 (grub_efi_vendor_device_path_t): New type.
8635 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
8636 (struct grub_efi_controller_device_path): New structure.
8637 (grub_efi_controller_device_path_t): New type.
8638 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
8639 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
8640 (struct grub_efi_acpi_device_path): New structure.
8641 (grub_efi_acpi_device_path_t): New type.
8642 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
8643 (struct grub_efi_expanded_acpi_device_path): New structure.
8644 (grub_efi_expanded_acpi_device_path_t): New type.
8645 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
8646 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
8647 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
8648 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
8649 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
8650 (struct grub_efi_atapi_device_path): New structure.
8651 (grub_efi_atapi_device_path_t): New type.
8652 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
8653 (struct grub_efi_fibre_channel_device_path): New structure.
8654 (grub_efi_fibre_channel_device_path_t): New type.
8655 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
8656 (struct grub_efi_1394_device_path): New structure.
8657 (grub_efi_1394_device_path_t): New type.
8658 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
8659 (struct grub_efi_usb_device_path): New structure.
8660 (grub_efi_usb_device_path_t): New type.
8661 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
8662 (struct grub_efi_usb_class_device_path): New structure.
8663 (grub_efi_usb_class_device_path_t): New type.
8664 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
8665 (struct grub_efi_i2o_device_path): New structure.
8666 (grub_efi_i2o_device_path_t): New type.
8667 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
8668 (struct grub_efi_mac_address_device_path): New structure.
8669 (grub_efi_mac_address_device_path_t): New type.
8670 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
8671 (struct grub_efi_ipv4_device_path): New structure.
8672 (grub_efi_ipv4_device_path_t): New type.
8673 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
8674 (struct grub_efi_ipv6_device_path): New structure.
8675 (grub_efi_ipv6_device_path_t): New type.
8676 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
8677 (struct grub_efi_infiniband_device_path): New structure.
8678 (grub_efi_infiniband_device_path_t): New type.
8679 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
8680 (struct grub_efi_uart_device_path): New structure.
8681 (grub_efi_uart_device_path_t): New type.
8682 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
8683 (struct grub_efi_vendor_messaging_device_path): New structure.
8684 (grub_efi_vendor_messaging_device_path_t): New type.
8685 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
8686 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
8687 (struct grub_efi_hard_drive_device_path): New structure.
8688 (grub_efi_hard_drive_device_path_t): New type.
8689 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
8690 (struct grub_efi_cdrom_device_path): New structure.
8691 (grub_efi_cdrom_device_path_t): New type.
8692 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
8693 (struct grub_efi_vendor_media_device_path): New structure.
8694 (grub_efi_vendor_media_device_path_t): New type.
8695 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
8696 (struct grub_efi_file_path_device_path): New structure.
8697 (grub_efi_file_path_device_path_t): New type.
8698 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
8699 (struct grub_efi_protocol_device_path): New structure.
8700 (grub_efi_protocol_device_path_t): New type.
8701 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
8702 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
8703 (struct grub_efi_bios_device_path): New structure.
8704 (grub_efi_bios_device_path_t): New type.
8705 (struct grub_efi_disk_io): New structure.
8706 (grub_efi_disk_io_t): New type.
8707 (struct grub_efi_block_io_media): New structure.
8708 (grub_efi_block_io_media_t): New type.
8709 (struct grub_efi_block_io): New structure.
8710 (grub_efi_block_io_t): New type.
8712 * include/grub/misc.h (grub_stop): Removed.
8713 (grub_exit): New prototype.
8714 (grub_abort): Likewise.
8716 * include/grub/disk.h (enum grub_disk_dev_id): Added
8717 GRUB_DISK_DEVICE_EFIDISK_ID.
8719 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
8721 (kernel_syms.lst): Remove the target if an error occurs.
8723 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
8725 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
8726 as it was simply too buggy.
8728 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
8730 * kern/misc.c (grub_lltoa): New function.
8731 (grub_vsprintf): Added support for the long long suffix,
8734 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
8736 * Makefile.in (LDFLAGS): Add variable.
8737 (LD): Remove variable.
8738 * configure.ac: Add -m32 to LDFLAGS.
8739 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
8740 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
8741 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
8742 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
8743 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
8745 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
8746 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
8747 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
8749 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
8751 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
8752 length for unknown glyph.
8754 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8756 Add support for pre-loaded modules into the EFI port.
8758 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
8759 completely. Accept one more argument DIR. The caller has changed.
8761 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
8763 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
8764 (grub_efi_loaded_image_guid): New variable.
8765 (grub_efi_get_loaded_image): New function.
8766 (grub_arch_modules_addr): Likewise.
8768 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
8771 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
8772 (struct grub_efi_loaded_image): New structure.
8773 (grub_efi_loaded_image_t): New type.
8775 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8777 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
8778 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
8779 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
8781 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
8783 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
8785 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
8787 * DISTLIST: Added include/grub/efi/console.h,
8788 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
8789 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8791 * include/grub/efi/console.h: New file.
8792 * include/grub/efi/time.h: Likewise.
8793 * include/grub/i386/efi/kernel.h: Likewise.
8794 * kern/efi/init.c: Likewise.
8795 * kern/efi/mm.c: Likewise.
8796 * term/efi/console.c: Likewise.
8798 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
8799 (grub_stop): Removed.
8800 (grub_get_rtc): Likewise.
8801 (grub_machine_init): Simply call grub_efi_init.
8802 (grub_machine_fini): Call grub_efi_fini.
8804 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
8805 (grub_efi_output_string): Removed.
8806 (grub_efi_stall): New function.
8807 (grub_stop): Likewise.
8808 (grub_get_rtc): Likewise.
8810 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
8811 (grub_efi_stall): New prototype.
8812 (grub_efi_allocate_pages): Likewise.
8813 (grub_efi_free_pages): Likewise.
8814 (grub_efi_get_memory_map): Likewise.
8815 (grub_efi_mm_init): Likewise.
8816 (grub_efi_mm_fini): Likewise.
8817 (grub_efi_init): Likewise.
8818 (grub_efi_fini): Likewise.
8820 * include/grub/i386/efi/time.h: Do not include
8821 grub/symbol.h. Include grub/efi/time.h.
8822 (GRUB_TICKS_PER_SECOND): Removed.
8823 (grub_get_rtc): Likewise.
8825 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
8826 Added padding. The EFI spec is buggy.
8827 (GRUB_EFI_BLACK): New macro.
8828 (GRUB_EFI_BLUE): Likewise.
8829 (GRUB_EFI_GREEN): Likewise.
8830 (GRUB_EFI_CYAN): Likewise.
8831 (GRUB_EFI_RED): Likewise.
8832 (GRUB_EFI_MAGENTA): Likewise.
8833 (GRUB_EFI_BROWN): Likewise.
8834 (GRUB_EFI_LIGHTGRAY): Likewise.
8835 (GRUB_EFI_BRIGHT): Likewise.
8836 (GRUB_EFI_DARKGRAY): Likewise.
8837 (GRUB_EFI_LIGHTBLUE): Likewise.
8838 (GRUB_EFI_LIGHTGREEN): Likewise.
8839 (GRUB_EFI_LIGHTCYAN): Likewise.
8840 (GRUB_EFI_LIGHTRED): Likewise.
8841 (GRUB_EFI_LIGHTMAGENTA): Likewise.
8842 (GRUB_EFI_YELLOW): Likewise.
8843 (GRUB_EFI_WHITE): Likewise.
8844 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
8845 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
8846 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
8847 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
8848 (GRUB_EFI_BACKGROUND_RED): Likewise.
8849 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
8850 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
8851 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
8852 (GRUB_EFI_TEXT_ATTR): Likewise.
8854 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
8855 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8856 (kernel_mod_HEADERS): Added efi/time.h.
8858 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
8860 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
8861 include/grub/efi/api.h, include/grub/efi/console_control.h,
8862 include/grub/efi/efi.h, include/grub/efi/pe32.h,
8863 include/grub/i386/efi/time.h, kern/efi/efi.c,
8864 kern/i386/efi/init.c, kern/i386/efi/startup.S,
8865 and util/i386/efi/grub-mkimage.c.
8867 * Makefile.in (RMKFILES): Added i386-efi.rmk.
8869 * genmk.rb (PModule#rule): Do not export symbols if
8870 #{prefix}_EXPORTS is set to "no".
8872 * conf/i386-efi.mk: New file.
8873 * conf/i386-efi.rmk: Likewise.
8874 * include/grub/efi/api.h: Likewise.
8875 * include/grub/efi/console_control.h: Likewise.
8876 * include/grub/efi/efi.h: Likewise.
8877 * include/grub/efi/pe32.h: Likewise.
8878 * include/grub/i386/efi/time.h: Likewise.
8879 * kern/efi/efi.c: Likewise.
8880 * kern/i386/efi/init.c: Likewise.
8881 * kern/i386/efi/startup.S: Likewise.
8882 * util/i386/efi/grub-mkimage.c: Likewise.
8884 2006-04-17 Marco Gerards <marco@gnu.org>
8886 * include/grub/script.h: Include <grub/parser.h> and
8887 "grub_script.tab.h".
8888 (struct grub_lexer_param): New struct.
8889 (struct grub_parser_param): Likewise.
8890 (grub_script_create_arglist): Pass the state in an argument.
8891 (grub_script_add_arglist): Likewise.
8892 (grub_script_create_cmdline): Likewise.
8893 (grub_script_create_cmdblock): Likewise.
8894 (grub_script_create_cmdif): Likewise.
8895 (grub_script_create_cmdmenu): Likewise.
8896 (grub_script_add_cmd): Likewise.
8897 (grub_script_arg_add): Likewise.
8898 (grub_script_lexer_ref): Likewise.
8899 (grub_script_lexer_deref): Likewise.
8900 (grub_script_lexer_record_start): Likewise.
8901 (grub_script_lexer_record_stop): Likewise.
8902 (grub_script_mem_record): Likewise.
8903 (grub_script_mem_record_stop): Likewise.
8904 (grub_script_malloc): Likewise.
8905 (grub_script_yylex): Likewise.
8906 (grub_script_yyparse): Likewise.
8907 (grub_script_yyerror): Likewise.
8908 (grub_script_yylex): Likewise.
8909 (grub_script_lexer_init): Return the state.
8911 * normal/lexer.c (grub_script_lexer_state): Removed variable.
8912 (grub_script_lexer_done): Likewise.
8913 (grub_script_lexer_getline): Likewise.
8914 (grub_script_lexer_refs): Likewise.
8916 (newscript): Likewise.
8918 (recording): Likewise.
8919 (recordpos): Likewise.
8920 (recordlen): Likewise.
8921 (grub_script_lexer_init): Return the state instead of setting
8923 (grub_script_lexer_ref): Use the newly added argument for state
8925 (grub_script_lexer_deref): Likewise.
8926 (grub_script_lexer_record_start): Likewise.
8927 (grub_script_lexer_record_stop): Likewise.
8928 (recordchar): Likewise.
8929 (nextchar): Likewise.
8930 (grub_script_yylex2): Likewise.
8931 (grub_script_yylex): Likewise.
8932 (grub_script_yyerror): Likewise.
8934 * normal/parser.y (func_mem): Removed variable.
8935 (menu_entry): Likewise.
8937 (%lex-param): New parser option.
8938 (%parse-param): Likewise.
8939 (script): Always return the AST.
8940 (argument): Pass the state around.
8941 (arguments): Likewise.
8942 (grubcmd): Likewise.
8943 (commands): Likewise.
8944 (function): Likewise.
8945 (menuentry): Likewise.
8946 (if_statement): Likewise.
8949 * normal/script.c (grub_script_memused): Removed variable.
8950 (grub_script_parsed): Likewise.
8951 (grub_script_malloc): Added a state argument. Use that instead of
8953 (grub_script_mem_record): Likewise.
8954 (grub_script_mem_record_stop): Likewise.
8955 (grub_script_arg_add): Likewise.
8956 (grub_script_add_arglist): Likewise.
8957 (grub_script_create_cmdline): Likewise.
8958 (grub_script_create_cmdif): Likewise.
8959 (grub_script_create_cmdmenu): Likewise.
8960 (grub_script_add_cmd): Likewise.
8961 (grub_script_parse): Setup the state before calling the parser.
8963 2006-04-16 Marco Gerards <marco@gnu.org>
8965 * normal/command.c (grub_command_init): Remove the title command.
8967 * normal/lexer.c (grub_script_yylex): Renamed from this...
8968 (grub_script_yylex2): ... to this.
8969 (grub_script_yylex): New function. Temporary
8970 introduced to filter some tokens.
8971 (grub_script_yyerror): Print a newline.
8973 * normal/main.c (read_config_file): Output information about the
8974 lines that contain errors. Wait for a key after all lines have
8975 been processed. Don't return an empty menu.
8977 * normal/parser.y (func_mem): Don't initialize.
8978 (menu_entry): Likewise.
8979 (err): New variable.
8980 (script): Don't return anything when an error was encountered.
8981 (ws, returns): Removed rules.
8982 (argument): Disabled concatenated variable support.
8983 (arguments): Remove explicit separators.
8984 (grubcmd): Likewise.
8985 (function): Likewise.
8986 (menuentry): Likewise.
8988 (commands): Likewise. Add error handling.
8990 * normal/script.c (grub_script_create_cmdline): If
8991 `grub_script_parsed' is 0, assume the parser encountered an error.
8993 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
8995 * configure.ac: Add support for EFI. Fix the typo
8996 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
8998 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9000 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
9001 foreign multibyte characters should be shown correctly.
9003 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
9005 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
9007 (read_config_file): Made it to close file before returning.
9009 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
9011 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
9012 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
9013 video/i386/pc/vbefill.c.
9015 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
9016 video/i386/pc/vbefill.c.
9018 * include/grub/video.h (grub_video_blit_format): New enum.
9019 (grub_video_mode_info): Added new member blit_format.
9020 (grub_video_get_blit_format): New function prototype.
9022 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
9024 (grub_video_vbe_map_rgb): Likewise.
9025 (grub_video_vbe_unmap_color): Likewise.
9027 * include/grub/i386/pc/vbeblit.h: New file.
9029 * include/grub/i386/pc/vbefill.h: New file.
9031 * video/video.c (grub_video_get_blit_format): New function.
9032 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
9033 (grub_video_vbe_map_rgb): Likewise.
9034 (grub_video_vbe_unmap_color): Likewise.
9036 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
9038 (grub_video_vbe_blit_render_target): Changed to use more optimized
9040 (grub_video_vbe_setup): Added detection for optimized settings.
9041 (grub_video_vbe_create_render_target): Likewise.
9043 * video/i386/pc/vbeblit.c: New file.
9045 * video/i386/pc/vbefill.c: New file.
9047 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
9049 * font/manager.c (grub_font_get_glyph): Removed font fixup from
9052 * util/unifont2pff.rb: ... and moved it to here. Improved argument
9053 parsing to support both hex and dec ranges. If filename was missing
9054 show usage information.
9056 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
9058 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
9059 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
9061 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
9062 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
9063 (video_mod_SOURCES): Added.
9064 (video_mod_CFLAGS): Likewise.
9065 (video_mod_LDFLAGS): Likewise.
9066 (gfxterm_mod_SOURCES): Likewise.
9067 (gfxterm_mod_CFLAGS): Likewise.
9068 (gfxterm_mod_LDFLAGS): Likewise.
9069 (videotest_mod_SOURCES): Likewise.
9070 (videotest_mod_CFLAGS): Likewise.
9071 (videotest_mod_LDFLAGS): Likewise.
9072 (vesafb_mod_SOURCES): Removed.
9073 (vesafb_mod_CFLAGS): Likewise.
9074 (vesafb_mod_LDFLAGS): Likewise.
9075 (vga_mod_SOURCES): Likewise.
9076 (vga_mod_CFLAGS): Likewise.
9077 (vga_mod_LDFLAGS): Likewise.
9079 * commands/videotest.c: New file.
9081 * font/manager.c (fill_with_default_glyph): Modified to use
9083 (grub_font_get_glyph): Likewise.
9084 (fontmanager): Renamed from this...
9085 (font_manager): ... to this.
9087 * include/grub/font.h (grub_font_glyph): Added new structure.
9088 (grub_font_get_glyph): Modified to use grub_font_glyph.
9090 * include/grub/misc.h (grub_abs): Added as inline function.
9092 * include/grub/video.h: New file.
9094 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
9095 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
9096 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
9097 (grub_vbe_get_controller_info): Renamed from this...
9098 (grub_vbe_bios_get_controller_info): ... to this.
9099 (grub_vbe_get_mode_info): Renamed from this...
9100 (grub_vbe_bios_get_mode_info): ... to this.
9101 (grub_vbe_set_mode): Renamed from this...
9102 (grub_vbe_bios_set_mode): ... to this.
9103 (grub_vbe_get_mode): Renamed from this...
9104 (grub_vbe_bios_get_mode): ... to this.
9105 (grub_vbe_set_memory_window): Renamed from this...
9106 (grub_vbe_bios_set_memory_window): ... to this.
9107 (grub_vbe_get_memory_window): Renamed from this...
9108 (grub_vbe_bios_get_memory_window): ... to this.
9109 (grub_vbe_set_scanline_length): Renamed from this...
9110 (grub_vbe_set_scanline_length): ... to this.
9111 (grub_vbe_get_scanline_length): Renamed from this...
9112 (grub_vbe_bios_get_scanline_length): ... to this.
9113 (grub_vbe_set_display_start): Renamed from this...
9114 (grub_vbe_bios_set_display_start): ... to this.
9115 (grub_vbe_get_display_start): Renamed from this...
9116 (grub_vbe_bios_get_display_start): ... to this.
9117 (grub_vbe_set_palette_data): Renamed from this...
9118 (grub_vbe_bios_set_palette_data): ... to this.
9119 (grub_vbe_set_pixel_rgb): Removed.
9120 (grub_vbe_set_pixel_index): Likewise.
9122 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
9124 (grub_vbe_bios_get_controller_info): ... to this.
9125 (grub_vbe_get_mode_info): Renamed from this...
9126 (grub_vbe_bios_get_mode_info): ... to this.
9127 (grub_vbe_set_mode): Renamed from this...
9128 (grub_vbe_bios_set_mode): ... to this.
9129 (grub_vbe_get_mode): Renamed from this...
9130 (grub_vbe_bios_get_mode): ... to this.
9131 (grub_vbe_set_memory_window): Renamed from this...
9132 (grub_vbe_bios_set_memory_window): ... to this.
9133 (grub_vbe_get_memory_window): Renamed from this...
9134 (grub_vbe_bios_get_memory_window): ... to this.
9135 (grub_vbe_set_scanline_length): Renamed from this...
9136 (grub_vbe_set_scanline_length): ... to this.
9137 (grub_vbe_get_scanline_length): Renamed from this...
9138 (grub_vbe_bios_get_scanline_length): ... to this.
9139 (grub_vbe_set_display_start): Renamed from this...
9140 (grub_vbe_bios_set_display_start): ... to this.
9141 (grub_vbe_get_display_start): Renamed from this...
9142 (grub_vbe_bios_get_display_start): ... to this.
9143 (grub_vbe_set_palette_data): Renamed from this...
9144 (grub_vbe_bios_set_palette_data): ... to this.
9145 (grub_vbe_bios_get_controller_info): Fixed problem with registers
9146 getting corrupted after calling it. Added more pushes and pops.
9147 (grub_vbe_bios_set_mode): Likewise.
9148 (grub_vbe_bios_get_mode): Likewise.
9149 (grub_vbe_bios_get_memory_window): Likewise.
9150 (grub_vbe_bios_set_scanline_length): Likewise.
9151 (grub_vbe_bios_get_scanline_length): Likewise.
9152 (grub_vbe_bios_get_display_start): Likewise.
9153 (grub_vbe_bios_set_palette_data): Likewise.
9155 * normal/cmdline.c (cl_set_pos): Refresh the screen.
9156 (cl_insert): Likewise.
9157 (cl_delete): Likewise.
9159 * term/gfxterm.c: New file.
9161 * term/i386/pc/vesafb.c: Removed file.
9163 * video/video.c: New file.
9165 * video/i386/pc/vbe.c (real2pm): Added new function.
9166 (grub_video_vbe_draw_pixel): Likewise.
9167 (grub_video_vbe_get_video_ptr): Likewise.
9168 (grub_video_vbe_get_pixel): Likewise
9169 (grub_video_vbe_init): Likewise.
9170 (grub_video_vbe_fini): Likewise.
9171 (grub_video_vbe_setup): Likewise.
9172 (grub_video_vbe_get_info): Likewise.
9173 (grub_video_vbe_set_palette): Likewise.
9174 (grub_video_vbe_get_palette): Likewise.
9175 (grub_video_vbe_set_viewport): Likewise.
9176 (grub_video_vbe_get_viewport): Likewise.
9177 (grub_video_vbe_map_color): Likewise.
9178 (grub_video_vbe_map_rgb): Likewise.
9179 (grub_video_vbe_map_rgba): Likewise.
9180 (grub_video_vbe_unmap_color): Likewise.
9181 (grub_video_vbe_fill_rect): Likewise.
9182 (grub_video_vbe_blit_glyph): Likewise.
9183 (grub_video_vbe_blit_bitmap): Likewise.
9184 (grub_video_vbe_blit_render_target): Likewise.
9185 (grub_video_vbe_scroll): Likewise.
9186 (grub_video_vbe_swap_buffers): Likewise.
9187 (grub_video_vbe_create_render_target): Likewise.
9188 (grub_video_vbe_delete_render_target): Likewise.
9189 (grub_video_vbe_set_active_render_target): Likewise.
9190 (grub_vbe_set_pixel_rgb): Remove function.
9191 (grub_vbe_set_pixel_index): Likewise.
9192 (index_color_mode): Remove static variable.
9193 (active_mode): Likewise.
9194 (framebuffer): Likewise.
9195 (bytes_per_scan_line): Likewise.
9196 (grub_video_vbe_adapter): Added new static variable.
9197 (framebuffer): Likewise.
9198 (render_target): Likewise.
9199 (initial_mode): Likewise.
9200 (mode_in_use): Likewise.
9201 (mode_list): Likewise.
9203 2006-03-10 Marco Gerards <marco@gnu.org>
9205 * configure.ac (AC_INIT): Bumped to 1.93.
9207 * DISTLIST: Added `include/grub/hfs.h'.
9209 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
9211 * boot/i386/pc/boot.S (general_error): Before looping, try INT
9212 18H, which might help the BIOS falling back to next boot media.
9214 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
9216 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
9217 Poe Chen <poe.poechen@gmail.com>.
9219 2006-01-17 Marco Gerards <marco@gnu.org>
9221 * include/grub/normal.h: Include <grub/script.h>.
9222 (grub_command_list): Removed struct.
9223 (grub_command_list_t): Removed type.
9224 (grub_menu_entry): Remove members `num' and `command_list'. Add
9225 members `commands' and `sourcecode'.
9226 * include/grub/script.h: Add inclusion guards.
9227 (grub_script_cmd_menuentry): New struct.
9228 (grub_script_execute_menuentry): New prototype.
9229 (grub_script_lexer_record_start): Likewise.
9230 (grub_script_lexer_record_stop): Likewise.
9231 * normal/execute.c (grub_script_execute_menuentry): New function.
9232 * normal/lexer.c (record, recording, recordpos, recordlen): New
9234 (grub_script_lexer_record_start): New function.
9235 (grub_script_lexer_record_stop): Likewise.
9236 (recordchar): Likewise.
9237 (nextchar): Likewise.
9238 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
9239 2048 as the buffer size. Add the tokens `menuentry' and `@'.
9240 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
9241 (current_menu): New variable.
9242 (free_menu): Mainly rewritten.
9243 (grub_normal_menu_addentry): New function.
9244 (read_config_file): Rewritten.
9245 * normal/menu.c (run_menu_entry): Mainly rewritten.
9246 * normal/menu_entry.c (make_screen): Rewritten the code to insert
9248 (run): Mainly rewritten.
9249 * normal/parser.y (menu_entry): New variable.
9250 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
9251 (menuentry): New rule.
9252 (command): Add `menuentry'.
9253 (if_statement): Allow additional returns before `fi'.
9254 * normal/script.c (grub_script_create_cmdmenu): New function.
9256 2006-01-03 Marco Gerards <marco@gnu.org>
9258 * INSTALL: GNU Bison is required.
9259 * configure.ac: Rewritten the test to detect Bison.
9260 * Makefile.in (YACC): New variable. Reported by Xun Sun
9261 <xun.sun.cn@gmail.com>.
9263 2006-01-03 Marco Gerards <marco@gnu.org>
9265 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
9266 the HFS+ filesystem to filesystem blocks.
9267 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
9268 GCC warning is silenced.
9270 2006-01-03 Marco Gerards <marco@gnu.org>
9272 * partmap/apple.c (apple_partition_map_iterate): Convert the data
9273 read from disk from big endian to host byte order.
9275 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
9277 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
9279 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
9280 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
9281 embedded HFS+ filesystem.
9282 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
9283 (grub_hfs_sblock): Move from here...
9284 * include/grub/hfs.h: To here... New file.
9285 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
9287 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
9289 (grub_hfsplus_volheader): Change type of member `magic' to
9291 (grub_hfsplus_data): Add new member `embedded_offset'.
9292 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
9294 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
9295 Calculate the offset.
9297 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9299 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
9301 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
9303 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9305 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
9306 ENV->NAME is NULL after allocating ENV->VALUE.
9308 2005-12-25 Marco Gerards <marco@gnu.org>
9310 * kern/env.c (grub_env_set): Rewritten the error handling code.
9312 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9314 * geninit.sh: Made more robust, and more portable.
9316 2005-12-25 Marco Gerards <marco@gnu.org>
9318 Add support for Apple HFS+ filesystems.
9320 * fs/hfsplus.c: New file.
9322 * DISTLIST: Added `fs/hfsplus.c'.
9324 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
9325 (hfsplus_mod_SOURCES): New variable.
9326 (hfsplus_mod_CFLAGS): Likewise.
9327 (hfsplus_mod_LDFLAGS): Likewise.
9328 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
9329 (grub_setup_SOURCES): Likewise.
9330 (grub_mkdevicemap_SOURCES): Likewise.
9331 (grub_emu_SOURCES): Likewise.
9332 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9334 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
9336 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
9338 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9340 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
9341 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
9342 include/grub/parser.h, include/grub/script.h, kern/parser.c,
9343 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
9344 normal/lexer.c, normal/parser.y, normal/script.c, and
9346 Removed kern/sparc64/cache.c.
9348 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
9349 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
9352 * configure.ac (AC_INIT): Bumped to 1.92.
9354 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
9356 * kern/err.c (grub_error_push): Added new function to support error
9358 (grub_error_pop): Likewise.
9359 (grub_error_stack_items): New local variable to support error stacks.
9360 (grub_error_stack_pos): Likewise.
9361 (grub_error_stack_assert): Likewise.
9362 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
9364 (grub_print_error): Added support to print errors from error stack.
9366 * include/grub/err.h (grub_error_push): Added function prototype.
9367 (grub_error_pop): Likewise.
9369 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
9371 * configure.ac: Accept `powerpc64' as host_cpu.
9372 (amd64): Rename to `biarch32'.
9374 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
9375 non-cacheline-aligned addresses.
9377 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
9378 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
9379 if `size' is non-zero.
9381 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
9383 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
9384 and `cd' to make sure the filename is not prefixed with a
9386 (pkgdata_MODULES): Add `gpt.mod'.
9387 (gpt_mod_SOURCES): New variable.
9388 (gpt_mod_CFLAGS): Likewise.
9389 (gpt_mod_LDFLAGS): Likewise.
9391 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
9393 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
9396 * partmap/gpt.c: New file.
9398 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
9399 GPT partition map is detected.
9401 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
9403 * commands/i386/pc/play.c: New file.
9404 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
9405 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
9408 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
9410 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
9411 ((unused))' to silence gcc warning.
9413 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
9415 * configure.ac: Correct `AC_PROG_YACC' test.
9417 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9419 * util/powerpc/ieee1275/grub-install.in: Run the mount point
9420 check before installing files.
9422 2005-11-22 Mike Small <smallm@panix.com>
9424 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
9425 number regex so multidigit numbers are recognized correctly.
9427 2005-11-22 Mike Small <smallm@panix.com>
9429 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
9430 debugging message before attempting to claim memory.
9431 (grub_rescue_cmd_initrd): Add a claim debugging message and try
9432 multiple addresses in case of failure.
9434 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9436 * term/tparm.c (get_space): Remove empty `if' statement.
9438 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
9440 * kern/parser.c (check_varstate): Rename `state' to 's'.
9442 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9444 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
9445 variable definitions to the beginning of each function. Sort stack
9447 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
9448 `buf' argument to `char *'.
9450 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9452 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
9453 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9454 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9455 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9456 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9457 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9458 configfile.mod, search.mod, gzio.mod and test.mod.
9459 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9460 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9461 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9462 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9463 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9464 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9465 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9466 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9467 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9468 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9469 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9470 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9471 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9472 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9473 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9474 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9475 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9476 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9477 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9478 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9479 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9480 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9481 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
9483 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
9485 (pkgdata_MODULES): Add test.mod.
9487 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9489 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
9490 appending to variables with "+=".
9491 (PModule): Use full pathname to generate *.lst filenames.
9493 * Makefile.in: Fixed list rules moved from genmk.rb.
9494 (.DELETE_ON_ERROR): New special target.
9495 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
9497 * conf/i386-pc.rmk: Include conf/common.mk.
9498 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9499 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9500 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9501 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9502 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9503 configfile.mod, search.mod, gzio.mod and test.mod.
9504 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9505 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9506 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9507 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9508 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9509 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9510 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9511 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9512 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9513 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9514 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9515 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9516 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9517 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9518 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9519 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9520 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9521 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9522 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9523 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9524 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9525 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9526 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
9528 * conf/common.rmk: ... to here. New file.
9530 * conf/common.mk: New file.
9532 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
9534 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
9535 (grub_script.tab.c): ... here.
9537 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
9538 (grub_script.tab.c): ... here.
9540 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
9541 (grub_script.tab.c): ... here.
9543 * normal/command.c (grub_command_find): Fixed a memory leak of
9544 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
9546 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9548 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
9549 "@" which marks the start of a comment on ARM.
9550 (VARIABLE): Likewise.
9552 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9554 Add support for Linux/ADFS partition tables.
9556 * partmap/acorn.c: New file.
9558 * include/grub/acorn_filecore.h: Likewise.
9560 * DISTLIST: Added `partmap/acorn.c' and
9561 `include/grub/acorn_filecore.h'.
9563 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9565 (pkgdata_MODULES): Add `acorn.mod'.
9566 (acorn_mod_SOURCES): New variable.
9567 (acorn_mod_CFLAGS): Likewise.
9569 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9571 (pkgdata_MODULES): Add `acorn.mod'.
9572 (acorn_mod_SOURCES): New variable.
9573 (acorn_mod_CFLAGS): Likewise.
9575 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
9576 (pkgdata_MODULES): Add `acorn.mod'.
9577 (acorn_mod_SOURCES): New variable.
9578 (acorn_mod_CFLAGS): Likewise.
9579 (acorn_mod_LDFLAGS): Likewise.
9581 * include/types.h (grub_disk_addr_t): New typedef.
9583 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
9585 * geninit.sh: New file.
9587 * geninitheader.sh: Likewise.
9589 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
9590 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
9591 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
9592 * commands/configfile.c (grub_configfile_init)
9593 (grub_configfile_fini): Likewise.
9594 * commands/default.c (grub_default_init, grub_default_fini):
9596 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
9597 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
9598 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
9599 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
9601 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
9602 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
9604 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
9605 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
9607 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
9609 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
9611 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
9612 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
9613 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
9614 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
9615 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
9616 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
9617 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
9618 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
9619 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
9620 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
9621 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
9622 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
9623 * partmap/amiga.c (grub_amiga_partition_map_init)
9624 (grub_amiga_partition_map_fini): Likewise.
9625 * partmap/apple.c (grub_apple_partition_map_init)
9626 (grub_apple_partition_map_fini): Likewise.
9627 * partmap/pc.c (grub_pc_partition_map_init)
9628 (grub_pc_partition_map_fini): Likewise.
9629 * partmap/sun.c (grub_sun_partition_map_init,
9630 grub_sun_partition_map_fini): Likewise.
9631 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
9634 * util/grub-emu.c: Include <grub_modules_init.h>.
9635 (main): Don't initialize and de-initialize any modules directly,
9636 use `grub_init_all' and `grub_fini_all' instead.
9638 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
9639 `grub_vesafb_mod_init'.
9640 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
9642 * term/i386/pc/vga.c (grub_vga_init): Renamed to
9643 `grub_vga_mod_init'. Updated all users.
9644 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
9646 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
9647 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
9650 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
9651 Generate a function to initialize the module in utilities.
9652 Updated all callers.
9653 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
9654 initialize the module in utilities. Updated all callers.
9656 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9658 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
9659 escape sequence and a literal ^L to clear the screen.
9661 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
9662 when returning from Open Firmware.
9664 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9666 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
9667 (grub_ofconsole_height): Likewise.
9668 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
9669 manually insert a '\n'.
9670 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
9671 `grub_ofconsole_height'. Return early if these are already set.
9673 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
9675 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9676 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
9677 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
9678 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
9679 and `normal/script.c'.
9680 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9681 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9682 (test_mod_SOURCES): New variable.
9683 (test_mod_CFLAGS): Likewise.
9684 (test_mod_LDFLAGS): Likewise.
9685 (pkgdata_MODULES): Add `test.mod'.
9686 (grub_script.tab.c): New rule.
9687 (grub_script.tab.h): Likewise.
9689 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
9691 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9692 `commands/test.c', `normal/execute.c', `normal/lexer.c',
9693 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9694 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9695 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9696 (test_mod_SOURCES): New variable.
9697 (test_mod_CFLAGS): Likewise.
9698 (pkgdata_MODULES): Add `test.mod'.
9699 (grub_script.tab.c): New rule.
9700 (grub_script.tab.h): Likewise.
9702 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
9704 Add initial scripting support.
9706 * commands/test.c: New file.
9707 * include/grub/script.h: Likewise.
9708 * normal/execute.c: Likewise.
9709 * normal/function.c: Likewise.
9710 * normal/lexer.c: Likewise.
9711 * normal/parser.y: Likewise.
9712 * normal/script.c: Likewise.
9714 * configure.ac: Add `AC_PROG_YACC' test.
9716 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
9717 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
9718 `normal/function.c' and `normal/script.c'.
9719 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9720 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9721 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
9723 (pkgdata_MODULES): Add `test.mod'.
9724 (grub_script.tab.c): New rule.
9725 (grub_script.tab.h): Likewise.
9727 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
9729 * include/grub/normal.h (grub_test_init): New prototype.
9730 (grub_test_fini): Likewise.
9732 * normal/command.c: Include <grub/script.h>.
9733 (grub_command_execute): Rewritten.
9735 * util/grub-emu.c (main): Call `grub_test_init' and
9738 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9740 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
9742 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
9743 there are no pending characters.
9745 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9747 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
9748 `grub_strndup' to drop device arguments. Replace unnecessary
9749 `grub_strndup' with `grub_strdup'.
9751 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9753 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
9754 `debug' environment variable has been set.
9756 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
9758 * Makefile.in (install-local): Use $(DATA).
9759 (uninstall): Likewise.
9760 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
9761 (sbin_UTILITIES): ... to here.
9762 (sbin_SCRIPTS): New variable.
9763 (grub_install_SOURCES): New variable.
9764 * util/powerpc/ieee1275/grub-install.in: New file.
9765 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
9767 (add_segments): Call `grub_util_get_path'.
9769 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
9771 From Timothy Baldwin:
9772 * commands/ls.c (grub_ls_list_files): Close FILE with
9774 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
9776 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
9778 * include/grub/parser.h: New file.
9780 * kern/parser.c: Likewise.
9782 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
9783 (grub_setup_SOURCES): Likewise.
9784 (grub_probefs_SOURCES): Likewise.
9785 (grub_emu_SOURCES): Likewise.
9786 (kernel_img_HEADERS): Add `parser.h'.
9788 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9789 (grub_emu_SOURCES): Add `kern/parser.c'.
9790 (grubof_SOURCES): Likewise.
9792 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9793 (grubof_SOURCES): Add `kern/parser.c'.
9795 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
9797 * kern/misc.c (grub_split_cmdline): Removed function.
9799 * kern/rescue.c: Include <grub/parser.h>.
9800 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
9801 of `grub_split_cmdline'.
9803 * normal/command.c: Include <grub/parser.h>.
9804 (grub_command_execute): Use `grub_parser_split_cmdline' instead
9805 of `grub_split_cmdline'.
9807 * normal/completion.c: Include <grub/parser.h>.
9808 (cmdline_state): New variable.
9809 (iterate_dir): End the filename with a quote depending on the
9811 (get_state): new function.
9812 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
9813 split the arguments and determine the current argument. When the
9814 argument string is not quoted, escape all spaces.
9816 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9818 * normal/sparc64/setjmp.S: New file.
9820 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9822 * include/grub/sparc64/libgcc.h: New file.
9823 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
9824 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
9825 normal/sparc64/setjmp.c.
9827 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9829 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
9830 * kern/sparc64/cache.S: New file.
9831 * kern/sparc64/cache.c: Removed.
9832 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
9833 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
9835 (COMMON_LDFLAGS): Add -melf64_sparc.
9836 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
9837 (grubof_SOURCES): Use cache.S instead of cache.c.
9838 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
9839 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
9840 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
9842 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
9843 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
9844 (linux_mod_CFLAGS): Commented out.
9845 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
9846 out because module isn't built.
9847 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
9848 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
9849 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
9850 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
9851 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
9852 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9853 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9854 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
9855 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
9856 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
9857 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9858 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9859 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
9860 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
9862 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
9864 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
9865 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
9866 longer, because HFS should not be used on PC.
9868 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9870 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
9871 consistently within the loop.
9873 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
9875 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
9876 directory can not be read.
9878 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9880 * configure.ac (AC_INIT): Increase the version number to 1.91.
9882 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
9883 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
9884 term/i386/pc/serial.c.
9886 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9888 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
9889 file size must be permitted.
9891 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
9892 between %ah and %al.
9894 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9896 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
9898 Call the hook with a NUL-terminated filename.
9899 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
9902 * kern/term.c (cursor_state): New variable.
9903 (grub_term_set_current): Reset the cursor state on a new
9905 (grub_setcursor): Rewritten to use CURSOR_STATE.
9906 (grub_getcursor): New function.
9908 * include/grub/term.h (grub_getcursor): New prototype.
9910 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
9911 integers on ARM. Reported by Timothy Baldwin
9912 <T.E.Baldwin99@members.leeds.ac.uk>.
9914 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
9916 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
9918 (grub_sfs_dir): Likewise.
9920 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
9922 Add support for the SFS filesystem.
9924 * fs/sfs.c: New file.
9926 * DISTLIST: Added `fs/sfs.c'.
9928 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
9929 (grub_probefs_SOURCES): Likewise.
9930 (grub_emu_SOURCES): Likewise.
9931 (pkgdata_MODULES): Add `sfs.mod'.
9932 (sfs_mod_SOURCES): New variable.
9933 (sfs_mod_CFLAGS): Likewise.
9934 (sfs_mod_LDFLAGS): Likewise.
9936 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
9937 (pkgdata_MODULES): Add `sfs.mod'.
9938 (sfs_mod_SOURCES): New variable.
9939 (sfs_mod_CFLAGS): Likewise.
9941 * util/grub-emu.c (main): Call `grub_sfs_init' and
9944 * include/grub/fs.h (grub_sfs_init): New prototype.
9945 (grub_sfs_fini): Likewise.
9947 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
9949 Add support for the AFFS filesystem.
9951 * fs/affs.c: New file.
9953 * DISTLIST: Added `fs/affs.c'.
9955 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
9956 (grub_probefs_SOURCES): Likewise.
9957 (grub_emu_SOURCES): Likewise.
9958 (pkgdata_MODULES): Add `affs.mod'.
9959 (affs_mod_SOURCES): New variable.
9960 (affs_mod_CFLAGS): Likewise.
9961 (affs_mod_LDFLAGS): Likewise.
9963 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
9964 (pkgdata_MODULES): Add `affs.mod'.
9965 (affs_mod_SOURCES): New variable.
9966 (affs_mod_CFLAGS): Likewise.
9968 * util/grub-emu.c (main): Call `grub_affs_init' and
9971 * include/grub/fs.h (grub_affs_init): New prototype.
9972 (grub_affs_fini): Likewise.
9974 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9976 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
9978 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9980 * configure.ac: Accept `x86_64' as host_cpu. In that case add
9983 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
9986 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
9987 (COMMON_LDFLAGS): New variable.
9988 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
9989 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
9990 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
9991 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
9992 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
9993 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
9994 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
9995 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
9996 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
9997 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
9998 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9999 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10000 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
10001 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
10002 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
10004 (normal_mod_ASFLAGS): Add `-m32'.
10006 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
10007 (grub_host_size_t, grub_host_ssize_t): New types.
10008 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
10009 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
10010 `GRUB_HOST_SIZEOF_VOID_P'.
10012 * include/grub/kernel.h (struct grub_module_header): Type of
10013 member offset changed to `grub_host_off_t'. Type of member size
10014 changed to `grub_host_size_t'.
10015 (struct grub_module_info): Type of member offset changed to
10016 `grub_host_off_t'. Type of member size changed to
10017 `grub_host_size_t'.
10019 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
10021 Make GRUB's kernel compliant to Multiboot Specification.
10023 * kern/i386/pc/startup.S (multiboot_header): New label.
10024 (multiboot_entry): Likewise.
10025 (multiboot_trampoline): Likewise.
10027 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10028 Increased to 0x4A0.
10030 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
10031 put parentheses after a question mark.
10032 [!GRUB_UTIL] (my_mod): New variable.
10034 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
10036 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
10038 Adds support for the XFS filesystem. Btrees are not supported
10041 * fs/xfs.c: New file.
10043 * DISTLIST: Added `fs/xfs.c'.
10045 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
10046 (grub_probefs_SOURCES): Likewise.
10047 (grub_emu_SOURCES): Likewise.
10048 (pkgdata_MODULES): Add `xfs.mod'.
10049 (xfs_mod_SOURCES): New variable.
10050 (xfs_mod_CFLAGS): Likewise.
10052 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
10053 (pkgdata_MODULES): Add `xfs.mod'.
10054 (xfs_mod_SOURCES): New variable.
10055 (xfs_mod_CFLAGS): Likewise.
10057 * util/grub-emu.c (main): Call `grub_xfs_init' and
10060 * include/grub/fs.h (grub_xfs_init): New prototype.
10061 (grub_xfs_fini): Likewise.
10064 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
10066 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
10067 color modes, allow greater than 16 colors to be configured as
10070 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
10072 * normal/completion.c (complete_arguments): Add the qualifier
10073 const into OPTIONS.
10075 From Omniflux <omniflux+lists@omniflux.com>:
10076 * include/grub/terminfo.h: New file.
10077 * include/grub/tparm.h: Likewise.
10078 * include/grub/i386/pc/serial.h: Likewise.
10079 * term/terminfo.c: Likewise.
10080 * term/tparm.c: Likewise.
10081 * term/i386/pc/serial.c: Likewise.
10082 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
10084 (terminfo_mod_SOURCES): New variable.
10085 (terminfo_mod_CFLAGS): Likewise.
10086 (serial_mod_SOURCES): Likewise.
10087 (serial_mod_CFLAGS): Likewise.
10089 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
10091 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
10092 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
10093 and kern/powerpc/ieee1275/cmain.c, respectively.
10095 * boot/powerpc/ieee1275/crt0.S: Moved to ...
10096 * kern/powerpc/ieee1275/crt0.S: ... here.
10098 * boot/powerpc/ieee1275/cmain.c: Moved to ...
10099 * kern/powerpc/ieee1275/cmain.c: ... here.
10101 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
10102 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
10103 instead of boot/powerpc/ieee1275/crt0.S and
10104 boot/powerpc/ieee1275/cmain.c, respectively.
10106 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
10107 sectors. It was not used anyway.
10109 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10111 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
10112 `unused parameter' warning.
10114 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
10116 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
10118 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
10121 2005-08-28 Marco Gerards <metgerards@student.han.nl>
10123 * include/grub/normal.h (enum grub_completion_type): Added
10124 `GRUB_COMPLETION_TYPE_ARGUMENT'.
10126 * normal/cmdline.c (print_completion): Handle
10127 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
10128 * normal/menu_entry.c (store_completion): Likewise.
10130 * normal/completion.c (complete_arguments): New function.
10131 (grub_normal_do_completion): Call `complete_arguments' when the
10132 current words start with a dash.
10134 2005-08-27 Marco Gerards <metgerards@student.han.nl>
10136 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
10137 `gzio.mod' instead of `io.mod').
10139 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
10141 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
10142 (DISTDIRS): Added io and video.
10143 Rewrite the search routine to make an output consistently.
10145 * DISTLIST: Added conf/sparc64-ieee1275.mk,
10146 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
10147 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
10148 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
10149 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
10150 util/powerpc/ieee1275/misc.c.
10152 * include/grub/gzio.h: New file.
10153 * io/gzio.c: Likewise.
10155 * kern/file.c (grub_file_close): Call grub_device_close only if
10156 FILE->DEVICE is not NULL.
10158 * include/grub/mm.h [!NULL] (NULL): New macro.
10160 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
10162 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
10163 (pkgdata_MODULES): Added gzio.mod.
10164 (gzio_mod_SOURCES): New variable.
10165 (gzio_mod_CFLAGS): Likewise.
10167 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
10168 (pkgdata_MODULES): Added gzio.mod.
10169 (gzio_mod_SOURCES): New variable.
10170 (gzio_mod_CFLAGS): Likewise.
10172 * commands/cat.c: Include grub/gzio.h.
10173 (grub_cmd_cat): Use grub_gzfile_open instead of
10176 * commands/cmp.c: Include grub/gzio.h.
10177 (grub_cmd_cmp): Use grub_gzfile_open instead of
10180 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
10181 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
10183 (grub_rescue_cmd_module): Likewise.
10185 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10187 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
10188 kern/sparc64/ieee1275/init.c because it contains _start.
10189 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
10191 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
10193 * configure.ac: Add support for sparc64 host with ieee1275
10195 * configure: Generated from configure.ac.
10196 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
10198 (grub_ofdisk_read): Likewise.
10199 (grub_ofdisk_open): Use %p to print pointer values, and cast the
10200 pointers as (void *) to remove a warning.
10201 (grub_ofdisk_close): Likewise.
10202 (grub_ofdisk_read): Likewise.
10203 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
10204 returns, so make it return void to remove a warning.
10205 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
10206 Corresponding prototype change.
10207 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
10208 values, and cast the pointers as (void *) to remove a warning.
10209 (grub_mm_dump): Likewise.
10210 * conf/sparc64-ieee1275.mk: New file.
10211 * conf/sparc64-ieee1275.rmk: Likewise.
10212 * include/grub/sparc64/setjmp.h: Likewise.
10213 * include/grub/sparc64/types.h: Likewise.
10214 * include/grub/sparc64/ieee1275/console.h: Likewise.
10215 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10216 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10217 * include/grub/sparc64/ieee1275/time.h: Likewise.
10218 * kern/sparc64/cache.c: Likewise.
10219 * kern/sparc64/dl.c: Likewise.
10220 * kern/sparc64/ieee1275/init.c: Likewise.
10221 * kern/sparc64/ieee1275/openfw.c: Likewise.
10223 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10225 * util/console.c (grub_ncurses_putchar): If C is greater than
10226 0x7f, set C to a question mark.
10227 (grub_ncurses_getcharwidth): New function.
10228 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
10231 * normal/menu.c (print_entry): Made aware of Unicode. First,
10232 convert TITLE to UCS-4, and predict the cursor position by
10235 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
10237 * kern/misc.c (grub_utf16_to_utf8): Likewise.
10239 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10241 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
10242 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10245 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
10246 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
10247 grub_strcpy and grub_strlen. Take it into account that a space
10248 character is inserted as a delimiter.
10250 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10252 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
10253 invalid magic in the error.
10255 * commands/search.c: New file.
10257 * util/grub-emu.c (main): Call grub_search_init and
10260 * kern/rescue.c (grub_rescue_print_disks): Removed.
10261 (grub_rescue_print_devices): New function.
10262 (grub_rescue_cmd_ls): Use grub_device_iterate with
10263 grub_rescue_print_devices instead of grub_disk_dev_iterate with
10264 grub_rescue_print_disks.
10266 * kern/partition.c (grub_partition_iterate): Return the result of
10267 PARTMAP->ITERATE instead of GRUB_ERRNO.
10269 * kern/device.c: Include grub/partition.h.
10270 (grub_device_iterate): New function.
10272 * include/grub/partition.h (grub_partition_iterate): Return int
10273 instead of grub_err_t.
10275 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
10277 [GRUB_UTIL] (grub_search_fini): Likewise.
10279 * include/grub/device.h (grub_device_iterate): New prototype.
10281 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10283 (pkgdata_MODULES): Added search.mod.
10284 (search_mod_SOURCES): New variable.
10285 (search_mod_CFLAGS): Likewise.
10287 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
10288 (pkgdata_MODULES): Added search.mod.
10289 (search_mod_SOURCES): New variable.
10290 (search_mod_CFLAGS): Likewise.
10292 * commands/ls.c (grub_ls_list_disks): Renamed to ...
10293 (grub_ls_list_devices): ... this, and use grub_device_iterate.
10294 All callers changed.
10296 * DISTLIST: Added commands/search.c.
10298 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
10300 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
10302 (grub_getcharwidth): New function.
10304 * kern/misc.c (grub_utf8_to_ucs4): New function.
10306 * include/grub/term.h (struct grub_term): Added a new member
10308 (grub_getcharwidth): New prototype.
10310 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
10312 * term/i386/pc/console.c (map_char): New function. Segregated from
10313 grub_console_putchar.
10314 (grub_console_putchar): Use map_char.
10315 (grub_console_getcharwidth): New function.
10316 (grub_console_term): Specified grub_console_getcharwidth as
10319 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
10320 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
10322 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
10324 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
10325 on grub_strtoul completely.
10326 (write_char): Declare local variables in the beginning of the
10328 (grub_vesafb_getcharwidth): New function.
10329 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
10332 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
10334 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
10335 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
10336 commands/i386/pc/vbetest.c.
10338 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
10339 call grub_vbe_get_controller_info again, because the returned
10340 information is volatile.
10341 (grub_vbe_set_video_mode): Mostly rewritten.
10342 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
10343 grub_vbe_status_t correctly.
10344 (grub_vbe_get_video_mode_info): Likewise.
10345 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
10346 several if statements.
10348 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
10349 * commands/i386/pc/vbeinfo.c: ... this.
10351 * commands/i386/pc/vbe_test.c: Renamed to ...
10352 * commands/i386/pc/vbetest.c: ... this.
10354 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
10356 (grub_cmd_vbeinfo): ... this. Save video modes before
10357 iterating. Skip a video mode, if it is not available, not enough
10358 information is given or it is monochrome. Show the memory
10359 model. Leave the interpretation of MODEVAR to grub_strtoul
10361 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
10362 (GRUB_MOD_FINI): Likewise.
10364 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
10365 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
10366 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
10367 duplicated grub_env_get. Leave the interpretation of MODEVAR to
10368 grub_strtoul completely.
10369 (real2pm): Removed.
10370 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
10371 (GRUB_MOD_FINI): Likewise.
10373 * normal/misc.c: Include grub/mm.h.
10375 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
10376 vbe_list_modes with vbetest.mod and vbeinfo.mod.
10377 (vbe_list_modes_mod_SOURCES): Removed.
10378 (vbe_list_modes_mod_CFLAGS): Likewise.
10379 (vbe_test_mod_SOURCES): Likewise.
10380 (vbe_test_mod_CFLAGS): Likewise.
10381 (vbeinfo_mod_SOURCES): New variable.
10382 (vbeinfo_mod_CFLAGS): Likewise.
10383 (vbetest_mod_SOURCES): Likewise.
10384 (vbetest_mod_CFLAGS): Likewise.
10386 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
10388 * normal/misc.c: New file.
10390 * DISTLIST: Added normal/misc.c.
10392 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
10393 DISK to HOOK. Call HOOK with DISK.
10394 * partmap/apple.c (apple_partition_map_iterate): Likewise.
10395 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10396 * partmap/sun.c (sun_partition_map_iterate): Likewise.
10398 * normal/menu_entry.c (struct screen): Added a new member
10399 "completion_shown".
10400 (completion_buffer): New global variable.
10401 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
10402 (store_completion): New function.
10403 (complete): Likewise.
10404 (clear_completions): Likewise.
10405 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
10406 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
10407 a tab, call complete.
10409 * normal/completion.c (disk_dev): Removed.
10410 (print_simple_completion): Likewise.
10411 (print_partition_completion): Likewise.
10412 (print_func): New global variable.
10413 (add_completion): Do not take the arguments WHAT or PRINT any
10414 longer. Added a new argument TYPE. Instead of printing directly,
10415 call PRINT_FUNC if not NULL.
10416 All callers changed.
10417 (complete_device): Use a local variable DEV instead of
10418 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
10419 (grub_normal_do_completion): Take a new argument HOOK. Do not
10420 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
10421 empty string, return NULL instead.
10422 All callers changed.
10424 * normal/cmdline.c (print_completion): New function.
10426 * kern/partition.c (grub_partition_iterate): Add an argument DISK
10428 All callers changed.
10430 * kern/disk.c (grub_print_partinfo): Removed.
10432 * include/grub/partition.h (struct grub_partition_map): Add a new
10433 argument DISK into HOOK of ITERATE.
10434 (grub_partition_iterate): Add a new argument DISK to HOOK.
10436 * include/grub/normal.h (enum grub_completion_type): New enum.
10437 (grub_completion_type_t): New type.
10438 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
10439 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
10440 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
10441 (GRUB_COMPLETION_TYPE_FILE): Likewise.
10442 (grub_normal_do_completion): Added a new argument HOOK.
10443 (grub_normal_print_device_info): New prototype.
10445 * include/grub/disk.h (grub_print_partinfo): Removed.
10447 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
10448 (normal_mod_SOURCES): Likewise.
10449 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10450 (normal_mod_SOURCES): Likewise.
10452 * commands/ls.c (grub_ls_list_disks): Use
10453 grub_normal_print_device_info instead of grub_print_partinfo. Free
10455 (grub_ls_list_files): Use grub_normal_print_device_info instead of
10456 duplicating the code.
10458 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10460 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
10461 follow GCS more precisely.
10462 * commands/i386/pc/vbe_test.c: Likewise.
10463 * include/grub/i386/pc/vbe.h: Likewise.
10464 * term/i386/pc/vesafb.c: Likewise.
10465 * video/i386/pc/vbe.c: Likewise.
10467 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10469 * DISTLIST: Added term/i386/pc/vesafb.c
10470 DISTLIST: Added video/i386/pc/vbe.c
10471 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
10472 DISTLIST: Added commands/i386/pc/vbe_test.c.
10473 * commands/i386/pc/vbe_list_modes.c: New file.
10474 * commands/i386/pc/vbe_test.c: Likewise.
10475 * term/i386/pc/vesafb.c: Likewise.
10476 * video/i386/pc/vbe.c: Likewise.
10477 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
10478 (grub_vbe_probe) Added prototype.
10479 (grub_vbe_set_video_mode) Likewise.
10480 (grub_vbe_get_video_mode) Likewise.
10481 (grub_vbe_get_video_mode_info) Likewise.
10482 (grub_vbe_set_pixel_rgb) Likewise.
10483 (grub_vbe_set_pixel_index) Likewise.
10484 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
10485 (pkgdata_MODULES): Added vesafb.mod.
10486 (pkgdata_MODULES): Added vbe_list_modes.mod.
10487 (pkgdata_MODULES): Added vbe_test.mod.
10488 (vbe_mod_SOURCES): Added.
10489 (vbe_mod_CFLAGS): Likewise.
10490 (vesafb_mod_SOURCES): Likewise.
10491 (vesafb_mod_CFLAGS): Likewise.
10492 (vbe_list_modes_mod_SOURCES): Likewise.
10493 (vbe_list_modes_mod_CFLAGS): Likewise.
10494 (vbe_test_mod_SOURCES): Likewise.
10495 (vbe_test_mod_CFLAGS): Likewise.
10497 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
10499 * normal/command.c (grub_command_execute): If INTERACTIVE is
10500 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
10501 CMDLINE. Disable the pager if INTERACTIVE is true.
10502 All callers are changed.
10504 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
10505 before reading a config file.
10506 * normal/main.c (read_config_file): Even if a command is not
10507 found, register it if it is within an entry.
10509 * util/grub-emu.c: Include sys/types.h and unistd.h.
10510 (options): Added --hold.
10511 (struct arguments): Added a new member "hold".
10512 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
10514 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
10515 cleared by a debugger, if it is not zero.
10517 * include/grub/normal.h (grub_command_execute): Add an argument
10520 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
10522 * DISTLIST: Added include/grub/i386/pc/vbe.h.
10524 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
10526 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
10527 program with another one, because the old one didn't detect a bug
10528 in gcc-3.4. Always use regparm 2, because the new test is still
10529 not enough for gcc-4.0. Someone must investigate a simple test
10530 case which detects a bug in gcc-4.0.
10532 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
10534 * DISTLIST: Added normal/completion.c.
10536 * normal/completion.c: New file.
10538 * term/i386/pc/console.c (grub_console_getwh): New function.
10539 (grub_console_term): Assign grub_console_getwh to getwh.
10541 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
10542 function is defined in normal/completion.c as
10543 grub_normal_do_completion.
10544 (grub_cmdline_get): Use grub_normal_do_completion instead of
10547 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
10548 returns non-zero, otherwise return 0.
10549 (grub_partition_iterate): First, probe the partition map. Then,
10550 call ITERATE only for this partition map.
10552 * kern/misc.c (grub_strncmp): Rewritten.
10554 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
10555 returns non-zero. Otherwise return 0.
10557 * include/grub/partition.h (grub_partition_map_iterate): Return
10558 int instead of void.
10560 * include/grub/normal.h (grub_normal_do_completion): New prototype.
10562 * include/grub/misc.h (grub_strncmp): Change the type of N to
10565 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
10568 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
10569 unsigned explicitly before comparing it with I.
10571 * kern/main.c (grub_env_write_root): Add the attribute unused into
10574 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10575 normal/completion.c.
10576 (normal_mod_SOURCES): Likewise.
10577 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10578 (normal_mod_SOURCES): Likewise.
10580 * normal/command.c (grub_iterate_commands): If ITERATE returns
10581 non-zero, return one immediately.
10583 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
10585 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
10586 * kern/i386/pc/startup.S: Updated Global Descriptor table's
10588 (grub_vbe_get_controller_info): New function.
10589 (grub_vbe_get_mode_info): Likewise.
10590 (grub_vbe_set_mode): Likewise.
10591 (grub_vbe_get_mode): Likewise.
10592 (grub_vbe_set_memory_window): Likewise.
10593 (grub_vbe_get_memory_window): Likewise.
10594 (grub_vbe_set_scanline_length): Likewise.
10595 (grub_vbe_get_scanline_length): Likewise.
10596 (grub_vbe_set_display_start): Likewise.
10597 (grub_vbe_get_display_start): Likewise.
10598 (grub_vbe_set_palette_data): Likewise.
10599 * include/grub/i386/pc/vbe.h: New file.
10601 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10603 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10604 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
10605 * DISTLIST: Likewise.
10606 * kern/ieee1275/of.c: Moved to ...
10607 * kern/ieee1275/ieee1275.c: ... here.
10609 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10611 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
10612 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
10613 Pass 0 as `end' parameter to grub_strtoul().
10615 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10617 * include/grub/powerpc/ieee1275/console.h: Do not include
10618 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
10620 (grub_console_cur_color): Remove i386-specific prototype.
10621 (grub_console_real_putchar): Likewise.
10622 (grub_console_checkkey): Likewise.
10623 (grub_console_getkey): Likewise.
10624 (grub_console_getxy): Likewise.
10625 (grub_console_gotoxy): Likewise.
10626 (grub_console_cls): Likewise.
10627 (grub_console_setcursor): Likewise.
10628 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
10629 Include <grub/machine/console.h>.
10630 * term/ieee1275/ofconsole.c: Likewise.
10632 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
10634 * Makefile.in (LIBLZO): New variable.
10636 * configure.ac: Check for LZO version 2.
10638 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
10639 lzo/lzo1x.h instead of lzo1x.h.
10641 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
10644 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
10645 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
10647 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
10648 copying the data from PARTITION to P.
10650 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10652 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
10653 negative, unload the module.
10655 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
10656 map is "pc_partition_map" but not "pc".
10657 (usage): Fix the description. The options are --boot-image and
10658 --core-image but not --boot-file or --core-file.
10659 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
10660 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
10663 * util/i386/pc/grub-install.in: Do not specify --boot-file or
10664 --core-file. Specify INSTALL_DEVICE as an argument.
10666 * util/console.c: Include config.h.
10667 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
10668 [HAVE_NCURSES_H]: Include ncurses.h.
10669 [HAVE_CURSES_H]: Include curses.h.
10670 [!A_NORMAL] (A_NORMAL): Defined as zero.
10671 [!A_STANDOUT] (A_STANDOUT): Likewise.
10673 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
10675 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
10677 * configure.ac: Check for curses libraries and headers.
10679 * Makefile.in (LIBCURSES): New variable.
10681 * genmk.rb (Script::rule): Set the executable bits.
10683 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
10684 name of the PC partition map is "pc_partition_map" but not "pc".
10686 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10688 * util/i386/pc/grub-install.in (grub_probefs): New variable.
10689 (modules): Likewise.
10690 (usage): Added descriptions for --modules and --grub-probefs.
10691 Handle --modules and --grub-probefs. Save the arguments in MODULES
10692 and GRUB_PROBEFS, respectively.
10693 Auto-detect a filesystem module against GRUBDIR. If the result is
10694 empty and modules are not specified explicitly, abort the
10695 installation. Add the result to MODULES.
10697 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
10698 disk/powerpc/ieee1275/ofdisk.c,
10699 include/grub/powerpc/ieee1275/init.h and
10700 term/powerpc/ieee1275/ofconsole.c.
10701 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
10702 term/ieee1275/ofconsole.c.
10704 * include/grub/powerpc/ieee1275/console.h: Resurrected.
10706 * COPYING: Upgraded to the latest version. Only the address of the
10707 FSF office has changed.
10709 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10711 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10712 kern/ieee1275.c with kern/ieee1275/of.c.
10714 * kern/ieee1275.c: Moved to ...
10715 * kern/ieee1275/of.c: ... here.
10717 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
10719 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
10722 * config.guess: Updated to the latest version from gnulib.
10723 * config.sub: Likewise.
10724 * install.sh: Likewise.
10725 * mkinstalldirs: Likewise.
10727 * include/grub/console.h: Removed. This file is arch-specific. Do
10728 not put this in include/grub.
10730 * include/grub/i386/pc/console.h: Resurrected.
10732 * util/console.c: Include grub/machine/console.h instead of
10734 * util/grub-emu.c: Likewise.
10736 2005-08-04 Marco Gerards <metgerards@student.han.nl>
10738 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
10741 From Vincent Pelletier <subdino2004@yahoo.fr>
10742 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
10743 Redefined to use grub_getwh.
10744 (grub_term): New member named getwh.
10745 (grub_getwh): New prototype.
10746 * kern/term.c (grub_getwh): New function.
10747 * term/i386/pc/console.c (grub_console_getwh): New function.
10748 (grub_console_term): New member `getwh'.
10749 * term/i386/pc/vga.c (grub_vga_getwh): New function.
10750 (grub_vga_term): New member `getwh'.
10751 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
10753 (grub_ofconsole_getw): New function.
10754 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
10755 (grub_ofconsole_term): New field named getwh and new initial
10758 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
10760 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
10761 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
10762 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
10763 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
10764 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
10765 of <grub/machine/ieee1275.h>.
10766 * commands/ieee1275/reboot.c: Likewise.
10767 * boot/powerpc/ieee1275/ieee1275.c: Move ...
10768 * kern/ieee1275.c: ... to here. All users updated. Change all
10769 parameter structs to use new type `grub_ieee1275_cell_t'.
10770 * term/powerpc/ieee1275/ofconsole.c: Move ...
10771 * term/ieee1275/ofconsole.c: ... to here. All users updated.
10772 * disk/powerpc/ieee1275/ofdisk.c: Move ...
10773 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
10774 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
10776 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
10777 Remove unused prototypes. All users updated.
10778 * include/grub/powerpc/ieee1275/console.h: Removed.
10779 * include/grub/powerpc/ieee1275/ieee1275.h: Define
10780 `grub_ieee1275_cell_t'.
10781 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
10782 Cast comparisons with -1 to the correct type.
10783 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
10784 type to match `grub_ieee1275_entry_fn'.
10786 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
10788 * DISTLIST: Added util/i386/pc/grub-probefs.c.
10790 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
10791 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
10793 (grub_probefs_SOURCES): New variable.
10795 * util/i386/pc/grub-probefs.c: New file.
10797 * util/i386/pc/grub-setup.c (main): Call
10798 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
10799 grub_hfs_init and grub_jfs_init to initialize the system. Call
10800 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
10801 grub_pc_partition_map_fini to finish the system.
10803 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
10805 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
10807 (grub_multiboot_load_elf32): Likewise.
10808 (grub_multiboot_is_elf64): Likewise.
10809 (grub_multiboot_load_elf64): Likewise.
10810 (grub_multiboot_load_elf): Likewise.
10811 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
10812 an ELF32 or ELF64 file.
10813 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
10815 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
10816 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
10817 NULL before calling FS->LABEL.
10818 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
10819 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
10820 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
10821 before calling FS->LABEL.
10823 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
10825 * util/i386/pc/grub-install.in (datadir): New variable.
10827 (pkgdatadir): New variable.
10828 (pkglibdir): Removed.
10830 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
10832 * DISTLIST: Added util/i386/pc/grub-install.in.
10834 * util/i386/pc/grub-install.in: New file.
10836 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
10837 (grub_install_SOURCES): Likewise.
10839 * genmk.rb: Added support for scripts.
10840 (Script): New class.
10841 (scripts): New variable.
10843 * Makefile.in (install-local): Install sbin_SCRIPTS by
10845 (uninstall): Remove sbin_SCRIPTS.
10847 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
10848 device, try to get a GRUB device by
10849 grub_util_biosdisk_get_grub_dev.
10852 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
10853 description for --device-map.
10855 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10857 Change the semantics of variable hooks. They now return strings
10858 instead of error values.
10860 * util/i386/pc/grub-setup.c: Include grub/env.h.
10861 (setup): Use grub_device_set_root instead of grub_env_set.
10863 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
10864 grub_env_get instead of grub_device_set_root and
10865 grub_device_get_root, respectively.
10867 * kern/main.c (grub_env_write_root): New function.
10868 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
10869 grub_env_set instead of grub_device_set_root.
10871 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
10873 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
10874 rather than calling ENV->WRITE_HOOK afterwards.
10875 (grub_env_get): Return the result of ENV->READ_HOOK rather than
10876 passing a pointer of a pointer.
10877 (grub_register_variable_hook): Change the types of "read_hook" and
10878 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
10880 Allocate the default empty string on the heap, because this string
10881 may be freed later.
10883 * kern/device.c: Include grub/env.h.
10884 (grub_device_set_root): Removed.
10885 (grub_device_get_root): Likewise.
10886 (grub_device_open): Use grub_env_get instead of
10887 grub_device_get_root.
10889 * include/grub/env.h (grub_env_read_hook_t): New type.
10890 (grub_env_write_hook_t): Likewise.
10891 (grub_env_var): Change the types of "read_hook" and "write_hook"
10892 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
10893 (grub_register_variable_hook): Likewise.
10895 * include/grub/device.h (grub_device_set_root): Removed.
10896 (grub_device_set_root): Likewise.
10898 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
10899 make sure that DIRNAME terminates with '/', so that
10900 grub_fat_find_dir will fail if PATH is not a directory.
10902 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
10904 Use the qualifier auto for print_files and print_files_long.
10905 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
10907 Put a newline only if there is no error.
10908 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
10911 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10913 * kern/partition.c (grub_partition_probe): Initialize PART to
10914 NULL. Otherwise, when no partition map is registered, this returns
10917 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
10919 * partmap/apple.c (apple_partition_map_iterate): Check if POS
10920 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
10923 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
10925 * commands/ls.c (grub_ls_list_disks): Print the filesystem
10926 information on each device, if it does not have partitions. Print
10927 "Device" instead of "Disk", because this function is not specific
10930 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
10931 static to ensure that it is put on the memory rather than a
10934 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10936 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
10937 (grub_cat_init): Likewise.
10938 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
10939 (options): Likewise.
10940 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
10941 (grub_configfile_init): Likewise.
10942 * font/manager.c (GRUB_MOD_INIT): Likewise.
10943 * commands/help.c (GRUB_MOD_INIT): Likewise.
10944 (grub_help_init): Likewise.
10945 * normal/command.c (grub_command_init): Likewise.
10946 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
10947 * disk/loopback.c (grub_loop_init): Likewise.
10948 (GRUB_MOD_INIT): Likewise.
10949 * commands/ls.c (grub_ls_init): Likewise.
10950 (GRUB_MOD_INIT): Likewise.
10951 (options): Likewise.
10952 * commands/boot.c (grub_boot_init): Likewise.
10953 (GRUB_MOD_INIT): Likewise.
10954 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
10955 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
10956 (GRUB_MOD_INIT): Likewise.
10957 * commands/cmp.c (grub_cmp_init): Likewise.
10958 (GRUB_MOD_INIT): Likewise.
10960 * normal/arg.c: Use <> instead of "" to include header files.
10961 (SHORT_ARG_HELP): New macro.
10962 (SHORT_ARG_USAGE): Likewise.
10963 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
10964 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
10966 (find_short): Check if C is 'h' or 'u' explicitly.
10967 (grub_arg_show_help): Use space characters instead of tabs. Treat
10968 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
10969 are shown with --help and --usage only if they are not used for
10970 the command itself.
10971 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
10974 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
10975 const into "longarg". Change the type of "shortarg" to int.
10977 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10979 * boot/i386/pc/boot.S (boot_drive_check): New label.
10981 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
10984 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
10985 which do not pass a boot drive correctly. Copied from GRUB Legacy.
10987 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10989 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
10990 When turning off Gate A20, skip the check and return immediately,
10991 because this is not fatal usually.
10993 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10995 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
10996 be 0x7C00 instead of 0x8000.
10998 * boot/i386/pc/pxeboot.S: Rewritten.
11000 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
11002 (gate_a20_check_state): Read a byte from 0x108000. Invert the
11005 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
11007 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
11008 robustness. This routine now supports a BIOS call and System
11009 Control Port A to modify the gate A20.
11011 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11012 Increased to 0x440.
11014 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
11016 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
11017 device path and resulting ihandle.
11018 (grub_ofdisk_close): dprintf the ihandle being closed.
11019 (grub_ofdisk_read): dprintf function parameters.
11020 * kern/mm.c (grub_mm_init_region): Likewise.
11021 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
11022 (grub_linux_boot): dprintf the Linux entry point, initrd address and
11023 size, and boot arguments.
11024 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
11025 before loading into memory.
11026 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
11027 before loading into memory.
11029 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
11031 * kern/mm.c: Added much documentation.
11032 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
11033 8, set to 5 instead of 8.
11035 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11037 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
11039 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
11040 (grub_mkdevicemap_SOURCES): New variable.
11042 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
11043 lib/device.c of GRUB Legacy.
11045 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
11047 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
11048 instead of PATH is NULL.
11050 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
11052 * commands/cmp.c (BUFFER_SIZE): New macro.
11053 (grub_cmd_cmp): Close the right file at the right time. Compare
11054 only data just read. Don't report files of different size as
11055 identical. Dynamically allocate buffers. Move variable
11056 declarations at the beginning of function.
11058 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
11060 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
11063 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
11065 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
11066 when backspace is pressed at beginning of line.
11068 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
11070 * DISTLIST: Added genfslist.sh.
11072 * normal/main.c (fs_module_list): New variable.
11073 (autoload_fs_module): New function.
11074 (read_fs_list): Likewise.
11075 (grub_normal_execute): Call read_fs_list.
11077 * kern/fs.c (grub_fs_autoload_hook): New variable.
11078 (grub_fs_probe): Added support for auto-loading.
11080 * include/grub/normal.h (struct grub_fs_module_list): New struct.
11081 (grub_fs_module_list_t): New type.
11083 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
11084 (grub_fs_autoload_hook): New prototype.
11086 * genfslist.sh: New file.
11088 * genmk.rb: Added a rule to generate a filesystem list.
11090 2005-06-30 Marco Gerards <metgerards@student.han.nl>
11092 * configure.ac: Fix the test for cross-compiling.
11094 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
11095 define GRUB_UTIL anymore.
11097 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
11098 so this function works on other systems than just big endian.
11099 (load_modules): Likewise.
11100 (add_segments): Likewise.
11102 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
11104 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
11105 contains `l' modifier, get a long from va_arg().
11107 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
11109 * kern/mm.c (grub_free): If the next free block which is being
11110 merged is the first free block, set the first block to the block
11112 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
11114 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11116 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
11117 `grub_ieee1275_chosen'.
11119 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
11121 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
11122 (grub_ieee1275_chosen): New variable.
11123 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
11125 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
11126 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11127 Rename first argument to `phandle' for consistency.
11128 (grub_ieee1275_get_property_length): Likewise.
11129 (grub_ieee1275_next_property): Likewise. Change type of first argument
11130 to grub_ieee1275_phandle_t.
11131 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
11132 Move export next to declaration.
11133 (grub_ieee1275_chosen): New variable.
11134 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
11135 Correct cosmetic typo.
11136 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
11137 `grub_ieee1275_chosen'.
11138 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
11139 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
11140 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
11141 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
11142 `grub_ieee1275_chosen'.
11144 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
11146 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
11148 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
11149 /chosen/bootargs as "variable=value" pairs.
11151 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
11153 * include/grub/misc.h (grub_dprintf): New macro.
11154 (grub_real_dprintf): New prototype.
11155 (grub_strword): Likewise.
11156 (grub_iswordseparator): Likewise.
11157 * kern/misc.c (grub_real_dprintf): New function.
11158 (grub_strword): Likewise.
11159 (grub_iswordseparator): Likewise.
11161 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
11163 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
11164 (roundup): Remove macro.
11165 (grub_ieee1275_flags): Make static.
11166 (grub_ieee1275_realmode): Remove.
11167 (grub_ieee1275_test_flag): New function.
11168 (grub_ieee1275_set_flag): Likewise.
11169 (find_options): Rename to `grub_ieee1275_find_options'; update
11170 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
11171 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
11172 (cmain): New prototype.
11173 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
11174 `grub_ieee1275_flags' directly.
11175 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
11176 machine/biosdisk.h.
11177 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
11178 Don't include grub/machine/init.h.
11179 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
11180 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11182 (grub_ieee1275_realmode): Likewise.
11183 (grub_ieee1275_flag): New enum.
11184 (grub_ieee1275_test_flag): New prototype.
11185 (grub_ieee1275_set_flag): New prototype.
11186 * include/grub/powerpc/ieee1275/init.h: Remove file.
11187 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
11188 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
11189 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
11190 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
11192 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
11193 `grub_ieee1275_test_flag'.
11194 (grub_ieee1275_encode_devname): Likewise.
11196 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
11198 * include/grub/powerpc/ieee1275/ieee1275.h
11199 (grub_ieee1275_encode_devname): New prototype.
11200 (grub_ieee1275_get_filename): Likewise.
11201 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
11203 (grub_set_prefix): Likewise.
11204 (grub_machine_init): Call grub_set_prefix.
11205 * kern/powerpc/ieee1275/openfw.c: Fix typos.
11206 (grub_parse_type): New enum.
11207 (grub_ieee1275_get_devargs): New function.
11208 (grub_ieee1275_get_devname): Likewise.
11209 (grub_ieee1275_parse_args): Likewise.
11210 (grub_ieee1275_get_filename): Likewise.
11211 (grub_ieee1275_encode_devname): Likewise.
11213 2005-03-30 Marco Gerards <metgerards@student.han.nl>
11215 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
11216 `grub_loader_unset'.
11218 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
11220 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
11221 instead of grub_ieee1275_interpret.
11222 (grub_halt_init): New function.
11223 (grub_halt_fini): Likewise.
11224 (GRUB_MOD_INIT): Correct message grammar.
11225 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
11226 instead of grub_ieee1275_interpret.
11227 (grub_reboot_init): New function.
11228 (grub_reboot_fini): Likewise.
11229 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
11230 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
11231 util/i386/pc/misc.c with commands/ieee1275/halt.c,
11232 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
11233 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
11235 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
11237 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
11239 (grub_halt): Likewise.
11240 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
11241 (cmain): Remove __attribute__((unused)).
11242 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
11243 (grub_heap_len): Likewise.
11244 (grub_machine_fini): New function.
11245 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
11246 (grub_halt): Likewise.
11247 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
11249 * util/powerpc/ieee1275/misc.c: New file.
11251 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
11253 * DISTLIST: New file.
11254 * gendistlist.sh: Likewise.
11256 * Makefile.in (COMMON_DISTFILES): Removed.
11257 (BOOT_DISTFILES): Likewise.
11258 (CONF_DISTFILES): Likewise.
11259 (DISK_DISTFILES): Likewise.
11260 (FS_DISTFILES): Likewise.
11261 (INCLUDE_DISTFILES): Likewise.
11262 (KERN_DISTFILES): Likewise.
11263 (LOADER_DISTFILES): Likewise.
11264 (TERM_DISTFILES): Likewise.
11265 (UTIL_DISTFILES): Likewise.
11266 (DISTFILES): Likewise.
11267 (uninstall): Uninstall files in $(pkgdata_DATA).
11268 (DISTLIST): New target.
11269 (distdir): Use the contents of the file DISTLIST to get a list of
11272 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
11274 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
11275 descriptor. This is ported from GRUB Legacy.
11277 * gencmdlist.sh: Added an extra semicolon to make it work with
11278 old sed versions. Reported by Robert Bihlmeyer
11279 <robbe@orcus.priv.at>.
11281 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
11283 Automatic loading of commands is supported.
11285 * normal/main.c (read_command_list): New function.
11286 (grub_normal_execute): Call read_command_list.
11288 * normal/command.c (grub_register_command): Return zero or CMD.
11289 Allocate CMD->NAME from the heap.
11290 Initialize CMD->MODULE_NAME to zero.
11291 Find the same name as well. If the same command is found and it is
11292 a dummy command, overwrite members. If it is not a dummy command,
11294 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
11295 (grub_command_find): If a dummy command is found, load a module
11296 and retry to find a command only once.
11298 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
11299 make sure that each command is loaded.
11301 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
11303 (struct grub_command): Remove const from the member `name'.
11304 Add a new member `module_name'.
11305 (grub_register_command): Return grub_command_t.
11307 * commands/help.c (grub_cmd_help): Call grub_command_find to make
11308 sure that each command is loaded.
11310 * genmk.rb (PModule::rule): Specify a module name without the
11311 suffix ".mod" to gencmdlist.sh.
11313 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11315 * gencmdlist.sh: New file.
11317 * genmk.rb (PModule::rule): Generate a rule for a command list.
11319 Generate command.lst from $(COMMANDFILES).
11321 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
11322 (DATA): Added $(pkgdata_DATA).
11323 (install-local): Install files in $(pkgdata_DATA).
11325 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
11327 * term/i386/pc/vga.c (debug_command): Removed.
11328 (GRUB_MOD_INIT): Do not register the command "debug".
11330 From Hollis Blanchard:
11331 * commands/configfile.c: New file.
11332 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11333 commands/configfile.c.
11334 (pkgdata_MODULES): Added configfile.mod.
11335 (configfile_mod_SOURCES): New variable.
11336 (configfile_mod_CFLAGS): Likewise.
11337 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11338 commands/configfile.c.
11339 (pkgdata_MODULES): Added configfile.mod.
11340 (configfile_mod_SOURCES): New variable.
11341 (configfile_mod_CFLAGS): Likewise.
11342 * util/grub-emu.c (main): Call grub_configfile_init and
11343 grub_configfile_fini.
11344 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
11346 [GRUB_UTIL] (grub_configfile_fini): Likewise.
11348 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11350 * normal/arg.c (grub_arg_show_help): Do not show the bug report
11353 * commands/help.c (grub_cmd_help): Do not print newlines after
11354 the last command in print_command_help.
11356 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11358 * commands/default.h: New file.
11359 * commands/timeout.h: Likewise.
11360 * normal/context.c: Likewise.
11362 * util/misc.c: Do not include sys/times.h.
11363 Include sys/time.h and grub/machine/time.h.
11364 (grub_get_rtc): Rewritten with gettimeofday.
11366 * util/grub-emu.c (main): Call grub_default_init and
11367 grub_timeout_init before grub_normal_init, and call
11368 grub_timeout_fini and grub_default_fini after grub_main.
11370 * util/console.c (grub_ncurses_checkkey): Return the read
11373 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
11376 * normal/main.c (read_config_file): Push MENU. If this fails,
11377 print an error and wait for a user input.
11378 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
11379 If a menu is empty or an error occurs, pop MENU.
11380 (grub_normal_execute): Pop and free MENU after grub_menu_run
11383 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
11385 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
11387 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11389 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
11391 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11394 * include/grub/normal.h (struct grub_menu_list): New struct.
11395 (grub_menu_list_t): New type.
11396 (struct grub_context): New struct.
11397 (grub_context_t): New type.
11398 (grub_register_command): Got rid of EXPORT_FUNC.
11399 (grub_unregister_command): Likewise.
11400 (grub_context_get): New prototype.
11401 (grub_context_get_current_menu): Likewise.
11402 (grub_context_push_menu): Likewise.
11403 (grub_context_pop_menu): Likewise.
11404 [GRUB_UTIL] (grub_default_init): Likewise.
11405 [GRUB_UTIL] (grub_default_fini): Likewise.
11406 [GRUB_UTIL] (grub_timeout_init): Likewise.
11407 [GRUB_UTIL] (grub_timeout_fini): Likewise.
11409 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
11410 commands/timeout.c and normal/context.c.
11411 (pkgdata_MODULES): Added default.mod and timeout.mod.
11412 (normal_mod_SOURCES): Added normal/context.c.
11413 (default_mod_SOURCES): New variable.
11414 (default_mod_CFLAGS): Likewise.
11415 (timeout_mod_SOURCES): Likewise.
11416 (timeout_mod_CFLAGS): Likewise.
11417 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
11419 (pkgdata_MODULES): Added default.mod and timeout.mod.
11420 (normal_mod_SOURCES): Added normal/context.c.
11421 (default_mod_SOURCES): New variable.
11422 (default_mod_CFLAGS): Likewise.
11423 (timeout_mod_SOURCES): Likewise.
11424 (timeout_mod_CFLAGS): Likewise.
11426 * Makefile.in (all-local): Added $(MKFILES).
11428 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
11430 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
11431 (grub_emu_SOURCES): Likewise.
11432 (pkgdata_MODULES): Add `sun.mod'.
11433 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11434 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11436 (pkgdata_MODULES): Add `sun.mod'.
11437 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11438 * include/grub/partition.h (grub_sun_partition_map_init): New
11440 (grub_sun_partition_map_fini): Likewise.
11441 * partmap/sun.c: New file.
11442 * util/grub-emu.c (main): Initialize and de-initialize the sun
11443 partitionmap support.
11445 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
11447 This implements an Emacs-like menu entry editor.
11449 * normal/menu_entry.c: New file.
11451 * util/console.c (grub_ncurses_putchar): Translate some Unicode
11452 characters to ASCII.
11453 (saved_char): New variable.
11454 (grub_ncurses_checkkey): Rewritten completely.
11455 (grub_ncurses_getkey): Likewise.
11456 (grub_ncurses_init): Call raw instead of cbreak.
11458 * normal/menu.c (print_entry): Do not put a space.
11459 (init_page): Renamed to ...
11460 (grub_menu_init_page): ... this. All callers changed.
11461 (edit_menu_entry): Removed.
11462 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
11464 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
11466 * kern/misc.c (grub_vprintf): Call grub_refresh.
11468 * normal/menu.c (DISP_LEFT): Renamed to ...
11469 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
11470 * normal/menu.c (DISP_UP): Renamed to ...
11471 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
11472 * normal/menu.c (DISP_RIGHT): Renamed to ...
11473 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
11474 * normal/menu.c (DISP_DOWN): Renamed to ...
11475 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
11476 * normal/menu.c (DISP_HLINE): Renamed to ...
11477 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
11478 * normal/menu.c (DISP_VLINE): Renamed to ...
11479 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
11480 * normal/menu.c (DISP_UL): Renamed to ...
11481 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
11482 * normal/menu.c (DISP_UR): Renamed to ...
11483 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
11484 * normal/menu.c (DISP_LL): Renamed to ...
11485 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
11486 * normal/menu.c (DISP_LR): Renamed to ...
11487 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
11488 * normal/menu.c (TERM_WIDTH): Renamed to ...
11489 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
11490 * normal/menu.c (TERM_HEIGHT): Renamed to ...
11491 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
11492 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
11493 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
11494 * normal/menu.c (TERM_MARGIN): Renamed to ...
11495 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
11496 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
11497 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
11498 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
11499 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
11500 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
11501 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
11502 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
11503 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
11504 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
11505 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
11506 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
11507 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
11508 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
11509 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
11510 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
11511 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
11512 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
11513 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
11514 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
11515 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
11516 All callers changed.
11518 * include/grub/normal.h: New prototype.
11520 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11521 normal/menu_entry.c.
11522 (normal_mod_SOURCES): Likewise.
11523 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11524 (normal_mod_SOURCES): Likewise.
11526 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
11528 * include/grub/normal.h (grub_halt_init): New prototype.
11529 (grub_halt_fini): Likewise.
11530 (grub_reboot_init): Likewise.
11531 (grub_reboot_fini): Likewise.
11533 * util/grub-emu.c: Include signal.h.
11534 (main_env): New global variable.
11535 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
11537 (grub_machine_fini): New function.
11538 (main): Call grub_halt_init and grub_reboot_init before
11539 grub_main, and grub_reboot_fini and grub_halt_fini after it.
11540 Call setjmp with MAIN_ENV to go back afterwards.
11541 Call grub_machine_fini right before return.
11543 * include/grub/util/misc.h: Include setjmp.h.
11544 (main_env): New prototype.
11546 * include/grub/kernel.h (grub_machine_fini): New prototype.
11547 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
11548 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
11550 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
11551 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
11552 * term/i386/pc/console.c (grub_console_fini): Likewise.
11554 * util/i386/pc/misc.c: New file.
11556 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11557 util/i386/pc/misc.c, commands/i386/pc/halt.c and
11558 commands/i386/pc/reboot.c.
11560 2005-02-14 Guillem Jover <guillem@hadrons.org>
11562 * include/grub/dl.h (grub_dl_check_header): New prototype.
11563 (grub_arch_dl_check_header): Change return type to grub_err_t,
11564 remove size parameter and export function. Update all callers.
11565 * kern/dl.c (grub_dl_check_header): New function.
11566 (grub_dl_load_core): Use `grub_dl_check_header' instead of
11567 `grub_arch_dl_check_header'. Check ELF type. Check if sections
11568 are inside the core.
11569 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
11570 independent ELF header checks.
11571 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11572 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
11573 `grub_dl_check_header' instead of explicit checks. Check for the
11575 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
11576 `grub_dl_check_header' instead of explicit checks. Remove arch
11577 specific ELF header checks.
11579 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
11582 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
11584 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
11585 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
11587 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
11589 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
11590 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
11591 (part_map_iterate): Clear `grub_errno' and return 0 if
11592 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
11593 * partmap/amiga.c (amiga_partition_map_iterate): Return
11594 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
11595 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11597 2005-02-01 Guillem Jover <guillem@hadrons.org>
11599 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
11602 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11604 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
11606 (grub_rescue_cmd_linux): New prototype.
11607 (grub_rescue_cmd_initrd): Likewise.
11608 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
11610 (grub_linux_release_mem): Release the memory for the initrd.
11611 (grub_load_linux): Renamed from this...
11612 (grub_rescue_cmd_linux): ...To this. Changed all callers.
11613 Changed `entry' not to be static. Loop over memory regions to
11614 find another one when the default fails.
11615 (grub_rescue_cmd_initrd): New function.
11616 (grub_linux_init): Remove function.
11617 (grub_linux_fini): Likewise.
11618 (GRUB_MOD_INIT): Register `initrd'.
11619 (GRUB_MOD_FINI): Unregister `initrd'.
11620 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
11622 (grub_linux_normal_fini): Likewise.
11623 (GRUB_MOD_INIT): Register `initrd'.
11624 (GRUB_MOD_FINI): Unregister `initrd'.
11626 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11628 * commands/help.c: New file.
11629 * normal/arg.c (show_help): Renamed to...
11630 (grub_arg_show_help): ... this.
11631 * commands/i386/pc/halt.c: New file.
11632 * commands/i386/pc/reboot.c: Likewise.
11633 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
11634 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
11635 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
11636 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
11638 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11640 (pkgdata_MODULES): Add `help.mod'.
11641 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
11642 * grub/i386/pc/init.h (grub_reboot): New prototype.
11643 (grub_halt): Likewise.
11644 * include/grub/normal.h (grub_arg_show_help): New prototype.
11645 (grub_help_init): Likewise.
11646 (grub_help_fini): Likewise.
11647 * util/grub-emu.c (main): Initialize and deinitialize the help
11650 * normal/cmdline.c (grub_cmdline_get): Doc fix.
11652 * normal/command.c (grub_command_init): Fixed the description of
11653 the `set' and `unset' commands.
11655 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11657 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
11659 * commands/ieee1275/halt.c: New file.
11660 * commands/ieee1275/reboot.c: Likewise.
11661 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
11662 `__attribute__ ((unused))'. Some GCS related fixed.
11663 (grub_suspend_init) [GRUB_UTIL]: Function removed.
11664 (grub_suspend_fini): Likewise.
11665 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
11667 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
11668 (halt_mod_CFLAGS): New variables.
11669 * include/grub/powerpc/ieee1275/ieee1275.h
11670 (grub_ieee1275_interpret): New prototype.
11672 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
11674 * include/grub/misc.h (memmove): New prototype.
11675 (memcpy): Likewise.
11677 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
11679 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
11680 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
11682 2005-01-22 Marco Gerards <metgerards@student.han.nl>
11684 * kern/misc.c (grub_strndup): Function rewritten.
11686 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
11688 * normal/menu.c (TERM_WIDTH): Macro redefined.
11689 (TERM_TOP_BORDER_Y): Likewise.
11690 (draw_border): Replaced while-loop by a for-loop. Make the number
11691 of lines consistent with the number of lines displayed in
11692 print_entries. Added a margin below the rectangle.
11693 (print_entry): Make the entry fit in the rectangle.
11694 (print_entries): Display the scroll arrows next to the right
11697 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11699 * fs/minix.c (grub_minix_find_file): Reserve more space for
11700 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
11701 `grub_strncpy' to copy `path' into it.
11703 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11705 Add the loopback device, a device via which files can be accessed
11708 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
11709 (pkgdata_MODULES): Add loopback.mod.
11710 (loopback_mod_SOURCES): New variable.
11711 (loopback_mod_CFLAGS): Likewise.
11712 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11714 (pkgdata_MODULES): Add loopback.mod.
11715 (loopback_mod_SOURCES): New variable.
11716 (loopback_mod_CFLAGS): Likewise.
11717 * disk/loopback.c: new file.
11718 * include/grub/normal.h (grub_loop_init): New prototype.
11719 (grub_loop_fini): New prototype.
11720 * util/grub-emu.c (main): Initialize and de-initialize loopback
11722 * include/grub/disk.h (grub_disk_dev_id): Add
11723 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
11725 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
11727 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
11729 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
11730 (suspend_mod_SOURCES): New variable.
11731 (suspend_mod_CFLAGS): Likewise.
11732 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
11734 * commands/ieee1275/suspend.c: New file.
11736 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11738 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
11739 ((unused))' to `__attribute__ ((used))'.
11740 (GRUB_MOD_FINI): Likewise.
11741 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
11742 * genmk.rb (PModule): Assign space to common symbols when linking
11745 2005-01-20 Marco Gerards <metgerards@student.han.nl>
11747 * include/grub/mm.h (grub_mm_init_region): Change the type of the
11748 `unsigned' arguments to `grub_size_t'.
11749 (grub_malloc): Likewise.
11750 (grub_realloc): Likewise.
11751 (grub_memalign): Likewise.
11752 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
11753 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11754 * util/misc.c (grub_malloc): Likewise.
11755 (grub_realloc): Likewise.
11756 * kern/mm.c (get_header_from_pointer): Change the casts to
11757 `unsigned' into a cast to `grub_size_t'.
11759 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
11760 point to `currnode' when `currnode' is changed.
11762 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
11763 Schottelius <nico-linux@schottelius.org>.
11765 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
11767 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
11768 (note_path): Remove variable.
11769 (GRUB_IEEE1275_NOTE_NAME): New macro.
11770 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
11771 (grub_ieee1275_note_hdr): New structure.
11772 (grub_ieee1275_note_desc): Likewise.
11773 (grub_ieee1275_note): Likewise.
11774 (load_note): Remove `dir' argument. All callers updated. Remove
11775 `note_img' and `path'. Do not load a file from `note_path'.
11776 Initialize a struct grub_ieee1275_note and write that to `out'.
11777 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
11779 2005-01-05 Marco Gerards <metgerards@student.han.nl>
11781 * util/misc.c (grub_util_read_image): Revert last change. It
11782 called `grub_util_read_at', which seeks from the beginning of the
11785 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
11787 * TODO: Add note about endianness in grub-mkimage.
11788 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
11790 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
11791 (grub_mkimage_SOURCES): New target.
11792 * include/grub/kernel.h (grub_start_addr): Remove variable.
11793 (grub_end_addr): Likewise.
11794 (grub_total_module_size): Likewise.
11795 (grub_kernel_image_size): Likewise.
11796 (GRUB_MODULE_MAGIC): New constant.
11797 (grub_module_info): New structure.
11798 (grub_arch_modules_addr): New prototype.
11799 (grub_get_end_addr): Remove prototype.
11800 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
11801 * include/grub/powerpc/ieee1275/kernel.h: New file.
11802 * include/grub/util/misc.h (grub_util_get_fp_size): New
11804 (grub_util_read_at): Likewise.
11805 (grub_util_write_image_at): Likewise.
11806 * kern/main.c (grub_get_end_addr): Remove function.
11807 (grub_load_modules): Call grub_arch_modules_addr instead of using
11808 grub_end_addr. Look for a grub_module_info struct in memory. Use
11809 the grub_module_info fields instead of calling grub_get_end_addr
11810 as loop conditions. Move grub_add_unused_region code here.
11811 (grub_add_unused_region): Remove function.
11812 * kern/i386/pc/init.c: Include grub/cache.h.
11813 (grub_machine_init): Remove call to grub_get_end_addr. Remove
11814 one call to add_mem_region.
11815 (grub_arch_modules_addr): New function.
11816 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
11817 (grub_total_module_size): Likewise.
11818 Include grub/machine/kernel.h.
11819 (grub_arch_modules_addr): New function.
11820 * util/grub-emu.c (grub_end_addr): Remove variable.
11821 (grub_total_module_size): Likewise.
11822 (grub_arch_modules_addr): New function.
11823 * util/misc.c: Include unistd.h.
11824 (grub_util_get_fp_size): New function.
11825 (grub_util_read_at): Likewise.
11826 (grub_util_write_image_at): Likewise.
11827 (grub_util_read_image): Call grub_util_read_at.
11828 (grub_util_write_image): Call grub_util_write_image_at.
11829 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
11830 additional memory in kernel_img for a struct grub_module_info.
11831 Fill in that grub_module_info.
11832 * util/powerpc/ieee1275/grub-mkimage.c: New file.
11834 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11836 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
11838 * include/grub/powerpc/ieee1275/ieee1275.h
11839 (grub_ieee1275_milliseconds): New prototype.
11840 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
11842 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
11843 grub_ieee1275_milliseconds.
11845 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11847 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
11849 (find_options): New function.
11850 (cmain): Call find_options.
11851 * include/grub/powerpc/ieee1275/ieee1275.h
11852 (grub_ieee1275_realmode): New extern variable.
11853 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
11854 grub_map if grub_ieee1275_realmode is false.
11856 2004-12-29 Marco Gerards <metgerards@student.han.nl>
11858 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
11859 lines are inserted and make it work like readline. Reported by
11860 Vincent Pelletier <subdino2004@yahoo.fr>.
11862 2004-12-28 Marco Gerards <metgerards@student.han.nl>
11864 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
11866 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
11867 `kern/powerpc/cache.S'.
11869 2004-12-27 Marco Gerards <metgerards@student.han.nl>
11871 * genmk.rb: Handle the `Program' class in the main loop. Written
11872 by Johan Rydberg <jrydberg@gnu.org>.
11873 (Program): New class.
11874 (programs): New variable.
11875 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
11876 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
11877 instead of "grub/kernel.h". Include <grub/machine/init.h>.
11878 (help_arch): Function removed.
11879 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
11880 `powerpc/libgcc.h' and `loader.h'.
11881 (pkgdata_PROGRAMS): New variable.
11882 (sbin_UTILITIES): Variable removed.
11883 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
11884 (grubof_SOURCES): Variable re-defined so it only includes the
11885 core functionality.
11886 (grubof_CFLAGS): Remove `-DGRUBOF'.
11887 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
11888 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
11889 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
11890 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
11891 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
11892 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
11893 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
11894 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
11895 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
11896 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
11897 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11898 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
11899 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
11900 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
11901 (pc_mod_CFLAGS): New variables.
11902 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
11903 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
11904 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
11905 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
11907 * include/grub/i386/pc/init.h (grub_os_area_addr)
11908 (rub_os_area_size): ... to here.
11909 * include/grub/powerpc/ieee1275/ieee1275.h
11910 (grub_ieee1275_entry_fn): Export symbol.
11911 * include/grub/powerpc/ieee1275/init.h: New file.
11912 * include/grub/powerpc/libgcc.h: Likewise.
11913 * include/grub/cache.h: Likewise.
11914 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
11915 <hollis@penguinppc.org>.
11916 * kern/dl.c: Include <grub/cache.h>.
11917 (grub_dl_flush_cache): New function.
11918 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
11920 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
11921 (grub_console_init): Removed prototypes.
11922 (grub_machine_init): Don't initialize the modules anymore.
11923 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
11925 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
11926 Macro undef removed.
11927 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
11928 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
11929 relocation `R_PPC_REL32'. Return an error when the relocation is
11931 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
11932 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
11933 * util/misc.c (grub_arch_sync_caches): Likewise.
11935 2004-12-19 Marco Gerards <metgerards@student.han.nl>
11937 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
11938 `symlist.c', add `grubof_symlist.c'.
11939 (symlist.c): Variable removed.
11940 (grubof_HEADERS): Variable added.
11941 (grubof_symlist.c): New target.
11942 (kernel_syms.lst): Use `grubof_HEADERS' instead of
11943 `kernel_img_HEADERS'.
11944 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
11945 * kern/powerpc/dl.c: New file.
11946 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
11948 (grub_arch_dl_relocate_symbols): Likewise.
11949 (grub_register_exported_symbols): Likewise.
11951 2004-12-13 Marco Gerards <metgerards@student.han.nl>
11953 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
11954 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
11955 to fail instead. Reported by Vincent Pelletier
11956 <subdino2004@yahoo.fr>.
11958 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
11959 it is not allocated. Reported by Vincent Pelletier
11960 <subdino2004@yahoo.fr>.
11962 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
11963 output so the output looks better.
11965 2004-12-04 Marco Gerards <metgerards@student.han.nl>
11967 Modulize the partition map support and add support for the amiga
11970 * commands/ls.c: Include <grub/partition.h> instead of
11971 <grub/machine/partition.h>.
11972 * kern/disk.c: Likewise.
11973 * kern/rescue.c: Likewise.
11974 * loader/i386/pc/chainloader.c: Likewise.
11975 * normal/cmdline.c: Likewise.
11976 * kern/powerpc/ieee1275/init.c: Likewise.
11977 (grub_machine_init): Call `grub_pc_partition_map_init',
11978 `grub_amiga_partition_map_init' and
11979 `grub_apple_partition_map_init'.
11980 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
11981 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
11982 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
11983 `partition.h' and `pc_partition.h'.
11984 (grub_setup_SOURCES): Remove
11985 `disk/i386/pc/partition.c'. Add `kern/partition.c',
11986 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11987 (grub_emu_SOURCES): Likewise.
11988 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
11989 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
11990 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
11991 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11992 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
11993 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11994 (grubof_SOURCES): Likewise.
11995 * disk/i386/pc/partition.c: File removed.
11996 * disk/powerpc/ieee1275/partition.c: Likewise.
11997 * include/grub/powerpc/ieee1275/partition.h: Likewise.
11998 * include/grub/i386/pc/partition.h: Likewise.
11999 * kern/partition.c: New file.
12000 * partmap/amiga.c: Likewise.
12001 * partmap/apple.c: Likewise.
12002 * partmap/pc.c: Likewise.
12003 * include/grub/partition.h: Likewise..
12004 * include/grub/pc_partition.h: Likewise.
12005 * util/grub-emu.c: Include <grub/partition.h> instead of
12006 <grub/machine/partition.h>.
12007 (main): Call `grub_pc_partition_map_init',
12008 `grub_amiga_partition_map_init' and
12009 `grub_apple_partition_map_init' and deinitialize afterwards.
12010 * util/i386/pc/biosdisk.c: Include `#include
12011 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12012 `<grub/machine/partition.h>'.
12013 * util/i386/pc/grub-setup.c: Likewise.
12014 * util/i386/pc/biosdisk.c: Likewise.
12015 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
12016 partition information in case of a PC partition.
12017 * util/i386/pc/grub-setup.c: Include `#include
12018 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
12019 `<grub/machine/partition.h>'.
12020 (setup): Only access the PC specific partition information in case
12023 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
12025 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
12026 (grub_longjmp): Likewise.
12027 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
12029 * normal/powerpc/setjmp.S: New file.
12030 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12031 `normal/powerpc/setjmp.S'.
12032 (grubof_CFLAGS): Add `-DGRUBOF'.
12033 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
12034 [GRUB_UTIL && !GRUBOF].
12036 2004-11-16 Marco Gerards <metgerards@student.han.nl>
12038 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
12039 property named `name'. Correctly handle the error returned by
12040 `grub_ieee1275_finddevice' if a device can not be opened.
12042 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
12044 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
12045 `actual' for negativity.
12046 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
12049 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12051 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
12052 (PAGE_OFFSET): New macro.
12053 (CRTC_ADDR_PORT): Likewise.
12054 (CRTC_DATA_PORT): Likewise.
12055 (START_ADDR_HIGH_REGISTER): Likewise.
12056 (START_ADDR_LOW_REGISTER): Likewise.
12057 (GRAPHICS_ADDR_PORT): Likewise.
12058 (GRAPHICS_DATA_PORT): Likewise.
12059 (READ_MAP_REGISTER): Likewise.
12060 (INPUT_STATUS1_REGISTER): Likewise.
12061 (INPUT_STATUS1_VERTR_BIT): Likewise.
12062 (page): New variable.
12063 (wait_vretrace): New function.
12064 (set_read_map): Likewise.
12065 (set_start_address): Likewise.
12066 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
12068 (check_vga_mem): Take the page into account.
12069 (write_char): Likewise.
12070 (write_cursor): Likewise.
12071 (scroll_up): Likewise. Copy the page to the page that is not
12072 shown and switch between both pages.
12073 (grub_vga_putchar): Fix off by one error.
12074 (grub_vga_cls): Wait for the vertical retrace. Take the page into
12077 2004-11-01 Marco Gerards <metgerards@student.han.nl>
12079 Add support for iso9660 (including rockridge).
12081 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12082 (iso9660_mod_SOURCES): New variable.
12083 (iso9660_mod_CFLAGS): Likewise.
12084 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
12085 * include/grub/fs.h (grub_iso9660_init): New prototype.
12086 * util/grub-emu.c (main): Call `grub_iso9660_init'.
12087 * fs/iso9660.c: New file.
12089 * include/grub/misc.h (grub_strncat): New prototype.
12090 * kern/misc.c (grub_strncat): New function.
12092 * fs/hfs.c (grub_hfs_mount): Translate the error
12093 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
12094 * fs/jfs.c (grub_jfs_mount): Likewise.
12095 * fs/ufs.c (grub_ufs_mount): Likewise.
12097 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
12099 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
12100 which initialized BAT registers.
12101 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
12102 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12104 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
12105 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
12107 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
12108 (grub_mapclaim): Likewise.
12109 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
12110 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
12113 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
12115 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
12116 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
12117 -ffreestanding and -msoft-float.
12119 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
12121 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
12122 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
12123 set in grub_ieee1275_flags.
12125 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
12127 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
12129 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
12130 grub_console_init first.
12131 Change the memory range used for grub_ieee1275_claim and
12132 grub_mm_init_region.
12133 Print an error message if the claim fails.
12134 Include <grub/misc.h>.
12136 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
12138 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
12139 Call grub_children_iterate for device nodes of type `scsi',
12141 (grub_ofdisk_open): Remove manual device alias resolution.
12142 Fix memory leak when device cannot be opened.
12143 * include/grub/powerpc/ieee1275/ieee1275.h
12144 (grub_children_iterate): New prototype.
12145 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
12147 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12148 Return -1 if args.size was -1.
12150 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12152 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
12153 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
12154 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
12155 Open Firmware's memory for it; claim memory from _start to _end.
12156 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
12157 (_end): New extern.
12158 (_start): Zero BSS from __bss_start to _end.
12159 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12161 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
12163 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
12165 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
12166 -1 if args.base was -1.
12168 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
12170 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
12171 escape sequence instead of a literal ^L. Also call
12172 grub_ofconsole_gotoxy.
12174 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
12176 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
12177 void * arguments to grub_addr_t. All callers updated. Also make
12178 the `result' argument optional.
12179 (grub_ieee1275_release): change void * arguments to grub_addr_t.
12180 All callers updated.
12182 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
12184 * commands/ls.c (grub_ls_list_files): Use the string following the
12185 initial ')', if present, as the filesystem path.
12186 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
12188 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
12190 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
12192 Make the source code of the menu interface more readable.
12194 * normal/menu.c: Include grub/mm.h.
12195 (TERM_WIDTH): New macro.
12196 (TERM_HEIGHT): Likewise.
12197 (TERM_INFO_HEIGHT): Likewise.
12198 (TERM_MARGIN): Likewise.
12199 (TERM_SCROLL_WIDTH): Likewise.
12200 (TERM_TOP_BORDER_Y): Likewise.
12201 (TERM_LEFT_BORDER_X): Likewise.
12202 (TERM_BORDER_WIDTH): Likewise.
12203 (TERM_MESSAGE_HEIGHT): Likewise.
12204 (TERM_BORDER_HEIGHT): Likewise.
12205 (TERM_NUM_ENTRIES): Likewise.
12206 (TERM_FIRST_ENTRY_Y): Likewise.
12207 (TERM_ENTRY_WIDTH): Likewise.
12208 (TERM_CURSOR_X): Likewise.
12209 (draw_border): Use macros instead of magic numbers.
12210 (print_entry): Likewise.
12211 (print_entries): Likewise.
12212 (run_menu): Likewise. Also, handle the key 'e'.
12213 (run_menu_entry): Ignore empty command lines.
12214 (print_message): Added a new argument EDIT. If EDIT is true,
12215 print a different message.
12216 (init_page): Likewise.
12217 (edit_menu_entry): New function. Not implemented yet.
12219 2004-09-17 Marco Gerards <metgerards@student.han.nl>
12221 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
12222 can be loaded from normal mode.
12224 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
12226 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
12227 (multiboot_mod_CFLAGS): New variables.
12228 * loader/i386/pc/linux_normal.c: New file.
12229 * loader/i386/pc/multiboot_normal.c: Likewise.
12231 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
12232 attribute `unused'.
12234 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
12235 `fdiro' to read the mode information from instead of `diro'.
12237 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
12238 looking up a symlink.
12240 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
12242 * normal/command.c (grub_command_execute): Don't parse the
12243 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
12244 flags of the command.
12246 * normal/menu.c (grub_menu_run): Fix typo.
12248 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
12250 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
12252 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
12253 `y + 1' instead of `y - 1'.
12255 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
12257 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
12259 From Hollis Blanchard <hollis@penguinppc.org>:
12260 * kern/misc.c (memmove): New alias for grub_memmove.
12261 (memcmp): New alias for grub_memcmp.
12262 (memset): New alias for grub_memset.
12263 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12264 Change "int handle" to "grub_ieee1275_phandle_t handle".
12265 * include/grub/powerpc/ieee1275/ieee1275.h
12266 (grub_ieee1275_get_property): Likewise.
12268 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
12270 Added normal mode command `chainloader' as module chain.mod, which
12271 depends on normal.mod and _chain.mod.
12273 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
12274 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
12275 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
12277 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
12278 but arguments parsing moved to ...
12279 (grub_chainloader_cmd): ... here. New function.
12280 * include/grub/i386/pc/chainloader.h: New file.
12281 * loader/i386/pc/chainloader_normal.c: Likewise.
12283 2004-09-11 Marco Gerards <metgerards@student.han.nl>
12285 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
12286 (grub_mkimage_LDFLAGS): Likewise.
12287 (grub_emu_SOURCES): Likewise.
12288 (kernel_img_HEADERS): Added fshelp.h.
12289 * fs/ext2.c: Include <grub/fshelp.h>.
12290 (FILETYPE_REG): New macro.
12291 (FILETYPE_INO_REG): Likewise.
12292 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
12294 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
12296 (grub_fshelp_node): New struct.
12297 (grub_ext2_data): Added member `diropen'. Changed member `inode'
12299 (grub_ext2_get_file_block): Removed function.
12300 (grub_ext2_read_block): New function.
12301 (grub_ext2_read_file): Replaced parameter `data' by `node'.
12302 This function was written.
12303 (grub_ext2_mount): Read the root inode. Create a diropen struct.
12304 (grub_ext2_find_file): Removed function.
12305 (grub_ext2_read_symlink): New function.
12306 (grub_ext2_iterate_dir): Likewise.
12307 (grub_ext2_open): Rewritten.
12308 (grub_ext2_dir): Rewritten.
12309 * include/grub/fshelp.h: New file.
12310 * fs/fshelp.c: Likewise.
12312 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
12314 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
12315 (print_message): Add a missing newline.
12316 (run_menu): Added timeout support.
12317 (run_menu_entry): New local function.
12318 (grub_menu_run): Added support for booting.
12320 * kern/loader.c (grub_loader_is_loaded): New function.
12322 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
12323 (grub_get_rtc): Exported.
12325 * include/grub/i386/pc/time.h: Include grub/symbol.h.
12326 (grub_get_rtc): Exported.
12328 * include/grub/normal.h (struct grub_command_list): Remove
12329 constant from the member `command'.
12331 * include/grub/loader.h (grub_loader_is_loaded): Declared.
12333 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
12335 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
12337 2004-08-28 Marco Gerards <metgerards@student.han.nl>
12339 Add support for the JFS filesystem.
12341 * fs/jfs.c: New file.
12342 * include/grub/fs.h (grub_jfs_init): New prototype.
12343 (grub_jfs_fini): New prototype.
12344 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
12345 (grub_emu_SOURCES): Likewise.
12346 (pkgdata_MODULES): Add jfs.mod.
12347 (jfs_mod_SOURCES): New variable.
12348 (jfs_mod_CFLAGS): Likewise.
12349 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
12350 (grubof_SOURCES): Likewise.
12351 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
12353 * fs/fat.c (grub_fat_find_dir): Convert the filename little
12354 endian to the host endian.
12355 (grub_fat_utf16_to_utf8): Move function from there...
12356 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
12357 the endianness of the source string anymore.
12358 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
12360 2004-08-24 Marco Gerards <metgerards@student.han.nl>
12362 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
12363 (grub_boot_fini) [GRUB_UTIL]: Likewise.
12364 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
12365 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
12367 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
12368 (grub_hfs_iterate_dir): Make the function static. Add prototypes
12369 for `node_found' and `it_dir'.
12370 (grub_hfs_dir): Add prototype for `dir_hook'.
12372 * fs/minix.c (grub_minix_get_file_block): Add prototype for
12373 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
12374 and `indir32' to silence a gcc warning.
12376 * include/grub/fs.h (grub_hfs_init): New prototype.
12377 (grub_hfs_fini): Likewise.
12380 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12382 Each disk device has its own id now. This is useful to make use
12383 of multiple disk devices.
12385 * include/grub/disk.h (grub_disk_dev_id): New enum.
12386 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
12387 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
12389 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
12390 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12392 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
12393 GRUB_DISK_DEVICE_OFDISK_ID as an id.
12395 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
12396 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12398 * include/grub/disk.h (struct grub_disk_dev): Added a new member
12399 "id" which is used by the cache manager.
12401 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
12404 2004-08-18 Marco Gerards <metgerards@student.han.nl>
12406 * fs/hfs.c: New file.
12407 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
12408 (grub_emu_SOURCES): Likewise.
12409 (pkgdata_MODULES): Add hfs.mod.
12410 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
12411 (grubof_SOURCES): Likewise.
12412 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
12414 * include/grub/misc.h (grub_strncasecmp): Add prototype.
12415 * kern/misc.c (grub_strncasecmp): Add function.
12417 2004-08-14 Marco Gerards <metgerards@student.han.nl>
12419 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
12422 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
12423 (grub_ext2_dir): In case the directory entry type is unknown, read
12426 2004-08-02 Peter Bruin <pjbruin@dds.nl>
12428 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
12429 grub_load_linux instead of grub_rescue_cmd_linux as second
12430 argument of grub_rescue_register_command.
12432 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
12434 2004-07-27 Marco Gerards <metgerards@student.han.nl>
12436 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
12438 * commands/boot.c: Remove the check for `GRUB_UTIL'.
12439 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12440 `loader/powerpc/ieee1275/linux.c',
12441 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
12442 * include/grub/powerpc/ieee1275/ieee1275.h
12443 (grub_ieee1275_release): New prototype.
12444 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
12445 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
12446 normal, boot, linux and linux_normal.
12447 * loader/powerpc/ieee1275/linux.c: New file.
12448 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12450 2004-07-12 Marco Gerards <metgerards@student.han.nl>
12452 * normal/arg.c (grub_arg_parse): Correct error handling after
12453 reallocating the argumentlist (check if `argl' is not null instead
12454 of checking if `args' is not null).
12455 * kern/mm.c (grub_realloc): Return the same pointer when using the
12456 same region, instead of returning the header address.
12458 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12460 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
12461 one block instead of two when looking for the initial partition.
12462 (grub_partition_probe): Initialize the local variable `p' with 0.
12463 Use base 10 for the grub_strtoul call.
12464 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
12465 need for one local variable.
12466 (grub_strtoul): Don't add the new value to `num', instead of that
12469 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12471 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
12472 (pxeboot_img_SOURCES): New variable.
12473 (pxeboot_img_ASFLAGS): Likewise.
12474 (pxeboot_img_LDFLAGS): Likewise.
12475 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
12476 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
12477 <lode_leroy@hotmail.com>.
12479 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12481 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
12482 there was no input.
12484 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12486 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
12487 the history buffer logic.
12489 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12491 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
12492 (FILETYPE_INO_SYMLINK): New macros.
12493 (grub_ext2_find_file): Check if the node is a directory using the
12494 inode stat information instead of using the filetype in the
12495 dirent. Exclude the first character of an absolute symlink.
12496 (grub_ext2_dir): Mask out the filetype part of the mode member of
12499 2004-05-24 Marco Gerards <metgerards@student.han.nl>
12501 Add support for UFS version 1 and 2. Add support for the minix
12502 filesystem version 1 and 2, both the variants with 14 and 30 long
12505 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
12507 (grub_emu_SOURCES): Likewise.
12508 (pkgdata_MODULES): Add ufs.mod and minix.mod.
12509 (ufs_mod_SOURCES): New variable.
12510 (ufs_mod_CFLAGS): Likewise.
12511 (minix_mod_SOURCES): Likewise.
12512 (minix_mod_CFLAGS): Likewise.
12513 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
12515 (grubof_SOURCES): Likewise.
12516 * fs/ufs.c: New file.
12517 * fs/minix.c: New file.
12518 * include/grub/fs.h (grub_ufs_init): New prototype.
12519 (grub_ufs_fini): Likewise.
12520 (grub_minix_init): Likewise.
12521 (grub_minix_fini): Likewise.
12522 * util/grub-emu.c (main): Initialize and deinitialize UFS and
12525 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
12527 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
12528 commands/ls.c, commands/terminal.c, commands/boot.c,
12529 commands/cmp.c and commands/cat.c.
12530 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
12532 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
12535 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12537 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
12538 and grub_, respectively. Because the conversion is trivial and
12539 mechanical, I omit the details here. Please refer to the CVS
12540 if you need more information.
12542 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12544 * include/pupa: Renamed to ...
12545 * include/grub: ... this.
12546 * util/i386/pc/pupa-mkimage.c: Renamed to ...
12547 * util/i386/pc/grub-mkimage.c: ... this.
12548 * util/i386/pc/pupa-setup.c: Renamed to ...
12549 * util/i386/pc/grub-setup.c: ... this.
12550 * util/pupa-emu.c: Renamed to ...
12551 * util/grub-emu.c: ... this.
12553 2004-03-29 Marco Gerards <metgerards@student.han.nl>
12555 Add support for the newworld apple macintosh (PPC). This has been
12556 tested on the powerbook 2000 only. It only adds support for
12557 generic ieee1275 functions, console and disk support. This should
12558 be easy to port to other architectures with support for Open
12561 * configure.ac: Accept the powerpc as host_cpu. In the case of
12562 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
12563 specific tests are only executed while building for the i386.
12564 Inverse test for crosscompile.
12565 * genmk.rb (Utility): Allow assembler files.
12566 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
12567 * conf/powerpc-ieee1275.rmk: New file.
12568 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
12569 * disk/powerpc/ieee1275/partition.c: Likewise.
12570 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
12571 * include/pupa/powerpc/ieee1275/console.h: Likewise.
12572 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
12573 * include/pupa/powerpc/ieee1275/time.h: Likewise.
12574 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
12575 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
12576 * include/pupa/powerpc/ieee1275/loader.h
12577 * include/pupa/powerpc/setjmp.h: Likewise.
12578 * include/pupa/powerpc/types.h: Likewise.
12579 * kern/powerpc/ieee1275/init.c: Likewise.
12580 * kern/powerpc/ieee1275/openfw.c: Likewise.
12581 * term/powerpc/ieee1275/ofconsole.c: Likewise.
12583 These files were written by Johan Rydberg
12584 (jrydberg@night.trouble.net) and I only modified them slightly.
12586 * boot/powerpc/ieee1275/cmain.c: New file.
12587 * boot/powerpc/ieee1275/crt0.S: Likewise.
12588 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
12589 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
12591 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
12593 * Makefile.in: Update copyright.
12594 * genmodsrc.sh: Likewise.
12595 * gensymlist.sh: Likewise.
12596 * term/i386/pc/vga.c: Indent correctly.
12598 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
12599 bugreporting address.
12600 * util/i386/pc/pupa-setup.c (usage): Likewise,
12601 (main): Call pupa_ext2_init and pupa_ext2_fini.
12603 * fs/fat.c (log2): Renamed to ...
12604 (fat_log2): ... this.
12605 All callers changed.
12606 * kern/misc.c (memcpy): Alias to pupa_memmove.
12607 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
12609 * util/console.c (pupa_ncurses_fini): Return 0.
12611 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
12612 Move fail label here.
12613 [__GNU__]: Don't warn when using stat.
12614 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
12615 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
12616 long int. Use strtol instead of strtoul.
12618 2004-03-14 Marco Gerards <metgerards@student.han.nl>
12620 * commands/boot.c: New file.
12621 * commands/cat.c: Likewise.
12622 * commands/cmp.c: Likewise.
12623 * commands/ls.c: Likewise.
12624 * commands/terminal.c: Likewise.
12625 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
12626 (pupa_register_command): Changed interface to match the new
12628 (pupa_command_execute): Changed (almost rewritten) so it uses
12629 pupa_split_command. Added support for setting variables using the
12631 (rescue_command): Changed to work with the new argument parser.
12632 (terminal_command): Moved from here to commands/terminal.c.
12633 (set_command): New function.
12634 (unset_command): New function.
12635 (insmod_command): New function.
12636 (rmmod_command): New function.
12637 (lsmod_command): New function.
12638 (pupa_command_init): Don't initialize the command terminal
12639 anymore. Initialize the commands set, unset, insmod, rmmod and
12641 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
12642 (kernel_img_HEADERS): Add arg.h and env.h.
12643 (pupa_mkimage_LDFLAGS): Add kern/env.c.
12644 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
12645 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
12647 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
12649 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
12650 (boot_mod_SOURCES): New variable.
12651 (terminal_mod_SOURCES): Likewise.
12652 (ls_mod_SOURCES): Likewise.
12653 (cmp_mod_SOURCES): Likewise.
12654 (cat_mod_SOURCES): Likewise.
12656 * normal/arg.c: New file.
12657 * kern/env.c: Likewise.
12658 * include/pupa/arg.h: Likewise.
12659 * include/pupa/env.h: Likewise.
12660 * font/manager.c (font_command): Changed to match argument parsing
12662 (PUPA_MOD_INIT): Likewise.
12663 * hello/hello.c (pupa_cmd_hello): Likewise.
12664 (PUPA_MOD_INIT): Likewise.
12665 * include/pupa/disk.h: Include <pupa/device.h>.
12666 (pupa_print_partinfo): New prototype.
12667 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
12668 (pupa_dl_get_prefix): Likewise.
12669 * include/pupa/misc.h: Include <pupa/err.h>.
12670 (pupa_isgraph): New prototype.
12671 (pupa_isdigit): Likewise.
12672 (pupa_split_cmdline): Likewise.
12673 * include/pupa/normal.h: Include <pupa/arg.h>.
12674 (pupa_command): Changed the prototype of the member `func' to
12675 match the argument parsing interface. Added member `options'.
12676 (pupa_register_command): Updated to match function.
12677 (pupa_arg_parse): New prototype.
12678 (pupa_hello_init) [PUPA_UTIL]: New prototype.
12679 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
12680 (pupa_ls_init) [PUPA_UTIL]: Likewise.
12681 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
12682 (pupa_cat_init) [PUPA_UTIL]: Likewise.
12683 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
12684 (pupa_boot_init) [PUPA_UTIL]: Likewise.
12685 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
12686 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
12687 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
12688 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
12689 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
12690 * kern/disk.c: Include <pupa/file.h>.
12691 (pupa_print_partinfo): New function.
12692 * kern/dl.c: Include <pupa/env.h>.
12693 (pupa_dl_dir): Variable removed.
12694 (pupa_dl_load): Use the environment variable `prefix' instead of
12695 the variable pupa_dl_dir.
12696 (pupa_dl_set_prefix): Function removed.
12697 (pupa_dl_get_prefix): Likewise.
12698 * kern/i386/pc/init.c: Include <pupa/env.h>.
12699 (pupa_machine_init): Use the environment variable `prefix' instead of
12700 using pupa_dl_set_prefix to set the prefix.
12701 * kern/main.c: Include <pupa/env.h>.
12702 (pupa_set_root_dev): Use the environment variable `prefix' instead of
12703 using pupa_dl_get_prefix to get the prefix.
12704 * kern/misc.c: Include <pupa/env.h>.
12705 (pupa_isdigit): New function.
12706 (pupa_isgraph): Likewise.
12707 (pupa_ftoa): Likewise.
12708 (pupa_vsprintf): Added support for printing values of the type
12709 `double'. Make it possible to format variable output when using
12710 formatting like `%1.2%f'.
12711 (pupa_split_cmdline): New function.
12712 * kern/rescue.c: Include <pupa/env.h>.
12713 (next_word): Removed function.
12714 (pupa_rescue_cmd_prefix): Likewise.
12715 (pupa_rescue_cmd_set): New function.
12716 (pupa_rescue_cmd_unset): New function.
12717 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
12718 split the command line instead of splitting it here. Added
12719 support for setting variables using the syntax `foo=bar'. Don't
12720 initialize the prefix command anymore. Initialized the set and
12722 * normal/cmdline.c: Include <pupa/env.h>.
12723 (pupa_tab_complete): Added prototypes for print_simple_completion,
12724 print_partition_completion, add_completion, iterate_commands,
12725 iterate_dev, iterate_part and iterate_dir. Moved code to print
12726 partition information from here to kern/disk.c.
12727 (pupa_cmdline_run): Don't check if the function exists anymore.
12728 * normal/main.c: Include <pupa/env.h>.
12729 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
12730 instead of using pupa_dl_get_prefix to get the prefix.
12731 * term/i386/pc/vga.c: Include <pupa/arg.h>.
12732 (check_vga_mem): Cast pointers to `void *' to silence a gcc
12734 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
12735 (pupa_vga_setcolor): Declare unused variables with `__attribute__
12736 ((unused))' to silence a gcc warning.
12737 (pupa_vga_setcolor): Likewise.
12738 (debug_command): Changed to match argument parsing
12740 * util/pupa-emu.c: Include <pupa/env.h>.
12741 (options): Added 0's for unused fields to silence a gcc warning.
12743 (main): Use the environment variable `prefix' instead of using
12744 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
12745 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
12748 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
12749 * util/misc.c: Include <malloc.h>.
12750 (pupa_malloc): Rewritten so errors are correctly reported.
12751 (pupa_realloc): Likewise.
12752 (pupa_memalign): Likewise.
12753 (pupa_mm_init_region): Declare unused variables with
12754 `__attribute__ ((unused))' to silence a gcc warning.
12755 * normal/i386/setjmp.S: Remove tab at the end of the file to
12756 silence a gcc warning.
12757 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
12758 variables with `__attribute__ ((unused))' to silence a gcc
12760 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
12761 local variable i unsigned to silence a gcc warning.
12763 * kern/term.c: Include <pupa/misc.h>.
12764 (pupa_more_lines): New variable.
12765 (pupa_more): Likewise.
12766 (pupa_putcode): When the pager is active pause at the end of every
12768 (pupa_set_more): New function.
12769 * include/pupa/term.h (pupa_set_more): New prototype.
12772 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
12774 Now this project is GRUB 2 rather than PUPA. The location of
12775 the CVS repository was moved to GRUB's.
12777 * configure.ac: Use bug-grub as the reporting address.
12778 Use GRUB instead of PUPA.
12779 Change the version number to 1.90.
12781 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
12783 * genkernsyms.sh: Updated copyright information.
12784 * genmk.rb: Likewise.
12785 * genmodsrc.sh: Likewise.
12786 * gensymlist.sh: Likewise.
12787 * boot/i386/pc/boot.S: Likewise.
12788 * boot/i386/pc/diskboot.S: Likewise.
12789 * disk/i386/pc/biosdisk.c: Likewise.
12790 * disk/i386/pc/partition.c: Likewise.
12791 * font/manager.c: Likewise.
12792 * fs/ext2.c: Likewise.
12793 * fs/fat.c: Likewise.
12794 * include/pupa/boot.h: Likewise.
12795 * include/pupa/device.h: Likewise.
12796 * include/pupa/disk.h: Likewise.
12797 * include/pupa/dl.h: Likewise.
12798 * include/pupa/elf.h: Likewise.
12799 * include/pupa/err.h: Likewise.
12800 * include/pupa/file.h: Likewise.
12801 * include/pupa/font.h: Likewise.
12802 * include/pupa/fs.h: Likewise.
12803 * include/pupa/kernel.h: Likewise.
12804 * include/pupa/loader.h: Likewise.
12805 * include/pupa/misc.h: Likewise.
12806 * include/pupa/mm.h: Likewise.
12807 * include/pupa/net.h: Likewise.
12808 * include/pupa/normal.h: Likewise.
12809 * include/pupa/rescue.h: Likewise.
12810 * include/pupa/setjmp.h: Likewise.
12811 * include/pupa/symbol.h: Likewise.
12812 * include/pupa/term.h: Likewise.
12813 * include/pupa/types.h: Likewise.
12814 * include/pupa/i386/setjmp.h: Likewise.
12815 * include/pupa/i386/types.h: Likewise.
12816 * include/pupa/i386/pc/biosdisk.h: Likewise.
12817 * include/pupa/i386/pc/boot.h: Likewise.
12818 * include/pupa/i386/pc/console.h: Likewise.
12819 * include/pupa/i386/pc/init.h: Likewise.
12820 * include/pupa/i386/pc/kernel.h: Likewise.
12821 * include/pupa/i386/pc/linux.h: Likewise.
12822 * include/pupa/i386/pc/loader.h: Likewise.
12823 * include/pupa/i386/pc/memory.h: Likewise.
12824 * include/pupa/i386/pc/multiboot.h: Likewise.
12825 * include/pupa/i386/pc/partition.h: Likewise.
12826 * include/pupa/i386/pc/time.h: Likewise.
12827 * include/pupa/i386/pc/vga.h: Likewise.
12828 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
12829 * include/pupa/util/getroot.h: Likewise.
12830 * include/pupa/util/misc.h: Likewise.
12831 * include/pupa/util/resolve.h: Likewise.
12832 * kern/device.c: Likewise.
12833 * kern/disk.c: Likewise.
12834 * kern/dl.c: Likewise.
12835 * kern/err.c: Likewise.
12836 * kern/file.c: Likewise.
12837 * kern/fs.c: Likewise.
12838 * kern/loader.c: Likewise.
12839 * kern/main.c: Likewise.
12840 * kern/misc.c: Likewise.
12841 * kern/mm.c: Likewise.
12842 * kern/rescue.c: Likewise.
12843 * kern/term.c: Likewise.
12844 * kern/i386/dl.c: Likewise.
12845 * kern/i386/pc/init.c: Likewise.
12846 * kern/i386/pc/lzo1x.S: Likewise.
12847 * kern/i386/pc/startup.S: Likewise.
12848 * loader/i386/pc/chainloader.c: Likewise.
12849 * loader/i386/pc/linux.c: Likewise.
12850 * loader/i386/pc/multiboot.c: Likewise.
12851 * normal/cmdline.c: Likewise.
12852 * normal/command.c: Likewise.
12853 * normal/main.c: Likewise.
12854 * normal/menu.c: Likewise.
12855 * normal/i386/setjmp.S: Likewise.
12856 * term/i386/pc/console.c: Likewise.
12857 * term/i386/pc/vga.c: Likewise.
12858 * util/console.c: Likewise.
12859 * util/genmoddep.c: Likewise.
12860 * util/misc.c: Likewise.
12861 * util/pupa-emu.c: Likewise.
12862 * util/resolve.c: Likewise.
12863 * util/unifont2pff.rb: Likewise.
12864 * util/i386/pc/biosdisk.c: Likewise.
12865 * util/i386/pc/getroot.c: Likewise.
12866 * util/i386/pc/pupa-mkimage.c: Likewise.
12867 * util/i386/pc/pupa-setup.c: Likewise.
12869 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
12871 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
12872 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
12873 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
12874 reading and reset it after reading.
12875 (pupa_ext2_close): Return PUPA_ERR_NONE.
12877 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
12879 (struct linux_kernel_header): Add kernel_version and
12881 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
12882 pupa_file_read succeeds.
12883 (pupa_rescue_cmd_initrd): Implement.
12885 2003-12-03 Marco Gerards <metgerards@student.han.nl>
12887 * fs/ext2.c (pupa_ext2_label): New function.
12888 (pupa_ext2_fs): Added label.
12889 * fs/fat.c (pupa_fat_label): New function.
12890 (pupa_fat_fs): Added label.
12891 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
12893 * kern/misc.c (pupa_strndup): New function.
12894 * include/pupa/misc.h (pupa_strndup): New prototype.
12896 * include/pupa/normal.h: Include <pupa/err.h>.
12897 (pupa_set_history): New prototype.
12898 (pupa_iterate_commands): New prototype.
12899 * normal/cmdline.c: Include <pupa/machine/partition.h>,
12900 <pupa/disk.h>, <pupa/file.h>.
12901 (hist_size): New variable.
12902 (hist_lines): Likewise.
12903 (hist_end): Likewise.
12904 (hist_used): Likewise.
12905 (pupa_set_history): New function.
12906 (pupa_history_get): Likewise.
12907 (pupa_history_add): Likewise.
12908 (pupa_history_replace): Likewise.
12909 (pupa_tab_complete): Likewise.
12910 (pupa_cmdline_run): Added tab completion and history buffer. Tab
12911 completion shows partitionnames while completing partitions, this
12912 feature was suggested by Jeff Bailey.
12913 * normal/command.c (pupa_iterate_commands): New function.
12914 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
12915 (pupa_normal_init): Initialize history buffer.
12916 (PUPA_MOD_INIT): Likewise.
12917 (pupa_normal_fini): Free the history buffer.
12918 (PUPA_MOD_FINI): Likewise.
12920 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
12923 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
12924 * configure.ac [i386]: Check for regparam bug.
12925 (NESTED_FUNC_ATTR) [! i386]: Defined.
12927 2003-11-17 Marco Gerards <metgerards@student.han.nl>
12929 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
12930 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
12931 (pupa_emu_SOURCES): New variable.
12932 (pupa_emu_LDFLAGS): Likewise.
12933 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
12934 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
12935 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
12936 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12937 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
12938 (pupa_jmp_buf): New typedef.
12939 (pupa_setjmp) [PUPA_UTIL]: New macro.
12940 (pupa_longjmp) [PUPA_UTIL]: Likewise.
12941 * include/pupa/term.h (struct pupa_term): New member `refresh'.
12942 (pupa_refresh): New prototype.
12943 * include/pupa/util/getroot.h: New file.
12944 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
12946 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
12947 (pupa_rescue_cmd_cat): Likewise.
12948 (pupa_rescue_cmd_ls): Likewise.
12949 (pupa_rescue_cmd_testload): Likewise.
12950 (pupa_rescue_cmd_lsmod): Likewise.
12951 * normal/cmdline.c (pupa_cmdline_get): Likewise.
12952 * normal/menu.c (run_menu): Likewise.
12953 * kern/term.c (pupa_cls): Likewise.
12954 (pupa_refresh): New function.
12955 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
12956 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12957 * util/console.c: New file.
12959 * util/i386/pc/getroot.c: New file.
12960 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
12961 (pupa_putchar): New function.
12962 (pupa_refresh): Likewise.
12963 (xgetcwd): Function moved to ...
12964 (strip_extra_slashes): Likewise.
12965 (get_prefix): Likewise.
12966 * util/i386/pc/getroot.c: ... here.
12967 (find_root_device): Function moved and renamed to...
12968 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
12969 Changed all callers.
12970 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
12972 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
12973 Changed all callers.
12974 * util/misc.c (pupa_memalign): New function.
12975 (pupa_mm_init_region): Likewise.
12976 (pupa_register_exported_symbols): Likewise.
12977 (pupa_putchar): Function removed.
12978 * util/pupa-emu.c: New file.
12980 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
12982 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
12983 (_multiboot_mod_SOURCES): New variable.
12984 (_multiboot_mod_CFLAGS): Likewise.
12985 * loader/i386/pc/multiboot.c: New file.
12986 * include/pupa/i386/pc/multiboot.h: Likewise.
12987 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
12988 (pupa_multiboot_real_boot): New function.
12989 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
12990 (pupa_multiboot_real_boot): New prototype.
12991 (pupa_rescue_cmd_multiboot): Likewise
12992 (pupa_rescue_cmd_module): Likewise.
12994 * kern/loader.c (pupa_loader_set): Continue when
12995 pupa_loader_unload_func() fails.
12996 (pupa_loader_unset): New function.
12997 * include/pupa/loader.h (pupa_loader_unset): New prototype.
12999 * kern/misc.c (pupa_stpcpy): New function.
13000 * include/pupa/misc.h (pupa_stpcpy): New prototype.
13002 2003-11-12 Marco Gerards <metgerards@student.han.nl>
13004 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
13005 for available extensions.
13007 * include/pupa/i386/pc/time.h: New file.
13008 * kern/disk.c: Include <pupa/machine/time.h>.
13009 (PUPA_CACHE_TIMEOUT): New macro.
13010 (pupa_last_time): New variable.
13011 (pupa_disk_open): Flush the cache when there was a timeout.
13012 (pupa_disk_close): Reset the timer.
13013 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
13015 * util/misc.c: Include <sys/times.h>
13016 (pupa_get_rtc): New function.
13018 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
13020 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
13022 (pupa_ext2_get_file_block): Use blocks member.
13024 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
13025 first block. Return -1 instead of pupa_errno on error.
13027 2003-10-27 Marco Gerards <metgerards@student.han.nl>
13029 * README: In the pupa-mkimage example use _chain instead of chain
13030 and ext2 instead of fat.
13031 * TODO: Replace ext2fs with jfs as an example. Add an item for
13032 adding journal playback for ext2fs.
13033 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
13034 (pkgdata_MODULES): Added ext2.mod.
13035 (ext2_mod_SOURCES): New variable.
13036 (ext2_mod_CFLAGS): Likewise.
13037 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
13038 * include/pupa/misc.h (pupa_strncpy): New prototype.
13039 (pupa_strcat): Likewise.
13040 (pupa_strncmp): Likewise.
13041 * kern/misc.c (pupa_strcat): Enable function.
13042 (pupa_strncpy): New function.
13043 (pupa_strncmp): Likewise.
13044 * fs/ext2.c: New file.
13046 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
13047 when the read failed before retrying.
13048 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
13049 (_FILE_OFFSET_BITS): Likewise.
13050 * configure.ac: Added AC_SYS_LARGEFILE.
13052 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13054 * genmk.rb (PModule#rule): Make sure to get only symbol names
13055 from the output of nm.
13056 Reported by Robert Millan <zeratul2@wanadoo.es>.
13058 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
13060 I forgot to check in these changes for a long time. This adds
13061 incomplete support for VGA console, and this is still very
13062 buggy. Also, a lot of consideration is required for I18N,
13063 UNICODE, and VGA font issues. Therefore, assume that this is
13064 such that "better than nothing".
13066 * font/manager.c: New file.
13067 * include/pupa/font.h: Likewise.
13068 * include/pupa/i386/pc/vga.h: Likewise.
13069 * term/i386/pc/vga.c: Likewise.
13070 * util/unifont2pff.rb: Likewise.
13072 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
13073 (pkgdata_MODULES): Added vga.mod and font.mod.
13074 (vga_mod_SOURCES): New variables.
13075 (vga_mod_CFLAGS): Likewise.
13076 (font_mod_SOURCES): Likewise.
13077 (font_mod_CFLAGS): Likewise.
13079 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
13081 * include/pupa/term.h: Include pupa/err.h.
13082 (struct pupa_term): Added init and fini.
13083 Changed the argument of putchar to pupa_uint32_t.
13085 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
13086 (pupa_console_real_putchar): New prototype.
13087 (pupa_console_putchar): Removed.
13088 (pupa_console_checkkey): Exported.
13089 (pupa_console_getkey): Likewise.
13091 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
13094 * kern/term.c (pupa_term_set_current): Rewritten.
13095 (pupa_putchar): Likewise.
13096 (pupa_putcode): New function.
13098 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
13099 (pupa_console_real_putchar): ... this.
13100 (pupa_vga_set_mode): New function.
13101 (pupa_vga_get_font): Likewise.
13103 * normal/command.c: Include pupa/term.h.
13104 (terminal_command): New function.
13105 (pupa_command_init): Register the command "terminal".
13107 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
13108 (DISP_UP): Likewise.
13109 (DISP_RIGHT): Likewise.
13110 (DISP_DOWN): Likewise.
13111 (DISP_HLINE): Likewise.
13112 (DISP_VLINE): Likewise.
13113 (DISP_UL): Likewise.
13114 (DISP_UR): Likewise.
13115 (DISP_LL): Likewise.
13116 (DISP_LR): Likewise.
13118 * term/i386/pc/console.c (pupa_console_putchar): New function.
13120 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
13122 * util/resolve.c (pupa_util_resolve_dependencies): BUG
13123 FIX. Reverse the path_list.
13125 * include/pupa/normal.h: Export pupa_register_command and
13126 pupa_unregister_command.
13128 * hello/hello.c (pupa_cmd_hello): New module.
13129 * conf/i386-pc.rmk: Added hello.mod.
13131 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
13133 * kern/i386/pc/lzo1x.S: New file.
13135 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
13136 (compress_kernel): New variable.
13137 (generate_image): Heavily modified to support compressing a
13138 large part of the core image.
13140 * util/misc.c (pupa_util_read_image): Fix a file descriptor
13142 (pupa_util_load_image): New function.
13144 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
13145 (pupa_compressed_size): New variable.
13146 (codestart): Enable Gate A20 here.
13147 Decompress the compressed part of the core image.
13148 Rearrange the code to put functions and variables which are
13149 required for initialization in the non-compressed part.
13152 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
13155 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
13157 * include/pupa/i386/pc/kernel.h
13158 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
13159 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
13160 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13161 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13162 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
13164 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
13166 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
13167 (Utility#rule): Likewise.
13169 * configure.ac: Check if LZO is available.
13171 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
13173 * include/pupa/normal.h: New file.
13174 * include/pupa/setjmp.h: Likewise.
13175 * include/pupa/i386/setjmp.h: Likewise.
13176 * normal/cmdline.c: Likewise.
13177 * normal/command.c: Likewise.
13178 * normal/main.c: Likewise.
13179 * normal/menu.c: Likewise.
13180 * normal/i386/setjmp.S: Likewise.
13182 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
13183 (pupa_rescue_cmd_initrd): Likewise.
13185 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
13188 * kern/i386/pc/startup.S (translation_table): New variable.
13189 (translate_keycode): New function.
13190 (pupa_console_getkey): Call translate_keycode.
13192 * kern/rescue.c (attempt_normal_mode): New function.
13193 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
13194 it failed, print a message.
13196 * kern/mm.c (pupa_real_malloc): Print more information when a
13197 free magic is broken.
13198 (pupa_free): If the first free header is not free actually, set
13201 * kern/main.c (pupa_load_normal_mode): Just load the module
13203 (pupa_main): Don't print the message
13204 "Entering into rescue mode..." here.
13206 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
13208 (pupa_rescue_cmd_initrd): Likewise.
13209 (pupa_rescue_cmd_initrd): Likewise.
13211 * include/pupa/symbol.h (FUNCTION): Specify the type.
13212 (VARIABLE): Likewise.
13214 * include/pupa/err.h (pupa_err_t): Added
13215 PUPA_ERR_UNKNOWN_COMMAND.
13217 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
13218 (pupa_dl_get_prefix): Likewise.
13220 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
13221 Added _chain.mod and _linux.mod instead of chain.mod and
13223 (chain_mod_SOURCES): Renamed to ...
13224 (_chain_mod_SOURCES): ... this.
13225 (chain_mod_CFLAGS): Renamed to ...
13226 (_chain_mod_CFLAGS): ... this.
13227 (linux_mod_SOURCES): Renamed to ...
13228 (_linux_mod_SOURCES): ... this.
13229 (linux_mod_CFLAGS): Renamed to ...
13230 (_linux_mod_CFLAGS): ... this.
13231 (normal_mod_SOURCES): New variable.
13232 (normal_mod_CFLAGS): Likewise.
13233 (normal_mod_ASFLAGS): Likewise.
13235 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
13237 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
13240 * kern/dl.c (pupa_dl_ref): Refer depending modules
13242 (pupa_dl_unref): Unrefer depending modules recursively.
13243 Don't call pupa_dl_unload implicitly, because PUPA can crash if
13244 a module is unloaded before one depending on that module is
13246 (pupa_dl_unload): Unload depending modules explicitly,
13249 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
13251 * include/pupa/i386/pc/linux.h: New file.
13252 * loader/i386/pc/linux.c: Likewise.
13254 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
13256 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
13257 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
13258 of PUPA_CHAINLOADER_BOOT_SECTOR.
13260 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
13261 (pupa_linux_prot_size): New variable.
13262 (pupa_linux_tmp_addr): Likewise.
13263 (pupa_linux_real_addr): Likewise.
13264 (pupa_linux_boot_zimage): New function.
13265 (pupa_linux_boot_bzimage): Likewise.
13267 * kern/i386/pc/init.c (struct mem_region): New structure.
13268 (MAX_REGIONS): New macro.
13269 (mem_regions): New variable.
13270 (num_regions): Likewise.
13271 (pupa_os_area_addr): Likewise.
13272 (pupa_os_area_size): Likewise.
13273 (pupa_lower_mem): Likewise.
13274 (pupa_upper_mem): Likewise.
13275 (add_mem_region): New function.
13276 (compact_mem_regions): Likewise.
13277 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
13278 the size of the conventional memory and that of so-called upper
13279 memory (before the first memory hole).
13280 Instead of adding each found region to free memory, use
13281 add_mem_region and add them after removing overlaps.
13282 Also, add only 1/4 of the upper memory to free memory. The rest
13283 is used for loading OS images. Maybe this is ad hoc, but this
13284 makes it much easier to relocate OS images when booting.
13286 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
13287 (pupa_enter_rescue_mode): Don't register initrd and module.
13289 * kern/mm.c: Include pupa/dl.h.
13291 * kern/main.c: Include pupa/file.h and pupa/device.h.
13293 * kern/loader.c (pupa_loader_load_module_func): Removed.
13294 (pupa_loader_load_module): Likewise.
13296 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
13299 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
13300 (pupa_linux_tmp_addr): Likewise.
13301 (pupa_linux_real_addr): Likewise.
13302 (pupa_linux_boot_zimage): Likewise.
13303 (pupa_linux_boot_bzimage): Likewise.
13305 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
13306 (pupa_upper_mem): Likewise.
13307 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
13308 module is too dangerous.
13310 * include/pupa/loader.h (pupa_os_area_addr): Declared.
13311 (pupa_os_area_size): Likewise.
13312 (pupa_loader_set): Remove the first argument. Loader doesn't
13313 manage modules or initrd any longer.
13314 (pupa_loader_load_module): Removed.
13316 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
13317 (linux_mod_SOURCES): New variable.
13318 (linux_mod_CFLAGS): Likewise.
13320 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
13322 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
13323 the length of a blocklist correctly.
13325 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
13326 Use ioctl only if the OS file is a block device.
13327 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
13328 not very useful for normal files.
13330 * kern/main.c (pupa_set_root_dev): New function.
13331 (pupa_load_normal_mode): Likewise.
13332 (pupa_main): Call those above.
13334 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
13337 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
13339 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
13341 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
13342 (setup): Configure the installed partition information and the
13345 * loader/i386/pc/chainloader.c (my_mod): New variable.
13346 (pupa_chainloader_unload): New function.
13347 (pupa_rescue_cmd_chainloader): Refer itself.
13348 (PUPA_MOD_INIT): Save its own module in MY_MOD.
13350 * kern/i386/pc/startup.S (install_partition): Removed.
13351 (version_string): Likewise.
13352 (config_file): Likewise.
13353 (pupa_install_dos_part): New variable.
13354 (pupa_install_bsd_part): Likewise.
13355 (pupa_prefix): Likewise.
13356 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
13358 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
13360 (make_install_device): New function.
13361 (pupa_machine_init): Set the dl prefix.
13363 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
13364 (buf): Renamed to ...
13365 (linebuf): ... this.
13366 (pupa_rescue_cmd_prefix): New function.
13367 (pupa_rescue_cmd_insmod): Likewise.
13368 (pupa_rescue_cmd_rmmod): Likewise.
13369 (pupa_rescue_cmd_lsmod): Likewise.
13370 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
13373 * kern/mm.c (pupa_memalign): If failed even after invalidating
13374 disk caches, unload unneeded modules and retry.
13376 * kern/misc.c (pupa_memmove): New function.
13377 (pupa_memcpy): Removed.
13378 (pupa_strcpy): New function.
13379 (pupa_itoa): Made static.
13381 * kern/dl.c (pupa_dl_iterate): New function.
13382 (pupa_dl_ref): Likewise.
13383 (pupa_dl_unref): Likewise.
13384 (pupa_dl_unload): Return if succeeded or not.
13385 (pupa_dl_unload_unneeded): New function.
13386 (pupa_dl_unload_all): Likewise.
13387 (pupa_dl_init): Renamed to ...
13388 (pupa_dl_set_prefix): ... this.
13389 (pupa_dl_get_prefix): New function.
13391 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
13392 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
13393 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13394 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13395 (pupa_install_dos_part): Declared.
13396 (pupa_install_bsd_part): Likewise.
13397 (pupa_prefix): Likewise.
13398 (pupa_boot_drive): Likewise.
13400 * include/pupa/types.h: Fix a typo.
13402 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
13404 (pupa_memmove): Declared.
13405 (pupa_strcpy): Likewise.
13407 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
13408 pupa_mod_init takes one argument, its own module.
13409 (pupa_dl_unload_unneeded): Declared.
13410 (pupa_dl_unload_all): Likewise.
13411 (pupa_dl_ref): Likewise.
13412 (pupa_dl_unref): Likewise.
13413 (pupa_dl_iterate): Likewise.
13414 (pupa_dl_init): Renamed to ...
13415 (pupa_dl_set_prefix): ... this.
13416 (pupa_dl_get_prefix): Declared.
13418 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
13419 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
13421 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
13422 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
13424 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
13425 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
13427 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13429 * util/i386/pc/pupa-setup.c (setup): Define the internal
13430 function find_first_partition_start at the top level, because GCC
13431 3.0.x cannot compile internal functions in deeper scopes
13433 (find_root_device): Use lstat instead of stat.
13434 Don't follow symbolic links.
13435 Fix the path-constructing code.
13437 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
13438 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
13439 by a BLKGETSIZE ioctl first, because block devices don't fill
13440 the member st_mode of the structure stat on Linux.
13441 [__linux__] (linux_find_partition): Use a temporary buffer
13442 REAL_DEV for the working space. Copy it to DEV before returning.
13443 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
13444 buffer cache consistent.
13445 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
13446 strncmp. The previous value was merely wrong.
13447 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
13449 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
13450 FAT size is 12. The previous value was merely wrong.
13452 * kern/main.c (pupa_main): Don't split the starting message from
13455 * kern/term.c (pupa_putchar): Put CR after LF instead of before
13456 LF, because BIOS goes crazy about character attributes in this
13459 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13461 * include/i386/pc/util/biosdisk.h: New file.
13462 * util/i386/pc/biosdisk.c: Likewise.
13463 * util/i386/pc/pupa-setup.c: Likewise.
13465 * Makefile.in (INCLUDE_DISTFILES): Added
13466 include/pupa/i386/pc/util/biosdisk.h.
13467 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
13468 directory util/i386/pc.
13469 (install-local): Added a rule for sbin_UTILITIES.
13470 (uninstall): Likewise.
13472 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
13474 * util/misc.c (xrealloc): New function.
13475 (pupa_malloc): Likewise.
13476 (pupa_free): Likewise.
13477 (pupa_realloc): Likewise.
13478 (pupa_stop): Likewise.
13479 (pupa_putchar): Likewise.
13481 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
13483 * include/pupa/util/misc.h (xrealloc): Declared.
13485 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
13487 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
13488 (PUPA_BOOT_MACHINE_BPB_END): ... this.
13490 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
13491 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13493 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
13494 way should be implemented.
13495 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13497 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
13498 the size of NAME for safety.
13499 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
13502 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
13503 (pupa_setup_SOURCES): Likewise.
13505 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
13507 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13509 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
13510 bunch of pushl's from pusha, because this destroys the return
13513 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13515 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
13516 This means that any missing prototypes could be fatal. Also, you
13517 must take care when writing assembly code. See the comments at
13518 the beginning of startup.S, for more details.
13520 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
13521 compilation mechanism.
13522 (pupa_chainloader_real_boot): Likewise.
13523 (pupa_biosdisk_rw_int13_extensions): Likewise.
13524 (pupa_biosdisk_rw_standard): Likewise.
13525 (pupa_biosdisk_check_int13_extensions): Likewise.
13526 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
13527 (pupa_biosdisk_get_diskinfo_standard): Likewise.
13528 (pupa_get_memsize): Likewise.
13529 (pupa_get_mmap_entry): Likewise.
13530 (pupa_console_putchar): Likewise.
13531 (pupa_console_setcursor): Likewise.
13532 (pupa_getrtsecs): Use pushl instead of push.
13534 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
13535 memory instead of the stack for a mmap entry, because some
13536 BIOSes may ignore the maximum size and overflow.
13538 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
13540 * genmk.rb (PModule#rule): Compile automatically generated
13541 sources with module-specific CFLAGS as well as other sources.
13543 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13545 * configure.ac: Check ld.
13546 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
13547 respectively, before checking endianness and sizes.
13549 * Makefile.in (LD): New variable.
13551 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13553 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
13555 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13557 * Changelog: New file.