1 2008-01-08 Robert Millan <rmh@aybabtu.com>
3 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
4 `! grub_linux_is_bzimage', change order of address comparison to make
5 it more intuitive, and improve "too big zImage" error message.
7 2008-01-08 Robert Millan <rmh@aybabtu.com>
9 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
10 `$(update-grub_DATA)'.
11 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
14 2008-01-07 Robert Millan <rmh@aybabtu.com>
16 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
17 which instruction is modified by grub-setup during installation
18 (since it wasn't obvious by only looking at this file).
20 2008-01-07 Robert Millan <rmh@aybabtu.com>
22 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
23 listing actual TODO items.
25 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
27 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
29 (grub_reiserfs_get_key_offset): Likewise.
30 (grub_reiserfs_set_key_offset): Likewise.
31 (grub_reiserfs_set_key_type): Likewise.
32 (grub_reiserfs_iterate_dir): Return 1 if found, otheriwise 0.
34 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
35 better to remove the bitfield version completely.
37 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
39 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
40 allocated from the heap, due to the fshelp implementation.
41 (grub_reiserfs_dir): Free NODE, due to the same reason.
43 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
45 Mostly from Vincent Pelletier:
47 * fs/reiserfs.c: New file.
49 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
50 (reiserfs_mod_SOURCES): New variable.
51 (reiserfs_mod_CFLAGS): Likewise.
52 (reiserfs_mod_LDFLAGS): Likewise.
54 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
55 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
56 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
59 2008-01-06 Robert Millan <rmh@aybabtu.com>
61 * normal/color.c: Remove `<grub/env.h>'.
63 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
65 * include/grub/normal.h: Include <grub/env.h>.
67 2008-01-05 Robert Millan <rmh@aybabtu.com>
69 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
70 usage example with `(hd0,1)'.
71 Reported by Samuel Thibault.
73 2008-01-05 Robert Millan <rmh@aybabtu.com>
75 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
76 (grub_linux_boot_zimage): Rename to ...
77 (grub_linux_boot): ... this.
78 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
79 (grub_linux_boot_zimage): Conditionalize zImage copy.
81 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
82 (grub_linux_boot_bzimage): Remove prototype.
83 (grub_linux_boot_zimage): Rename to ...
84 (grub_linux_boot): ... this.
86 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
87 (grub_linux_boot): Remove function.
89 2008-01-05 Robert Millan <rmh@aybabtu.com>
91 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
92 (grub_env_write_color_highlight): Likewise.
93 (grub_wait_after_message): Likewise.
95 * normal/color.c: New file.
97 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
98 (normal_mod_DEPENDENCIES): Likewise.
100 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
101 (normal_mod_DEPENDENCIES): Likewise.
103 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
104 (normal_mod_DEPENDENCIES): Likewise.
106 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
107 (normal_mod_DEPENDENCIES): Likewise.
109 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
110 for waiting after a message is printed.
111 * normal/main.c (read_config_file): Likewise.
112 (grub_normal_init): Register grub_env_write_color_normal() and
113 grub_env_write_color_highlight() hooks. Mark `color_normal' and
114 `color_highlight' variables as global.
116 * normal/menu.c (grub_wait_after_message): New function.
117 (grub_color_menu_normal): New variable. Replaces ...
118 (GRUB_COLOR_MENU_NORMAL): ... this macro.
119 (grub_color_menu_highlight): New variable. Replaces ...
120 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
121 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
122 `GRUB_TERM_COLOR_STANDARD'.
123 (print_message): Use `grub_setcolorstate' to reload colors. Rename
124 `normal_code' and `highlight_code' to `old_color_normal' and
125 `old_color_highlight', respectively.
126 (grub_menu_init_page): Update colors when drawing the menu, based on
127 `menu_color_normal' and `menu_color_highlight' variables.
128 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
129 a message is printed.
131 2008-01-05 Robert Millan <rmh@aybabtu.com>
133 * kern/env.c (grub_env_context_open): Propagate hooks for global
134 variables to new context.
136 * kern/main.c (grub_set_root_dev): Export `root' variable.
138 2008-01-05 Robert Millan <rmh@aybabtu.com>
140 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
141 discs unconditionaly, since udev and others have options to provide
144 2008-01-05 Robert Millan <rmh@aybabtu.com>
146 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
148 2008-01-04 Christian Franke <franke@computer.org>
150 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
153 2008-01-03 Pavel Roskin <proski@gnu.org>
155 * kern/i386/linuxbios/init.c: Put "void" to all function
156 declarations with no arguments.
157 * kern/powerpc/ieee1275/init.c: Likewise.
158 * term/i386/pc/at_keyboard.c: Likewise.
159 * term/i386/pc/vga_text.c: Likewise.
160 * util/grub-mkdevicemap.c: Likewise.
162 2008-01-02 Robert Millan <rmh@aybabtu.com>
164 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
165 message when loaded image is out of bounds.
166 (grub_multiboot_load_elf64): Likewise.
168 2008-01-02 Pavel Roskin <proski@gnu.org>
170 * util/grub.d/10_linux.in: Try version without ".old" when
171 looking for initrd. It's better to use initrd from the newer
172 kernel of the same version than no initrd at all.
174 2008-01-01 Robert Millan <rmh@aybabtu.com>
176 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
178 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
180 * include/grub/video.h: Added grub_video_unmap_color and
181 grub_video_get_active_render_target.
182 (grub_video_adapter): Added unmap_color and get_active_render_target.
184 * video/video.c: Added grub_video_unmap_color and
185 grub_video_get_active_render_target.
186 (grub_video_get_info): Changed method to accept NULL pointer as an
187 argument to allow detection of active video adapter.
189 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
190 grub_video_vbe_unmap_color_int.
191 Added grub_video_vbe_unmap_color and
192 grub_video_vbe_get_active_render_target.
193 (grub_video_vbe_adapter): Added unmap_color and
194 get_active_render_target.
196 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
197 with grub_video_vbe_unmap_color_int.
199 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
200 (DEFAULT_NORMAL_COLOR): Likewise.
201 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
202 (DEFAULT_FG_COLOR): Removed.
203 (DEFAULT_BG_COLOR): Likewise.
204 (DEFAULT_CURSOR_COLOR): Changed value.
205 (grub_virtual_screen): Added standard_color_setting,
206 normal_color_setting, highlight_color_setting and term_color.
207 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
208 (bitmap_width): Added.
209 (bitmap_height): Likewise.
211 (set_term_color): Likewise.
212 (grub_virtual_screen_setup): Changed to use new terminal coloring
214 (grub_gfxterm_init): Added init for bitmap.
215 (grub_gfxterm_fini): Added destroy for bitmap.
216 (redraw_screen_rect): Updated to use background bitmap and new
218 (scroll_up): Added optimization for case when there is no bitmap.
219 (grub_gfxterm_cls): Fixed to use correct background color.
220 (grub_virtual_screen_setcolorstate): Changed to use new terminal
222 (grub_virtual_screen_setcolor): Likewise.
223 (grub_virtual_screen_getcolor): Added.
224 (grub_gfxterm_background_image_cmd): Likewise.
225 (grub_video_term): Added setcolor and getcolor.
226 (MOD_INIT): Added registration of background_image command.
227 (MOD_TERM): Added unregistration for background_image command.
229 2007-12-30 Pavel Roskin <proski@gnu.org>
231 * loader/multiboot_loader.c: Fix multiboot command
232 unregistration. Fix all typos in the word "multiboot".
234 2007-12-29 Pavel Roskin <proski@gnu.org>
236 * util/grub.d/10_linux.in: Refactor search for initrd. Add
237 support for initrd names used in Fedora.
239 2007-12-26 Bean <bean123ch@gmail.com>
241 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
242 (cpio_mod_SOURCES): New variable.
243 (cpio_mod_CFLAGS): Likewise.
244 (cpio_mod_LDFLAGS): Likewise.
246 * fs/cpio.c: New file.
248 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
250 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
252 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
254 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
256 2007-12-25 Robert Millan <rmh@aybabtu.com>
258 * include/grub/term.h (struct grub_term): Add `getcolor' function.
259 (grub_getcolor): New function.
261 * kern/term.c (grub_getcolor): New function.
262 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
263 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
264 (print_entry): Set normal and highlight colors to
265 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
266 respectively, before printing and restore them to old
268 (grub_menu_init_page): Likewise. Fill an additional colored space
269 that would otherwise be left blank.
271 * term/efi/console.c (grub_console_getcolor): New function.
272 (struct grub_console_term.getcolor): New variable.
273 * term/i386/pc/console.c (grub_console_getcolor): New function.
274 (struct grub_console_term.getcolor): New variable.
275 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
276 (struct grub_console_term.getcolor): New variable.
278 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
279 (struct grub_console_term.setcolor): Remove variable.
280 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
281 (struct grub_console_term.setcolor): Remove variable.
282 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
283 (struct grub_console_term.setcolor): Remove variable.
284 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
285 (struct grub_console_term.setcolor): Remove variable.
287 2007-12-25 Robert Millan <rmh@aybabtu.com>
289 * configure.ac: Search for possible unifont.hex locations, and
290 define UNIFONT_HEX if found.
292 * Makefile.in (UNIFONT_HEX): Define variable.
293 (DATA): Rename to ...
294 (PKGLIB): ... this. Update all users.
295 (PKGDATA): New variable.
296 (pkgdata_IMAGES): Rename to ...
297 (pkglib_IMAGES): ... this. Update all users.
298 (pkgdata_MODULES): Rename to ...
299 (pkglib_MODULES): ... this. Update all users.
300 (pkgdata_PROGRAMS): Rename to ...
301 (pkglib_PROGRAMS): ... this. Update all users.
302 (pkgdata_DATA): Rename to ...
303 (pkglib_DATA): ... this. Update all users.
304 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
305 (unicode.pff, ascii.pff): New rules.
306 (all-local): Add `$(PKGDATA)' dependency.
307 (install-local): Process `$(PKGDATA)'.
309 * util/update-grub_lib.in (font_path): Search for *.pff files in
310 a few more locations, including `${pkgdata}'.
312 2007-12-23 Robert Millan <rmh@aybabtu.com>
314 Patch from Bean <bean123ch@gmail.com>:
315 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
318 2007-12-21 Bean <bean123ch@gmail.com>
320 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
321 (ntfscomp_mod_SOURCES): New variable.
322 (ntfscomp_mod_CFLAGS): Likewise.
323 (ntfscomp_mod_LDFLAGS): Likewise.
325 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
326 (grub_probe_SOURCES): Likewise.
327 (grub_emu_SOURCES): Likewise.
329 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
330 (grub_emu_SOURCES): Likewise.
332 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
333 (grub_emu_SOURCES): Likewise.
335 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
336 (grub_emu_SOURCES): Likewise.
338 * fs/ntfs.c (grub_ntfscomp_func): New variable.
339 (read_run_list): Renamed to grub_ntfs_read_run_list.
340 (decomp_nextvcn): Moved to ntfscomp.c.
341 (decomp_getch): Likewise.
342 (decomp_get16): Likewise.
343 (decomp_block): Likewise.
344 (read_block): Likewise.
345 (read_data): Partially moved to ntfscomp.c.
346 (fixup): Change unsigned to grub_uint16_t.
347 (read_mft): Change unsigned long to grub_uint32_t.
348 (read_attr): Likewise.
349 (read_data): Likewise.
350 (read_run_data): Likewise.
351 (read_run_list): Likewise.
352 (read_mft): Likewise.
354 * fs/ntfscomp.c: New file.
356 * include/grub/ntfs.h: New file.
358 2007-12-16 Robert Millan <rmh@aybabtu.com>
360 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
361 IDE disk check, since Linux is known to support 20 IDE disks.
362 Reported by Colin Watson.
364 2007-12-15 Bean <bean123ch@gmail.com>
366 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
367 (lnxboot_img_SOURCES): New variable.
368 (lnxboot_img_ASFLAGS): Likewise.
369 (lnxboot_img_LDFLAGS): Likewise.
371 * boot/i386/pc/lnxboot.S: New file.
373 2007-11-24 Pavel Roskin <proski@gnu.org>
375 * configure.ac: Test if '--build-id=none' is supported by the
376 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
377 objcopy to generate incorrect binary files (binutils
378 2.17.50.0.18-1 as shipped by Fedora 8).
379 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
380 linking, so that build ID doesn't break the test.
382 2007-11-24 Pavel Roskin <proski@gnu.org>
384 * include/grub/i386/time.h: use "void" in the argument list
386 * include/grub/powerpc/time.h: Likewise.
387 * include/grub/sparc64/time.h: Likewise.
389 2007-11-18 Christian Franke <franke@computer.org>
391 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
392 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
393 This fixes the problem that function keys did not work in grub-emu.
395 2007-11-18 Christian Franke <franke@computer.org>
397 * disk/host.c (grub_host_open): Remove attribute unused from
398 name parameter. Add check for "host". This fixes the problem
399 that grub-emu does not find partitions.
401 2007-11-18 Christian Franke <franke@computer.org>
403 * util/hostfs.c (is_dir): New function.
404 (grub_hostfs_dir): Handle missing dirent.d_type case.
405 (grub_hostfs_read): Add missing fseek().
406 (grub_hostfs_label): Clear label pointer. This fixes a crash
407 of grub-emu on "ls (host)".
409 2007-11-18 Christian Franke <franke@computer.org>
411 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
412 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
413 to 64 bit boundary by default.
415 2007-11-18 Bean <bean123ch@gmail.com>
417 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
418 (hexdump_mod_SOURCES): New variable.
419 (hexdump_mod_CFLAGS): Likewise.
420 (hexdump_mod_LDFLAGS): Likewise.
422 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
424 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
426 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
428 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
430 * include/grub/hexdump.h: New file.
432 * commands/hexdump.c: New file.
434 2007-11-10 Robert Millan <rmh@aybabtu.com>
436 * commands/i386/pc/play.c (beep_off): Switch order of arguments
437 in grub_outb() calls.
440 2007-11-10 Christian Franke <franke@computer.org>
442 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
443 (grub_menu_run): Likewise.
445 2007-11-10 Robert Millan <rmh@aybabtu.com>
447 * include/grub/i386/efi/machine.h: New file.
448 * include/grub/i386/linuxbios/machine.h: Likewise.
449 * include/grub/i386/pc/machine.h: Likewise.
450 * include/grub/powerpc/ieee1275/machine.h: Likewise.
451 * include/grub/sparc64/ieee1275/machine.h: Likewise.
453 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
454 (serial_hw_io_addr): New variable.
455 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
456 instead of `(unsigned short *) 0x400'.
458 2007-11-10 Bean <bean123ch@gmail.com>
460 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
462 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
464 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
465 (vga_mod_SOURCES): Added.
466 (vga_mod_CFLAGS): Likewise.
467 (vga_mod_LDFLAGS): Likewise.
469 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
471 (set_map_mask): Likewise.
472 (set_read_map): Likewise.
473 (set_read_address): Likewise.
474 (vga_font): Removed variable.
475 (get_vga_glyph): Removed function.
476 (invalidate_char): Likewise.
477 (write_char): Changed to use grub_font_get_glyph() for font
479 (grub_vga_putchar): Likewise.
480 (grub_vga_getcharwidth): Likewise.
482 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
484 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
486 (pxeboot_img_LDFLAGS): Likewise.
487 (diskboot_img_LDFLAGS): Likewise.
488 (kernel_img_LDFLAGS): Likewise.
490 2007-11-06 Robert Millan <rmh@aybabtu.com>
492 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
493 in grub_outb() calls.
494 (serial_hw_init): Likewise.
496 2007-11-05 Robert Millan <rmh@aybabtu.com>
498 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
499 spaces. Skip non-regular files.
501 2007-11-05 Robert Millan <rmh@aybabtu.com>
503 * kern/disk.c (grub_disk_firmware_fini)
504 (grub_disk_firmware_is_tainted): New variables.
506 * include/grub/disk.h (grub_disk_firmware_fini)
507 (grub_disk_firmware_is_tainted): Likewise.
509 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
510 (grub_disk_biosdisk_fini): ... to here.
511 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
512 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
513 is set. Register grub_disk_biosdisk_fini() in
514 `grub_disk_firmware_fini'.
516 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
517 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
518 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
519 to finish existing firmware disk interface.
521 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
522 (ata_mod_SOURCES): New variable.
523 (ata_mod_CFLAGS): Likewise.
524 (ata_mod_LDFLAGS): Likewise.
526 2007-11-05 Robert Millan <rmh@aybabtu.com>
528 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
529 (grub_ata_wait): Reimplement using grub_millisleep().
531 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
532 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
534 2007-11-03 Marco Gerards <marco@gnu.org>
536 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
537 (CRTC_ADDR_PORT): New macro.
538 (CRTC_DATA_PORT): Likewise.
539 (CRTC_CURSOR): Likewise.
540 (CRTC_CURSOR_ADDR_HIGH): Likewise.
541 (CRTC_CURSOR_ADDR_LOW): Likewise.
542 (update_cursor): New function.
543 (grub_console_real_putchar): Call `update_cursor'.
544 (grub_console_gotoxy): Likewise.
545 (grub_console_cls): Set the default color when clearing the
547 (grub_console_setcursor): Implemented.
549 2007-11-03 Marco Gerards <marco@gnu.org>
551 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
553 (grub_ata_pio_write): Likewise.
555 (grub_atapi_identify): Wait after issuing an ATA command.
556 (grub_atapi_packet): Likewise.
557 (grub_ata_identify): Likewise.
558 (grub_ata_readwrite): Likewise.
560 2007-11-03 Marco Gerards <marco@gnu.org>
562 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
563 (grub_ata_pio_write): Likewise.
564 (grub_ata_readwrite): Use `grub_error', instead of
565 returning `grub_errno'.
567 2007-11-03 Marco Gerards <marco@gnu.org>
569 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
570 grub_ata_pio_write once for every single sector, instead of for
573 2007-10-31 Robert Millan <rmh@aybabtu.com>
575 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
577 * conf/i386-linuxbios.rmk: New file.
579 * kern/i386/pc/hardware.c: Likewise.
580 * term/i386/pc/at_keyboard.c: Likewise.
581 * term/i386/pc/vga_text.c: Likewise.
583 * include/grub/i386/linuxbios/boot.h: Likewise.
584 * include/grub/i386/linuxbios/console.h: Likewise.
585 * include/grub/i386/linuxbios/init.h: Likewise.
586 * include/grub/i386/linuxbios/kernel.h: Likewise.
587 * include/grub/i386/linuxbios/loader.h: Likewise.
588 * include/grub/i386/linuxbios/memory.h: Likewise.
589 * include/grub/i386/linuxbios/serial.h: Likewise.
590 * include/grub/i386/linuxbios/time.h: Likewise.
592 * kern/i386/linuxbios/init.c: Likewise.
593 * kern/i386/linuxbios/startup.S: Likewise.
594 * kern/i386/linuxbios/table.c: Likewise.
596 2007-10-31 Marco Gerards <marco@gnu.org>
598 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
599 (ata_mod_SOURCES): New variable.
600 (ata_mod_CFLAGS): Likewise.
601 (ata_mod_LDFLAGS): Likewise.
603 * disk/ata.c: New file.
605 * include/grub/disk.h (grub_disk_dev_id): Add
606 `GRUB_DISK_DEV_ATA_ID'.
608 2007-10-31 Robert Millan <rmh@aybabtu.com>
610 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
611 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
613 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
614 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
616 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
619 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
621 2007-10-27 Robert Millan <rmh@aybabtu.com>
623 * include/grub/types.h (ULONG_MAX): Define macro.
625 2007-10-22 Robert Millan <rmh@aybabtu.com>
627 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
629 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
631 2007-10-22 Robert Millan <rmh@aybabtu.com>
633 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
634 (pkgdata_MODULES): Add `biosdisk.mod'.
635 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
638 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
639 (grub_biosdisk_init): Replace with ...
640 (GRUB_MOD_INIT(biosdisk)): ... this.
641 (grub_biosdisk_fini): Replace with ...
642 (GRUB_MOD_FINI(biosdisk)): ... this.
644 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
645 (grub_machine_init): Remove call to grub_biosdisk_init().
646 (grub_machine_fini): Remove call to grub_machine_fini().
648 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
650 2007-10-22 Robert Millan <rmh@aybabtu.com>
652 * include/grub/time.h: New file.
653 * include/grub/i386/time.h: Likewise.
654 * include/grub/powerpc/time.h: Likewise.
655 * include/grub/sparc64/time.h: Likewise.
657 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
659 (KERNEL_MACHINE_TIME_HEADER): ... this.
660 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
662 (KERNEL_MACHINE_TIME_HEADER): ... this.
663 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
665 (KERNEL_MACHINE_TIME_HEADER): ... this.
667 * kern/i386/efi/init.c: Include `<grub/time.h>'.
668 (grub_millisleep): New function.
669 * kern/i386/pc/init.c: Include `<grub/time.h>'.
670 (grub_millisleep): New function.
671 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
672 Remove `grub/machine/time.h' include.
673 (grub_millisleep): New function.
674 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
675 Remove `grub/machine/time.h' include.
676 (grub_millisleep): New function.
678 * include/grub/misc.h (grub_div_roundup): New function.
680 * kern/misc.c: Include `<grub/time.h>'.
681 (grub_millisleep_generic): New function.
683 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
685 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
687 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
688 `machine/time.h'. Add `time.h'.
689 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
691 2007-10-21 Robert Millan <rmh@aybabtu.com>
693 * include/grub/misc.h (grub_max): New function.
695 2007-10-21 Robert Millan <rmh@aybabtu.com>
697 * util/misc.c (grub_util_info): Call fflush() before returning.
699 2007-10-20 Robert Millan <rmh@aybabtu.com>
701 * genmk.rb (Image): Copy `extra_flags' from here ...
702 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
704 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
705 to `argc' and `args' arguments.
707 2007-10-17 Robert Millan <rmh@aybabtu.com>
709 * kern/i386/loader.S: New file.
711 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
712 * kern/i386/loader.S (grub_linux_prot_size)... to here.
713 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
714 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
715 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
716 * kern/i386/loader.S (grub_linux_real_addr)... to here.
717 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
718 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
719 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
720 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
721 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
722 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
723 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
724 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
726 * kern/i386/realmode.S: New file.
728 * kern/i386/pc/startup.S (protstack): Moved from here ...
729 * kern/i386/realmode.S (protstack)... to here.
730 * kern/i386/pc/startup.S (gdt): Moved from here ...
731 * kern/i386/realmode.S (gdt)... to here.
732 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
733 * kern/i386/realmode.S (prot_to_real)... to here.
735 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
736 `kern/i386/realmode.S'.
738 2007-10-17 Robert Millan <rmh@aybabtu.com>
740 * include/grub/i386/loader.h: New file.
742 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
743 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
744 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
745 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
746 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
747 * include/grub/i386/loader.h (grub_linux_prot_size)
748 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
749 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
750 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
751 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
753 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
755 2007-10-15 Robert Millan <rmh@aybabtu.com>
757 * normal/misc.c (grub_normal_print_device_info): Do not probe for
758 filesystem when dev->disk is unset.
759 Do probe for filesystem even when dev->disk->has_partitions is set.
760 In case a filesystem is found, always report it.
761 In case it isn't, if dev->disk->has_partitions is set, report that
762 a partition table was found instead of reporting that no filesystem
765 2007-10-12 Robert Millan <rmh@aybabtu.com>
767 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
768 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
770 * include/grub/types.h (grub_host_to_target16): New macro.
771 (grub_host_to_target32): Likewise.
772 (grub_host_to_target64): Likewise.
773 (grub_target_to_host16): Likewise.
774 (grub_target_to_host32): Likewise.
775 (grub_target_to_host64): Likewise.
777 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
779 (GRUB_MOD_ALIGN): ...this. Update all users.
781 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
782 grub_host_to_target32.
783 Replace grub_be_to_cpu32 with grub_target_to_host32.
784 (load_modules): Likewise.
785 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
786 Replace grub_be_to_cpu32 with grub_target_to_host32.
787 Replace grub_cpu_to_be16 with grub_host_to_target16.
788 Replace grub_cpu_to_be32 grub_host_to_target32.
790 2007-10-12 Robert Millan <rmh@aybabtu.com>
792 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
793 * util/elf/grub-mkimage.c: ... here.
795 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
796 `util/powerpc/ieee1275/grub-mkimage.c'.
798 2007-10-07 Robert Millan <rmh@aybabtu.com>
800 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
801 and make it easier to figure out.
802 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
803 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
804 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
805 leave us with less than HEAP_MIN_SIZE total heap.
806 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
808 2007-10-03 Robert Millan <rmh@aybabtu.com>
810 * include/grub/i386/io.h: New file.
811 * commands/i386/pc/play.c (inb): Removed.
813 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
815 * term/i386/pc/serial.c (inb): Removed.
817 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
819 * term/i386/pc/vga.c (inb): Removed.
821 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
824 2007-10-02 Robert Millan <rmh@aybabtu.com>
826 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
827 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
828 Reported by Marcin Kurek.
830 2007-09-07 Robert Millan <rmh@aybabtu.com>
832 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
833 SmartFirmware version updates (as released by Sven Luther), and avoid
834 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
835 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
838 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
841 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
842 when merging two regions.
844 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
846 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
847 * normal/completion.c (grub_normal_do_completion): Likewise.
848 Reported by Hitoshi Ozeki.
850 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
852 Do not use devices at boot in chainloading.
854 * loader/i386/pc/chainloader.c (boot_drive): New variable.
855 (boot_part_addr): Likewise.
856 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
857 with BOOT_DRIVE and BOOT_PART_ADDR.
858 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
859 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
861 2007-08-29 Robert Millan <rmh@aybabtu.com>
863 Patch from Simon Peter <dn.tlp@gmx.net>:
864 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
865 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
866 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
867 util/i386/pc/grub-setup.c_DEPENDENCIES.
868 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
869 util/grub-probe.c_DEPENDENCIES.
870 * conf/powerpc-ieee1275.rmk: Likewise.
872 2007-08-28 Robert Millan <rmh@aybabtu.com>
874 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
875 to tell grub-mkdevicemap how to name devices.
876 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
879 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
880 util/i386/get_disk_name.c.
881 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
882 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
883 util/ieee1275/get_disk_name.c.
885 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
887 * DISTLIST: Add util/i386/get_disk_name.c and
888 util/ieee1275/get_disk_name.c.
890 * util/grub-mkdevicemap.c: Replace device naming logic with
891 grub_util_get_disk_name() calls.
893 2007-08-20 Robert Millan <rmh@aybabtu.com>
895 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
896 (so that it works for both plural and singular quantities).
898 2007-08-05 Robert Millan <rmh@aybabtu.com>
900 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
901 so that [xz] isn't taken into account when determining order.
903 2007-08-02 Marco Gerards <marco@gnu.org>
905 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
906 `include/multiboot2.h', `include/grub/elfload.h',
907 `include/multiboot.h', `include/grub/multiboot.h',
908 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
909 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
910 `kern/elf.c', `loader/multiboot_loader.c',
911 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
912 `loader/i386/pc/multiboot2.c',
913 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
914 `util/i386/pc/grub-mkrescue.in'. Remove
915 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
916 `include/grub/i386/pc/util/biosdisk.h' and
917 `include/grub/powerpc/ieee1275/multiboot.h'.
919 2007-08-02 Bean <bean123ch@gmail.com>
921 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
922 (ntfs_mod_SOURCES): New variable.
923 (ntfs_mod_CFLAGS): Likewise.
924 (ntfs_mod_LDFLAGS): Likewise.
926 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
927 (grub_probe_SOURCES): Likewise.
928 (grub_emu_SOURCES): Likewise.
930 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
931 (grub_emu_SOURCES): Likewise.
933 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
934 (grub_emu_SOURCES): Likewise.
936 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
938 * fs/ntfs.c: New file.
940 2007-08-02 Bean <bean123ch@gmail.com>
942 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
944 * file.h (grub_file): Likewise.
946 * fshelp.h (grub_fshelp_read_file): Likewise.
948 * util/i386/pc/grub-setup.c (setup): Likewise.
949 (save_first_sector): Likewise.
950 (save_blocklists): Likewise.
952 * fs/affs.c (grub_affs_read_file): Likewise.
954 * fs/ext2.c (grub_ext2_read_file): Likewise.
956 * fs/fat.c (grub_fat_read_data): Likewise.
958 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
960 * fs/hfs.c (grub_hfs_read_file): Likewise.
962 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
964 * fs/jfs.c (grub_jfs_read_file): Likewise.
966 * fs/minix.c (grub_minix_read_file): Likewise.
968 * fs/sfs.c (grub_sfs_read_file): Likewise.
970 * fs/ufs.c (grub_ufs_read_file): Likewise.
972 * fs/xfs.c (grub_xfs_read_file): Likewise.
974 * command/blocklist.c (read_blocklist): Likewise.
975 (print_blocklist): Likewise.
977 2007-08-02 Marco Gerards <marco@gnu.org>
979 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
982 * disk/host.c: New file.
984 * util/hostfs.c: Likewise.
986 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
987 return `GRUB_ERR_BAD_FS'.
988 * fs/sfs.c (grub_sfs_mount): Likewise.
989 * fs/xfs.c (grub_xfs_mount): Likewise.
991 * include/grub/disk.h (enum grub_disk_dev_id): Add
992 `GRUB_DISK_DEVICE_HOST_ID'.
994 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
996 2007-07-24 Jerone Young <jerone@gmail.com>
998 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
999 modules for compilation.
1000 * conf/powerpc-ieee1275.rmk: Likewise.
1002 * include/multiboot.h: Move multiboot definitions to one file. Rename
1003 many definitions to not get grub specific.
1004 * include/multiboot2.h: Create header with multiboot 2 definitions.
1005 * include/grub/multiboot.h: Header for grub specific function
1006 prototypes and definitions.
1007 * include/grub/multiboot2.h: Likewise.
1008 * include/grub/multiboot_loader.h: Likewise.
1009 * include/grub/i386/pc/multiboot.h: Removed.
1010 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
1012 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
1013 and 2 to allow for one multiboot and module commands.
1014 * loader/multiboot2.c: Add multiboot2 functionality.
1015 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
1016 and definition names.
1017 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
1019 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
1020 ieee1275 specific multiboot2 code.
1022 * kern/i386/pc/startup.S: Change headers and definition names for
1023 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
1025 2007-07-22 Robert Millan <rmh@aybabtu.com>
1027 * geninitheader.sh: Process file specified in first parameter rather
1028 than hardcoding grub_modules_init.lst.
1029 * geninit.sh: Likewise. Also, construct header name dynamicaly rather
1030 than hardcoding grub_modules_init.h.
1032 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
1033 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
1034 grub_probe_init.[ch] and grub_setup_init.[ch].
1036 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
1037 grub_modules_init.h with grub_emu_init.h.
1038 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
1039 grub_probe_init.[ch] files.
1040 * conf/i386-efi.rmk: Likewise.
1041 * conf/i386-pc.rmk: Likewise.
1042 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
1043 grub_setup_init.[ch] files.
1045 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
1046 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
1047 to initialize modules rather than a list of hardcoded functions.
1048 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
1049 grub_init_all() to initialize modules rather than a list of hardcoded
1052 2007-07-22 Robert Millan <rmh@aybabtu.com>
1054 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
1055 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
1057 2007-07-22 Robert Millan <rmh@aybabtu.com>
1059 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
1060 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
1061 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
1062 flag when running on SmartFirmware.
1063 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
1064 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
1067 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
1068 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
1069 rather than decreasing it.
1071 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
1072 there's not enough space to do it, fail in the same way as when it
1073 can't be done because there are no partitions.
1075 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
1076 when nvsetenv failed.
1078 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
1080 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
1081 because this rule is automatically generated.
1082 (grub-mkrescue): Removed for the same reason as above.
1084 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
1086 Migrate to GNU General Public License Version 3.
1088 * COPYING: Replaced with the plain text version of GPLv3.
1090 * config.guess: Updated from gnulib.
1091 * config.sub: Likewise.
1093 * geninit.sh: Output a GPLv3 copyright notice.
1094 * geninitheader.sh: Likewise.
1095 * genmodsrc.sh: Likewise.
1096 * gensymlist.sh.in: Likewise.
1098 * boot/i386/pc/boot.S: Upgraded to GPLv3.
1099 * boot/i386/pc/diskboot.S: Likewise.
1100 * boot/i386/pc/pxeboot.S: Likewise.
1101 * commands/blocklist.c: Likewise.
1102 * commands/boot.c: Likewise.
1103 * commands/cat.c: Likewise.
1104 * commands/cmp.c: Likewise.
1105 * commands/configfile.c: Likewise.
1106 * commands/echo.c: Likewise.
1107 * commands/help.c: Likewise.
1108 * commands/ls.c: Likewise.
1109 * commands/search.c: Likewise.
1110 * commands/terminal.c: Likewise.
1111 * commands/test.c: Likewise.
1112 * commands/videotest.c: Likewise.
1113 * commands/i386/cpuid.c: Likewise.
1114 * commands/i386/pc/halt.c: Likewise.
1115 * commands/i386/pc/play.c: Likewise.
1116 * commands/i386/pc/reboot.c: Likewise.
1117 * commands/i386/pc/vbeinfo.c: Likewise.
1118 * commands/i386/pc/vbetest.c: Likewise.
1119 * commands/ieee1275/halt.c: Likewise.
1120 * commands/ieee1275/reboot.c: Likewise.
1121 * commands/ieee1275/suspend.c: Likewise.
1122 * disk/loopback.c: Likewise.
1123 * disk/lvm.c: Likewise.
1124 * disk/raid.c: Likewise.
1125 * disk/efi/efidisk.c: Likewise.
1126 * disk/i386/pc/biosdisk.c: Likewise.
1127 * disk/ieee1275/ofdisk.c: Likewise.
1128 * font/manager.c: Likewise.
1129 * fs/affs.c: Likewise.
1130 * fs/ext2.c: Likewise.
1131 * fs/fat.c: Likewise.
1132 * fs/fshelp.c: Likewise.
1133 * fs/hfs.c: Likewise.
1134 * fs/hfsplus.c: Likewise.
1135 * fs/iso9660.c: Likewise.
1136 * fs/jfs.c: Likewise.
1137 * fs/minix.c: Likewise.
1138 * fs/sfs.c: Likewise.
1139 * fs/ufs.c: Likewise.
1140 * fs/xfs.c: Likewise.
1141 * hello/hello.c: Likewise.
1142 * include/grub/acorn_filecore.h: Likewise.
1143 * include/grub/arg.h: Likewise.
1144 * include/grub/bitmap.h: Likewise.
1145 * include/grub/boot.h: Likewise.
1146 * include/grub/cache.h: Likewise.
1147 * include/grub/device.h: Likewise.
1148 * include/grub/disk.h: Likewise.
1149 * include/grub/dl.h: Likewise.
1150 * include/grub/elfload.h: Likewise.
1151 * include/grub/env.h: Likewise.
1152 * include/grub/err.h: Likewise.
1153 * include/grub/file.h: Likewise.
1154 * include/grub/font.h: Likewise.
1155 * include/grub/fs.h: Likewise.
1156 * include/grub/fshelp.h: Likewise.
1157 * include/grub/gzio.h: Likewise.
1158 * include/grub/hfs.h: Likewise.
1159 * include/grub/kernel.h: Likewise.
1160 * include/grub/loader.h: Likewise.
1161 * include/grub/lvm.h: Likewise.
1162 * include/grub/misc.h: Likewise.
1163 * include/grub/mm.h: Likewise.
1164 * include/grub/net.h: Likewise.
1165 * include/grub/normal.h: Likewise.
1166 * include/grub/parser.h: Likewise.
1167 * include/grub/partition.h: Likewise.
1168 * include/grub/pc_partition.h: Likewise.
1169 * include/grub/raid.h: Likewise.
1170 * include/grub/rescue.h: Likewise.
1171 * include/grub/script.h: Likewise.
1172 * include/grub/setjmp.h: Likewise.
1173 * include/grub/symbol.h: Likewise.
1174 * include/grub/term.h: Likewise.
1175 * include/grub/terminfo.h: Likewise.
1176 * include/grub/tparm.h: Likewise.
1177 * include/grub/types.h: Likewise.
1178 * include/grub/video.h: Likewise.
1179 * include/grub/efi/api.h: Likewise.
1180 * include/grub/efi/chainloader.h: Likewise.
1181 * include/grub/efi/console.h: Likewise.
1182 * include/grub/efi/console_control.h: Likewise.
1183 * include/grub/efi/disk.h: Likewise.
1184 * include/grub/efi/efi.h: Likewise.
1185 * include/grub/efi/pe32.h: Likewise.
1186 * include/grub/efi/time.h: Likewise.
1187 * include/grub/i386/linux.h: Likewise.
1188 * include/grub/i386/setjmp.h: Likewise.
1189 * include/grub/i386/types.h: Likewise.
1190 * include/grub/i386/efi/kernel.h: Likewise.
1191 * include/grub/i386/efi/loader.h: Likewise.
1192 * include/grub/i386/efi/time.h: Likewise.
1193 * include/grub/i386/pc/biosdisk.h: Likewise.
1194 * include/grub/i386/pc/boot.h: Likewise.
1195 * include/grub/i386/pc/chainloader.h: Likewise.
1196 * include/grub/i386/pc/console.h: Likewise.
1197 * include/grub/i386/pc/init.h: Likewise.
1198 * include/grub/i386/pc/kernel.h: Likewise.
1199 * include/grub/i386/pc/loader.h: Likewise.
1200 * include/grub/i386/pc/memory.h: Likewise.
1201 * include/grub/i386/pc/multiboot.h: Likewise.
1202 * include/grub/i386/pc/serial.h: Likewise.
1203 * include/grub/i386/pc/time.h: Likewise.
1204 * include/grub/i386/pc/vbe.h: Likewise.
1205 * include/grub/i386/pc/vbeblit.h: Likewise.
1206 * include/grub/i386/pc/vbefill.h: Likewise.
1207 * include/grub/i386/pc/vbeutil.h: Likewise.
1208 * include/grub/i386/pc/vga.h: Likewise.
1209 * include/grub/ieee1275/ieee1275.h: Likewise.
1210 * include/grub/ieee1275/ofdisk.h: Likewise.
1211 * include/grub/powerpc/libgcc.h: Likewise.
1212 * include/grub/powerpc/setjmp.h: Likewise.
1213 * include/grub/powerpc/types.h: Likewise.
1214 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
1215 * include/grub/powerpc/ieee1275/console.h: Likewise.
1216 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
1217 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
1218 * include/grub/powerpc/ieee1275/loader.h: Likewise.
1219 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
1220 * include/grub/powerpc/ieee1275/time.h: Likewise.
1221 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
1222 * include/grub/sparc64/libgcc.h: Likewise.
1223 * include/grub/sparc64/setjmp.h: Likewise.
1224 * include/grub/sparc64/types.h: Likewise.
1225 * include/grub/sparc64/ieee1275/console.h: Likewise.
1226 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
1227 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
1228 * include/grub/sparc64/ieee1275/time.h: Likewise.
1229 * include/grub/util/biosdisk.h: Likewise.
1230 * include/grub/util/getroot.h: Likewise.
1231 * include/grub/util/lvm.h: Likewise.
1232 * include/grub/util/misc.h: Likewise.
1233 * include/grub/util/raid.h: Likewise.
1234 * include/grub/util/resolve.h: Likewise.
1235 * io/gzio.c: Likewise.
1236 * kern/device.c: Likewise.
1237 * kern/disk.c: Likewise.
1238 * kern/dl.c: Likewise.
1239 * kern/elf.c: Likewise.
1240 * kern/env.c: Likewise.
1241 * kern/err.c: Likewise.
1242 * kern/file.c: Likewise.
1243 * kern/fs.c: Likewise.
1244 * kern/loader.c: Likewise.
1245 * kern/main.c: Likewise.
1246 * kern/misc.c: Likewise.
1247 * kern/mm.c: Likewise.
1248 * kern/parser.c: Likewise.
1249 * kern/partition.c: Likewise.
1250 * kern/rescue.c: Likewise.
1251 * kern/term.c: Likewise.
1252 * kern/efi/efi.c: Likewise.
1253 * kern/efi/init.c: Likewise.
1254 * kern/efi/mm.c: Likewise.
1255 * kern/i386/dl.c: Likewise.
1256 * kern/i386/efi/init.c: Likewise.
1257 * kern/i386/efi/startup.S: Likewise.
1258 * kern/i386/pc/init.c: Likewise.
1259 * kern/i386/pc/lzo1x.S: Likewise.
1260 * kern/i386/pc/startup.S: Likewise.
1261 * kern/ieee1275/ieee1275.c: Likewise.
1262 * kern/powerpc/cache.S: Likewise.
1263 * kern/powerpc/dl.c: Likewise.
1264 * kern/powerpc/ieee1275/cmain.c: Likewise.
1265 * kern/powerpc/ieee1275/crt0.S: Likewise.
1266 * kern/powerpc/ieee1275/init.c: Likewise.
1267 * kern/powerpc/ieee1275/openfw.c: Likewise.
1268 * kern/sparc64/cache.S: Likewise.
1269 * kern/sparc64/dl.c: Likewise.
1270 * kern/sparc64/ieee1275/init.c: Likewise.
1271 * kern/sparc64/ieee1275/openfw.c: Likewise.
1272 * loader/efi/chainloader.c: Likewise.
1273 * loader/efi/chainloader_normal.c: Likewise.
1274 * loader/i386/efi/linux.c: Likewise.
1275 * loader/i386/efi/linux_normal.c: Likewise.
1276 * loader/i386/pc/chainloader.c: Likewise.
1277 * loader/i386/pc/chainloader_normal.c: Likewise.
1278 * loader/i386/pc/linux.c: Likewise.
1279 * loader/i386/pc/linux_normal.c: Likewise.
1280 * loader/i386/pc/multiboot.c: Likewise.
1281 * loader/i386/pc/multiboot_normal.c: Likewise.
1282 * loader/powerpc/ieee1275/linux.c: Likewise.
1283 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1284 * normal/arg.c: Likewise.
1285 * normal/cmdline.c: Likewise.
1286 * normal/command.c: Likewise.
1287 * normal/completion.c: Likewise.
1288 * normal/execute.c: Likewise.
1289 * normal/function.c: Likewise.
1290 * normal/lexer.c: Likewise.
1291 * normal/main.c: Likewise.
1292 * normal/menu.c: Likewise.
1293 * normal/menu_entry.c: Likewise.
1294 * normal/misc.c: Likewise.
1295 * normal/parser.y: Likewise.
1296 * normal/script.c: Likewise.
1297 * normal/i386/setjmp.S: Likewise.
1298 * normal/powerpc/setjmp.S: Likewise.
1299 * normal/sparc64/setjmp.S: Likewise.
1300 * partmap/acorn.c: Likewise.
1301 * partmap/amiga.c: Likewise.
1302 * partmap/apple.c: Likewise.
1303 * partmap/gpt.c: Likewise.
1304 * partmap/pc.c: Likewise.
1305 * partmap/sun.c: Likewise.
1306 * term/gfxterm.c: Likewise.
1307 * term/terminfo.c: Likewise.
1308 * term/efi/console.c: Likewise.
1309 * term/i386/pc/console.c: Likewise.
1310 * term/i386/pc/serial.c: Likewise.
1311 * term/i386/pc/vesafb.c: Likewise.
1312 * term/i386/pc/vga.c: Likewise.
1313 * term/ieee1275/ofconsole.c: Likewise.
1314 * util/biosdisk.c: Likewise.
1315 * util/console.c: Likewise.
1316 * util/genmoddep.c: Likewise.
1317 * util/getroot.c: Likewise.
1318 * util/grub-emu.c: Likewise.
1319 * util/grub-mkdevicemap.c: Likewise.
1320 * util/grub-probe.c: Likewise.
1321 * util/lvm.c: Likewise.
1322 * util/misc.c: Likewise.
1323 * util/raid.c: Likewise.
1324 * util/resolve.c: Likewise.
1325 * util/update-grub.in: Likewise.
1326 * util/update-grub_lib.in: Likewise.
1327 * util/grub.d/00_header.in: Likewise.
1328 * util/grub.d/10_hurd.in: Likewise.
1329 * util/grub.d/10_linux.in: Likewise.
1330 * util/i386/efi/grub-install.in: Likewise.
1331 * util/i386/efi/grub-mkimage.c: Likewise.
1332 * util/i386/pc/grub-install.in: Likewise.
1333 * util/i386/pc/grub-mkimage.c: Likewise.
1334 * util/i386/pc/grub-mkrescue.in: Likewise.
1335 * util/i386/pc/grub-setup.c: Likewise.
1336 * util/i386/pc/misc.c: Likewise.
1337 * util/powerpc/ieee1275/grub-install.in: Likewise.
1338 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
1339 * util/powerpc/ieee1275/misc.c: Likewise.
1340 * video/bitmap.c: Likewise.
1341 * video/video.c: Likewise.
1342 * video/i386/pc/vbe.c: Likewise.
1343 * video/i386/pc/vbeblit.c: Likewise.
1344 * video/i386/pc/vbefill.c: Likewise.
1345 * video/i386/pc/vbeutil.c: Likewise.
1346 * video/readers/tga.c: Likewise.
1348 2007-07-02 Robert Millan <rmh@aybabtu.com>
1350 * conf/i386-efi.rmk: Replace obsolete reference to
1351 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
1352 with util/getroot.c.
1353 * conf/powerpc-ieee1275.rmk: Likewise.
1354 * conf/sparc64-ieee1275.rmk: Likewise.
1356 * util/grub-emu.c (main): Fix unchecked pointer handling.
1358 2007-07-02 Robert Millan <rmh@aybabtu.com>
1360 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
1361 invocation to fail, in order to support partition-less media.
1363 * util/i386/pc/grub-install.in: Likewise.
1365 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
1366 which fs or partmap modules are needed (akin to its sister scripts).
1368 Also use grub-probe to get rid of unportable /proc/mounts check.
1370 Print the same informational message that the other scripts do, before
1373 2007-06-23 Robert Millan <rmh@aybabtu.com>
1375 * util/update-grub_lib.in (font_path): New function. Determine wether
1376 a font file can be found and, if so, echo the GRUB path to it.
1378 * util/update-grub.in: Handle multiple terminals depending on user
1379 input, platform availability and font file presence. Propagate
1380 variables of our findings to /etc/grub.d/ children.
1382 * util/grub.d/00_header.in: Handle multiple terminals, based on
1383 environment setup by update-grub.
1385 2007-06-23 Robert Millan <rmh@aybabtu.com>
1387 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
1389 2007-06-21 Robert Millan <rmh@aybabtu.com>
1391 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
1392 indicate end of data section in kernel image.
1393 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
1394 GRUB_KERNEL_MACHINE_DATA_END.
1396 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
1398 * kern/i386/efi/startup.S: Likewise.
1400 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
1401 during image generation. Implement --prefix option to override this
1403 * util/i386/efi/grub-mkimage.c: Likewise.
1405 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
1406 code to make path relative to its root into a separate function.
1408 * util/i386/pc/grub-install.in: Use newly provided
1409 make_system_path_relative_to_its_root() to convert ${grubdir}, then
1410 pass the result to grub-install --prefix.
1412 2007-06-13 Robert Millan <rmh@aybabtu.com>
1414 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
1416 * util/grub-emu.c: Use above definitions from misc.h instead of
1418 * util/grub-mkdevicemap.c: Likewise.
1419 * util/i386/pc/grub-setup.c: Likewise.
1420 * util/grub-probe.c: Likewise.
1421 (probe): Abort with grub_util_error() when either
1422 grub_guess_root_device or grub_util_get_grub_dev fails.
1424 2007-06-12 Robert Millan <rmh@aybabtu.com>
1426 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
1428 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
1430 * util/grub-probe.c (probe): Likewise for "drive_name".
1432 2007-06-11 Robert Millan <rmh@aybabtu.com>
1434 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
1435 not just the cdrom one.
1437 2007-06-11 Robert Millan <rmh@aybabtu.com>
1439 * util/i386/pc/grub-mkrescue.in: Add "set -e".
1440 Add --pkglibdir=DIR option to override pkglibdir.
1441 Mention --image-type=TYPE in help output.
1442 Fix --grub-mkimage (it was a no-op).
1443 Abort gracefuly when no parameter is given.
1445 2007-06-11 Robert Millan <rmh@aybabtu.com>
1447 * util/i386/pc/grub-mkrescue.in: New file.
1448 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
1449 * Makefile.in: Handle bin_SCRIPTS.
1451 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
1453 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
1454 list of video modes.
1456 2007-06-06 Robert Millan <rmh@aybabtu.com>
1458 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
1459 file doesn't exist, or if it is in a filesystem grub can't read.
1461 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
1462 not abort if GRUB_DRIVE could not be defined. Rearrange generated
1463 header comment to fit in 80 columns when the variables are resolved.
1465 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
1466 could be identified by update-grub. Remove redundant check for
1467 unifont.pff existance (since convert_system_path_to_grub_path now
1470 2007-06-04 Robert Millan <rmh@aybabtu.com>
1472 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
1474 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
1476 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
1478 2007-06-04 Robert Millan <rmh@aybabtu.com>
1480 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
1482 * include/grub/partition.h: Declare grub_apple_partition_map_init and
1483 grub_apple_partition_map_fini.
1486 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
1487 to access >2 TiB disks).
1489 Print disk->total_sectors with %llu instead of %lu, since this
1490 variable is always 64-bit (prevents wrong disk size from being displayed
1491 on either >2 TiB disk or big-endian CPU).
1493 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
1494 into a generic case that supports all (sane) partition maps.
1496 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
1499 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
1500 and grub_apple_partition_map_fini() after that.
1502 2007-06-01 Robert Millan <rmh@aybabtu.com>
1504 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
1506 * util/grub.d/00_header.in: Only enable gfxterm when
1507 convert_system_path_to_grub_path() succeeds.
1509 2007-05-20 Robert Millan <rmh@aybabtu.com>
1511 * util/update-grub_lib.in: New file.
1512 * DISTLIST: Add update-grub_lib.in.
1513 * conf/common.rmk: Generate update-grub_lib and install it in
1515 * Makefile.in: Add install routine for $(lib_DATA).
1517 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
1518 function provided by update-grub_lib to support arbitrary paths of
1520 * util/update-grub.in: Use convert_system_path_to_grub_path() to
1521 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
1523 2007-05-19 Robert Millan <rmh@aybabtu.com>
1525 * commands/i386/cpuid.c: New module.
1527 * conf/i386-efi.rmk: Enable cpuid.mod.
1528 * conf/i386-pc.rmk: Likewise.
1530 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
1532 * kern/disk.c (grub_disk_read): Check return value of
1535 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
1537 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
1539 * disk/raid.c (grub_raid_open): Likewise.
1541 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
1543 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
1544 stack instead of on the heap.
1546 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
1547 before doing a read on it.
1549 * configure.ac: Only use -fno-stack-protector for the target
1552 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
1554 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
1555 __attribute_ ((unused)) to mode_type argument.
1557 * util/getroot.c (grub_guess_root_device): Fix #endif.
1559 * kern/misc.c (memcmp): Fix prototype.
1561 * include/grub/partition.h [GRUB_UTIL]
1562 (grub_gpt_partition_map_init): Add prototype.
1563 (grub_gpt_partition_map_fini): Likewise.
1565 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
1568 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
1569 (grub_fat_read_data): Likewise.
1570 (grub_fat_find_dir): Likewise.
1572 * font/manager.c (find_glyph): Make table a const.
1573 (grub_font_get_glyph): Remove bitmap from if statement.
1575 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
1577 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
1578 code, first search for device in /dev/mapper, then in /dev.
1579 (grub_util_get_grub_dev): New function.
1580 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
1582 * util/grub-probe.c (probe): Remove check for RAID, call
1583 grub_util_get_grub_dev() instead of
1584 grub_util_biosdisk_get_grub_dev().
1585 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
1586 grub_util_biosdisk_get_grub_dev().
1587 * util/i386/pc/grub-setup.c (main): Likewise.
1589 2007-05-16 Robert Millan <rmh@aybabtu.com>
1591 * DISTLIST: Update for the latest changes.
1592 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
1593 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
1594 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
1595 grub/util/biosdisk.h.
1596 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
1597 grub/util/biosdisk.h.
1599 2007-05-16 Robert Millan <rmh@aybabtu.com>
1601 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
1603 2007-05-16 Robert Millan <rmh@aybabtu.com>
1605 * util/i386/efi/grub-install.in: New.
1606 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
1607 newly added grub-install.
1608 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
1610 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
1611 grub/util/biosdisk.h.
1612 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
1613 grub/util/biosdisk.h.
1615 2007-05-16 Robert Millan <rmh@aybabtu.com>
1617 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
1618 * include/grub/util/biosdisk.h: ... here.
1619 * util/i386/pc/biosdisk.c: Moved to ...
1620 * util/biosdisk.c: ... here.
1621 * util/i386/pc/getroot.c: Moved to ...
1622 * util/getroot.c: ... here.
1623 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
1624 * util/grub-mkdevicemap.c: ... here.
1625 * util/i386/pc/grub-probe.c: Moved to ...
1626 * util/grub-probe.c: ... here.
1628 2007-05-15 Robert Millan <rmh@aybabtu.com>
1630 * util/update-grub.in: Remove duplicated line in grub.cfg header
1633 2007-05-13 Robert Millan <rmh@aybabtu.com>
1635 * util/update-grub.in: Fix a few assumptions about the devices holding
1636 /, /boot and /boot/grub being the same.
1637 * util/grub.d/00_header.in: Likewise.
1638 * util/grub.d/10_hurd.in: Likewise.
1639 * util/grub.d/10_linux.in: Likewise.
1641 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
1642 patterns. Use that to define the `.old' suffix as older than `'.
1644 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
1646 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
1647 the grub.cfg header message.
1649 2007-05-11 Robert Millan <rmh@aybabtu.com>
1651 * util/update-grub.in: Create device.map if it doesn't already exist,
1652 before attempting to run grub-probe.
1653 Check for grub-probe and grub-mkdevicemap with the same code
1654 grub-install is using.
1657 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
1659 * Makefile.in: Add the datarootdir autoconf variable.
1661 2007-05-09 Robert Millan <rmh@aybabtu.com>
1663 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
1664 fail gracefuly if dev->disk->partition == NULL.
1666 2007-05-07 Robert Millan <rmh@aybabtu.com>
1668 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
1669 determine partition map module.
1670 * util/i386/pc/grub-install.in: Use this feature to decide which
1671 partition module to load, instead of hardcoding pc and gpt.
1673 2007-05-07 Robert Millan <rmh@aybabtu.com>
1675 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
1676 source directory differs from build directory.
1678 2007-05-05 Robert Millan <rmh@aybabtu.com>
1680 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
1683 2007-05-05 Robert Millan <rmh@aybabtu.com>
1685 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
1687 2007-05-05 Robert Millan <rmh@aybabtu.com>
1689 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
1690 command-line arguments via ${GRUB_CMDLINE_LINUX}.
1692 2007-05-05 Robert Millan <rmh@aybabtu.com>
1694 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
1695 (grub_probe_SOURCES): Likewise.
1696 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
1697 GPT and initialize dos_part and bsd_part accordingly.
1698 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
1700 (main): Activate gpt module for use during partition identification,
1701 and deactivate it afterwards.
1702 * util/i386/pc/grub-install.in: Add gpt module to core.img.
1703 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
1704 partition identification, and deactivate it afterwards.
1706 2007-05-05 Robert Millan <rmh@aybabtu.com>
1708 * term/i386/pc/console.c (grub_console_fini): Call
1709 grub_term_set_current() before grub_term_unregister().
1711 2007-05-04 Robert Millan <rmh@aybabtu.com>
1713 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
1714 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
1715 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
1716 and update-grub_DATA.
1717 * conf/common.rmk: Build and install update-grub components.
1718 * conf/common.mk: Regenerate.
1719 * util/update-grub.in: New. Core of update-grub.
1720 * util/grub.d/00_header.in: New. Generates grub.cfg header.
1721 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
1722 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
1723 * util/grub.d/README: New. Document grub.d directory layout.
1725 2007-05-01 Robert Millan <rmh@aybabtu.com>
1727 * util/grub-emu.c: Move initialization functions
1728 grub_util_biosdisk_init() and grub_init_all() before
1729 grub_util_biosdisk_get_grub_dev(), which relies on them.
1731 2007-04-19 Robert Millan <rmh@aybabtu.com>
1733 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
1736 2007-04-18 Jerone Young <jerone@gmail.com>
1738 * kernel/elf.c: Add missing parenthesis for conditional statement
1741 2007-04-10 Jerone Young <jerone@gmail.com>
1743 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
1744 continue on and look for device node with real device name.
1746 2007-04-10 Jerone Young <jerone@gmail.com>
1748 * configure.ac: Add argument for autoconf to use tranformation
1750 * Makefile.in: Add autoconf package transformation code.
1751 * util/i386/pc/grub-install.in: Likewise.
1752 * util/powerpc/ieee1275/grub-install.in: Likewise.
1754 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
1756 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
1757 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
1758 (EXT2_REVISION): Likewise.
1759 (EXT2_INODE_SIZE): Likewise.
1760 (struct grub_ext2_block_group): Added a missing member
1762 (grub_ext2_read_inode): Divide by the inode size in a superblock
1763 instead of 128 to obtain INODES_PER_BLOCK.
1764 Use the macro EXT2_INODE_SIZE instead of directly using
1767 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
1769 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
1770 superblock instead of the structure size to compute an
1771 offset. This fixes the problem that GRUB could not read a
1772 filesystem when inode size is different from 128-byte.
1774 2007-03-05 Marco Gerards <marco@gnu.org>
1776 * normal/main.c (read_config_file): When "menu" is not set, create
1779 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
1781 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
1782 (HEAP_LIMIT): New macro.
1783 (grub_claim_heap): Claim memory up to `heaplimit'.
1785 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
1787 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
1788 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
1790 (grub_arch_modules_addr): Return address after `_end'.
1791 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
1792 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
1793 (add_segments): Calculate `_end' from phdr size and location.
1794 (ALIGN_UP): Moved to ...
1795 * include/grub/misc.h: here.
1796 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
1798 (GRUB_IEEE1275_MODULE_BASE): Removed.
1800 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
1802 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
1805 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
1807 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
1809 (grub_elf64_load_hook_t): Likewise.
1810 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
1813 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
1815 * kern/mm.c: Update copyright.
1816 (grub_mm_debug): Correct syntax error.
1817 (grub_mm_dump_free): New function.
1818 (grub_debug_free): Call `grub_free'.
1819 * include/grub/mm.h: Update copyright.
1820 (grub_mm_dump_free): Add declaration.
1822 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
1824 * include/grub/ieee1275/ieee1275.h: Update copyright.
1825 * kern/powerpc/ieee1275/init.c: Likewise.
1826 * kern/powerpc/ieee1275/openfw.c: Likewise.
1828 * loader/powerpc/ieee1275/linux.c: Likewise.
1829 * include/grub/elfload.h: Likewise.
1830 * kern/elf.c: Likewise.
1831 (grub_elf32_load): Pass `base' and `size' parameters. Update all
1833 (grub_elf64_load): Likewise.
1834 (grub_elf32_load_segment): Move to a nested function.
1835 (grub_elf64_load_segment): Likewise.
1837 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
1839 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
1841 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
1842 (grub_heap_len): Likewise.
1843 (HEAP_SIZE): New macro.
1844 (grub_claim_heap): New function.
1845 (grub_machine_init): Don't claim heap directly. Call
1847 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
1848 (grub_available_iterate): New function.
1850 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
1852 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
1853 * configure.ac: Use it for testing the HOST and TARGET compilers.
1855 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
1857 * Makefile.in (enable_grub_emu): New variable.
1858 * configure.ac (--enable-grub-emu): New option.
1859 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
1860 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
1861 * conf/i386-pc.rmk: Likewise.
1862 * conf/powerpc-ieee1275.rmk: Likewise.
1863 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
1865 2006-12-12 Marco Gerards <marco@gnu.org>
1867 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
1869 * kern/env.c (grub_env_unset): Don't free the member `value' when
1870 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
1873 * normal/main.c (current_menu): Removed.
1874 (free_menu): Unset the `menu' environment variable.
1875 (grub_normal_menu_addentry): Make use of the environment variable
1876 `menu', instead of using the global `current_menu'. Allocate
1877 memory for the sourcecode of this entry.
1878 (read_config_file): New argument `nested', changed all callers.
1879 Only in the case of a new context, initialize a new menu. Set the
1880 `menu' environment variable.
1881 (grub_normal_execute): Don't set and unset the environment
1882 variable `menu' here anymore. Only free the menu when leaving the
1885 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
1888 2006-12-11 Marco Gerards <marco@gnu.org>
1890 * normal/menu_entry.c (run): Fix off by one bug so the last line
1891 is executed. Move the loader check to outside the loop.
1893 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
1895 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
1897 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
1899 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
1900 the number of sectors. Reported by Andrey Shuvikov
1901 <mr_hyro@yahoo.com>.
1903 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
1905 * kern/disk.c (grub_disk_read): When there is a read error, always
1906 try to read only the necessary data.
1908 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
1910 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
1912 [GRUB_UTIL] (grub_raid_fini): Likewise.
1913 [GRUB_UTIL] (grub_lvm_init): Likewise.
1914 [GRUB_UTIL] (grub_lvm_fini): Likewise.
1915 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
1916 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
1917 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
1918 and grub_raid_fini().
1920 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
1922 * include/grub/types.h (__unused): Rename to UNUSED.
1923 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
1924 (grub_elf64_size): Likewise.
1926 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
1928 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
1929 grub_error_push and grub_error_pop in the error-handling path.
1930 (grub_elf32_load_segment): Only call grub_file_read with non-zero
1933 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
1935 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
1936 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1937 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1938 (kernel_elf_SOURCES): Likewise.
1939 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
1940 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
1941 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
1942 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
1943 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
1944 (elf_mod_SOURCES): New variable.
1945 (elf_mod_CFLAGS): Likewise.
1946 (elf_mod_LDFLAGS): Likewise.
1947 * include/grub/types.h (__unused): New macro.
1948 * include/grub/elfload.h: New file.
1949 * kern/elf.c: Likewise.
1950 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
1951 (ELF32_LOADMASK): New macro.
1952 (ELF64_LOADMASK): Likewise.
1954 (grub_linux_load32): New function.
1955 (grub_linux_load64): Likewise.
1956 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
1957 Use grub_elf_t instead of grub_file_t.
1959 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
1961 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
1962 `catch_result' to struct set_color_args.
1964 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
1966 * normal/menu.c: Include grub/script.h.
1967 * normal/menu_entry.c: Likewise.
1968 * include/grub/normal.h: Do not include grub/script.h.
1970 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
1972 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
1974 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
1976 * kern/disk.c (grub_disk_open): Print debug messages when opening a
1978 (grub_disk_close): Print debug messages when closing a disk.
1979 (grub_disk_read): Print debug messages when disk read fails.
1980 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
1982 * kern/partition.c: Include misc.h.
1983 (grub_partition_iterate): Print debug messages when detecting
1986 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
1988 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
1990 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
1992 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
1994 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
1995 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
1997 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
1999 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
2000 instead of sizeof(lv). Patch by Michael Guntsche.
2002 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
2004 * disk/lvm.c: Rename VGS to VG_LIST.
2005 (grub_lvm_iterate): Change VGS->LV to VG-LV.
2006 (grub_lvm_open): Likewise.
2007 Thanks to Michael Guntsche for finding this bug.
2009 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
2011 * configure.ac (AC_INIT): Bumped to 1.95.
2013 2006-10-14 Robert Millan <rmh@aybabtu.com>
2015 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
2016 with "/dev/.static/dev/md".
2018 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
2020 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
2021 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
2022 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
2023 DRIVE_NAME are always freed.
2025 * util/i386/pc/biosdisk.c (make_device_name): Add one into
2026 DOS_PART, as a DOS partition is counted from one instead of zero
2027 now. Reported by Robert Millan.
2029 2006-10-14 Robert Millan <rmh@aybabtu.com>
2031 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
2032 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
2033 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
2034 string returned by grub_guess_root_device.
2035 * util/i386/pc/grub-setup.c: Likewise.
2036 * util/i386/pc/grub-probefs.c: Likewise.
2038 * util/i386/pc/grub-probefs.c: Rename to ...
2039 * util/i386/pc/grub-probe.c: ... this.
2040 * DISTLIST: Remove grub-probefs, add grub-probe.
2041 * conf/i386-efi.rmk: Likewise.
2042 * conf/i386-pc.rmk: Likewise.
2043 * util/i386/pc/grub-install.in: Likewise.
2045 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
2046 choose which information we want to print.
2048 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
2050 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
2051 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
2052 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
2053 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
2054 video/readers/tga.c and video/i386/pc/vbeutil.c.
2056 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
2058 Added support for RAID and LVM.
2060 * disk/lvm.c: New file.
2061 * disk/raid.c: Likewise.
2062 * include/grub/lvm.h: Likewise.
2063 * include/grub/raid.h: Likewise.
2064 * include/grub/util/lvm.h: Likewise.
2065 * include/grub/util/raid.h: Likewise.
2066 * util/lvm.c: Likewise.
2067 * util/raid.c: Likewise.
2069 * include/grub/disk.h (grub_disk_dev_id): Add
2070 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
2071 (grub_disk_get_size): New prototype.
2072 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
2073 returns a partition.
2074 (grub_disk_get_size): New function.
2076 * kern/i386/pc/init.c (make_install_device): Copy the prefix
2077 verbatim if grub_install_dos_part is -2.
2079 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
2082 * util/i386/pc/grub-setup.c (setup): New argument
2083 MUST_EMBED. Force embedding of GRUB when the argument is
2084 true. Close FILE before returning.
2085 (main): Add support for RAID and LVM.
2087 * conf/common.rmk: Add RAID and LVM modules.
2088 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
2090 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
2092 * kern/misc.c (grub_strstr): New function.
2093 * include/grub/misc.h (grub_strstr): New prototype.
2095 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
2097 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
2099 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
2101 * kern/misc.c (grub_strtoull): Guess the base only if not
2104 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
2106 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
2109 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
2111 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
2113 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
2114 Remove `flags' argument. All callers changed.
2115 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
2116 (IEEE1275_IHANDLE_INVALID): New variable.
2117 (IEEE1275_CELL_INVALID): New variable.
2118 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2119 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
2120 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
2121 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
2122 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
2123 codes from Open Firmware. All callers updated.
2124 (grub_ieee1275_next_property): Directly return Open Firmware return
2126 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
2127 Standardize error checking from `grub_ieee1275_get_property'.
2128 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
2129 `devalias' to `aliases'. Correct comments. Consolidate error paths.
2131 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
2133 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
2134 `instance_to_package_args' to `instance_to_path_args'.
2136 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
2137 `grub_ieee1275_chosen'.
2139 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
2140 `grub_ieee1275_interpret'.
2142 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
2144 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
2146 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
2148 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
2149 (__cmpdi): Likewise.
2151 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
2152 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
2155 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
2157 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
2158 to type `grub_ssize_t'.
2159 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
2161 2006-09-22 Marco Gerards <marco@gnu.org>
2163 * normal/script.c (grub_script_create_cmdmenu): Skip leading
2166 2006-09-22 Marco Gerards <marco@gnu.org>
2168 * commands/echo.c: New file.
2170 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
2172 * conf/common.rmk (echo_mod_SOURCES): New variable.
2173 (echo_mod_CFLAGS): Likewise.
2174 (echo_mod_LDFLAGS): Likewise.
2176 2006-09-22 Marco Gerards <marco@gnu.org>
2178 * normal/main.c (get_line): Malloc memory instead of using
2179 preallocated memory. Removed the arguments `cmdline' and
2180 `max_len'. Updated all callers.
2182 2006-09-22 Marco Gerards <marco@gnu.org>
2184 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
2185 (normal_mod_DEPENDENCIES): Likewise.
2187 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
2188 (normal_mod_DEPENDENCIES): Likewise.
2190 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
2192 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
2194 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
2196 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
2197 (normal_mod_DEPENDENCIES): Likewise.
2198 * conf/i386-pc.mk: Regenerate.
2199 * conf/i386-efi.mk: Likewise
2200 * conf/common.mk: Likewise.
2201 * conf/powerpc-ieee1275.mk: Likewise.
2202 * conf/sparc64-ieee1275.mk: Likewise.
2204 2006-09-22 Robert Millan <rmh@aybabtu.com>
2206 Sync with i386 version.
2207 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
2208 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
2210 2006-09-21 Robert Millan <rmh@aybabtu.com>
2212 Import from GRUB Legacy (lib/device.c):
2213 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
2214 (init_device_map) [__linux__]: Add support for I2O devices.
2216 2006-09-14 Marco Gerards <marco@gnu.org>
2218 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
2221 2006-09-14 Robert Millan <rmh@aybabtu.com>
2223 * util/i386/pc/grub-install.in: Skip menu.lst when removing
2226 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
2228 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
2229 before adding it to device.map.
2231 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
2233 * genmk.rb: Let GCC generate dependenceies the first time it
2234 compiles a file; using the -MD option.
2235 * conf/common.mk: Regenerate.
2236 * conf/i386-pc.mk: Likewise.
2237 * conf/i386-efi.mk: Likewise.
2238 * conf/powerpc-ieee1275.mk: Likewise.
2239 * conf/sparc64-ieee1275.mk: Likewise.
2241 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
2243 Move the prototypes of grub_setjmp and grub_longjmp to
2244 cpu/setjmp.h, so that each architecture may specify different
2247 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
2248 (grub_longjmp): Likewise.
2249 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
2250 (grub_longjmp): Likewise.
2251 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
2252 (grub_longjmp): Likewise.
2254 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
2255 [!GRUB_UTIL] (grub_longjmp): Removed.
2257 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
2259 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
2260 "color!" method does not return any value.
2262 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
2264 * include/grub/bitmap.h: New file.
2266 * include/grub/i386/pc/vbeutil.h: Likewise.
2268 * video/bitmap.c: Likewise.
2270 * video/readers/tga.c: Likewise.
2272 * video/i386/pc/vbeutil.c: Likewise.
2274 * commands/videotest.c: Code cleanup and updated to reflect to new
2277 * term/gfxterm.c: Likewise.
2279 * video/video.c: Likewise.
2281 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
2282 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
2283 (bitmap_mod_SOURCES): New entry.
2284 (bitmap_mod_CFLAGS): Likewise.
2285 (bitmap_mod_LDFLAGS): Likewise.
2286 (tga_mod_SOURCES): Likewise.
2287 (tga_mod_CFLAGS): Likewise.
2288 (tga_mod_LDFLAGS): Likewise.
2290 * include/grub/video.h (grub_video_blit_operators): New enum type.
2291 (grub_video_render_target): Changed as forward declaration and moved
2292 actual definition to be video driver specific.
2293 (grub_video_adapter.blit_bitmap): Added blitting operator.
2294 (grub_video_adapter.blit_render_target): Likewise.
2295 (grub_video_blit_bitmap): Likewise.
2296 (grub_video_blit_render_target): Likewise.
2298 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
2299 driver specific render target definition.
2300 (grub_video_vbe_map_rgba): Added driver internal helper.
2301 (grub_video_vbe_unmap_color): Updated to use
2302 grub_video_i386_vbeblit_info.
2303 (grub_video_vbe_get_video_ptr): Likewise.
2305 * include/grub/i386/pc/vbeblit.h
2306 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
2307 grub_video_i386_vbeblit_info.
2308 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2309 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2310 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2311 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2312 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2313 (grub_video_i386_vbeblit_index_index): Likewise.
2314 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
2315 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2316 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2317 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
2319 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
2322 * video/i386/pc/vbeblit.c: Updated to reflect changes on
2323 include/grub/i386/pc/vbeblit.h.
2325 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
2326 Updated to use grub_video_i386_vbeblit_info.
2327 (grub_video_i386_vbefill_R8G8B8): Likewise.
2328 (grub_video_i386_vbefill_index): Likewise.
2329 (grub_video_i386_vbefill): Added generic filler.
2331 * video/i386/pc/vbefill.c: Updated to reflect changes on
2332 include/grub/i386/pc/vbefill.h.
2334 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
2335 grub_video_i386_vbeblit_info.
2336 (grub_video_vbe_unmap_color): Likewise.
2337 (grub_video_vbe_blit_glyph): Likewise.
2338 (grub_video_vbe_scroll): Likewise.
2339 (grub_video_vbe_draw_pixel): Removed function.
2340 (grub_video_vbe_get_pixel): Likewise.
2341 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
2342 updated code to use it.
2343 (common_blitter): Added common blitter for render target and bitmap.
2344 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
2345 (grub_video_vbe_blit_render_target): Likewise.
2347 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
2349 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
2350 is in text mode if there is no console control protocol instance
2353 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
2355 * include/grub/video.h: Code cleanup.
2357 * include/grub/i386/pc/vbe.h: Likewise.
2359 * video/i386/pc/vbe.c: Likewise.
2361 * video/i386/pc/vbeblit.c: Likewise.
2363 * video/i386/pc/vbefill.c: Likewise.
2365 * video/video.c: Likewise. Also added more comments.
2367 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
2369 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
2370 (struct grub_biosdisk_dap): Likewise.
2372 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
2373 linkage settings for all functions.
2375 2006-07-12 Marco Gerards <marco@gnu.org>
2377 * configure.ac (--enable-mm-debug): Fix typo.
2379 * genkernsyms.sh.in: Use proper quoting for `CC'.
2381 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
2383 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
2384 (normal_mod_ASFLAGS): Remove "-m32".
2386 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
2388 * util/misc.c: Include config.h.
2389 [!HAVE_MEMALIGN]: Do not include malloc.h.
2390 (grub_memalign): Use posix_memalign, if present. Then, use
2391 memalign, if present. Otherwise, emit an error.
2393 * util/grub-emu.c: Do not include malloc.h.
2395 * include/grub/util/misc.h: Include unistd.h. This is required for
2396 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
2397 D. Eades III <hde@foobar-qux.org>.
2399 * configure.ac (AC_GNU_SOURCE): Added.
2400 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
2403 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
2405 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
2406 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
2408 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
2410 * include/grub/types.h (grub_host_addr_t): Rename to
2412 (grub_host_off_t): Rename to grub_target_off_t.
2413 (grub_host_size_t): Rename to grub_target_size_t.
2414 (grub_host_ssize_t): Rename to grub_target_ssize_t.
2415 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
2417 * include/grub/kernel.h (struct grub_module_header): Change type
2418 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
2419 (grub_module_info): Likewise.
2421 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
2423 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
2424 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
2425 Velazquez <jesus.velazquez@gmail.com>.
2427 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
2429 Count partitions from 1 instead of 0 in the string representation
2430 of partitions. Still use 0-based internally.
2432 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
2433 (sun_partition_map_iterate): Use grub_partition_t instead of
2434 struct grub_partition *. Cast DESC->START_CYLINDER to
2435 grub_uint64_t after converting the endian.
2436 (sun_partition_map_probe): Subtract 1 for PARTNUM.
2437 (sun_partition_map_get_name): Add 1 to P->INDEX.
2439 * partmap/pc.c (grub_partition_parse): Subtract 1 for
2441 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
2443 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
2444 zero instead of one.
2445 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
2446 (gpt_partition_map_get_name): Add 1 into P->INDEX.
2448 * partmap/apple.c (apple_partition_map_iterate): Change the type
2450 (apple_partition_map_probe): Subtract 1 for PARTNUM.
2451 (apple_partition_map_get_name): Add 1 into P->INDEX.
2453 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
2455 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
2456 calculate the offset of a partition.
2457 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
2458 (amiga_partition_map_get_name): Add 1 into P->INDEX.
2460 * partmap/acorn.c (acorn_partition_map_find): Change the type of
2461 SECTOR to grub_disk_addr_t.
2462 (acorn_partition_map_iterate): Likewise.
2463 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
2464 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
2466 (acorn_partition_map_get_name): Add 1 into P->INDEX.
2468 * kern/i386/pc/init.c (make_install_device): Add 1 into
2469 GRUB_INSTALL_DOS_PART.
2471 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
2474 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
2476 Clean up the code to support 64-bit addressing in disks and
2477 files. This change is not enough for filesystems yet.
2479 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
2480 type of "start" to grub_uint64_t.
2481 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
2482 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
2483 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
2486 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
2487 to grub_disk_addr_t.
2489 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
2492 * partmap/pc.c (pc_partition_map_iterate): Likewise.
2494 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
2497 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
2499 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
2501 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
2503 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
2504 to grub_off_t, to detect an error from grub_file_seek.
2505 (grub_multiboot_load_elf32): Likewise.
2507 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
2508 maximum unsigned long value when an overflow is detected.
2509 (grub_strtoull): New function.
2510 (grub_divmod64): Likewise.
2511 (grub_lltoa): use grub_divmod64.
2513 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
2515 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
2516 the pointer to next character. Use grub_strtoull instead of
2518 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
2519 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
2522 * kern/file.c (grub_file_read): Prevent an oveflow of LEN, as the
2523 return value is signed.
2524 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
2525 test if OFFSET is less than zero, as OFFSET is unsigned now.
2527 * kern/disk.c (struct grub_disk_cache): Change the type of
2528 "sector" to grub_disk_addr_t.
2529 (grub_disk_cache_get_index): Change the type of SECTOR to
2530 grub_disk_addr_t. Calculate the hash with SECTOR casted to
2531 unsigned after shifting.
2532 (grub_disk_cache_invalidate): Change the type of SECTOR to
2534 (grub_disk_cache_unlock): Likewise.
2535 (grub_disk_cache_store): Likewise.
2536 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
2537 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
2538 grub_disk_addr_t and grub_uint64_t, respectively.
2539 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
2540 body, as the value of OFFSET is tweaked by
2541 grub_disk_check_range. Change the types of START_SECTOR, LEN and
2542 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
2544 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
2545 body, as the value of OFFSET is tweaked by
2546 grub_disk_check_range. Change the types of LEN and N to
2549 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
2550 and "saved_offset" to grub_off_t.
2551 (test_header): Cast BUF to char *.
2552 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
2554 (grub_gzio_read): Change the types of OFFSET and SIZE to
2555 grub_off_t and grub_size_t, respectively.
2557 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
2559 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
2560 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
2561 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
2562 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
2563 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
2565 * include/grub/types.h (grub_off_t): Unconditionally set to
2567 (grub_disk_addr_t): Changed to grub_uint64_t.
2569 * include/grub/partition.h (struct grub_partition): Change the
2570 types of "start", "len" and "offset" to grub_disk_addr_t,
2571 grub_uint64_t and grub_disk_addr_t, respectively.
2572 (grub_partition_get_start): Return grub_disk_addr_t.
2573 (grub_partition_get_len): Return grub_uint64_t.
2575 * include/grub/misc.h (grub_strtoull): New prototype.
2576 (grub_divmod64): Likewise.
2578 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
2579 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
2580 grub_off_t, respectively.
2581 All callers and references changed.
2583 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
2584 grub_size_t in "read".
2585 All callers and references changed.
2587 * include/grub/file.h (struct grub_file): Change the types of
2588 "offset" and "size" to grub_off_t and grub_off_t,
2589 respectively. Change the type of SECTOR to grub_disk_addr_t in
2591 (grub_file_read): Change the type of LEN to grub_size_t.
2592 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
2594 (grub_file_size): Return grub_off_t.
2595 (grub_file_tell): Likewise.
2596 All callers and references changed.
2598 * include/grub/disk.h (struct grub_disk_dev): Change the types of
2599 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
2601 (struct grub_disk): Change the type of "total_sectors" to
2602 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
2604 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
2605 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
2606 (grub_disk_write): Likewise.
2607 All callers and references changed.
2609 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
2610 char * for grub_strncmp to silence gcc.
2611 (grub_iso9660_mount): Likewise.
2612 (grub_iso9660_mount): Likewise.
2613 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
2615 (grub_iso9660_iterate_dir): Likewise.
2616 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
2618 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
2619 LEN to grub_disk_addr_t and grub_size_t, respectively.
2621 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
2623 * fs/jfs.c (grub_jfs_read_file): Likewise.
2625 * fs/minix.c (grub_jfs_read_file): Likewise.
2627 * fs/sfs.c (grub_jfs_read_file): Likewise.
2629 * fs/ufs.c (grub_jfs_read_file): Likewise.
2631 * fs/xfs.c (grub_jfs_read_file): Likewise.
2633 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
2634 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
2637 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
2638 BLKNR to -1 instead of returning GRUB_ERRNO.
2639 (grub_ext2_read_file): Change the types of SECTOR and
2640 LEN to grub_disk_addr_t and grub_size_t, respectively.
2642 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
2643 LEN to grub_disk_addr_t and grub_size_t, respectively.
2645 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
2648 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
2649 string. Do not cast SECTOR explicitly.
2651 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
2652 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
2653 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
2654 grub_disk_addr_t and grub_size_t, respectively. If the sector is
2655 over 2TB and LBA mode is not supported, raise an error.
2656 (get_safe_sectors): New function.
2657 (grub_biosdisk_read): Use get_safe_sectors.
2658 (grub_biosdisk_write): Likewise.
2660 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
2661 (grub_efidisk_write): Likewise.
2663 * disk/loopback.c (delete_loopback): Cosmetic changes.
2664 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
2666 (grub_loopback_open): Likewise.
2667 (grub_loopback_read): Likewise. Also, change the type of POS to
2668 grub_off_t, and fix the usage of grub_memset.
2670 * commands/i386/pc/play.c: Include grub/machine/time.h.
2672 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
2675 * commands/configfile.c: Include grub/env.h.
2677 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
2678 GRUB_ERRNO directly instead. Change the type of POS to
2679 grub_off_t. Follow the coding standard.
2681 * commands/blocklist.c: Include grub/partition.h.
2682 (grub_cmd_blocklist): Return an error if the underlying device is
2683 not a disk. Take the starting sector of a partition into account,
2684 if a partition is used.
2686 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
2688 (lba_mode): Support 64-bit addresses.
2689 (chs_mode): Likewise.
2690 (copy_buffer): Adapted to the new offsets of a length field and a
2692 (blocklist_default_start): Allocate 64-bit space.
2694 * boot/i386/pc/boot.S (force_lba): Removed.
2695 (boot_drive): Moved to under KERNEL_SECTOR.
2696 (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
2698 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
2700 (lba_mode): Refactored to support a 64-bit address. More size
2702 (setup_sectors): Likewise.
2704 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
2706 * DISTLIST: Added include/grub/i386/linux.h. Removed
2707 include/grub/i386/pc/linux.h
2709 * configure.ac (AC_INIT): Bumped to 1.94.
2711 * config.guess: Updated from gnulib.
2712 * config.sub: Likewise.
2713 * install-sh: Likewise.
2714 * mkinstalldirs: Likewise.
2716 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
2718 * conf/common.rmk (grub_modules_init.lst): Depended on
2719 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
2722 * genmk.rb (PModule::rule): Reverted the previous change.
2724 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
2726 * conf/common.rmk (grub_modules_init.lst): Depends on
2727 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
2728 that the target does not exist before producing.
2729 (grub_modules_init.h): Remove the target before generating.
2730 (grub_emu_init.c): Likewise.
2732 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
2734 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
2736 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
2737 for the target-specific tests. Make sure that we also have the
2738 up-to-date target variables for those tests.
2740 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
2742 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
2743 (PModule::rule): Likewise.
2745 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
2747 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
2748 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
2749 target-specific flags should be prefixed.
2750 (PModule::rule): Likewise.
2752 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
2754 * configure.ac (CMP): Check if cmp is available explicitly.
2756 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
2758 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
2759 (target_cpu): New variable.
2760 (pkglibdir): Use target_cpu instead of host_cpu.
2762 * util/i386/pc/grub-install.in (host_cpu): Removed.
2763 (target_cpu): New variable.
2764 (pkglibdir): Use target_cpu instead of host_cpu.
2766 * util/genmoddep.c: Removed.
2768 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
2769 instead of GRUB_HOST_SIZEOF_VOID_P.
2770 * kern/dl.c: Likewise.
2772 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
2774 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
2775 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
2776 (GRUB_TARGET_SIZEOF_LONG): ... this.
2777 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
2778 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
2779 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
2781 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
2782 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
2783 (GRUB_TARGET_SIZEOF_LONG): ... this.
2784 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
2785 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
2786 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
2788 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
2789 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
2790 (GRUB_TARGET_SIZEOF_LONG): ... this.
2791 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
2792 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
2794 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
2795 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
2796 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
2797 instead of GRUB_HOST_SIZEOF_LONG.
2798 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
2799 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
2800 GRUB_CPU_WORDS_BIGENDIAN.
2801 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
2802 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
2805 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
2806 (genmoddep_SOURCES): Likewise.
2807 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
2808 (genmoddep_SOURCES): Likewise.
2809 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
2810 (genmoddep_SOURCES): Likewise.
2811 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
2813 (genmoddep_SOURCES): Likewise.
2815 * genmoddep.awk: New file.
2817 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
2818 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
2819 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
2820 (PModule::rule): Likewise.
2821 (Program::rule): Likewise.
2822 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
2823 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
2826 * configure.ac: Rewritten intensively to use host and target
2827 instead of build and host, respectively.
2829 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
2830 (host_cpu): Removed.
2831 (target_cpu): New variable.
2832 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
2833 (BUILD_CC): Removed.
2834 (BUILD_CFLAGS): Likewise.
2835 (BUILD_CPPFLAGS): Likewise.
2836 (TARGET_CC): New variable.
2837 (TARGET_CFLAGS): Likewise.
2838 (TARGET_CPPFLAGS): Likewise.
2839 (TARGET_LDFLAGS): Likewise.
2841 (include): Use target_cpu instead of host_cpu.
2842 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
2844 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2846 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
2848 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
2849 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
2850 field 'false' to 'exec_on_false'.
2851 (grub_script_create_cmdif): Renamed argument names to reflect above
2854 * normal/execute.c (grub_script_execute_cmdif): Likewise.
2856 * normal/script.c (grub_script_create_cmdif): Likewise.
2858 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
2860 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
2862 (grub_hfsplus_btree_recptr): Likewise.
2863 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
2864 FILEBLOCK both to pass a block number and store next block
2866 (grub_hfsplus_read_block): Rewritten heavily to support an extent
2867 overflow file correctly. Specify errors appropriately, because
2868 fshelp expects that GRUB_ERRNO is set when fails. Reuse
2869 grub_hfsplus_btree_recptr to get the pointer to a found key.
2870 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
2873 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
2875 (_linux_mod_SOURCES): New variable.
2876 (_linux_mod_CFLAGS): Likewise.
2877 (_linux_mod_LDFLAGS): Likewise.
2878 (linux_mod_SOURCES): Likewise.
2879 (linux_mod_CFLAGS): Likewise.
2880 (linux_mod_LDFLAGS): Likewise.
2882 * DISTLIST: Added loader/i386/efi/linux.c,
2883 loader/i386/efi/linux_normal.c and
2884 include/grub/i386/efi/loader.h.
2886 * loader/i386/efi/linux.c: New file.
2887 * loader/i386/efi/linux_normal.c: Likewise.
2888 * include/grub/i386/efi/loader.h: Likewise.
2890 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
2892 * commands/blocklist.c: New file.
2894 * DISTLIST: Added commands/blocklist.c.
2896 * term/efi/console.c (grub_console_highlight_color): Use a lighter
2897 color for the background, and a darker color for the foreground.
2898 (grub_console_checkkey): Return READ_KEY.
2899 (grub_console_cls): Set the background to
2900 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
2902 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
2904 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
2905 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
2907 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
2910 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
2911 BG. The spec is wrong again.
2913 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
2915 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
2917 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
2918 commands/blocklist.c.
2919 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2921 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
2922 (blocklist_mod_SOURCES): New variable.
2923 (blocklist_mod_CFLAGS): Likewise.
2924 (blocklist_mod_LDFLAGS): Likewise.
2926 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
2928 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
2930 (lba_mode): Use %eax more intensively to reduce the code size.
2932 2006-05-20 Marco Gerards <marco@gnu.org>
2934 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
2936 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
2938 (script): Accept leading newlines.
2939 (newlines): New rule to describe 0 or more newlines.
2940 (commands): Accept `command' with trailing newline. Fixed the
2941 order in which arguments were passed to `grub_script_add_cmd'.
2942 Accept commands separated by newlines.
2943 (function): Changed to accept newlines.
2944 (menuentry) Rewritten.
2946 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
2947 front of the list, instead of to the end.
2949 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
2951 * util/i386/pc/grub-install.in (bindir): New variable.
2952 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
2953 Shaver <lbgwjl@gmail.com>.
2955 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
2957 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
2958 grub/machine/linux.h
2959 * loader/i386/pc/linux.c: Likewise.
2961 * include/grub/i386/pc/linux.h: Moved to ...
2962 * include/grub/i386/linux.h: ... here.
2964 * include/grub/i386/linux.h (struct linux_kernel_params): New
2967 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
2969 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
2971 (grub_video_vbe_blit_glyph): Likewise.
2972 (grub_video_vbe_blit_bitmap): Likewise.
2973 (grub_video_vbe_blit_render_target): Likewise.
2975 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
2977 * configure.ac (--with-platform): Properly quote the square
2980 2006-05-08 Marco Gerards <marco@gnu.org>
2982 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
2984 (kernel_elf_HEADERS): ...to this. Updated all users.
2985 (grubof_symlist.c): Renamed from this...
2986 (kernel_elf_symlist.c): ...to this. Updated all users.
2987 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
2988 (grubof_SOURCES): Renamed from this...
2989 (kernel_elf_SOURCES): ...to this.
2990 (grubof_HEADERS): Renamed from this...
2991 (kernel_elf_HEADERS): ...to this.
2992 (grubof_CFLAGS): Renamed from this...
2993 (kernel_elf_CFLAGS): ...to this.
2994 (grubof_ASFLAGS): Renamed from this...
2995 (kernel_elf_ASFLAGS): ...to this.
2996 (grubof_LDFLAGS): Renamed from this...
2997 (kernel_elf_LDFLAGS): ...to this.
2999 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
3001 (kernel_elf_HEADERS): ...to this. Updated all users.
3002 (grubof_symlist.c): Renamed from this...
3003 (kernel_elf_symlist.c): ...to this. Updated all users.
3004 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
3005 (grubof_SOURCES): Renamed from this...
3006 (kernel_elf_SOURCES): ...to this.
3007 (grubof_HEADERS): Renamed from this...
3008 (kernel_elf_HEADERS): ...to this.
3009 (grubof_CFLAGS): Renamed from this...
3010 (kernel_elf_CFLAGS): ...to this.
3011 (grubof_ASFLAGS): Renamed from this...
3012 (kernel_elf_ASFLAGS): ...to this.
3013 (grubof_LDFLAGS): Renamed from this...
3014 (kernel_elf_LDFLAGS): ...to this.
3016 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
3017 `kernel.elf' instead of `grubof'.
3019 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
3021 Add --with-platform to configure. Use pkglibdir instead of
3022 pkgdatadir. This is reported by Roger Leigh.
3024 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
3025 (host_vendor): Likewise.
3026 (host_os): Likewise.
3027 (pkgdatadir): Likewise.
3028 (platform): New variable.
3029 (pkglibdir): Likewise.
3030 Use PKGLIBDIR instead of PKGDATADIR.
3032 * util/i386/pc/grub-install.in (datadir): Removed.
3033 (host_vendor): Likewise.
3034 (host_os): Likewise.
3035 (pkgdatadir): Likewise.
3036 (platform): New variable.
3037 (pkglibdir): Likewise.
3038 Use PKGLIBDIR instead of PKGDATADIR.
3040 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
3041 instead of GRUB_DATADIR.
3043 * util/i386/pc/grub-mkimage.c (usage): Likewise.
3045 * util/i386/efi/grub-mkimage.c (usage): Likewise.
3048 * configure.ac (--with-platform): New option.
3049 Use PLATFORM instead of HOST_VENDOR to specify a platform.
3051 * Makefile.in: Include a makefile based on PLATFORM instead of
3053 (pkgdatadir): Not appended by the machine type.
3054 (pkglibdir): Appended by the machine type.
3055 (host_vendor): Removed.
3056 (platform): New variable.
3057 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
3058 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
3059 (uninstall): Likewise.
3061 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
3063 Use the environment context in the menu. Remove the commands
3064 "default" and "timeout", and use variables instead.
3066 * normal/menu.c: Include grub/env.h.
3067 (print_entry): Cast TITLE to silence gcc.
3068 (get_timeout): New function.
3069 (set_timeout): Likewise.
3070 (get_entry_number): Likewise.
3071 (run_menu): Use a default entry, a fallback entry and a timeout
3072 in the environment variables "default", "fallback" and
3073 "timeout". Also, tweak the default entry if it is not within the
3074 current menu entries.
3075 (grub_menu_run): Use a fallback entry in the environment variable
3078 * normal/main.c (read_config_file): Do not initialize
3079 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
3081 (grub_normal_execute): Use a data slot to store the menu.
3083 * include/grub/normal.h (struct grub_menu): Removed default_entry,
3084 fallback_entry and timeout.
3085 (struct grub_menu_list): Removed.
3086 (grub_menu_list_t): Likewise.
3087 (struct grub_context): Likewise.
3088 (grub_context_t): Likewise.
3089 (grub_context_get): Likewise.
3090 (grub_context_get_current_menu): Likewise.
3091 (grub_context_push_menu): Likewise.
3092 (grub_context_pop_menu): Likewise.
3093 (grub_default_init): Likewise.
3094 (grub_default_fini): Likewise.
3095 (grub_timeout_init): Likewise.
3096 (grub_timeout_fini): Likewise.
3098 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
3100 (normal_mod_SOURCES): Removed normal/context.c.
3102 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
3103 commands/default.c, commands/timeout.c and normal/context.c.
3104 (normal_mod_SOURCES): Removed normal/context.c.
3106 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
3107 commands/timeout.c and normal/context.c.
3108 (normal_mod_SOURCES): Removed normal/context.c.
3110 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
3111 commands/default.c, commands/timeout.c and normal/context.c.
3112 (normal_mod_SOURCES): Removed normal/context.c.
3114 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
3116 (default_mod_SOURCES): Removed.
3117 (default_mod_CFLAGS): Likewise.
3118 (default_mod_LDFLAGS): Likewise.
3119 (timeout_mod_SOURCES): Removed.
3120 (timeout_mod_CFLAGS): Likewise.
3121 (timeout_mod_LDFLAGS): Likewise.
3123 * DISTLIST: Removed commands/default.c, commands/timeout.c and
3126 * commands/default.c: Removed.
3127 * commands/timeout.c: Likewise.
3128 * normal/context.c: Likewise.
3130 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
3132 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
3134 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
3136 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
3137 "next" to "prev" for readability.
3138 (struct grub_env_sorted_var): New struct.
3139 (grub_env_context): Renamed to ...
3140 (initial_context): ... this.
3141 (grub_env_var_context): Renamed to ...
3142 (current_context): ... this.
3143 (grub_env_find): Look only at CURRENT_CONTEXT.
3144 (grub_env_context_open): Rewritten to copy exported variables from
3146 (grub_env_context_close): Rewritten according to the new
3147 scheme. Also, add an assertion to prevent the initial context from
3149 (grub_env_insert): Removed the code for the sorted list.
3150 (grub_env_remove): Likewise.
3151 (grub_env_export): Simply mark the variable with
3152 GRUB_ENV_VAR_GLOBAL.
3153 (grub_env_set): A cosmetic change for naming consistency.
3154 (grub_env_get): Likewise.
3155 (grub_env_unset): Likewise.
3156 (grub_env_iterate): Rewritten to sort variables within this
3158 (grub_register_variable_hook): Fixed for naming consistency. Call
3159 grub_env_find again, only if NAME is not found at the first time.
3160 (mangle_data_slot_name): New function.
3161 (grub_env_set_data_slot): Likewise.
3162 (grub_env_get_data_slot): Likewise.
3163 (grub_env_unset_data_slot): Likewise.
3165 * include/grub/env.h (grub_env_var_type): New enum.
3166 (GRUB_ENV_VAR_LOCAL): New constant.
3167 (GRUB_ENV_VAR_GLOBAL): Likewise.
3168 (GRUB_ENV_VAR_DATA): Likewise.
3169 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
3171 (grub_env_set): Replace VAR with NAME for consistency.
3172 (grub_register_variable_hook): Likewise.
3173 (grub_env_export): Specify the name of the argument.
3174 (grub_env_set_data_slot): New prototype.
3175 (grub_env_get_data_slot): Likewise.
3176 (grub_env_unset_data_slot): Likewise.
3178 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
3180 Extend the loader so that GRUB can accept a loader which comes
3181 back to GRUB when a loaded image exits. Also, this change adds
3182 support for a chainloader on EFI.
3184 * term/efi/console.c: Include grub/misc.h.
3185 (grub_console_checkkey): Display a scan code on the top for
3186 debugging. This will be removed once the EFI port gets stable.
3187 Correct the scan code mapping.
3189 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
3190 allocate memory from larger regions, in order to reduce the number
3191 of allocated regions. Otherwise, the MacOSX loader panics.
3192 (filter_memory_map): Avoid less than 1MB for compatibility with
3194 (add_memory_regions): Allocate from the tail of a region, if
3195 possible, to avoid allocating a region near to 1MB, for the MacOSX
3198 * kern/efi/init.c (grub_efi_set_prefix): Specify
3199 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
3201 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
3202 argument IMAGE_HANDLE and specify it to get a loaded image.
3203 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
3204 grub_efi_get_loaded_image.
3205 (grub_efi_get_filename): Divide the legnth by the size of
3207 (grub_efi_get_device_path): New function.
3208 (grub_efi_print_device_path): Print End Device Path nodes. Divide
3209 the length by the size of grub_efi_char16_t for a file path device
3212 * kern/loader.c (grub_loader_noreturn): New variable.
3213 (grub_loader_set): Accept a new argument NORETURN. Set
3214 GRUB_LOADER_NORETURN to NORETURN.
3215 All callers changed.
3216 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
3219 * include/grub/efi/efi.h (grub_efi_get_device_path): New
3221 (grub_efi_get_loaded_image): Take an argument to specify an image
3224 * include/grub/loader.h (grub_loader_set): Added one more argument
3227 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
3228 instead of grub_efi_open_protocol.
3229 (grub_efidisk_get_device_name): Likewise.
3230 (grub_efidisk_close): Print a newline.
3231 (grub_efidisk_get_device_handle): Fixed to use
3232 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
3233 GRUB_EFI_DEVICE_PATH_TYPE.
3235 * disk/efi/efidisk.c (device_path_guid): Moved to ...
3236 * kern/efi/efi.c (device_path_guid): ... here.
3238 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
3240 (kernel_mod_HEADERS): Added efi/disk.h.
3241 (_chain_mod_SOURCES): New variable.
3242 (_chain_mod_CFLAGS): Likewise.
3243 (_chain_mod_LDFLAGS): Likewise.
3244 (chain_mod_SOURCES): Likewise.
3245 (chain_mod_CFLAGS): Likewise.
3246 (chain_mod_LDFLAGS): Likewise.
3248 * DISTLIST: Added include/grub/efi/chainloader.h,
3249 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
3251 * include/grub/efi/chainloader.h: New file.
3252 * loader/efi/chainloader.c: Likewise.
3253 * loader/efi/chainloader_normal.c: Likewise.
3255 2006-04-30 Marco Gerards <marco@gnu.org>
3257 * commands/configfile.c (grub_cmd_source): New function.
3258 (GRUB_MOD_INIT): Register the commands `source' and `.'.
3259 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
3261 2006-04-30 Marco Gerards <marco@gnu.org>
3263 * normal/execute.c (grub_script_execute_cmd): Change the return
3264 type to `grub_err_t'. Correctly return the error.
3265 (grub_script_execute_cmdline): In case a command line is not a
3266 command or a function, try to interpret it as an assignment.
3268 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
3270 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
3271 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
3272 skip a node whose name is obviously invalid as UTF-16,
3273 i.e. contains a NUL character. Stop the iteration when the last
3274 directory entry is found. Instead of using the return value of
3275 grub_hfsplus_btree_iterate_node, store the value in RET and use
3276 it, because the iterator can be stopped by the last directory
3279 2006-04-30 Marco Gerards <marco@gnu.org>
3281 * include/grub/env.h (grub_env_export): New prototype. Reported
3282 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
3284 2006-04-30 Marco Gerards <marco@gnu.org>
3286 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
3287 size of the extents in a catalog file record.
3289 2006-04-29 Marco Gerards <marco@gnu.org>
3291 * commands/configfile.c (grub_cmd_configfile): Execute the
3292 configfile within its own context.
3294 * include/grub/env.h (grub_env_context_open): New prototype.
3295 (grub_env_context_close): Likewise.
3297 * kern/env.c (grub_env): Removed.
3298 (grub_env_sorted): Likewise.
3299 (grub_env_context): New variable.
3300 (grub_env_var_context): Likewise.
3301 (grub_env_find): Search both the active context and the global
3303 (grub_env_context_open): New function.
3304 (grub_env_context_close): Likewise.
3305 (grub_env_insert): Likewise.
3306 (grub_env_remove): Likewise.
3307 (grub_env_export): Likewise.
3308 (grub_env_set): Changed to use helper functions to avoid code
3310 (grub_env_iterate): Rewritten so both the current context and the
3311 global context are being used.
3313 * normal/command.c (export_command): New function.
3314 (grub_command_init): Register the `export' function.
3316 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
3318 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
3319 explicitly to suppress gcc's warnings.
3320 * fs/fat.c (grub_fat_find_dir): Likewise.
3321 (grub_fat_label): Likewise.
3322 * fs/xfs.c (grub_xfs_read_inode): Likewise.
3323 (grub_xfs_mount): Likewise.
3324 (grub_xfs_label): Likewise.
3325 * fs/affs.c (grub_affs_mount): Likewise.
3326 (grub_affs_label): Likewise.
3327 (grub_affs_iterate_dir): Likewise.
3328 * fs/sfs.c (grub_sfs_mount): Likewise.
3329 (grub_sfs_iterate_dir): Likewise.
3330 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
3331 * fs/hfs.c (grub_hfs_mount): Likewise.
3332 (grub_hfs_cmp_catkeys): Likewise.
3333 (grub_hfs_find_dir): Likewise.
3334 (grub_hfs_dir): Likewise.
3335 (grub_hfs_label): Likewise.
3336 * fs/jfs.c (grub_jfs_mount): Likewise.
3337 (grub_jfs_opendir): Likewise.
3338 (grub_jfs_getent): Likewise.
3339 (grub_jfs_lookup_symlink): Likewise.
3340 (grub_jfs_label): Likewise.
3341 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
3342 (grub_hfsplus_iterate_dir): Likewise.
3343 (grub_hfsplus_btree_iterate_node): Made static.
3345 * util/grub-emu.c (prefix): New variable.
3346 (grub_machine_set_prefix): New function.
3347 (main): Do not set the environment variable "prefix" here. Only
3348 set PREFIX, which is used later by grub_machine_set_prefix.
3350 * include/grub/video.h: Do not include grub/symbol.h.
3351 (grub_video_register): Not exported. This symbol is not defined in
3353 (grub_video_unregister): Likewise.
3354 (grub_video_iterate): Likewise.
3355 (grub_video_setup): Likewise.
3356 (grub_video_restore): Likewise.
3357 (grub_video_get_info): Likewise.
3358 (grub_video_get_blit_format): Likewise.
3359 (grub_video_set_palette): Likewise.
3360 (grub_video_get_palette): Likewise.
3361 (grub_video_set_viewport): Likewise.
3362 (grub_video_get_viewport): Likewise.
3363 (grub_video_map_color): Likewise.
3364 (grub_video_map_rgb): Likewise.
3365 (grub_video_map_rgba): Likewise.
3366 (grub_video_fill_rect): Likewise.
3367 (grub_video_blit_glyph): Likewise.
3368 (grub_video_blit_bitmap): Likewise.
3369 (grub_video_blit_render_target): Likewise.
3370 (grub_video_scroll): Likewise.
3371 (grub_video_swap_buffers): Likewise.
3372 (grub_video_create_render_target): Likewise.
3373 (grub_video_delete_render_target): Likewise.
3374 (grub_video_set_active_render_target): Likewise.
3376 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
3378 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
3380 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
3381 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
3382 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
3383 instead of $(srcdir)/genkernsyms.sh.
3385 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
3386 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
3387 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
3388 instead of $(srcdir)/genkernsyms.sh.
3390 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
3391 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
3392 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
3393 instead of $(srcdir)/genkernsyms.sh.
3395 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
3396 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
3397 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
3398 instead of $(srcdir)/genkernsyms.sh.
3400 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
3403 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
3405 (gensymlist.sh): New target.
3406 (genkernsyms.sh): Likewise.
3408 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
3409 genkernsyms.sh.in and gensymlist.sh.in.
3411 * genkernsyms.sh: Removed.
3412 * gensymlist.sh: Likewise.
3414 * genkernsyms.sh.in: New file.
3415 * gensymlist.sh.in: Likewise.
3417 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
3419 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
3420 clobber "prefix", since we may have already set it manually.
3422 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
3424 * kern/misc.c (abort): New alias for grub_abort.
3426 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
3428 A new machine-specific function "grub_machine_set_prefix" is
3429 defined. This is called after loading modules, so that a prefix
3430 initialization can use modules. Also, this change adds an
3431 intensive debugging feature for the memory manager via the
3432 configure option "--enable-mm-debug".
3434 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
3437 * kern/sparc64/ieee1275/init.c (abort): Removed.
3438 (grub_stop): Likewise.
3439 (grub_exit): New function.
3440 (grub_set_prefix): Renamed to ...
3441 (grub_machine_set_prefix): ... this.
3442 (grub_machine_init): Do not call grub_set_prefix.
3444 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
3445 (grub_machine_set_prefix): ... this.
3446 (grub_machine_init): Do not call grub_set_prefix.
3448 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
3449 (grub_machine_init): Do not set the prefix here.
3451 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
3453 * kern/efi/init.c: Include grub/mm.h.
3454 (grub_efi_set_prefix): New function.
3456 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
3457 (grub_efi_get_filename): New function.
3458 (grub_print_device_path): Renamed to ...
3459 (grub_efi_print_device_path): ... this.
3461 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
3462 [MM_DEBUG] (grub_realloc): Likewise.
3463 [MM_DEBUG] (grub_free): Likewise.
3464 [MM_DEBUG] (grub_memalign): Likewise.
3465 [MM_DEBUG] (grub_mm_debug): New variable.
3466 [MM_DEBUG] (grub_debug_malloc): New function.
3467 [MM_DEBUG] (grub_debug_free): New function.
3468 [MM_DEBUG] (grub_debug_realloc): New function.
3469 [MM_DEBUG] (grub_debug_memalign): New function.
3471 * kern/misc.c (grub_abort): Print a newline to distinguish
3474 * kern/main.c (grub_main): Call grub_machine_set_prefix and
3475 grub_set_root_dev after loading modules. This is necessary when
3476 setting a prefix depends on modules.
3478 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
3479 (grub_efi_print_device_path): ... this.
3480 (grub_efi_get_filename): New prototype.
3481 (grub_efi_set_prefix): Likewise.
3483 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
3485 (grub_efidisk_get_device_handle): New prototype.
3486 (grub_efidisk_get_device_name): Likewise.
3488 * include/grub/mm.h: Include config.h.
3489 (MM_DEBUG): Removed.
3490 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
3491 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
3492 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
3493 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
3494 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
3495 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
3496 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
3497 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
3498 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
3500 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
3502 * disk/efi/efidisk.c: Include grub/partition.h.
3503 (iterate_child_devices): New function.
3504 (add_device): First, compare only last device path nodes, so that
3505 devices are sorted by the types.
3506 (grub_efidisk_get_device_handle): New function.
3507 (grub_efidisk_get_device_name): Likewise.
3509 * configure.ac (--enable-mm-debug): New option to enable the
3510 memory manager debugging feature. This makes the binary much
3511 bigger, so is disabled by default.
3513 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
3515 Use grub_abort instead of grub_stop, and grub_exit must be
3516 define in each architecture now. Also, this change adds support
3519 * util/i386/pc/grub-probefs.c: Include grub/term.h.
3520 (grub_getkey): New function.
3521 (grub_term_get_current): Likewise.
3523 * util/i386/pc/grub-setup.c: Include grub/term.h.
3524 (grub_getkey): New function.
3525 (grub_term_get_current): Likewise.
3527 * util/misc.c (grub_stop): Renamed to ...
3528 (grub_exit): ... this.
3530 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
3531 (grub_exit): ... this.
3532 (grub_machine_init): Use grub_abort instead of abort.
3533 (grub_stop): Removed.
3535 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
3538 * kern/i386/pc/startup.S (grub_exit): New function.
3539 (cold_reboot): New label.
3541 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
3542 (grub_efi_init): Call grub_efidisk_init.
3543 (grub_efi_fini): Call grub_efidisk_fini.
3545 * kern/efi/efi.c: Include grub/mm.h.
3546 (grub_efi_console_control_guid): Renamed to ...
3547 (console_control_guid): ... this.
3548 (grub_efi_loaded_image_guid): Renamed to ...
3549 (loaded_image_guid): ... this.
3550 (grub_efi_locate_handle): New function.
3551 (grub_efi_open_protocol): Likewise.
3552 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
3553 GRUB_EFI_CONSOLE_CONTROL_GUID.
3554 (grub_efi_exit): Removed.
3555 (grub_stop): Likewise.
3556 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
3557 (grub_exit): New function.
3558 (grub_print_device_path): Likewise.
3560 * kern/rescue.c (grub_rescue_cmd_exit): New function.
3561 (grub_enter_rescue_mode): Register "exit".
3563 * kern/misc.c (grub_real_dprintf): A cosmetic change.
3564 (grub_abort): New function.
3566 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
3568 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
3570 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
3572 * include/grub/efi/efi.h (grub_efi_exit): Removed.
3573 (grub_print_device_path): New prototype.
3574 (grub_efi_locate_handle): Likewise.
3575 (grub_efi_open_protocol): Likewise.
3577 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
3578 * disk/efi/efidisk.c: Likewise.
3580 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
3582 * include/grub/efi/console_control.h
3583 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
3585 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
3586 last 8 bytes as an array.
3587 (GRUB_EFI_DISK_IO_GUID): New macro.
3588 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
3589 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
3590 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
3592 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
3593 (struct grub_efi_device_path): Rename the member "sub_type" to
3595 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
3596 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
3597 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
3598 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
3599 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
3600 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
3601 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
3602 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
3603 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
3604 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
3605 (struct grub_efi_pci_device_path): New structure.
3606 (grub_efi_pci_device_path_t): New type.
3607 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
3608 (struct grub_efi_pccard_device_path): New structure.
3609 (grub_efi_pccard_device_path_t): New type.
3610 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
3611 (struct grub_efi_memory_mapped_device_path): New structure.
3612 (grub_efi_memory_mapped_device_path_t): New type.
3613 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
3614 (struct grub_efi_vendor_device_path): New structure.
3615 (grub_efi_vendor_device_path_t): New type.
3616 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
3617 (struct grub_efi_controller_device_path): New structure.
3618 (grub_efi_controller_device_path_t): New type.
3619 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
3620 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
3621 (struct grub_efi_acpi_device_path): New structure.
3622 (grub_efi_acpi_device_path_t): New type.
3623 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
3624 (struct grub_efi_expanded_acpi_device_path): New structure.
3625 (grub_efi_expanded_acpi_device_path_t): New type.
3626 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
3627 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
3628 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
3629 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
3630 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
3631 (struct grub_efi_atapi_device_path): New structure.
3632 (grub_efi_atapi_device_path_t): New type.
3633 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
3634 (struct grub_efi_fibre_channel_device_path): New structure.
3635 (grub_efi_fibre_channel_device_path_t): New type.
3636 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
3637 (struct grub_efi_1394_device_path): New structure.
3638 (grub_efi_1394_device_path_t): New type.
3639 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
3640 (struct grub_efi_usb_device_path): New structure.
3641 (grub_efi_usb_device_path_t): New type.
3642 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
3643 (struct grub_efi_usb_class_device_path): New structure.
3644 (grub_efi_usb_class_device_path_t): New type.
3645 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
3646 (struct grub_efi_i2o_device_path): New structure.
3647 (grub_efi_i2o_device_path_t): New type.
3648 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
3649 (struct grub_efi_mac_address_device_path): New structure.
3650 (grub_efi_mac_address_device_path_t): New type.
3651 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
3652 (struct grub_efi_ipv4_device_path): New structure.
3653 (grub_efi_ipv4_device_path_t): New type.
3654 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
3655 (struct grub_efi_ipv6_device_path): New structure.
3656 (grub_efi_ipv6_device_path_t): New type.
3657 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
3658 (struct grub_efi_infiniband_device_path): New structure.
3659 (grub_efi_infiniband_device_path_t): New type.
3660 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
3661 (struct grub_efi_uart_device_path): New structure.
3662 (grub_efi_uart_device_path_t): New type.
3663 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
3664 (struct grub_efi_vendor_messaging_device_path): New structure.
3665 (grub_efi_vendor_messaging_device_path_t): New type.
3666 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
3667 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
3668 (struct grub_efi_hard_drive_device_path): New structure.
3669 (grub_efi_hard_drive_device_path_t): New type.
3670 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
3671 (struct grub_efi_cdrom_device_path): New structure.
3672 (grub_efi_cdrom_device_path_t): New type.
3673 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
3674 (struct grub_efi_vendor_media_device_path): New structure.
3675 (grub_efi_vendor_media_device_path_t): New type.
3676 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
3677 (struct grub_efi_file_path_device_path): New structure.
3678 (grub_efi_file_path_device_path_t): New type.
3679 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
3680 (struct grub_efi_protocol_device_path): New structure.
3681 (grub_efi_protocol_device_path_t): New type.
3682 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
3683 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
3684 (struct grub_efi_bios_device_path): New structure.
3685 (grub_efi_bios_device_path_t): New type.
3686 (struct grub_efi_disk_io): New structure.
3687 (grub_efi_disk_io_t): New type.
3688 (struct grub_efi_block_io_media): New structure.
3689 (grub_efi_block_io_media_t): New type.
3690 (struct grub_efi_block_io): New structure.
3691 (grub_efi_block_io_t): New type.
3693 * include/grub/misc.h (grub_stop): Removed.
3694 (grub_exit): New prototype.
3695 (grub_abort): Likewise.
3697 * include/grub/disk.h (enum grub_disk_dev_id): Added
3698 GRUB_DISK_DEVICE_EFIDISK_ID.
3700 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
3702 (kernel_syms.lst): Remove the target if an error occurs.
3704 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
3706 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
3707 as it was simply too buggy.
3709 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
3711 * kern/misc.c (grub_lltoa): New function.
3712 (grub_vsprintf): Added support for the long long suffix,
3715 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
3717 * Makefile.in (LDFLAGS): Add variable.
3718 (LD): Remove variable.
3719 * configure.ac: Add -m32 to LDFLAGS.
3720 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
3721 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
3722 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
3723 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
3724 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
3726 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
3727 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
3728 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
3730 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
3732 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
3733 length for unknown glyph.
3735 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
3737 Add support for pre-loaded modules into the EFI port.
3739 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
3740 completely. Accept one more argument DIR. The caller has changed.
3742 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
3744 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
3745 (grub_efi_loaded_image_guid): New variable.
3746 (grub_efi_get_loaded_image): New function.
3747 (grub_arch_modules_addr): Likewise.
3749 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
3752 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
3753 (struct grub_efi_loaded_image): New structure.
3754 (grub_efi_loaded_image_t): New type.
3756 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
3758 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
3759 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
3760 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
3762 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
3764 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
3766 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
3768 * DISTLIST: Added include/grub/efi/console.h,
3769 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
3770 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
3772 * include/grub/efi/console.h: New file.
3773 * include/grub/efi/time.h: Likewise.
3774 * include/grub/i386/efi/kernel.h: Likewise.
3775 * kern/efi/init.c: Likewise.
3776 * kern/efi/mm.c: Likewise.
3777 * term/efi/console.c: Likewise.
3779 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
3780 (grub_stop): Removed.
3781 (grub_get_rtc): Likewise.
3782 (grub_machine_init): Simply call grub_efi_init.
3783 (grub_machine_fini): Call grub_efi_fini.
3785 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
3786 (grub_efi_output_string): Removed.
3787 (grub_efi_stall): New function.
3788 (grub_stop): Likewise.
3789 (grub_get_rtc): Likewise.
3791 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
3792 (grub_efi_stall): New prototype.
3793 (grub_efi_allocate_pages): Likewise.
3794 (grub_efi_free_pages): Likewise.
3795 (grub_efi_get_memory_map): Likewise.
3796 (grub_efi_mm_init): Likewise.
3797 (grub_efi_mm_fini): Likewise.
3798 (grub_efi_init): Likewise.
3799 (grub_efi_fini): Likewise.
3801 * include/grub/i386/efi/time.h: Do not include
3802 grub/symbol.h. Include grub/efi/time.h.
3803 (GRUB_TICKS_PER_SECOND): Removed.
3804 (grub_get_rtc): Likewise.
3806 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
3807 Added padding. The EFI spec is buggy.
3808 (GRUB_EFI_BLACK): New macro.
3809 (GRUB_EFI_BLUE): Likewise.
3810 (GRUB_EFI_GREEN): Likewise.
3811 (GRUB_EFI_CYAN): Likewise.
3812 (GRUB_EFI_RED): Likewise.
3813 (GRUB_EFI_MAGENTA): Likewise.
3814 (GRUB_EFI_BROWN): Likewise.
3815 (GRUB_EFI_LIGHTGRAY): Likewise.
3816 (GRUB_EFI_BRIGHT): Likewise.
3817 (GRUB_EFI_DARKGRAY): Likewise.
3818 (GRUB_EFI_LIGHTBLUE): Likewise.
3819 (GRUB_EFI_LIGHTGREEN): Likewise.
3820 (GRUB_EFI_LIGHTCYAN): Likewise.
3821 (GRUB_EFI_LIGHTRED): Likewise.
3822 (GRUB_EFI_LIGHTMAGENTA): Likewise.
3823 (GRUB_EFI_YELLOW): Likewise.
3824 (GRUB_EFI_WHITE): Likewise.
3825 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
3826 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
3827 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
3828 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
3829 (GRUB_EFI_BACKGROUND_RED): Likewise.
3830 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
3831 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
3832 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
3833 (GRUB_EFI_TEXT_ATTR): Likewise.
3835 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
3836 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
3837 (kernel_mod_HEADERS): Added efi/time.h.
3839 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
3841 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
3842 include/grub/efi/api.h, include/grub/efi/console_control.h,
3843 include/grub/efi/efi.h, include/grub/efi/pe32.h,
3844 include/grub/i386/efi/time.h, kern/efi/efi.c,
3845 kern/i386/efi/init.c, kern/i386/efi/startup.S,
3846 and util/i386/efi/grub-mkimage.c.
3848 * Makefile.in (RMKFILES): Added i386-efi.rmk.
3850 * genmk.rb (PModule#rule): Do not export symbols if
3851 #{prefix}_EXPORTS is set to "no".
3853 * conf/i386-efi.mk: New file.
3854 * conf/i386-efi.rmk: Likewise.
3855 * include/grub/efi/api.h: Likewise.
3856 * include/grub/efi/console_control.h: Likewise.
3857 * include/grub/efi/efi.h: Likewise.
3858 * include/grub/efi/pe32.h: Likewise.
3859 * include/grub/i386/efi/time.h: Likewise.
3860 * kern/efi/efi.c: Likewise.
3861 * kern/i386/efi/init.c: Likewise.
3862 * kern/i386/efi/startup.S: Likewise.
3863 * util/i386/efi/grub-mkimage.c: Likewise.
3865 2006-04-17 Marco Gerards <marco@gnu.org>
3867 * include/grub/script.h: Include <grub/parser.h> and
3868 "grub_script.tab.h".
3869 (struct grub_lexer_param): New struct.
3870 (struct grub_parser_param): Likewise.
3871 (grub_script_create_arglist): Pass the state in an argument.
3872 (grub_script_add_arglist): Likewise.
3873 (grub_script_create_cmdline): Likewise.
3874 (grub_script_create_cmdblock): Likewise.
3875 (grub_script_create_cmdif): Likewise.
3876 (grub_script_create_cmdmenu): Likewise.
3877 (grub_script_add_cmd): Likewise.
3878 (grub_script_arg_add): Likewise.
3879 (grub_script_lexer_ref): Likewise.
3880 (grub_script_lexer_deref): Likewise.
3881 (grub_script_lexer_record_start): Likewise.
3882 (grub_script_lexer_record_stop): Likewise.
3883 (grub_script_mem_record): Likewise.
3884 (grub_script_mem_record_stop): Likewise.
3885 (grub_script_malloc): Likewise.
3886 (grub_script_yylex): Likewise.
3887 (grub_script_yyparse): Likewise.
3888 (grub_script_yyerror): Likewise.
3889 (grub_script_yylex): Likewise.
3890 (grub_script_lexer_init): Return the state.
3892 * normal/lexer.c (grub_script_lexer_state): Removed variable.
3893 (grub_script_lexer_done): Likewise.
3894 (grub_script_lexer_getline): Likewise.
3895 (grub_script_lexer_refs): Likewise.
3897 (newscript): Likewise.
3899 (recording): Likewise.
3900 (recordpos): Likewise.
3901 (recordlen): Likewise.
3902 (grub_script_lexer_init): Return the state instead of setting
3904 (grub_script_lexer_ref): Use the newly added argument for state
3906 (grub_script_lexer_deref): Likewise.
3907 (grub_script_lexer_record_start): Likewise.
3908 (grub_script_lexer_record_stop): Likewise.
3909 (recordchar): Likewise.
3910 (nextchar): Likewise.
3911 (grub_script_yylex2): Likewise.
3912 (grub_script_yylex): Likewise.
3913 (grub_script_yyerror): Likewise.
3915 * normal/parser.y (func_mem): Removed variable.
3916 (menu_entry): Likewise.
3918 (%lex-param): New parser option.
3919 (%parse-param): Likewise.
3920 (script): Always return the AST.
3921 (argument): Pass the state around.
3922 (arguments): Likewise.
3923 (grubcmd): Likewise.
3924 (commands): Likewise.
3925 (function): Likewise.
3926 (menuentry): Likewise.
3927 (if_statement): Likewise.
3930 * normal/script.c (grub_script_memused): Removed variable.
3931 (grub_script_parsed): Likewise.
3932 (grub_script_malloc): Added a state argument. Use that instead of
3934 (grub_script_mem_record): Likewise.
3935 (grub_script_mem_record_stop): Likewise.
3936 (grub_script_arg_add): Likewise.
3937 (grub_script_add_arglist): Likewise.
3938 (grub_script_create_cmdline): Likewise.
3939 (grub_script_create_cmdif): Likewise.
3940 (grub_script_create_cmdmenu): Likewise.
3941 (grub_script_add_cmd): Likewise.
3942 (grub_script_parse): Setup the state before calling the parser.
3944 2006-04-16 Marco Gerards <marco@gnu.org>
3946 * normal/command.c (grub_command_init): Remove the title command.
3948 * normal/lexer.c (grub_script_yylex): Renamed from this...
3949 (grub_script_yylex2): ... to this.
3950 (grub_script_yylex): New function. Temporary
3951 introduced to filter some tokens.
3952 (grub_script_yyerror): Print a newline.
3954 * normal/main.c (read_config_file): Output information about the
3955 lines that contain errors. Wait for a key after all lines have
3956 been processed. Don't return an empty menu.
3958 * normal/parser.y (func_mem): Don't initialize.
3959 (menu_entry): Likewise.
3960 (err): New variable.
3961 (script): Don't return anything when an error was encountered.
3962 (ws, returns): Removed rules.
3963 (argument): Disabled concatenated variable support.
3964 (arguments): Remove explicit separators.
3965 (grubcmd): Likewise.
3966 (function): Likewise.
3967 (menuentry): Likewise.
3969 (commands): Likewise. Add error handling.
3971 * normal/script.c (grub_script_create_cmdline): If
3972 `grub_script_parsed' is 0, assume the parser encountered an error.
3974 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
3976 * configure.ac: Add support for EFI. Fix the typo
3977 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
3979 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
3981 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
3982 foreign multibyte characters should be shown correctly.
3984 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
3986 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
3988 (read_config_file): Made it to close file before returning.
3990 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
3992 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
3993 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
3994 video/i386/pc/vbefill.c.
3996 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
3997 video/i386/pc/vbefill.c.
3999 * include/grub/video.h (grub_video_blit_format): New enum.
4000 (grub_video_mode_info): Added new member blit_format.
4001 (grub_video_get_blit_format): New function prototype.
4003 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
4005 (grub_video_vbe_map_rgb): Likewise.
4006 (grub_video_vbe_unmap_color): Likewise.
4008 * include/grub/i386/pc/vbeblit.h: New file.
4010 * include/grub/i386/pc/vbefill.h: New file.
4012 * video/video.c (grub_video_get_blit_format): New function.
4013 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
4014 (grub_video_vbe_map_rgb): Likewise.
4015 (grub_video_vbe_unmap_color): Likewise.
4017 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
4019 (grub_video_vbe_blit_render_target): Changed to use more optimized
4021 (grub_video_vbe_setup): Added detection for optimized settings.
4022 (grub_video_vbe_create_render_target): Likewise.
4024 * video/i386/pc/vbeblit.c: New file.
4026 * video/i386/pc/vbefill.c: New file.
4028 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
4030 * font/manager.c (grub_font_get_glyph): Removed font fixup from
4033 * util/unifont2pff.rb: ... and moved it to here. Improved argument
4034 parsing to support both hex and dec ranges. If filename was missing
4035 show usage information.
4037 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
4039 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
4040 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
4042 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
4043 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
4044 (video_mod_SOURCES): Added.
4045 (video_mod_CFLAGS): Likewise.
4046 (video_mod_LDFLAGS): Likewise.
4047 (gfxterm_mod_SOURCES): Likewise.
4048 (gfxterm_mod_CFLAGS): Likewise.
4049 (gfxterm_mod_LDFLAGS): Likewise.
4050 (videotest_mod_SOURCES): Likewise.
4051 (videotest_mod_CFLAGS): Likewise.
4052 (videotest_mod_LDFLAGS): Likewise.
4053 (vesafb_mod_SOURCES): Removed.
4054 (vesafb_mod_CFLAGS): Likewise.
4055 (vesafb_mod_LDFLAGS): Likewise.
4056 (vga_mod_SOURCES): Likewise.
4057 (vga_mod_CFLAGS): Likewise.
4058 (vga_mod_LDFLAGS): Likewise.
4060 * commands/videotest.c: New file.
4062 * font/manager.c (fill_with_default_glyph): Modified to use
4064 (grub_font_get_glyph): Likewise.
4065 (fontmanager): Renamed from this...
4066 (font_manager): ... to this.
4068 * include/grub/font.h (grub_font_glyph): Added new structure.
4069 (grub_font_get_glyph): Modified to use grub_font_glyph.
4071 * include/grub/misc.h (grub_abs): Added as inline function.
4073 * include/grub/video.h: New file.
4075 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
4076 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
4077 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
4078 (grub_vbe_get_controller_info): Renamed from this...
4079 (grub_vbe_bios_get_controller_info): ... to this.
4080 (grub_vbe_get_mode_info): Renamed from this...
4081 (grub_vbe_bios_get_mode_info): ... to this.
4082 (grub_vbe_set_mode): Renamed from this...
4083 (grub_vbe_bios_set_mode): ... to this.
4084 (grub_vbe_get_mode): Renamed from this...
4085 (grub_vbe_bios_get_mode): ... to this.
4086 (grub_vbe_set_memory_window): Renamed from this...
4087 (grub_vbe_bios_set_memory_window): ... to this.
4088 (grub_vbe_get_memory_window): Renamed from this...
4089 (grub_vbe_bios_get_memory_window): ... to this.
4090 (grub_vbe_set_scanline_length): Renamed from this...
4091 (grub_vbe_set_scanline_length): ... to this.
4092 (grub_vbe_get_scanline_length): Renamed from this...
4093 (grub_vbe_bios_get_scanline_length): ... to this.
4094 (grub_vbe_set_display_start): Renamed from this...
4095 (grub_vbe_bios_set_display_start): ... to this.
4096 (grub_vbe_get_display_start): Renamed from this...
4097 (grub_vbe_bios_get_display_start): ... to this.
4098 (grub_vbe_set_palette_data): Renamed from this...
4099 (grub_vbe_bios_set_palette_data): ... to this.
4100 (grub_vbe_set_pixel_rgb): Removed.
4101 (grub_vbe_set_pixel_index): Likewise.
4103 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
4105 (grub_vbe_bios_get_controller_info): ... to this.
4106 (grub_vbe_get_mode_info): Renamed from this...
4107 (grub_vbe_bios_get_mode_info): ... to this.
4108 (grub_vbe_set_mode): Renamed from this...
4109 (grub_vbe_bios_set_mode): ... to this.
4110 (grub_vbe_get_mode): Renamed from this...
4111 (grub_vbe_bios_get_mode): ... to this.
4112 (grub_vbe_set_memory_window): Renamed from this...
4113 (grub_vbe_bios_set_memory_window): ... to this.
4114 (grub_vbe_get_memory_window): Renamed from this...
4115 (grub_vbe_bios_get_memory_window): ... to this.
4116 (grub_vbe_set_scanline_length): Renamed from this...
4117 (grub_vbe_set_scanline_length): ... to this.
4118 (grub_vbe_get_scanline_length): Renamed from this...
4119 (grub_vbe_bios_get_scanline_length): ... to this.
4120 (grub_vbe_set_display_start): Renamed from this...
4121 (grub_vbe_bios_set_display_start): ... to this.
4122 (grub_vbe_get_display_start): Renamed from this...
4123 (grub_vbe_bios_get_display_start): ... to this.
4124 (grub_vbe_set_palette_data): Renamed from this...
4125 (grub_vbe_bios_set_palette_data): ... to this.
4126 (grub_vbe_bios_get_controller_info): Fixed problem with registers
4127 getting corrupted after calling it. Added more pushes and pops.
4128 (grub_vbe_bios_set_mode): Likewise.
4129 (grub_vbe_bios_get_mode): Likewise.
4130 (grub_vbe_bios_get_memory_window): Likewise.
4131 (grub_vbe_bios_set_scanline_length): Likewise.
4132 (grub_vbe_bios_get_scanline_length): Likewise.
4133 (grub_vbe_bios_get_display_start): Likewise.
4134 (grub_vbe_bios_set_palette_data): Likewise.
4136 * normal/cmdline.c (cl_set_pos): Refresh the screen.
4137 (cl_insert): Likewise.
4138 (cl_delete): Likewise.
4140 * term/gfxterm.c: New file.
4142 * term/i386/pc/vesafb.c: Removed file.
4144 * video/video.c: New file.
4146 * video/i386/pc/vbe.c (real2pm): Added new function.
4147 (grub_video_vbe_draw_pixel): Likewise.
4148 (grub_video_vbe_get_video_ptr): Likewise.
4149 (grub_video_vbe_get_pixel): Likewise
4150 (grub_video_vbe_init): Likewise.
4151 (grub_video_vbe_fini): Likewise.
4152 (grub_video_vbe_setup): Likewise.
4153 (grub_video_vbe_get_info): Likewise.
4154 (grub_video_vbe_set_palette): Likewise.
4155 (grub_video_vbe_get_palette): Likewise.
4156 (grub_video_vbe_set_viewport): Likewise.
4157 (grub_video_vbe_get_viewport): Likewise.
4158 (grub_video_vbe_map_color): Likewise.
4159 (grub_video_vbe_map_rgb): Likewise.
4160 (grub_video_vbe_map_rgba): Likewise.
4161 (grub_video_vbe_unmap_color): Likewise.
4162 (grub_video_vbe_fill_rect): Likewise.
4163 (grub_video_vbe_blit_glyph): Likewise.
4164 (grub_video_vbe_blit_bitmap): Likewise.
4165 (grub_video_vbe_blit_render_target): Likewise.
4166 (grub_video_vbe_scroll): Likewise.
4167 (grub_video_vbe_swap_buffers): Likewise.
4168 (grub_video_vbe_create_render_target): Likewise.
4169 (grub_video_vbe_delete_render_target): Likewise.
4170 (grub_video_vbe_set_active_render_target): Likewise.
4171 (grub_vbe_set_pixel_rgb): Remove function.
4172 (grub_vbe_set_pixel_index): Likewise.
4173 (index_color_mode): Remove static variable.
4174 (active_mode): Likewise.
4175 (framebuffer): Likewise.
4176 (bytes_per_scan_line): Likewise.
4177 (grub_video_vbe_adapter): Added new static variable.
4178 (framebuffer): Likewise.
4179 (render_target): Likewise.
4180 (initial_mode): Likewise.
4181 (mode_in_use): Likewise.
4182 (mode_list): Likewise.
4184 2006-03-10 Marco Gerards <marco@gnu.org>
4186 * configure.ac (AC_INIT): Bumped to 1.93.
4188 * DISTLIST: Added `include/grub/hfs.h'.
4190 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
4192 * boot/i386/pc/boot.S (general_error): Before looping, try INT
4193 18H, which might help the BIOS falling back to next boot media.
4195 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
4197 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
4198 Poe Chen <poe.poechen@gmail.com>.
4200 2006-01-17 Marco Gerards <marco@gnu.org>
4202 * include/grub/normal.h: Include <grub/script.h>.
4203 (grub_command_list): Removed struct.
4204 (grub_command_list_t): Removed type.
4205 (grub_menu_entry): Remove members `num' and `command_list'. Add
4206 members `commands' and `sourcecode'.
4207 * include/grub/script.h: Add inclusion guards.
4208 (grub_script_cmd_menuentry): New struct.
4209 (grub_script_execute_menuentry): New prototype.
4210 (grub_script_lexer_record_start): Likewise.
4211 (grub_script_lexer_record_stop): Likewise.
4212 * normal/execute.c (grub_script_execute_menuentry): New function.
4213 * normal/lexer.c (record, recording, recordpos, recordlen): New
4215 (grub_script_lexer_record_start): New function.
4216 (grub_script_lexer_record_stop): Likewise.
4217 (recordchar): Likewise.
4218 (nextchar): Likewise.
4219 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
4220 2048 as the buffer size. Add the tokens `menuentry' and `@'.
4221 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
4222 (current_menu): New variable.
4223 (free_menu): Mainly rewritten.
4224 (grub_normal_menu_addentry): New function.
4225 (read_config_file): Rewritten.
4226 * normal/menu.c (run_menu_entry): Mainly rewritten.
4227 * normal/menu_entry.c (make_screen): Rewritten te code to insert
4229 (run): Mainly rewritten.
4230 * normal/parser.y (menu_entry): New variable.
4231 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
4232 (menuentry): New rule.
4233 (command): Add `menuentry'.
4234 (if_statement): Allow additional returns before `fi'.
4235 * normal/script.c (grub_script_create_cmdmenu): New function.
4237 2006-01-03 Marco Gerards <marco@gnu.org>
4239 * INSTALL: GNU Bison is required.
4240 * configure.ac: Rewritten the test to detect Bison.
4241 * Makefile.in (YACC): New variable. Reported by Xun Sun
4242 <xun.sun.cn@gmail.com>.
4244 2006-01-03 Marco Gerards <marco@gnu.org>
4246 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
4247 the HFS+ filesystem to filesystem blocks.
4248 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
4249 GCC warning is silenced.
4251 2006-01-03 Marco Gerards <marco@gnu.org>
4253 * partmap/apple.c (apple_partition_map_iterate): Convert the data
4254 read from disk from big endian to host byte order.
4256 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
4258 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
4260 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
4261 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
4262 embedded HFS+ filesystem.
4263 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
4264 (grub_hfs_sblock): Move from here...
4265 * include/grub/hfs.h: To here... New file.
4266 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
4268 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
4270 (grub_hfsplus_volheader): Change type of member `magic' to
4272 (grub_hfsplus_data): Add new member `embedded_offset'.
4273 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
4275 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
4276 Calculate the offset.
4278 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4280 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
4282 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
4284 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4286 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
4287 ENV->NAME is NULL after allocating ENV->VALUE.
4289 2005-12-25 Marco Gerards <marco@gnu.org>
4291 * kern/env.c (grub_env_set): Rewritten the error handling code.
4293 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4295 * geninit.sh: Made more robust, and more portable.
4297 2005-12-25 Marco Gerards <marco@gnu.org>
4299 Add support for Apple HFS+ filesystems.
4301 * fs/hfsplus.c: New file.
4303 * DISTLIST: Added `fs/hfsplus.c'.
4305 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
4306 (hfsplus_mod_SOURCES): New variable.
4307 (hfsplus_mod_CFLAGS): Likewise.
4308 (hfsplus_mod_LDFLAGS): Likewise.
4309 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
4310 (grub_setup_SOURCES): Likewise.
4311 (grub_mkdevicemap_SOURCES): Likewise.
4312 (grub_emu_SOURCES): Likewise.
4313 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4315 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
4317 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
4319 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4321 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
4322 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
4323 include/grub/parser.h, include/grub/script.h, kern/parser.c,
4324 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
4325 normal/lexer.c, normal/parser.y, normal/script.c, and
4327 Removed kern/sparc64/cache.c.
4329 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
4330 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
4333 * configure.ac (AC_INIT): Bumped to 1.92.
4335 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
4337 * kern/err.c (grub_error_push): Added new function to support error
4339 (grub_error_pop): Likewise.
4340 (grub_error_stack_items): New local variable to support error stacks.
4341 (grub_error_stack_pos): Likewise.
4342 (grub_error_stack_assert): Likewise.
4343 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
4345 (grub_print_error): Added support to print errors from error stack.
4347 * include/grub/err.h (grub_error_push): Added function prototype.
4348 (grub_error_pop): Likewise.
4350 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
4352 * configure.ac: Accept `powerpc64' as host_cpu.
4353 (amd64): Rename to `biarch32'.
4355 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
4356 non-cacheline-aligned addresses.
4358 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
4359 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
4360 if `size' is non-zero.
4362 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
4364 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
4365 and `cd' to make sure the filename is not prefixed with a
4367 (pkgdata_MODULES): Add `gpt.mod'.
4368 (gpt_mod_SOURCES): New variable.
4369 (gpt_mod_CFLAGS): Likewise.
4370 (gpt_mod_LDFLAGS): Likewise.
4372 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
4374 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
4377 * partmap/gpt.c: New file.
4379 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
4380 GPT partition map is detected.
4382 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
4384 * commands/i386/pc/play.c: New file.
4385 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
4386 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
4389 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
4391 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
4392 ((unused))' to silence gcc warning.
4394 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
4396 * configure.ac: Correct `AC_PROG_YACC' test.
4398 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
4400 * util/powerpc/ieee1275/grub-install.in: Run the mount point
4401 check before installing files.
4403 2005-11-22 Mike Small <smallm@panix.com>
4405 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
4406 number regex so multidigit numbers are recognized correctly.
4408 2005-11-22 Mike Small <smallm@panix.com>
4410 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
4411 debugging message before attempting to claim memory.
4412 (grub_rescue_cmd_initrd): Add a claim debugging message and try
4413 multiple addresses in case of failure.
4415 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
4417 * term/tparm.c (get_space): Remove empty `if' statement.
4419 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
4421 * kern/parser.c (check_varstate): Rename `state' to 's'.
4423 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
4425 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
4426 variable definitions to the beginning of each function. Sort stack
4428 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
4429 `buf' argument to `char *'.
4431 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
4433 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
4434 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
4435 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
4436 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
4437 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
4438 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
4439 configfile.mod, search.mod, gzio.mod and test.mod.
4440 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
4441 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
4442 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
4443 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
4444 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
4445 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
4446 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
4447 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
4448 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
4449 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
4450 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
4451 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
4452 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
4453 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
4454 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
4455 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
4456 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
4457 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
4458 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
4459 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
4460 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
4461 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
4462 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
4464 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
4466 (pkgdata_MODULES): Add test.mod.
4468 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
4470 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
4471 appending to variables with "+=".
4472 (PModule): Use full pathname to generate *.lst filenames.
4474 * Makefile.in: Fixed list rules moved from genmk.rb.
4475 (.DELETE_ON_ERROR): New special target.
4476 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
4478 * conf/i386-pc.rmk: Include conf/common.mk.
4479 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
4480 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
4481 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
4482 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
4483 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
4484 configfile.mod, search.mod, gzio.mod and test.mod.
4485 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
4486 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
4487 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
4488 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
4489 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
4490 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
4491 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
4492 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
4493 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
4494 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
4495 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
4496 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
4497 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
4498 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
4499 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
4500 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
4501 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
4502 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
4503 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
4504 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
4505 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
4506 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
4507 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
4509 * conf/common.rmk: ... to here. New file.
4511 * conf/common.mk: New file.
4513 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
4515 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
4516 (grub_script.tab.c): ... here.
4518 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
4519 (grub_script.tab.c): ... here.
4521 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
4522 (grub_script.tab.c): ... here.
4524 * normal/command.c (grub_command_find): Fixed a memory leak of
4525 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
4527 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
4529 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
4530 "@" which marks the start of a comment on ARM.
4531 (VARIABLE): Likewise.
4533 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
4535 Add support for Linux/ADFS partition tables.
4537 * partmap/acorn.c: New file.
4539 * include/grub/acorn_filecore.h: Likewise.
4541 * DISTLIST: Added `partmap/acorn.c' and
4542 `include/grub/acorn_filecore.h'.
4544 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
4546 (pkgdata_MODULES): Add `acorn.mod'.
4547 (acorn_mod_SOURCES): New variable.
4548 (acorn_mod_CFLAGS): Likewise.
4550 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
4552 (pkgdata_MODULES): Add `acorn.mod'.
4553 (acorn_mod_SOURCES): New variable.
4554 (acorn_mod_CFLAGS): Likewise.
4556 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
4557 (pkgdata_MODULES): Add `acorn.mod'.
4558 (acorn_mod_SOURCES): New variable.
4559 (acorn_mod_CFLAGS): Likewise.
4560 (acorn_mod_LDFLAGS): Likewise.
4562 * include/types.h (grub_disk_addr_t): New typedef.
4564 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
4566 * geninit.sh: New file.
4568 * geninitheader.sh: Likewise.
4570 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
4571 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
4572 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
4573 * commands/configfile.c (grub_configfile_init)
4574 (grub_configfile_fini): Likewise.
4575 * commands/default.c (grub_default_init, grub_default_fini):
4577 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
4578 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
4579 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
4580 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
4582 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
4583 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
4585 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
4586 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
4588 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
4590 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
4592 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
4593 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
4594 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
4595 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
4596 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
4597 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
4598 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
4599 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
4600 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
4601 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
4602 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
4603 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
4604 * partmap/amiga.c (grub_amiga_partition_map_init)
4605 (grub_amiga_partition_map_fini): Likewise.
4606 * partmap/apple.c (grub_apple_partition_map_init)
4607 (grub_apple_partition_map_fini): Likewise.
4608 * partmap/pc.c (grub_pc_partition_map_init)
4609 (grub_pc_partition_map_fini): Likewise.
4610 * partmap/sun.c (grub_sun_partition_map_init,
4611 grub_sun_partition_map_fini): Likewise.
4612 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
4615 * util/grub-emu.c: Include <grub_modules_init.h>.
4616 (main): Don't initialize and de-initialize any modules directly,
4617 use `grub_init_all' and `grub_fini_all' instead.
4619 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
4620 `grub_vesafb_mod_init'.
4621 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
4623 * term/i386/pc/vga.c (grub_vga_init): Renamed to
4624 `grub_vga_mod_init'. Updated all users.
4625 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
4627 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
4628 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
4631 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
4632 Generate a function to initialize the module in utilities.
4633 Updated all callers.
4634 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
4635 initialize the module in utilities. Updated all callers.
4637 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
4639 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
4640 escape sequence and a literal ^L to clear the screen.
4642 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
4643 when returning from Open Firmware.
4645 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
4647 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
4648 (grub_ofconsole_height): Likewise.
4649 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
4650 manually insert a '\n'.
4651 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
4652 `grub_ofconsole_height'. Return early if these are already set.
4654 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
4656 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
4657 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
4658 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
4659 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
4660 and `normal/script.c'.
4661 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
4662 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
4663 (test_mod_SOURCES): New variable.
4664 (test_mod_CFLAGS): Likewise.
4665 (test_mod_LDFLAGS): Likewise.
4666 (pkgdata_MODULES): Add `test.mod'.
4667 (grub_script.tab.c): New rule.
4668 (grub_script.tab.h): Likewise.
4670 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
4672 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
4673 `commands/test.c', `normal/execute.c', `normal/lexer.c',
4674 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
4675 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
4676 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
4677 (test_mod_SOURCES): New variable.
4678 (test_mod_CFLAGS): Likewise.
4679 (pkgdata_MODULES): Add `test.mod'.
4680 (grub_script.tab.c): New rule.
4681 (grub_script.tab.h): Likewise.
4683 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
4685 Add initial scripting support.
4687 * commands/test.c: New file.
4688 * include/grub/script.h: Likewise.
4689 * normal/execute.c: Likewise.
4690 * normal/function.c: Likewise.
4691 * normal/lexer.c: Likewise.
4692 * normal/parser.y: Likewise.
4693 * normal/script.c: Likewise.
4695 * configure.ac: Add `AC_PROG_YACC' test.
4697 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
4698 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
4699 `normal/function.c' and `normal/script.c'.
4700 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
4701 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
4702 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
4704 (pkgdata_MODULES): Add `test.mod'.
4705 (grub_script.tab.c): New rule.
4706 (grub_script.tab.h): Likewise.
4708 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
4710 * include/grub/normal.h (grub_test_init): New prototype.
4711 (grub_test_fini): Likewise.
4713 * normal/command.c: Include <grub/script.h>.
4714 (grub_command_execute): Rewritten.
4716 * util/grub-emu.c (main): Call `grub_test_init' and
4719 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
4721 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
4723 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
4724 there are no pending characters.
4726 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
4728 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
4729 `grub_strndup' to drop device arguments. Replace unnecessary
4730 `grub_strndup' with `grub_strdup'.
4732 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
4734 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
4735 `debug' environment variable has been set.
4737 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
4739 * Makefile.in (install-local): Use $(DATA).
4740 (uninstall): Likewise.
4741 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
4742 (sbin_UTILITIES): ... to here.
4743 (sbin_SCRIPTS): New variable.
4744 (grub_install_SOURCES): New variable.
4745 * util/powerpc/ieee1275/grub-install.in: New file.
4746 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
4748 (add_segments): Call `grub_util_get_path'.
4750 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
4752 From Timothy Baldwin:
4753 * commands/ls.c (grub_ls_list_files): Close FILE with
4755 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
4757 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
4759 * include/grub/parser.h: New file.
4761 * kern/parser.c: Likewise.
4763 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
4764 (grub_setup_SOURCES): Likewise.
4765 (grub_probefs_SOURCES): Likewise.
4766 (grub_emu_SOURCES): Likewise.
4767 (kernel_img_HEADERS): Add `parser.h'.
4769 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
4770 (grub_emu_SOURCES): Add `kern/parser.c'.
4771 (grubof_SOURCES): Likewise.
4773 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
4774 (grubof_SOURCES): Add `kern/parser.c'.
4776 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
4778 * kern/misc.c (grub_split_cmdline): Removed function.
4780 * kern/rescue.c: Include <grub/parser.h>.
4781 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
4782 of `grub_split_cmdline'.
4784 * normal/command.c: Include <grub/parser.h>.
4785 (grub_command_execute): Use `grub_parser_split_cmdline' instead
4786 of `grub_split_cmdline'.
4788 * normal/completion.c: Include <grub/parser.h>.
4789 (cmdline_state): New variable.
4790 (iterate_dir): End the filename with a quote depending on the
4792 (get_state): new function.
4793 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
4794 split the arguments and determine the current argument. When the
4795 argument string is not quoted, escape all spaces.
4797 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
4799 * normal/sparc64/setjmp.S: New file.
4801 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
4803 * include/grub/sparc64/libgcc.h: New file.
4804 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
4805 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
4806 normal/sparc64/setjmp.c.
4808 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
4810 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
4811 * kern/sparc64/cache.S: New file.
4812 * kern/sparc64/cache.c: Removed.
4813 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
4814 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
4816 (COMMON_LDFLAGS): Add -melf64_sparc.
4817 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
4818 (grubof_SOURCES): Use cache.S instead of cache.c.
4819 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
4820 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
4821 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
4823 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
4824 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
4825 (linux_mod_CFLAGS): Commented out.
4826 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
4827 out because module isn't built.
4828 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
4829 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
4830 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
4831 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
4832 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
4833 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
4834 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
4835 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
4836 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
4837 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
4838 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
4839 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
4840 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
4841 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
4843 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
4845 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
4846 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
4847 longer, because HFS should not be used on PC.
4849 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
4851 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
4852 consistently within the loop.
4854 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
4856 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
4857 directory can not be read.
4859 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
4861 * configure.ac (AC_INIT): Increase the version number to 1.91.
4863 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
4864 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
4865 term/i386/pc/serial.c.
4867 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
4869 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
4870 file size must be permitted.
4872 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
4873 between %ah and %al.
4875 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
4877 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
4879 Call the hook with a NUL-terminated filename.
4880 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
4883 * kern/term.c (cursor_state): New variable.
4884 (grub_term_set_current): Reset the cursor state on a new
4886 (grub_setcursor): Rewritten to use CURSOR_STATE.
4887 (grub_getcursor): New function.
4889 * include/grub/term.h (grub_getcursor): New prototype.
4891 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
4892 integers on ARM. Reported by Timothy Baldwin
4893 <T.E.Baldwin99@members.leeds.ac.uk>.
4895 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
4897 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
4899 (grub_sfs_dir): Likewise.
4901 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
4903 Add support for the SFS filesystem.
4905 * fs/sfs.c: New file.
4907 * DISTLIST: Added `fs/sfs.c'.
4909 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
4910 (grub_probefs_SOURCES): Likewise.
4911 (grub_emu_SOURCES): Likewise.
4912 (pkgdata_MODULES): Add `sfs.mod'.
4913 (sfs_mod_SOURCES): New variable.
4914 (sfs_mod_CFLAGS): Likewise.
4915 (sfs_mod_LDFLAGS): Likewise.
4917 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
4918 (pkgdata_MODULES): Add `sfs.mod'.
4919 (sfs_mod_SOURCES): New variable.
4920 (sfs_mod_CFLAGS): Likewise.
4922 * util/grub-emu.c (main): Call `grub_sfs_init' and
4925 * include/grub/fs.h (grub_sfs_init): New prototype.
4926 (grub_sfs_fini): Likewise.
4928 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
4930 Add support for the AFFS filesystem.
4932 * fs/affs.c: New file.
4934 * DISTLIST: Added `fs/affs.c'.
4936 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
4937 (grub_probefs_SOURCES): Likewise.
4938 (grub_emu_SOURCES): Likewise.
4939 (pkgdata_MODULES): Add `affs.mod'.
4940 (affs_mod_SOURCES): New variable.
4941 (affs_mod_CFLAGS): Likewise.
4942 (affs_mod_LDFLAGS): Likewise.
4944 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
4945 (pkgdata_MODULES): Add `affs.mod'.
4946 (affs_mod_SOURCES): New variable.
4947 (affs_mod_CFLAGS): Likewise.
4949 * util/grub-emu.c (main): Call `grub_affs_init' and
4952 * include/grub/fs.h (grub_affs_init): New prototype.
4953 (grub_affs_fini): Likewise.
4955 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
4957 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
4959 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
4961 * configure.ac: Accept `x86_64' as host_cpu. In that case add
4964 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
4967 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
4968 (COMMON_LDFLAGS): New variable.
4969 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
4970 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
4971 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
4972 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
4973 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
4974 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
4975 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
4976 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
4977 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
4978 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
4979 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
4980 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
4981 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
4982 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
4983 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
4985 (normal_mod_ASFLAGS): Add `-m32'.
4987 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
4988 (grub_host_size_t, grub_host_ssize_t): New types.
4989 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
4990 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
4991 `GRUB_HOST_SIZEOF_VOID_P'.
4993 * include/grub/kernel.h (struct grub_module_header): Type of
4994 member offset changed to `grub_host_off_t'. Type of member size
4995 changed to `grub_host_size_t'.
4996 (struct grub_module_info): Type of member offset changed to
4997 `grub_host_off_t'. Type of member size changed to
5000 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
5002 Make GRUB's kernel compliant to Multiboot Specification.
5004 * kern/i386/pc/startup.S (multiboot_header): New label.
5005 (multiboot_entry): Likewise.
5006 (multiboot_trampoline): Likewise.
5008 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
5011 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
5012 put parentheses after a question mark.
5013 [!GRUB_UTIL] (my_mod): New variable.
5015 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
5017 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
5019 Adds support for the XFS filesystem. Btrees are not supported
5022 * fs/xfs.c: New file.
5024 * DISTLIST: Added `fs/xfs.c'.
5026 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
5027 (grub_probefs_SOURCES): Likewise.
5028 (grub_emu_SOURCES): Likewise.
5029 (pkgdata_MODULES): Add `xfs.mod'.
5030 (xfs_mod_SOURCES): New variable.
5031 (xfs_mod_CFLAGS): Likewise.
5033 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
5034 (pkgdata_MODULES): Add `xfs.mod'.
5035 (xfs_mod_SOURCES): New variable.
5036 (xfs_mod_CFLAGS): Likewise.
5038 * util/grub-emu.c (main): Call `grub_xfs_init' and
5041 * include/grub/fs.h (grub_xfs_init): New prototype.
5042 (grub_xfs_fini): Likewise.
5045 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
5047 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
5048 color modes, allow greater than 16 colors to be configured as
5051 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5053 * normal/completion.c (complete_arguments): Add the qualifier
5056 From Omniflux <omniflux+lists@omniflux.com>:
5057 * include/grub/terminfo.h: New file.
5058 * include/grub/tparm.h: Likewise.
5059 * include/grub/i386/pc/serial.h: Likewise.
5060 * term/terminfo.c: Likewise.
5061 * term/tparm.c: Likewise.
5062 * term/i386/pc/serial.c: Likewise.
5063 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
5065 (terminfo_mod_SOURCES): New variable.
5066 (terminfo_mod_CFLAGS): Likewise.
5067 (serial_mod_SOURCES): Likewise.
5068 (serial_mod_CFLAGS): Likewise.
5070 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
5072 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
5073 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
5074 and kern/powerpc/ieee1275/cmain.c, respectively.
5076 * boot/powerpc/ieee1275/crt0.S: Moved to ...
5077 * kern/powerpc/ieee1275/crt0.S: ... here.
5079 * boot/powerpc/ieee1275/cmain.c: Moved to ...
5080 * kern/powerpc/ieee1275/cmain.c: ... here.
5082 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
5083 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
5084 instead of boot/powerpc/ieee1275/crt0.S and
5085 boot/powerpc/ieee1275/cmain.c, respectively.
5087 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
5088 sectors. It was not used anyway.
5090 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
5092 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
5093 `unused parameter' warning.
5095 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
5097 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
5099 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
5102 2005-08-28 Marco Gerards <metgerards@student.han.nl>
5104 * include/grub/normal.h (enum grub_completion_type): Added
5105 `GRUB_COMPLETION_TYPE_ARGUMENT'.
5107 * normal/cmdline.c (print_completion): Handle
5108 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
5109 * normal/menu_entry.c (store_completion): Likewise.
5111 * normal/completion.c (complete_arguments): New function.
5112 (grub_normal_do_completion): Call `complete_arguments' when the
5113 current words start with a dash.
5115 2005-08-27 Marco Gerards <metgerards@student.han.nl>
5117 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
5118 `gzio.mod' instead of `io.mod').
5120 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
5122 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
5123 (DISTDIRS): Added io and video.
5124 Rewrite the search routine to make an output consistently.
5126 * DISTLIST: Added conf/sparc64-ieee1275.mk,
5127 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
5128 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
5129 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
5130 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
5131 util/powerpc/ieee1275/misc.c.
5133 * include/grub/gzio.h: New file.
5134 * io/gzio.c: Likewise.
5136 * kern/file.c (grub_file_close): Call grub_device_close only if
5137 FILE->DEVICE is not NULL.
5139 * include/grub/mm.h [!NULL] (NULL): New macro.
5141 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
5143 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
5144 (pkgdata_MODULES): Added gzio.mod.
5145 (gzio_mod_SOURCES): New variable.
5146 (gzio_mod_CFLAGS): Likewise.
5148 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
5149 (pkgdata_MODULES): Added gzio.mod.
5150 (gzio_mod_SOURCES): New variable.
5151 (gzio_mod_CFLAGS): Likewise.
5153 * commands/cat.c: Include grub/gzio.h.
5154 (grub_cmd_cat): Use grub_gzfile_open instead of
5157 * commands/cmp.c: Include grub/gzio.h.
5158 (grub_cmd_cmp): Use grub_gzfile_open instead of
5161 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
5162 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
5164 (grub_rescue_cmd_module): Likewise.
5166 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
5168 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
5169 kern/sparc64/ieee1275/init.c because it contains _start.
5170 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
5172 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
5174 * configure.ac: Add support for sparc64 host with ieee1275
5176 * configure: Generated from configure.ac.
5177 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
5179 (grub_ofdisk_read): Likewise.
5180 (grub_ofdisk_open): Use %p to print pointer values, and cast the
5181 pointers as (void *) to remove a warning.
5182 (grub_ofdisk_close): Likewise.
5183 (grub_ofdisk_read): Likewise.
5184 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
5185 returns, so make it return void to remove a warning.
5186 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
5187 Corresponding prototype change.
5188 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
5189 values, and cast the pointers as (void *) to remove a warning.
5190 (grub_mm_dump): Likewise.
5191 * conf/sparc64-ieee1275.mk: New file.
5192 * conf/sparc64-ieee1275.rmk: Likewise.
5193 * include/grub/sparc64/setjmp.h: Likewise.
5194 * include/grub/sparc64/types.h: Likewise.
5195 * include/grub/sparc64/ieee1275/console.h: Likewise.
5196 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
5197 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
5198 * include/grub/sparc64/ieee1275/time.h: Likewise.
5199 * kern/sparc64/cache.c: Likewise.
5200 * kern/sparc64/dl.c: Likewise.
5201 * kern/sparc64/ieee1275/init.c: Likewise.
5202 * kern/sparc64/ieee1275/openfw.c: Likewise.
5204 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
5206 * util/console.c (grub_ncurses_putchar): If C is greater than
5207 0x7f, set C to a question mark.
5208 (grub_ncurses_getcharwidth): New function.
5209 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
5212 * normal/menu.c (print_entry): Made aware of Unicode. First,
5213 convert TITLE to UCS-4, and predict the cursor position by
5216 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
5218 * kern/misc.c (grub_utf16_to_utf8): Likewise.
5220 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
5222 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
5223 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
5226 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
5227 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
5228 grub_strcpy and grub_strlen. Take it into account that a space
5229 character is inserted as a delimiter.
5231 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
5233 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
5234 invalid magic in thre error.
5236 * commands/search.c: New file.
5238 * util/grub-emu.c (main): Call grub_search_init and
5241 * kern/rescue.c (grub_rescue_print_disks): Removed.
5242 (grub_rescue_print_devices): New function.
5243 (grub_rescue_cmd_ls): Use grub_device_iterate with
5244 grub_rescue_print_devices instead of grub_disk_dev_iterate with
5245 grub_rescue_print_disks.
5247 * kern/partition.c (grub_partition_iterate): Return the result of
5248 PARTMAP->ITERATE instead of GRUB_ERRNO.
5250 * kern/device.c: Include grub/partition.h.
5251 (grub_device_iterate): New function.
5253 * include/grub/partition.h (grub_partition_iterate): Return int
5254 instead of grub_err_t.
5256 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
5258 [GRUB_UTIL] (grub_search_fini): Likewise.
5260 * include/grub/device.h (grub_device_iterate): New prototype.
5262 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
5264 (pkgdata_MODULES): Added search.mod.
5265 (search_mod_SOURCES): New variable.
5266 (search_mod_CFLAGS): Likewise.
5268 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
5269 (pkgdata_MODULES): Added search.mod.
5270 (search_mod_SOURCES): New variable.
5271 (search_mod_CFLAGS): Likewise.
5273 * commands/ls.c (grub_ls_list_disks): Renamed to ...
5274 (grub_ls_list_devices): ... this, and use grub_device_iterate.
5275 All callers changed.
5277 * DISTLIST: Added commands/search.c.
5279 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
5281 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
5283 (grub_getcharwidth): New function.
5285 * kern/misc.c (grub_utf8_to_ucs4): New function.
5287 * include/grub/term.h (struct grub_term): Added a new member
5289 (grub_getcharwidth): New prototype.
5291 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
5293 * term/i386/pc/console.c (map_char): New function. Segregated from
5294 grub_console_putchar.
5295 (grub_console_putchar): Use map_char.
5296 (grub_console_getcharwidth): New function.
5297 (grub_console_term): Specified grub_console_getcharwidth as
5300 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
5301 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
5303 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
5305 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
5306 on grub_strtoul completely.
5307 (write_char): Declare local variables in the beginning of the
5309 (grub_vesafb_getcharwidth): New function.
5310 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
5313 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
5315 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
5316 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
5317 commands/i386/pc/vbetest.c.
5319 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
5320 call grub_vbe_get_controller_info again, because the returned
5321 information is volatile.
5322 (grub_vbe_set_video_mode): Mostly rewritten.
5323 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
5324 grub_vbe_status_t correctly.
5325 (grub_vbe_get_video_mode_info): Likewise.
5326 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
5327 several if statements.
5329 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
5330 * commands/i386/pc/vbeinfo.c: ... this.
5332 * commands/i386/pc/vbe_test.c: Renamed to ...
5333 * commands/i386/pc/vbetest.c: ... this.
5335 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
5337 (grub_cmd_vbeinfo): ... this. Save video modes before
5338 iterating. Skip a video mode, if it is not available, not enough
5339 information is given or it is monochrome. Show the memory
5340 model. Leave the interpretation of MODEVAR to grub_strtoul
5342 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
5343 (GRUB_MOD_FINI): Likewise.
5345 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
5346 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
5347 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
5348 duplicated grub_env_get. Leave the interpretation of MODEVAR to
5349 grub_strtoul completely.
5351 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
5352 (GRUB_MOD_FINI): Likewise.
5354 * normal/misc.c: Include grub/mm.h.
5356 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
5357 vbe_list_modes with vbetest.mod and vbeinfo.mod.
5358 (vbe_list_modes_mod_SOURCES): Removed.
5359 (vbe_list_modes_mod_CFLAGS): Likewise.
5360 (vbe_test_mod_SOURCES): Likewise.
5361 (vbe_test_mod_CFLAGS): Likewise.
5362 (vbeinfo_mod_SOURCES): New variable.
5363 (vbeinfo_mod_CFLAGS): Likewise.
5364 (vbetest_mod_SOURCES): Likewise.
5365 (vbetest_mod_CFLAGS): Likewise.
5367 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
5369 * normal/misc.c: New file.
5371 * DISTLIST: Added normal/misc.c.
5373 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
5374 DISK to HOOK. Call HOOK with DISK.
5375 * partmap/apple.c (apple_partition_map_iterate): Likewise.
5376 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5377 * partmap/sun.c (sun_partition_map_iterate): Likewise.
5379 * normal/menu_entry.c (struct screen): Added a new member
5381 (completion_buffer): New global variable.
5382 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
5383 (store_completion): New function.
5384 (complete): Likewise.
5385 (clear_completions): Likewise.
5386 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
5387 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
5388 a tab, call complete.
5390 * normal/completion.c (disk_dev): Removed.
5391 (print_simple_completion): Likewise.
5392 (print_partition_completion): Likewise.
5393 (print_func): New global variable.
5394 (add_completion): Do not take the arguments WHAT or PRINT any
5395 longer. Added a new argument TYPE. Instead of printing directly,
5396 call PRINT_FUNC if not NULL.
5397 All callers changed.
5398 (complete_device): Use a local variable DEV instead of
5399 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
5400 (grub_normal_do_completion): Take a new argument HOOK. Do not
5401 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
5402 empty string, return NULL instead.
5403 All callers changed.
5405 * normal/cmdline.c (print_completion): New function.
5407 * kern/partition.c (grub_partition_iterate): Add an argument DISK
5409 All callers changed.
5411 * kern/disk.c (grub_print_partinfo): Removed.
5413 * include/grub/partition.h (struct grub_partition_map): Add a new
5414 argument DISK into HOOK of ITERATE.
5415 (grub_partition_iterate): Add a new argument DISK to HOOK.
5417 * include/grub/normal.h (enum grub_completion_type): New enum.
5418 (grub_completion_type_t): New type.
5419 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
5420 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
5421 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
5422 (GRUB_COMPLETION_TYPE_FILE): Likewise.
5423 (grub_normal_do_completion): Added a new argument HOOK.
5424 (grub_normal_print_device_info): New prototype.
5426 * include/grub/disk.h (grub_print_partinfo): Removed.
5428 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
5429 (normal_mod_SOURCES): Likewise.
5430 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5431 (normal_mod_SOURCES): Likewise.
5433 * commands/ls.c (grub_ls_list_disks): Use
5434 grub_normal_print_device_info instead of grub_print_partinfo. Free
5436 (grub_ls_list_files): Use grub_normal_print_device_info instead of
5437 duplicating the code.
5439 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
5441 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
5442 follow GCS more precisely.
5443 * commands/i386/pc/vbe_test.c: Likewise.
5444 * include/grub/i386/pc/vbe.h: Likewise.
5445 * term/i386/pc/vesafb.c: Likewise.
5446 * video/i386/pc/vbe.c: Likewise.
5448 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
5450 * DISTLIST: Added term/i386/pc/vesafb.c
5451 DISTLIST: Added video/i386/pc/vbe.c
5452 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
5453 DISTLIST: Added commands/i386/pc/vbe_test.c.
5454 * commands/i386/pc/vbe_list_modes.c: New file.
5455 * commands/i386/pc/vbe_test.c: Likewise.
5456 * term/i386/pc/vesafb.c: Likewise.
5457 * video/i386/pc/vbe.c: Likewise.
5458 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
5459 (grub_vbe_probe) Added prototype.
5460 (grub_vbe_set_video_mode) Likewise.
5461 (grub_vbe_get_video_mode) Likewise.
5462 (grub_vbe_get_video_mode_info) Likewise.
5463 (grub_vbe_set_pixel_rgb) Likewise.
5464 (grub_vbe_set_pixel_index) Likewise.
5465 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
5466 (pkgdata_MODULES): Added vesafb.mod.
5467 (pkgdata_MODULES): Added vbe_list_modes.mod.
5468 (pkgdata_MODULES): Added vbe_test.mod.
5469 (vbe_mod_SOURCES): Added.
5470 (vbe_mod_CFLAGS): Likewise.
5471 (vesafb_mod_SOURCES): Likewise.
5472 (vesafb_mod_CFLAGS): Likewise.
5473 (vbe_list_modes_mod_SOURCES): Likewise.
5474 (vbe_list_modes_mod_CFLAGS): Likewise.
5475 (vbe_test_mod_SOURCES): Likewise.
5476 (vbe_test_mod_CFLAGS): Likewise.
5478 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
5480 * normal/command.c (grub_command_execute): If INTERACTIVE is
5481 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
5482 CMDLINE. Disable the pager if INTERACTIVE is true.
5483 All callers are changed.
5485 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
5486 before reading a config file.
5487 * normal/main.c (read_config_file): Even if a command is not
5488 found, register it if it is within an entry.
5490 * util/grub-emu.c: Include sys/types.h and unistd.h.
5491 (options): Added --hold.
5492 (struct arguments): Added a new member "hold".
5493 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
5495 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
5496 cleared by a debugger, if it is not zero.
5498 * include/grub/normal.h (grub_command_execute): Add an argument
5501 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
5503 * DISTLIST: Added include/grub/i386/pc/vbe.h.
5505 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
5507 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
5508 program with another one, because the old one didn't detect a bug
5509 in gcc-3.4. Always use regparm 2, because the new test is still
5510 not enough for gcc-4.0. Someone must investigate a simple test
5511 case which detects a bug in gcc-4.0.
5513 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
5515 * DISTLIST: Added normal/completion.c.
5517 * normal/completion.c: New file.
5519 * term/i386/pc/console.c (grub_console_getwh): New function.
5520 (grub_console_term): Assign grub_console_getwh to getwh.
5522 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
5523 function is defined in normal/completion.c as
5524 grub_normal_do_completion.
5525 (grub_cmdline_get): Use grub_normal_do_completion instead of
5528 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
5529 returns non-zero, otherwise return 0.
5530 (grub_partition_iterate): First, probe the partition map. Then,
5531 call ITERATE only for this partition map.
5533 * kern/misc.c (grub_strncmp): Rewritten.
5535 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
5536 returns non-zero. Otherwise return 0.
5538 * include/grub/partition.h (grub_partition_map_iterate): Return
5539 int instead of void.
5541 * include/grub/normal.h (grub_normal_do_completion): New prototype.
5543 * include/grub/misc.h (grub_strncmp): Change the type of N to
5546 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
5549 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
5550 unsigned explictly before comparing it with I.
5552 * kern/main.c (grub_env_write_root): Add the attribute unused into
5555 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
5556 normal/completion.c.
5557 (normal_mod_SOURCES): Likewise.
5558 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5559 (normal_mod_SOURCES): Likewise.
5561 * normal/command.c (grub_iterate_commands): If ITERATE returns
5562 non-zero, return one immediately.
5564 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
5566 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
5567 * kern/i386/pc/startup.S: Updated Global Descriptor table's
5569 (grub_vbe_get_controller_info): New function.
5570 (grub_vbe_get_mode_info): Likewise.
5571 (grub_vbe_set_mode): Likewise.
5572 (grub_vbe_get_mode): Likewise.
5573 (grub_vbe_set_memory_window): Likewise.
5574 (grub_vbe_get_memory_window): Likewise.
5575 (grub_vbe_set_scanline_length): Likewise.
5576 (grub_vbe_get_scanline_length): Likewise.
5577 (grub_vbe_set_display_start): Likewise.
5578 (grub_vbe_get_display_start): Likewise.
5579 (grub_vbe_set_palette_data): Likewise.
5580 * include/grub/i386/pc/vbe.h: New file.
5582 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
5584 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
5585 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
5586 * DISTLIST: Likewise.
5587 * kern/ieee1275/of.c: Moved to ...
5588 * kern/ieee1275/ieee1275.c: ... here.
5590 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
5592 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
5593 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
5594 Pass 0 as `end' parameter to grub_strtoul().
5596 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
5598 * include/grub/powerpc/ieee1275/console.h: Do not include
5599 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
5601 (grub_console_cur_color): Remove i386-specific prototype.
5602 (grub_console_real_putchar): Likewise.
5603 (grub_console_checkkey): Likewise.
5604 (grub_console_getkey): Likewise.
5605 (grub_console_getxy): Likewise.
5606 (grub_console_gotoxy): Likewise.
5607 (grub_console_cls): Likewise.
5608 (grub_console_setcursor): Likewise.
5609 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
5610 Include <grub/machine/console.h>.
5611 * term/ieee1275/ofconsole.c: Likewise.
5613 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
5615 * Makefile.in (LIBLZO): New variable.
5617 * configure.ac: Check for LZO version 2.
5619 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
5620 lzo/lzo1x.h instead of lzo1x.h.
5622 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
5625 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
5626 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
5628 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
5629 copying the data from PARTITION to P.
5631 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
5633 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
5634 negative, unload the module.
5636 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
5637 map is "pc_partition_map" but not "pc".
5638 (usage): Fix the description. The options are --boot-image and
5639 --core-image but not --boot-file or --core-file.
5640 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
5641 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
5644 * util/i386/pc/grub-install.in: Do not specify --boot-file or
5645 --core-file. Specify INSTALL_DEVICE as an argument.
5647 * util/console.c: Include config.h.
5648 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
5649 [HAVE_NCURSES_H]: Include ncurses.h.
5650 [HAVE_CURSES_H]: Include curses.h.
5651 [!A_NORMAL] (A_NORMAL): Defined as zero.
5652 [!A_STANDOUT] (A_STANDOUT): Likewise.
5654 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
5656 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
5658 * configure.ac: Check for curses libraries and headers.
5660 * Makefile.in (LIBCURSES): New variable.
5662 * genmk.rb (Script::rule): Set the executable bits.
5664 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
5665 name of the PC partition map is "pc_partition_map" but not "pc".
5667 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
5669 * util/i386/pc/grub-install.in (grub_probefs): New variable.
5670 (modules): Likewise.
5671 (usage): Added descriptions for --modules and --grub-probefs.
5672 Handle --modules and --grub-probefs. Save the arguments in MODULES
5673 and GRUB_PROBEFS, respectively.
5674 Auto-detect a filesystem module against GRUBDIR. If the result is
5675 empty and modules are not specified explicitly, abort the
5676 installation. Add the result to MODULES.
5678 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
5679 disk/powerpc/ieee1275/ofdisk.c,
5680 include/grub/powerpc/ieee1275/init.h and
5681 term/powerpc/ieee1275/ofconsole.c.
5682 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
5683 term/ieee1275/ofconsole.c.
5685 * include/grub/powerpc/ieee1275/console.h: Resurrected.
5687 * COPYING: Upgraded to the latest version. Only the address of the
5688 FSF office has changed.
5690 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
5692 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
5693 kern/ieee1275.c with kern/ieee1275/of.c.
5695 * kern/ieee1275.c: Moved to ...
5696 * kern/ieee1275/of.c: ... here.
5698 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
5700 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
5703 * config.guess: Updated to the latest version from gnulib.
5704 * config.sub: Likewise.
5705 * install.sh: Likewise.
5706 * mkinstalldirs: Likewise.
5708 * include/grub/console.h: Removed. This file is arch-specific. Do
5709 not put this in include/grub.
5711 * include/grub/i386/pc/console.h: Resurrected.
5713 * util/console.c: Include grub/machine/console.h instead of
5715 * util/grub-emu.c: Likewise.
5717 2005-08-04 Marco Gerards <metgerards@student.han.nl>
5719 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
5722 From Vincent Pelletier <subdino2004@yahoo.fr>
5723 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
5724 Redefined to use grub_getwh.
5725 (grub_term): New member named getwh.
5726 (grub_getwh): New prototype.
5727 * kern/term.c (grub_getwh): New function.
5728 * term/i386/pc/console.c (grub_console_getwh): New function.
5729 (grub_console_term): New member `getwh'.
5730 * term/i386/pc/vga.c (grub_vga_getwh): New function.
5731 (grub_vga_term): New member `getwh'.
5732 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
5734 (grub_ofconsole_getw): New function.
5735 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
5736 (grub_ofconsole_term): New field named getwh and new initial
5739 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
5741 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
5742 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
5743 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
5744 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
5745 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
5746 of <grub/machine/ieee1275.h>.
5747 * commands/ieee1275/reboot.c: Likewise.
5748 * boot/powerpc/ieee1275/ieee1275.c: Move ...
5749 * kern/ieee1275.c: ... to here. All users updated. Change all
5750 parameter structs to use new type `grub_ieee1275_cell_t'.
5751 * term/powerpc/ieee1275/ofconsole.c: Move ...
5752 * term/ieee1275/ofconsole.c: ... to here. All users updated.
5753 * disk/powerpc/ieee1275/ofdisk.c: Move ...
5754 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
5755 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
5757 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
5758 Remove unused prototypes. All users updated.
5759 * include/grub/powerpc/ieee1275/console.h: Removed.
5760 * include/grub/powerpc/ieee1275/ieee1275.h: Define
5761 `grub_ieee1275_cell_t'.
5762 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
5763 Cast comparisons with -1 to the correct type.
5764 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
5765 type to match `grub_ieee1275_entry_fn'.
5767 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
5769 * DISTLIST: Added util/i386/pc/grub-probefs.c.
5771 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
5772 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
5774 (grub_probefs_SOURCES): New variable.
5776 * util/i386/pc/grub-probefs.c: New file.
5778 * util/i386/pc/grub-setup.c (main): Call
5779 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
5780 grub_hfs_init and grub_jfs_init to initialize the system. Call
5781 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
5782 grub_pc_partition_map_fini to finish the system.
5784 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
5786 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
5788 (grub_multiboot_load_elf32): Likewise.
5789 (grub_multiboot_is_elf64): Likewise.
5790 (grub_multiboot_load_elf64): Likewise.
5791 (grub_multiboot_load_elf): Likewise.
5792 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
5793 an ELF32 or ELF64 file.
5794 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
5796 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
5797 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
5798 NULL before calling FS->LABEL.
5799 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
5800 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
5801 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
5802 before calling FS->LABEL.
5804 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
5806 * util/i386/pc/grub-install.in (datadir): New variable.
5808 (pkgdatadir): New variable.
5809 (pkglibdir): Removed.
5811 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
5813 * DISTLIST: Added util/i386/pc/grub-install.in.
5815 * util/i386/pc/grub-install.in: New file.
5817 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
5818 (grub_install_SOURCES): Likewise.
5820 * genmk.rb: Added support for scripts.
5821 (Script): New class.
5822 (scripts): New variable.
5824 * Makefile.in (install-local): Install sbin_SCRIPTS by
5826 (uninstall): Remove sbin_SCRIPTS.
5828 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
5829 device, try to get a GRUB device by
5830 grub_util_biosdisk_get_grub_dev.
5833 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
5834 description for --device-map.
5836 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
5838 Change the semantics of variable hooks. They now return strings
5839 instead of error values.
5841 * util/i386/pc/grub-setup.c: Include grub/env.h.
5842 (setup): Use grub_device_set_root instead of grub_env_set.
5844 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
5845 grub_env_get instead of grub_device_set_root and
5846 grub_device_get_root, respectively.
5848 * kern/main.c (grub_env_write_root): New function.
5849 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
5850 grub_env_set instead of grub_device_set_root.
5852 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
5854 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
5855 rather than calling ENV->WRITE_HOOK afterwards.
5856 (grub_env_get): Return the result of ENV->READ_HOOK rather than
5857 passing a pointer of a pointer.
5858 (grub_register_variable_hook): Change the types of "read_hook" and
5859 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
5861 Allocate the default empty string on the heap, because this string
5864 * kern/device.c: Include grub/env.h.
5865 (grub_device_set_root): Removed.
5866 (grub_device_get_root): Likewise.
5867 (grub_device_open): Use grub_env_get instead of
5868 grub_device_get_root.
5870 * include/grub/env.h (grub_env_read_hook_t): New type.
5871 (grub_env_write_hook_t): Likewise.
5872 (grub_env_var): Change the types of "read_hook" and "write_hook"
5873 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
5874 (grub_register_variable_hook): Likewise.
5876 * include/grub/device.h (grub_device_set_root): Removed.
5877 (grub_device_set_root): Likewise.
5879 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
5880 make sure that DIRNAME terminates with '/', so that
5881 grub_fat_find_dir will fail if PATH is not a directory.
5883 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
5885 Use the qualifier auto for print_files and print_files_long.
5886 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
5888 Put a newline only if there is no error.
5889 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
5892 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
5894 * kern/partition.c (grub_partition_probe): Initialize PART to
5895 NULL. Otherwise, when no partition map is registered, this returns
5898 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
5900 * partmap/apple.c (apple_partition_map_iterate): Check if POS
5901 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
5904 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
5906 * commands/ls.c (grub_ls_list_disks): Print the filesystem
5907 information on each device, if it does not have partitions. Print
5908 "Device" instead of "Disk", because this function is not specific
5911 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
5912 static to ensure that it is put on the memory rather than a
5915 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
5917 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
5918 (grub_cat_init): Likewise.
5919 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
5920 (options): Likewise.
5921 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
5922 (grub_configfile_init): Likewise.
5923 * font/manager.c (GRUB_MOD_INIT): Likewise.
5924 * commands/help.c (GRUB_MOD_INIT): Likewise.
5925 (grub_help_init): Likewise.
5926 * normal/command.c (grub_command_init): Likewise.
5927 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
5928 * disk/loopback.c (grub_loop_init): Likewise.
5929 (GRUB_MOD_INIT): Likewise.
5930 * commands/ls.c (grub_ls_init): Likewise.
5931 (GRUB_MOD_INIT): Likewise.
5932 (options): Likewise.
5933 * commands/boot.c (grub_boot_init): Likewise.
5934 (GRUB_MOD_INIT): Likewise.
5935 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
5936 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
5937 (GRUB_MOD_INIT): Likewise.
5938 * commands/cmp.c (grub_cmp_init): Likewise.
5939 (GRUB_MOD_INIT): Likewise.
5941 * normal/arg.c: Use <> instead of "" to include header files.
5942 (SHORT_ARG_HELP): New macro.
5943 (SHORT_ARG_USAGE): Likewise.
5944 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
5945 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
5947 (find_short): Check if C is 'h' or 'u' explicitly.
5948 (grub_arg_show_help): Use space characters instead of tabs. Treat
5949 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
5950 are shown with --help and --usage only if they are not used for
5952 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
5955 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
5956 const into "longarg". Change the type of "shortarg" to int.
5958 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
5960 * boot/i386/pc/boot.S (boot_drive_check): New label.
5962 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
5965 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
5966 which do not pass a boot drive correctly. Copied from GRUB Legacy.
5968 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
5970 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
5971 When turning off Gate A20, skip the check and return immediately,
5972 because this is not fatal usually.
5974 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
5976 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
5977 be 0x7C00 instead of 0x8000.
5979 * boot/i386/pc/pxeboot.S: Rewritten.
5981 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
5983 (gate_a20_check_state): Read a byte from 0x108000. Invert the
5986 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
5988 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
5989 robustness. This routine now supports a BIOS call and System
5990 Control Port A to modify the gate A20.
5992 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
5995 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
5997 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
5998 device path and resulting ihandle.
5999 (grub_ofdisk_close): dprintf the ihandle being closed.
6000 (grub_ofdisk_read): dprintf function parameters.
6001 * kern/mm.c (grub_mm_init_region): Likewise.
6002 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
6003 (grub_linux_boot): dprintf the Linux entry point, initrd address and
6004 size, and boot arguments.
6005 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
6006 before loading into memory.
6007 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
6008 before loading into memory.
6010 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
6012 * kern/mm.c: Added much documentation.
6013 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
6014 8, set to 5 instead of 8.
6016 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
6018 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
6020 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
6021 (grub_mkdevicemap_SOURCES): New variable.
6023 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
6024 lib/device.c of GRUB Legacy.
6026 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
6028 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
6029 instead of PATH is NULL.
6031 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
6033 * commands/cmp.c (BUFFER_SIZE): New macro.
6034 (grub_cmd_cmp): Close the right file at the right time. Compare
6035 only data just read. Don't report files of different size as
6036 identical. Dynamically allocate buffers. Move variable
6037 declarations at the beginning of function.
6039 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
6041 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
6044 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
6046 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
6047 when backspace is pressed at beginning of line.
6049 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
6051 * DISTLIST: Added genfslist.sh.
6053 * normal/main.c (fs_module_list): New variable.
6054 (autoload_fs_module): New function.
6055 (read_fs_list): Likewise.
6056 (grub_normal_execute): Call read_fs_list.
6058 * kern/fs.c (grub_fs_autoload_hook): New variable.
6059 (grub_fs_probe): Added support for auto-loading.
6061 * include/grub/normal.h (struct grub_fs_module_list): New struct.
6062 (grub_fs_module_list_t): New type.
6064 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
6065 (grub_fs_autoload_hook): New prototype.
6067 * genfslist.sh: New file.
6069 * genmk.rb: Added a rule to generate a filesystem list.
6071 2005-06-30 Marco Gerards <metgerards@student.han.nl>
6073 * configure.ac: Fix the test for cross-compiling.
6075 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
6076 define GRUB_UTIL anymore.
6078 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
6079 so this function works on other systems than just big endian.
6080 (load_modules): Likewise.
6081 (add_segments): Likewise.
6083 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
6085 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
6086 contains `l' modifier, get a long from va_arg().
6088 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
6090 * kern/mm.c (grub_free): If the next free block which is being
6091 merged is the first free block, set the first block to the block
6093 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
6095 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
6097 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
6098 `grub_ieee1275_chosen'.
6100 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
6102 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
6103 (grub_ieee1275_chosen): New variable.
6104 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
6106 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
6107 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
6108 Rename first argument to `phandle' for consistency.
6109 (grub_ieee1275_get_property_length): Likewise.
6110 (grub_ieee1275_next_property): Likewise. Change type of first argument
6111 to grub_ieee1275_phandle_t.
6112 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
6113 Move export next to declaration.
6114 (grub_ieee1275_chosen): New variable.
6115 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
6116 Correct cosmetic typo.
6117 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
6118 `grub_ieee1275_chosen'.
6119 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
6120 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
6121 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
6122 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
6123 `grub_ieee1275_chosen'.
6125 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
6127 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
6129 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
6130 /chosen/bootargs as "variable=value" pairs.
6132 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
6134 * include/grub/misc.h (grub_dprintf): New macro.
6135 (grub_real_dprintf): New prototype.
6136 (grub_strword): Likewise.
6137 (grub_iswordseparator): Likewise.
6138 * kern/misc.c (grub_real_dprintf): New function.
6139 (grub_strword): Likewise.
6140 (grub_iswordseparator): Likewise.
6142 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
6144 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
6145 (roundup): Remove macro.
6146 (grub_ieee1275_flags): Make static.
6147 (grub_ieee1275_realmode): Remove.
6148 (grub_ieee1275_test_flag): New function.
6149 (grub_ieee1275_set_flag): Likewise.
6150 (find_options): Rename to `grub_ieee1275_find_options'; update
6151 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
6152 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
6153 (cmain): New prototype.
6154 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
6155 `grub_ieee1275_flags' directly.
6156 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
6158 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
6159 Don't include grub/machine/init.h.
6160 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
6161 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
6163 (grub_ieee1275_realmode): Likewise.
6164 (grub_ieee1275_flag): New enum.
6165 (grub_ieee1275_test_flag): New prototype.
6166 (grub_ieee1275_set_flag): New prototype.
6167 * include/grub/powerpc/ieee1275/init.h: Remove file.
6168 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
6169 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
6170 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
6171 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
6173 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
6174 `grub_ieee1275_test_flag'.
6175 (grub_ieee1275_encode_devname): Likewise.
6177 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
6179 * include/grub/powerpc/ieee1275/ieee1275.h
6180 (grub_ieee1275_encode_devname): New prototype.
6181 (grub_ieee1275_get_filename): Likewise.
6182 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
6184 (grub_set_prefix): Likewise.
6185 (grub_machine_init): Call grub_set_prefix.
6186 * kern/powerpc/ieee1275/openfw.c: Fix typos.
6187 (grub_parse_type): New enum.
6188 (grub_ieee1275_get_devargs): New function.
6189 (grub_ieee1275_get_devname): Likewise.
6190 (grub_ieee1275_parse_args): Likewise.
6191 (grub_ieee1275_get_filename): Likewise.
6192 (grub_ieee1275_encode_devname): Likewise.
6194 2005-03-30 Marco Gerards <metgerards@student.han.nl>
6196 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
6197 `grub_loader_unset'.
6199 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
6201 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
6202 instead of grub_ieee1275_interpret.
6203 (grub_halt_init): New function.
6204 (grub_halt_fini): Likewise.
6205 (GRUB_MOD_INIT): Correct message grammar.
6206 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
6207 instead of grub_ieee1275_interpret.
6208 (grub_reboot_init): New function.
6209 (grub_reboot_fini): Likewise.
6210 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
6211 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
6212 util/i386/pc/misc.c with commands/ieee1275/halt.c,
6213 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
6214 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
6216 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
6218 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
6220 (grub_halt): Likewise.
6221 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
6222 (cmain): Remove __attribute__((unused)).
6223 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
6224 (grub_heap_len): Likewise.
6225 (grub_machine_fini): New function.
6226 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
6227 (grub_halt): Likewise.
6228 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
6230 * util/powerpc/ieee1275/misc.c: New file.
6232 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
6234 * DISTLIST: New file.
6235 * gendistlist.sh: Likewise.
6237 * Makefile.in (COMMON_DISTFILES): Removed.
6238 (BOOT_DISTFILES): Likewise.
6239 (CONF_DISTFILES): Likewise.
6240 (DISK_DISTFILES): Likewise.
6241 (FS_DISTFILES): Likewise.
6242 (INCLUDE_DISTFILES): Likewise.
6243 (KERN_DISTFILES): Likewise.
6244 (LOADER_DISTFILES): Likewise.
6245 (TERM_DISTFILES): Likewise.
6246 (UTIL_DISTFILES): Likewise.
6247 (DISTFILES): Likewise.
6248 (uninstall): Uninstall files in $(pkgdata_DATA).
6249 (DISTLIST): New target.
6250 (distdir): Use the contents of the file DISTLIST to get a list of
6253 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
6255 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
6256 descriptor. This is ported from GRUB Legacy.
6258 * gencmdlist.sh: Added an extra semicolon to make it work with
6259 old sed versions. Reported by Robert Bihlmeyer
6260 <robbe@orcus.priv.at>.
6262 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
6264 Automatic loading of commands is supported.
6266 * normal/main.c (read_command_list): New function.
6267 (grub_normal_execute): Call read_command_list.
6269 * normal/command.c (grub_register_command): Return zero or CMD.
6270 Allocate CMD->NAME from the heap.
6271 Initialize CMD->MODULE_NAME to zero.
6272 Find the same name as well. If the same command is found and it is
6273 a dummy command, overwrite members. If it is not a dummy command,
6275 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
6276 (grub_command_find): If a dummy command is found, load a module
6277 and retry to find a command only once.
6279 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
6280 make sure that each command is loaded.
6282 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
6284 (struct grub_command): Remove const from the member `name'.
6285 Add a new member `module_name'.
6286 (grub_register_command): Return grub_command_t.
6288 * commands/help.c (grub_cmd_help): Call grub_command_find to make
6289 sure that each command is loaded.
6291 * genmk.rb (PModule::rule): Specify a module name without the
6292 suffix ".mod" to gencmdlist.sh.
6294 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
6296 * gencmdlist.sh: New file.
6298 * genmk.rb (PModule::rule): Generate a rule for a command list.
6300 Generate command.lst from $(COMMANDFILES).
6302 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
6303 (DATA): Added $(pkgdata_DATA).
6304 (install-local): Install files in $(pkgdata_DATA).
6306 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
6308 * term/i386/pc/vga.c (debug_command): Removed.
6309 (GRUB_MOD_INIT): Do not register the command "debug".
6311 From Hollis Blanchard:
6312 * commands/configfile.c: New file.
6313 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6314 commands/configfile.c.
6315 (pkgdata_MODULES): Added configfile.mod.
6316 (configfile_mod_SOURCES): New variable.
6317 (configfile_mod_CFLAGS): Likewise.
6318 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
6319 commands/configfile.c.
6320 (pkgdata_MODULES): Added configfile.mod.
6321 (configfile_mod_SOURCES): New variable.
6322 (configfile_mod_CFLAGS): Likewise.
6323 * util/grub-emu.c (main): Call grub_configfile_init and
6324 grub_configfile_fini.
6325 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
6327 [GRUB_UTIL] (grub_configfile_fini): Likewise.
6329 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
6331 * normal/arg.c (grub_arg_show_help): Do not show the bug report
6334 * commands/help.c (grub_cmd_help): Do not print newlines after
6335 the last command in print_command_help.
6337 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
6339 * commands/default.h: New file.
6340 * commands/timeout.h: Likewise.
6341 * normal/context.c: Likewise.
6343 * util/misc.c: Do not include sys/times.h.
6344 Include sys/time.h and grub/machine/time.h.
6345 (grub_get_rtc): Rewritten with gettimeofday.
6347 * util/grub-emu.c (main): Call grub_default_init and
6348 grub_timeout_init before grub_normal_init, and call
6349 grub_timeout_fini and grub_default_fini after grub_main.
6351 * util/console.c (grub_ncurses_checkkey): Return the read
6354 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
6357 * normal/main.c (read_config_file): Push MENU. If this fails,
6358 print an error and wait for a user input.
6359 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
6360 If a menu is empty or an error occurs, pop MENU.
6361 (grub_normal_execute): Pop and free MENU after grub_menu_run
6364 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
6366 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
6368 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
6370 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
6372 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
6375 * include/grub/normal.h (struct grub_menu_list): New struct.
6376 (grub_menu_list_t): New type.
6377 (struct grub_context): New struct.
6378 (grub_context_t): New type.
6379 (grub_register_command): Got rid of EXPORT_FUNC.
6380 (grub_unregister_command): Likewise.
6381 (grub_context_get): New prototype.
6382 (grub_context_get_current_menu): Likewise.
6383 (grub_context_push_menu): Likewise.
6384 (grub_context_pop_menu): Likewise.
6385 [GRUB_UTIL] (grub_default_init): Likewise.
6386 [GRUB_UTIL] (grub_default_fini): Likewise.
6387 [GRUB_UTIL] (grub_timeout_init): Likewise.
6388 [GRUB_UTIL] (grub_timeout_fini): Likewise.
6390 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
6391 commands/timeout.c and normal/context.c.
6392 (pkgdata_MODULES): Added default.mod and timeout.mod.
6393 (normal_mod_SOURCES): Added normal/context.c.
6394 (default_mod_SOURCES): New variable.
6395 (default_mod_CFLAGS): Likewise.
6396 (timeout_mod_SOURCES): Likewise.
6397 (timeout_mod_CFLAGS): Likewise.
6398 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
6400 (pkgdata_MODULES): Added default.mod and timeout.mod.
6401 (normal_mod_SOURCES): Added normal/context.c.
6402 (default_mod_SOURCES): New variable.
6403 (default_mod_CFLAGS): Likewise.
6404 (timeout_mod_SOURCES): Likewise.
6405 (timeout_mod_CFLAGS): Likewise.
6407 * Makefile.in (all-local): Added $(MKFILES).
6409 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
6411 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
6412 (grub_emu_SOURCES): Likewise.
6413 (pkgdata_MODULES): Add `sun.mod'.
6414 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
6415 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6417 (pkgdata_MODULES): Add `sun.mod'.
6418 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
6419 * include/grub/partition.h (grub_sun_partition_map_init): New
6421 (grub_sun_partition_map_fini): Likewise.
6422 * partmap/sun.c: New file.
6423 * util/grub-emu.c (main): Initialize and de-initialize the sun
6424 partitionmap support.
6426 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
6428 This implements an Emacs-like menu entry editor.
6430 * normal/menu_entry.c: New file.
6432 * util/console.c (grub_ncurses_putchar): Translate some Unicode
6433 characters to ASCII.
6434 (saved_char): New variable.
6435 (grub_ncurses_checkkey): Rewritten completely.
6436 (grub_ncurses_getkey): Likewise.
6437 (grub_ncurses_init): Call raw instead of cbreak.
6439 * normal/menu.c (print_entry): Do not put a space.
6440 (init_page): Renamed to ...
6441 (grub_menu_init_page): ... this. All callers changed.
6442 (edit_menu_entry): Removed.
6443 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
6445 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
6447 * kern/misc.c (grub_vprintf): Call grub_refresh.
6449 * normal/menu.c (DISP_LEFT): Renamed to ...
6450 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
6451 * normal/menu.c (DISP_UP): Renamed to ...
6452 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
6453 * normal/menu.c (DISP_RIGHT): Renamed to ...
6454 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
6455 * normal/menu.c (DISP_DOWN): Renamed to ...
6456 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
6457 * normal/menu.c (DISP_HLINE): Renamed to ...
6458 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
6459 * normal/menu.c (DISP_VLINE): Renamed to ...
6460 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
6461 * normal/menu.c (DISP_UL): Renamed to ...
6462 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
6463 * normal/menu.c (DISP_UR): Renamed to ...
6464 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
6465 * normal/menu.c (DISP_LL): Renamed to ...
6466 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
6467 * normal/menu.c (DISP_LR): Renamed to ...
6468 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
6469 * normal/menu.c (TERM_WIDTH): Renamed to ...
6470 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
6471 * normal/menu.c (TERM_HEIGHT): Renamed to ...
6472 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
6473 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
6474 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
6475 * normal/menu.c (TERM_MARGIN): Renamed to ...
6476 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
6477 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
6478 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
6479 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
6480 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
6481 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
6482 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
6483 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
6484 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
6485 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
6486 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
6487 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
6488 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
6489 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
6490 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
6491 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
6492 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
6493 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
6494 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
6495 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
6496 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
6497 All callers changed.
6499 * include/grub/normal.h: New prototype.
6501 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6502 normal/menu_entry.c.
6503 (normal_mod_SOURCES): Likewise.
6504 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6505 (normal_mod_SOURCES): Likewise.
6507 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
6509 * include/grub/normal.h (grub_halt_init): New prototype.
6510 (grub_halt_fini): Likewise.
6511 (grub_reboot_init): Likewise.
6512 (grub_reboot_fini): Likewise.
6514 * util/grub-emu.c: Include signal.h.
6515 (main_env): New global variable.
6516 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
6518 (grub_machine_fini): New function.
6519 (main): Call grub_halt_init and grub_reboot_init before
6520 grub_main, and grub_reboot_fini and grub_halt_fini after it.
6521 Call setjmp with MAIN_ENV to go back afterwards.
6522 Call grub_machine_fini right before return.
6524 * include/grub/util/misc.h: Include setjmp.h.
6525 (main_env): New prototype.
6527 * include/grub/kernel.h (grub_machine_fini): New prototype.
6528 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
6529 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
6531 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
6532 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
6533 * term/i386/pc/console.c (grub_console_fini): Likewise.
6535 * util/i386/pc/misc.c: New file.
6537 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6538 util/i386/pc/misc.c, commands/i386/pc/halt.c and
6539 commands/i386/pc/reboot.c.
6541 2005-02-14 Guillem Jover <guillem@hadrons.org>
6543 * include/grub/dl.h (grub_dl_check_header): New prototype.
6544 (grub_arch_dl_check_header): Change return type to grub_err_t,
6545 remove size parameter and export function. Update all callers.
6546 * kern/dl.c (grub_dl_check_header): New function.
6547 (grub_dl_load_core): Use `grub_dl_check_header' instead of
6548 `grub_arch_dl_check_header'. Check ELF type. Check if sections
6549 are inside the core.
6550 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
6551 independent ELF header checks.
6552 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
6553 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
6554 `grub_dl_check_header' instead of explicit checks. Check for the
6556 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
6557 `grub_dl_check_header' instead of explicit checks. Remove arch
6558 specific ELF header checks.
6560 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
6563 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
6565 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
6566 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
6568 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
6570 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
6571 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
6572 (part_map_iterate): Clear `grub_errno' and return 0 if
6573 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
6574 * partmap/amiga.c (amiga_partition_map_iterate): Return
6575 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
6576 * partmap/apple.c (apple_partition_map_iterate): Likewise.
6578 2005-02-01 Guillem Jover <guillem@hadrons.org>
6580 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
6583 2005-01-31 Marco Gerards <metgerards@student.han.nl>
6585 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
6587 (grub_rescue_cmd_linux): New prototype.
6588 (grub_rescue_cmd_initrd): Likewise.
6589 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
6591 (grub_linux_release_mem): Release the memory for the initrd.
6592 (grub_load_linux): Renamed from this...
6593 (grub_rescue_cmd_linux): ...To this. Changed all callers.
6594 Changed `entry' not to be static. Loop over memory regions to
6595 find another one when the default fails.
6596 (grub_rescue_cmd_initrd): New function.
6597 (grub_linux_init): Remove function.
6598 (grub_linux_fini): Likewise.
6599 (GRUB_MOD_INIT): Register `initrd'.
6600 (GRUB_MOD_FINI): Unregister `initrd'.
6601 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
6603 (grub_linux_normal_fini): Likewise.
6604 (GRUB_MOD_INIT): Register `initrd'.
6605 (GRUB_MOD_FINI): Unregister `initrd'.
6607 2005-01-31 Marco Gerards <metgerards@student.han.nl>
6609 * commands/help.c: New file.
6610 * normal/arg.c (show_help): Renamed to...
6611 (grub_arg_show_help): ... this.
6612 * commands/i386/pc/halt.c: New file.
6613 * commands/i386/pc/reboot.c: Likewise.
6614 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
6615 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
6616 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
6617 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
6619 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6621 (pkgdata_MODULES): Add `help.mod'.
6622 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
6623 * grub/i386/pc/init.h (grub_reboot): New prototype.
6624 (grub_halt): Likewise.
6625 * include/grub/normal.h (grub_arg_show_help): New prototype.
6626 (grub_help_init): Likewise.
6627 (grub_help_fini): Likewise.
6628 * util/grub-emu.c (main): Initialize and deinitialize the help
6631 * normal/cmdline.c (grub_cmdline_get): Doc fix.
6633 * normal/command.c (grub_command_init): Fixed the description of
6634 the `set' and `unset' commands.
6636 2005-01-31 Marco Gerards <metgerards@student.han.nl>
6638 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
6640 * commands/ieee1275/halt.c: New file.
6641 * commands/ieee1275/reboot.c: Likewise.
6642 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
6643 `__attribute__ ((unused))'. Some GCS related fixed.
6644 (grub_suspend_init) [GRUB_UTIL]: Function removed.
6645 (grub_suspend_fini): Likewise.
6646 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
6648 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
6649 (halt_mod_CFLAGS): New variables.
6650 * include/grub/powerpc/ieee1275/ieee1275.h
6651 (grub_ieee1275_interpret): New prototype.
6653 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
6655 * include/grub/misc.h (memmove): New prototype.
6658 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
6660 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
6661 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
6663 2005-01-22 Marco Gerards <metgerards@student.han.nl>
6665 * kern/misc.c (grub_strndup): Function rewritten.
6667 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
6669 * normal/menu.c (TERM_WIDTH): Macro redefined.
6670 (TERM_TOP_BORDER_Y): Likewise.
6671 (draw_border): Replaced while-loop by a for-loop. Make the number
6672 of lines consistent with the number of lines displayed in
6673 print_entries. Added a margin below the rectangle.
6674 (print_entry): Make the entry fit in the rectangle.
6675 (print_entries): Display the scroll arrows next to the right
6678 2005-01-21 Marco Gerards <metgerards@student.han.nl>
6680 * fs/minix.c (grub_minix_find_file): Reserve more space for
6681 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
6682 `grub_strncpy' to copy `path' into it.
6684 2005-01-21 Marco Gerards <metgerards@student.han.nl>
6686 Add the loopback device, a device via which files can be accessed
6689 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
6690 (pkgdata_MODULES): Add loopback.mod.
6691 (loopback_mod_SOURCES): New variable.
6692 (loopback_mod_CFLAGS): Likewise.
6693 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6695 (pkgdata_MODULES): Add loopback.mod.
6696 (loopback_mod_SOURCES): New variable.
6697 (loopback_mod_CFLAGS): Likewise.
6698 * disk/loopback.c: new file.
6699 * include/grub/normal.h (grub_loop_init): New prototype.
6700 (grub_loop_fini): New prototype.
6701 * util/grub-emu.c (main): Initialize and de-initialize loopback
6703 * include/grub/disk.h (grub_disk_dev_id): Add
6704 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
6706 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
6708 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
6710 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
6711 (suspend_mod_SOURCES): New variable.
6712 (suspend_mod_CFLAGS): Likewise.
6713 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
6715 * commands/ieee1275/suspend.c: New file.
6717 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6719 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
6720 ((unused))' to `__attribute__ ((used))'.
6721 (GRUB_MOD_FINI): Likewise.
6722 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
6723 * genmk.rb (PModule): Assign space to common symbols when linking
6726 2005-01-20 Marco Gerards <metgerards@student.han.nl>
6728 * include/grub/mm.h (grub_mm_init_region): Change the type of the
6729 `unsigned' arguments to `grub_size_t'.
6730 (grub_malloc): Likewise.
6731 (grub_realloc): Likewise.
6732 (grub_memalign): Likewise.
6733 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
6734 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
6735 * util/misc.c (grub_malloc): Likewise.
6736 (grub_realloc): Likewise.
6737 * kern/mm.c (get_header_from_pointer): Change the casts to
6738 `unsigned' into a cast to `grub_size_t'.
6740 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
6741 point to `currnode' when `currnode' is changed.
6743 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
6744 Schottelius <nico-linux@schottelius.org>.
6746 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
6748 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
6749 (note_path): Remove variable.
6750 (GRUB_IEEE1275_NOTE_NAME): New macro.
6751 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
6752 (grub_ieee1275_note_hdr): New structure.
6753 (grub_ieee1275_note_desc): Likewise.
6754 (grub_ieee1275_note): Likewise.
6755 (load_note): Remove `dir' argument. All callers updated. Remove
6756 `note_img' and `path'. Do not load a file from `note_path'.
6757 Initialize a struct grub_ieee1275_note and write that to `out'.
6758 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
6760 2005-01-05 Marco Gerards <metgerards@student.han.nl>
6762 * util/misc.c (grub_util_read_image): Revert last change. It
6763 called `grub_util_read_at', which seeks from the beginning of the
6766 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
6768 * TODO: Add note about endianness in grub-mkimage.
6769 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
6771 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
6772 (grub_mkimage_SOURCES): New target.
6773 * include/grub/kernel.h (grub_start_addr): Remove variable.
6774 (grub_end_addr): Likewise.
6775 (grub_total_module_size): Likewise.
6776 (grub_kernel_image_size): Likewise.
6777 (GRUB_MODULE_MAGIC): New constant.
6778 (grub_module_info): New structure.
6779 (grub_arch_modules_addr): New prototype.
6780 (grub_get_end_addr): Remove prototype.
6781 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
6782 * include/grub/powerpc/ieee1275/kernel.h: New file.
6783 * include/grub/util/misc.h (grub_util_get_fp_size): New
6785 (grub_util_read_at): Likewise.
6786 (grub_util_write_image_at): Likewise.
6787 * kern/main.c (grub_get_end_addr): Remove function.
6788 (grub_load_modules): Call grub_arch_modules_addr instead of using
6789 grub_end_addr. Look for a grub_module_info struct in memory. Use
6790 the grub_module_info fields instead of calling grub_get_end_addr
6791 as loop conditions. Move grub_add_unused_region code here.
6792 (grub_add_unused_region): Remove function.
6793 * kern/i386/pc/init.c: Include grub/cache.h.
6794 (grub_machine_init): Remove call to grub_get_end_addr. Remove
6795 one call to add_mem_region.
6796 (grub_arch_modules_addr): New function.
6797 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
6798 (grub_total_module_size): Likewise.
6799 Include grub/machine/kernel.h.
6800 (grub_arch_modules_addr): New function.
6801 * util/grub-emu.c (grub_end_addr): Remove variable.
6802 (grub_total_module_size): Likewise.
6803 (grub_arch_modules_addr): New function.
6804 * util/misc.c: Include unistd.h.
6805 (grub_util_get_fp_size): New function.
6806 (grub_util_read_at): Likewise.
6807 (grub_util_write_image_at): Likewise.
6808 (grub_util_read_image): Call grub_util_read_at.
6809 (grub_util_write_image): Call grub_util_write_image_at.
6810 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
6811 additional memory in kernel_img for a struct grub_module_info.
6812 Fill in that grub_module_info.
6813 * util/powerpc/ieee1275/grub-mkimage.c: New file.
6815 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
6817 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
6819 * include/grub/powerpc/ieee1275/ieee1275.h
6820 (grub_ieee1275_milliseconds): New prototype.
6821 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
6823 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
6824 grub_ieee1275_milliseconds.
6826 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
6828 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
6830 (find_options): New function.
6831 (cmain): Call find_options.
6832 * include/grub/powerpc/ieee1275/ieee1275.h
6833 (grub_ieee1275_realmode): New extern variable.
6834 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
6835 grub_map if grub_ieee1275_realmode is false.
6837 2004-12-29 Marco Gerards <metgerards@student.han.nl>
6839 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
6840 lines are inserted and make it work like readline. Reported by
6841 Vincent Pelletier <subdino2004@yahoo.fr>.
6843 2004-12-28 Marco Gerards <metgerards@student.han.nl>
6845 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
6847 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
6848 `kern/powerpc/cache.S'.
6850 2004-12-27 Marco Gerards <metgerards@student.han.nl>
6852 * genmk.rb: Handle the `Program' class in the main loop. Written
6853 by Johan Rydberg <jrydberg@gnu.org>.
6854 (Program): New class.
6855 (programs): New variable.
6856 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
6857 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
6858 instead of "grub/kernel.h". Include <grub/machine/init.h>.
6859 (help_arch): Function removed.
6860 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
6861 `powerpc/libgcc.h' and `loader.h'.
6862 (pkgdata_PROGRAMS): New variable.
6863 (sbin_UTILITIES): Variable removed.
6864 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
6865 (grubof_SOURCES): Variable re-defined so it only includes the
6867 (grubof_CFLAGS): Remove `-DGRUBOF'.
6868 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
6869 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
6870 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
6871 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
6872 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
6873 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
6874 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
6875 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
6876 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
6877 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
6878 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
6879 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
6880 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
6881 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
6882 (pc_mod_CFLAGS): New variables.
6883 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
6884 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
6885 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
6886 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
6888 * include/grub/i386/pc/init.h (grub_os_area_addr)
6889 (rub_os_area_size): ... to here.
6890 * include/grub/powerpc/ieee1275/ieee1275.h
6891 (grub_ieee1275_entry_fn): Export symbol.
6892 * include/grub/powerpc/ieee1275/init.h: New file.
6893 * include/grub/powerpc/libgcc.h: Likewise.
6894 * include/grub/cache.h: Likewise.
6895 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
6896 <hollis@penguinppc.org>.
6897 * kern/dl.c: Include <grub/cache.h>.
6898 (grub_dl_flush_cache): New function.
6899 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
6901 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
6902 (grub_console_init): Removed prototypes.
6903 (grub_machine_init): Don't initialize the modules anymore.
6904 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
6906 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
6907 Macro undef removed.
6908 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
6909 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
6910 relocation `R_PPC_REL32'. Return an error when the relocation is
6912 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
6913 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
6914 * util/misc.c (grub_arch_sync_caches): Likewise.
6916 2004-12-19 Marco Gerards <metgerards@student.han.nl>
6918 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
6919 `symlist.c', add `grubof_symlist.c'.
6920 (symlist.c): Variable removed.
6921 (grubof_HEADERS): Variable added.
6922 (grubof_symlist.c): New target.
6923 (kernel_syms.lst): Use `grubof_HEADERS' instead of
6924 `kernel_img_HEADERS'.
6925 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
6926 * kern/powerpc/dl.c: New file.
6927 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
6929 (grub_arch_dl_relocate_symbols): Likewise.
6930 (grub_register_exported_symbols): Likewise.
6932 2004-12-13 Marco Gerards <metgerards@student.han.nl>
6934 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
6935 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
6936 to fail instead. Reported by Vincent Pelletier
6937 <subdino2004@yahoo.fr>.
6939 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
6940 it is not allocated. Reported by Vincent Pelletier
6941 <subdino2004@yahoo.fr>.
6943 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
6944 output so the output looks better.
6946 2004-12-04 Marco Gerards <metgerards@student.han.nl>
6948 Modulize the partition map support and add support for the amiga
6951 * commands/ls.c: Include <grub/partition.h> instead of
6952 <grub/machine/partition.h>.
6953 * kern/disk.c: Likewise.
6954 * kern/rescue.c: Likewise.
6955 * loader/i386/pc/chainloader.c: Likewise.
6956 * normal/cmdline.c: Likewise.
6957 * kern/powerpc/ieee1275/init.c: Likewise.
6958 (grub_machine_init): Call `grub_pc_partition_map_init',
6959 `grub_amiga_partition_map_init' and
6960 `grub_apple_partition_map_init'.
6961 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
6962 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
6963 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
6964 `partition.h' and `pc_partition.h'.
6965 (grub_setup_SOURCES): Remove
6966 `disk/i386/pc/partition.c'. Add `kern/partition.c',
6967 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
6968 (grub_emu_SOURCES): Likewise.
6969 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
6970 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
6971 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
6972 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
6973 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
6974 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
6975 (grubof_SOURCES): Likewise.
6976 * disk/i386/pc/partition.c: File removed.
6977 * disk/powerpc/ieee1275/partition.c: Likewise.
6978 * include/grub/powerpc/ieee1275/partition.h: Likewise.
6979 * include/grub/i386/pc/partition.h: Likewise.
6980 * kern/partition.c: New file.
6981 * partmap/amiga.c: Likewise.
6982 * partmap/apple.c: Likewise.
6983 * partmap/pc.c: Likewise.
6984 * include/grub/partition.h: Likewise..
6985 * include/grub/pc_partition.h: Likewise.
6986 * util/grub-emu.c: Include <grub/partition.h> instead of
6987 <grub/machine/partition.h>.
6988 (main): Call `grub_pc_partition_map_init',
6989 `grub_amiga_partition_map_init' and
6990 `grub_apple_partition_map_init' and deinitialize afterwards.
6991 * util/i386/pc/biosdisk.c: Include `#include
6992 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
6993 `<grub/machine/partition.h>'.
6994 * util/i386/pc/grub-setup.c: Likewise.
6995 * util/i386/pc/biosdisk.c: Likewise.
6996 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
6997 partition information in case of a PC partition.
6998 * util/i386/pc/grub-setup.c: Include `#include
6999 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
7000 `<grub/machine/partition.h>'.
7001 (setup): Only access the PC specific partition information in case
7004 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
7006 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
7007 (grub_longjmp): Likewise.
7008 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
7010 * normal/powerpc/setjmp.S: New file.
7011 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
7012 `normal/powerpc/setjmp.S'.
7013 (grubof_CFLAGS): Add `-DGRUBOF'.
7014 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
7015 [GRUB_UTIL && !GRUBOF].
7017 2004-11-16 Marco Gerards <metgerards@student.han.nl>
7019 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
7020 property named `name'. Correctly handle the error returned by
7021 `grub_ieee1275_finddevice' if a device can not be opened.
7023 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
7025 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
7026 `actual' for negativity.
7027 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
7030 2004-11-01 Marco Gerards <metgerards@student.han.nl>
7032 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
7033 (PAGE_OFFSET): New macro.
7034 (CRTC_ADDR_PORT): Likewise.
7035 (CRTC_DATA_PORT): Likewise.
7036 (START_ADDR_HIGH_REGISTER): Likewise.
7037 (START_ADDR_LOW_REGISTER): Likewise.
7038 (GRAPHICS_ADDR_PORT): Likewise.
7039 (GRAPHICS_DATA_PORT): Likewise.
7040 (READ_MAP_REGISTER): Likewise.
7041 (INPUT_STATUS1_REGISTER): Likewise.
7042 (INPUT_STATUS1_VERTR_BIT): Likewise.
7043 (page): New variable.
7044 (wait_vretrace): New function.
7045 (set_read_map): Likewise.
7046 (set_start_address): Likewise.
7047 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
7049 (check_vga_mem): Take the page into account.
7050 (write_char): Likewise.
7051 (write_cursor): Likewise.
7052 (scroll_up): Likewise. Copy the page to the page that is not
7053 shown and switch between both pages.
7054 (grub_vga_putchar): Fix off by one error.
7055 (grub_vga_cls): Wait for the vertical retrace. Take the page into
7058 2004-11-01 Marco Gerards <metgerards@student.han.nl>
7060 Add support for iso9660 (including rockridge).
7062 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
7063 (iso9660_mod_SOURCES): New variable.
7064 (iso9660_mod_CFLAGS): Likewise.
7065 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
7066 * include/grub/fs.h (grub_iso9660_init): New prototype.
7067 * util/grub-emu.c (main): Call `grub_iso9660_init'.
7068 * fs/iso9660.c: New file.
7070 * include/grub/misc.h (grub_strncat): New prototype.
7071 * kern/misc.c (grub_strncat): New function.
7073 * fs/hfs.c (grub_hfs_mount): Translate the error
7074 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
7075 * fs/jfs.c (grub_jfs_mount): Likewise.
7076 * fs/ufs.c (grub_ufs_mount): Likewise.
7078 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
7080 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
7081 which initialized BAT registers.
7082 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
7083 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
7085 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
7086 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
7088 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
7089 (grub_mapclaim): Likewise.
7090 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
7091 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
7094 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
7096 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
7097 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
7098 -ffreestanding and -msoft-float.
7100 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
7102 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
7103 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
7104 set in grub_ieee1275_flags.
7106 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
7108 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
7110 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
7111 grub_console_init first.
7112 Change the memory range used for grub_ieee1275_claim and
7113 grub_mm_init_region.
7114 Print an error message if the claim fails.
7115 Include <grub/misc.h>.
7117 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
7119 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
7120 Call grub_children_iterate for device nodes of type `scsi',
7122 (grub_ofdisk_open): Remove manual device alias resolution.
7123 Fix memory leak when device cannot be opened.
7124 * include/grub/powerpc/ieee1275/ieee1275.h
7125 (grub_children_iterate): New prototype.
7126 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
7128 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
7129 Return -1 if args.size was -1.
7131 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
7133 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
7134 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
7135 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
7136 Open Firmware's memory for it; claim memory from _start to _end.
7137 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
7139 (_start): Zero BSS from __bss_start to _end.
7140 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
7142 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
7144 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
7146 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
7147 -1 if args.base was -1.
7149 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
7151 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
7152 escape sequence instead of a literal ^L. Also call
7153 grub_ofconsole_gotoxy.
7155 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
7157 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
7158 void * arguments to grub_addr_t. All callers updated. Also make
7159 the `result' argument optional.
7160 (grub_ieee1275_release): change void * arguments to grub_addr_t.
7161 All callers updated.
7163 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
7165 * commands/ls.c (grub_ls_list_files): Use the string following the
7166 initial ')', if present, as the filesystem path.
7167 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
7169 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
7171 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
7173 Make the source code of the menu interface more readable.
7175 * normal/menu.c: Include grub/mm.h.
7176 (TERM_WIDTH): New macro.
7177 (TERM_HEIGHT): Likewise.
7178 (TERM_INFO_HEIGHT): Likewise.
7179 (TERM_MARGIN): Likewise.
7180 (TERM_SCROLL_WIDTH): Likewise.
7181 (TERM_TOP_BORDER_Y): Likewise.
7182 (TERM_LEFT_BORDER_X): Likewise.
7183 (TERM_BORDER_WIDTH): Likewise.
7184 (TERM_MESSAGE_HEIGHT): Likewise.
7185 (TERM_BORDER_HEIGHT): Likewise.
7186 (TERM_NUM_ENTRIES): Likewise.
7187 (TERM_FIRST_ENTRY_Y): Likewise.
7188 (TERM_ENTRY_WIDTH): Likewise.
7189 (TERM_CURSOR_X): Likewise.
7190 (draw_border): Use macros instead of magic numbers.
7191 (print_entry): Likewise.
7192 (print_entries): Likewise.
7193 (run_menu): Likewise. Also, handle the key 'e'.
7194 (run_menu_entry): Ignore empty command lines.
7195 (print_message): Added a new argument EDIT. If EDIT is true,
7196 print a different message.
7197 (init_page): Likewise.
7198 (edit_menu_entry): New function. Not implemented yet.
7200 2004-09-17 Marco Gerards <metgerards@student.han.nl>
7202 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
7203 can be loaded from normal mode.
7205 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
7207 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
7208 (multiboot_mod_CFLAGS): New variables.
7209 * loader/i386/pc/linux_normal.c: New file.
7210 * loader/i386/pc/multiboot_normal.c: Likewise.
7212 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
7215 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
7216 `fdiro' to read the mode information from instead of `diro'.
7218 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
7219 looking up a symlink.
7221 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
7223 * normal/command.c (grub_command_execute): Don't parse the
7224 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
7225 flags of the command.
7227 * normal/menu.c (grub_menu_run): Fix typo.
7229 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
7231 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
7233 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
7234 `y + 1' instead of `y - 1'.
7236 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
7238 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
7240 From Hollis Blanchard <hollis@penguinppc.org>:
7241 * kern/misc.c (memmove): New alias for grub_memmove.
7242 (memcmp): New alias for grub_memcmp.
7243 (memset): New alias for grub_memset.
7244 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
7245 Change "int handle" to "grub_ieee1275_phandle_t handle".
7246 * include/grub/powerpc/ieee1275/ieee1275.h
7247 (grub_ieee1275_get_property): Likewise.
7249 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
7251 Added normal mode command `chainloader' as module chain.mod, which
7252 depends on normal.mod and _chain.mod.
7254 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
7255 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
7256 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
7258 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
7259 but arguments parsing moved to ...
7260 (grub_chainloader_cmd): ... here. New function.
7261 * include/grub/i386/pc/chainloader.h: New file.
7262 * loader/i386/pc/chainloader_normal.c: Likewise.
7264 2004-09-11 Marco Gerards <metgerards@student.han.nl>
7266 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
7267 (grub_mkimage_LDFLAGS): Likewise.
7268 (grub_emu_SOURCES): Likewise.
7269 (kernel_img_HEADERS): Added fshelp.h.
7270 * fs/ext2.c: Include <grub/fshelp.h>.
7271 (FILETYPE_REG): New macro.
7272 (FILETYPE_INO_REG): Likewise.
7273 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
7275 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
7277 (grub_fshelp_node): New struct.
7278 (grub_ext2_data): Added member `diropen'. Changed member `inode'
7280 (grub_ext2_get_file_block): Removed function.
7281 (grub_ext2_read_block): New function.
7282 (grub_ext2_read_file): Replaced parameter `data' by `node'.
7283 This function was written.
7284 (grub_ext2_mount): Read the root inode. Create a diropen struct.
7285 (grub_ext2_find_file): Removed function.
7286 (grub_ext2_read_symlink): New function.
7287 (grub_ext2_iterate_dir): Likewise.
7288 (grub_ext2_open): Rewritten.
7289 (grub_ext2_dir): Rewritten.
7290 * include/grub/fshelp.h: New file.
7291 * fs/fshelp.c: Likewise.
7293 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
7295 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
7296 (print_message): Add a missing newline.
7297 (run_menu): Added timeout support.
7298 (run_menu_entry): New local function.
7299 (grub_menu_run): Added support for booting.
7301 * kern/loader.c (grub_loader_is_loaded): New function.
7303 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
7304 (grub_get_rtc): Exported.
7306 * include/grub/i386/pc/time.h: Include grub/symbol.h.
7307 (grub_get_rtc): Exported.
7309 * include/grub/normal.h (struct grub_command_list): Remove
7310 constant from the member `command'.
7312 * include/grub/loader.h (grub_loader_is_loaded): Declared.
7314 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
7316 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
7318 2004-08-28 Marco Gerards <metgerards@student.han.nl>
7320 Add support for the JFS filesystem.
7322 * fs/jfs.c: New file.
7323 * include/grub/fs.h (grub_jfs_init): New prototype.
7324 (grub_jfs_fini): New prototype.
7325 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
7326 (grub_emu_SOURCES): Likewise.
7327 (pkgdata_MODULES): Add jfs.mod.
7328 (jfs_mod_SOURCES): New variable.
7329 (jfs_mod_CFLAGS): Likewise.
7330 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
7331 (grubof_SOURCES): Likewise.
7332 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
7334 * fs/fat.c (grub_fat_find_dir): Convert the filename little
7335 endian to the host endian.
7336 (grub_fat_utf16_to_utf8): Move function from there...
7337 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
7338 the endianess of the source string anymore.
7339 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
7341 2004-08-24 Marco Gerards <metgerards@student.han.nl>
7343 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
7344 (grub_boot_fini) [GRUB_UTIL]: Likewise.
7345 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
7346 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
7348 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
7349 (grub_hfs_iterate_dir): Make the function static. Add prototypes
7350 for `node_found' and `it_dir'.
7351 (grub_hfs_dir): Add prototype for `dir_hook'.
7353 * fs/minix.c (grub_minix_get_file_block): Add prototype for
7354 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
7355 and `indir32' to silence a gcc warning.
7357 * include/grub/fs.h (grub_hfs_init): New prototype.
7358 (grub_hfs_fini): Likewise.
7361 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
7363 Each disk device has its own id now. This is useful to make use
7364 of multiple disk devices.
7366 * include/grub/disk.h (grub_disk_dev_id): New enum.
7367 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
7368 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
7370 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
7371 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
7373 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
7374 GRUB_DISK_DEVICE_OFDISK_ID as an id.
7376 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
7377 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
7379 * include/grub/disk.h (struct grub_disk_dev): Added a new member
7380 "id" which is used by the cache manager.
7382 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
7385 2004-08-18 Marco Gerards <metgerards@student.han.nl>
7387 * fs/hfs.c: New file.
7388 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
7389 (grub_emu_SOURCES): Likewise.
7390 (pkgdata_MODULES): Add hfs.mod.
7391 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
7392 (grubof_SOURCES): Likewise.
7393 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
7395 * include/grub/misc.h (grub_strncasecmp): Add prototype.
7396 * kern/misc.c (grub_strncasecmp): Add function.
7398 2004-08-14 Marco Gerards <metgerards@student.han.nl>
7400 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
7403 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
7404 (grub_ext2_dir): In case the directory entry type is unknown, read
7407 2004-08-02 Peter Bruin <pjbruin@dds.nl>
7409 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
7410 grub_load_linux instead of grub_rescue_cmd_linux as second
7411 argument of grub_rescue_register_command.
7413 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
7415 2004-07-27 Marco Gerards <metgerards@student.han.nl>
7417 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
7419 * commands/boot.c: Remove the check for `GRUB_UTIL'.
7420 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
7421 `loader/powerpc/ieee1275/linux.c',
7422 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
7423 * include/grub/powerpc/ieee1275/ieee1275.h
7424 (grub_ieee1275_release): New prototype.
7425 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
7426 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
7427 normal, boot, linux and linux_normal.
7428 * loader/powerpc/ieee1275/linux.c: New file.
7429 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
7431 2004-07-12 Marco Gerards <metgerards@student.han.nl>
7433 * normal/arg.c (grub_arg_parse): Correct error handling after
7434 reallocating the argumentlist (check if `argl' is not null instead
7435 of checking if `args' is not null).
7436 * kern/mm.c (grub_realloc): Return the same pointer when using the
7437 same region, instead of returning the header address.
7439 2004-07-11 Marco Gerards <metgerards@student.han.nl>
7441 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
7442 one block instead of two when looking for the initial partition.
7443 (grub_partition_probe): Initialize the local variable `p' with 0.
7444 Use base 10 for the grub_strtoul call.
7445 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
7446 need for one local variable.
7447 (grub_strtoul): Don't add the new value to `num', instead of that
7450 2004-07-11 Marco Gerards <metgerards@student.han.nl>
7452 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
7453 (pxeboot_img_SOURCES): New variable.
7454 (pxeboot_img_ASFLAGS): Likewise.
7455 (pxeboot_img_LDFLAGS): Likewise.
7456 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
7457 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
7458 <lode_leroy@hotmail.com>.
7460 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
7462 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
7465 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
7467 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
7468 the history buffer logic.
7470 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
7472 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
7473 (FILETYPE_INO_SYMLINK): New macros.
7474 (grub_ext2_find_file): Check if the node is a directory using the
7475 inode stat information instead of using the filetype in the
7476 dirent. Exclude the first character of an absolute symlink.
7477 (grub_ext2_dir): Mask out the filetype part of the mode member of
7480 2004-05-24 Marco Gerards <metgerards@student.han.nl>
7482 Add support for UFS version 1 and 2. Add support for the minix
7483 filesystem version 1 and 2, both the variants with 14 and 30 long
7486 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
7488 (grub_emu_SOURCES): Likewise.
7489 (pkgdata_MODULES): Add ufs.mod and minix.mod.
7490 (ufs_mod_SOURCES): New variable.
7491 (ufs_mod_CFLAGS): Likewise.
7492 (minix_mod_SOURCES): Likewise.
7493 (minix_mod_CFLAGS): Likewise.
7494 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
7496 (grubof_SOURCES): Likewise.
7497 * fs/ufs.c: New file.
7498 * fs/minix.c: New file.
7499 * include/grub/fs.h (grub_ufs_init): New prototype.
7500 (grub_ufs_fini): Likewise.
7501 (grub_minix_init): Likewise.
7502 (grub_minix_fini): Likewise.
7503 * util/grub-emu.c (main): Initialize and deinitialize UFS and
7506 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
7508 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
7509 commands/ls.c, commands/terminal.c, commands/boot.c,
7510 commands/cmp.c and commands/cat.c.
7511 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
7513 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
7516 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
7518 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
7519 and grub_, respectively. Because the conversion is trivial and
7520 mechanical, I omit the details here. Please refer to the CVS
7521 if you need more information.
7523 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
7525 * include/pupa: Renamed to ...
7526 * include/grub: ... this.
7527 * util/i386/pc/pupa-mkimage.c: Renamed to ...
7528 * util/i386/pc/grub-mkimage.c: ... this.
7529 * util/i386/pc/pupa-setup.c: Renamed to ...
7530 * util/i386/pc/grub-setup.c: ... this.
7531 * util/pupa-emu.c: Renamed to ...
7532 * util/grub-emu.c: ... this.
7534 2004-03-29 Marco Gerards <metgerards@student.han.nl>
7536 Add support for the newworld apple macintosh (PPC). This has been
7537 tested on the powerbook 2000 only. It only adds support for
7538 generic ieee1275 functions, console and disk support. This should
7539 be easy to port to other architectures with support for Open
7542 * configure.ac: Accept the powerpc as host_cpu. In the case of
7543 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
7544 specific tests are only executed while building for the i386.
7545 Inverse test for crosscompile.
7546 * genmk.rb (Utility): Allow assembler files.
7547 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
7548 * conf/powerpc-ieee1275.rmk: New file.
7549 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
7550 * disk/powerpc/ieee1275/partition.c: Likewise.
7551 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
7552 * include/pupa/powerpc/ieee1275/console.h: Likewise.
7553 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
7554 * include/pupa/powerpc/ieee1275/time.h: Likewise.
7555 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
7556 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
7557 * include/pupa/powerpc/ieee1275/loader.h
7558 * include/pupa/powerpc/setjmp.h: Likewise.
7559 * include/pupa/powerpc/types.h: Likewise.
7560 * kern/powerpc/ieee1275/init.c: Likewise.
7561 * kern/powerpc/ieee1275/openfw.c: Likewise.
7562 * term/powerpc/ieee1275/ofconsole.c: Likewise.
7564 These files were written by Johan Rydberg
7565 (jrydberg@night.trouble.net) and I only modified them slightly.
7567 * boot/powerpc/ieee1275/cmain.c: New file.
7568 * boot/powerpc/ieee1275/crt0.S: Likewise.
7569 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
7570 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
7572 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
7574 * Makefile.in: Update copyright.
7575 * genmodsrc.sh: Likewise.
7576 * gensymlist.sh: Likewise.
7577 * term/i386/pc/vga.c: Indent correctly.
7579 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
7580 bugreporting address.
7581 * util/i386/pc/pupa-setup.c (usage): Likewise,
7582 (main): Call pupa_ext2_init and pupa_ext2_fini.
7584 * fs/fat.c (log2): Renamed to ...
7585 (fat_log2): ... this.
7586 All callers changed.
7587 * kern/misc.c (memcpy): Alias to pupa_memmove.
7588 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
7590 * util/console.c (pupa_ncurses_fini): Return 0.
7592 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
7593 Move fail label here.
7594 [__GNU__]: Don't warn when using stat.
7595 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
7596 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
7597 long int. Use strtol instead of strtoul.
7599 2004-03-14 Marco Gerards <metgerards@student.han.nl>
7601 * commands/boot.c: New file.
7602 * commands/cat.c: Likewise.
7603 * commands/cmp.c: Likewise.
7604 * commands/ls.c: Likewise.
7605 * commands/terminal.c: Likewise.
7606 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
7607 (pupa_register_command): Changed interface to match the new
7609 (pupa_command_execute): Changed (almost rewritten) so it uses
7610 pupa_split_command. Added support for setting variables using the
7612 (rescue_command): Changed to work with the new argument parser.
7613 (terminal_command): Moved from here to commands/terminal.c.
7614 (set_command): New function.
7615 (unset_command): New function.
7616 (insmod_command): New function.
7617 (rmmod_command): New function.
7618 (lsmod_command): New function.
7619 (pupa_command_init): Don't initialize the command terminal
7620 anymore. Initialize the commands set, unset, insmod, rmmod and
7622 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
7623 (kernel_img_HEADERS): Add arg.h and env.h.
7624 (pupa_mkimage_LDFLAGS): Add kern/env.c.
7625 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
7626 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
7628 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
7630 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
7631 (boot_mod_SOURCES): New variable.
7632 (terminal_mod_SOURCES): Likewise.
7633 (ls_mod_SOURCES): Likewise.
7634 (cmp_mod_SOURCES): Likewise.
7635 (cat_mod_SOURCES): Likewise.
7637 * normal/arg.c: New file.
7638 * kern/env.c: Likewise.
7639 * include/pupa/arg.h: Likewise.
7640 * include/pupa/env.h: Likewise.
7641 * font/manager.c (font_command): Changed to match argument parsing
7643 (PUPA_MOD_INIT): Likewise.
7644 * hello/hello.c (pupa_cmd_hello): Likewise.
7645 (PUPA_MOD_INIT): Likewise.
7646 * include/pupa/disk.h: Include <pupa/device.h>.
7647 (pupa_print_partinfo): New prototype.
7648 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
7649 (pupa_dl_get_prefix): Likewise.
7650 * include/pupa/misc.h: Include <pupa/err.h>.
7651 (pupa_isgraph): New prototype.
7652 (pupa_isdigit): Likewise.
7653 (pupa_split_cmdline): Likewise.
7654 * include/pupa/normal.h: Include <pupa/arg.h>.
7655 (pupa_command): Changed the prototype of the member `func' to
7656 match the argument parsing interface. Added member `options'.
7657 (pupa_register_command): Updated to match function.
7658 (pupa_arg_parse): New prototype.
7659 (pupa_hello_init) [PUPA_UTIL]: New prototype.
7660 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
7661 (pupa_ls_init) [PUPA_UTIL]: Likewise.
7662 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
7663 (pupa_cat_init) [PUPA_UTIL]: Likewise.
7664 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
7665 (pupa_boot_init) [PUPA_UTIL]: Likewise.
7666 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
7667 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
7668 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
7669 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
7670 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
7671 * kern/disk.c: Include <pupa/file.h>.
7672 (pupa_print_partinfo): New function.
7673 * kern/dl.c: Include <pupa/env.h>.
7674 (pupa_dl_dir): Variable removed.
7675 (pupa_dl_load): Use the environment variable `prefix' instead of
7676 the variable pupa_dl_dir.
7677 (pupa_dl_set_prefix): Function removed.
7678 (pupa_dl_get_prefix): Likewise.
7679 * kern/i386/pc/init.c: Include <pupa/env.h>.
7680 (pupa_machine_init): Use the environment variable `prefix' instead of
7681 using pupa_dl_set_prefix to set the prefix.
7682 * kern/main.c: Include <pupa/env.h>.
7683 (pupa_set_root_dev): Use the environment variable `prefix' instead of
7684 using pupa_dl_get_prefix to get the prefix.
7685 * kern/misc.c: Include <pupa/env.h>.
7686 (pupa_isdigit): New function.
7687 (pupa_isgraph): Likewise.
7688 (pupa_ftoa): Likewise.
7689 (pupa_vsprintf): Added support for printing values of the type
7690 `double'. Make it possible to format variable output when using
7691 formatting like `%1.2%f'.
7692 (pupa_split_cmdline): New function.
7693 * kern/rescue.c: Include <pupa/env.h>.
7694 (next_word): Removed function.
7695 (pupa_rescue_cmd_prefix): Likewise.
7696 (pupa_rescue_cmd_set): New function.
7697 (pupa_rescue_cmd_unset): New function.
7698 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
7699 split the command line instead of splitting it here. Added
7700 support for setting variables using the syntax `foo=bar'. Don't
7701 initialize the prefix command anymore. Initialized the set and
7703 * normal/cmdline.c: Include <pupa/env.h>.
7704 (pupa_tab_complete): Added prototypes for print_simple_completion,
7705 print_partition_completion, add_completion, iterate_commands,
7706 iterate_dev, iterate_part and iterate_dir. Moved code to print
7707 partition information from here to kern/disk.c.
7708 (pupa_cmdline_run): Don't check if the funtion exists anymore.
7709 * normal/main.c: Include <pupa/env.h>.
7710 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
7711 instead of using pupa_dl_get_prefix to get the prefix.
7712 * term/i386/pc/vga.c: Include <pupa/arg.h>.
7713 (check_vga_mem): Cast pointers to `void *' to silence a gcc
7715 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
7716 (pupa_vga_setcolor): Declare unused variables with `__attribute__
7717 ((unused))' to silence a gcc warning.
7718 (pupa_vga_setcolor): Likewise.
7719 (debug_command): Changed to match argument parsing
7721 * util/pupa-emu.c: Include <pupa/env.h>.
7722 (options): Added 0's for unused fields to silence a gcc warning.
7724 (main): Use the environment variable `prefix' instead of using
7725 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
7726 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
7729 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
7730 * util/misc.c: Include <malloc.h>.
7731 (pupa_malloc): Rewritten so errors are correctly reported.
7732 (pupa_realloc): Likewise.
7733 (pupa_memalign): Likewise.
7734 (pupa_mm_init_region): Declare unused variables with
7735 `__attribute__ ((unused))' to silence a gcc warning.
7736 * normal/i386/setjmp.S: Remove tab at the end of the file to
7737 silence a gcc warning.
7738 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
7739 variables with `__attribute__ ((unused))' to silence a gcc
7741 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
7742 local variable i unsigned to silence a gcc warning.
7744 * kern/term.c: Include <pupa/misc.h>.
7745 (pupa_more_lines): New variable.
7746 (pupa_more): Likewise.
7747 (pupa_putcode): When the pager is active pause at the end of every
7749 (pupa_set_more): New function.
7750 * include/pupa/term.h (pupa_set_more): New prototype.
7753 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
7755 Now this project is GRUB 2 rather than PUPA. The location of
7756 the CVS repository was moved to GRUB's.
7758 * configure.ac: Use bug-grub as the reporting address.
7759 Use GRUB instead of PUPA.
7760 Change the version number to 1.90.
7762 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
7764 * genkernsyms.sh: Updated copyright information.
7765 * genmk.rb: Likewise.
7766 * genmodsrc.sh: Likewise.
7767 * gensymlist.sh: Likewise.
7768 * boot/i386/pc/boot.S: Likewise.
7769 * boot/i386/pc/diskboot.S: Likewise.
7770 * disk/i386/pc/biosdisk.c: Likewise.
7771 * disk/i386/pc/partition.c: Likewise.
7772 * font/manager.c: Likewise.
7773 * fs/ext2.c: Likewise.
7774 * fs/fat.c: Likewise.
7775 * include/pupa/boot.h: Likewise.
7776 * include/pupa/device.h: Likewise.
7777 * include/pupa/disk.h: Likewise.
7778 * include/pupa/dl.h: Likewise.
7779 * include/pupa/elf.h: Likewise.
7780 * include/pupa/err.h: Likewise.
7781 * include/pupa/file.h: Likewise.
7782 * include/pupa/font.h: Likewise.
7783 * include/pupa/fs.h: Likewise.
7784 * include/pupa/kernel.h: Likewise.
7785 * include/pupa/loader.h: Likewise.
7786 * include/pupa/misc.h: Likewise.
7787 * include/pupa/mm.h: Likewise.
7788 * include/pupa/net.h: Likewise.
7789 * include/pupa/normal.h: Likewise.
7790 * include/pupa/rescue.h: Likewise.
7791 * include/pupa/setjmp.h: Likewise.
7792 * include/pupa/symbol.h: Likewise.
7793 * include/pupa/term.h: Likewise.
7794 * include/pupa/types.h: Likewise.
7795 * include/pupa/i386/setjmp.h: Likewise.
7796 * include/pupa/i386/types.h: Likewise.
7797 * include/pupa/i386/pc/biosdisk.h: Likewise.
7798 * include/pupa/i386/pc/boot.h: Likewise.
7799 * include/pupa/i386/pc/console.h: Likewise.
7800 * include/pupa/i386/pc/init.h: Likewise.
7801 * include/pupa/i386/pc/kernel.h: Likewise.
7802 * include/pupa/i386/pc/linux.h: Likewise.
7803 * include/pupa/i386/pc/loader.h: Likewise.
7804 * include/pupa/i386/pc/memory.h: Likewise.
7805 * include/pupa/i386/pc/multiboot.h: Likewise.
7806 * include/pupa/i386/pc/partition.h: Likewise.
7807 * include/pupa/i386/pc/time.h: Likewise.
7808 * include/pupa/i386/pc/vga.h: Likewise.
7809 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
7810 * include/pupa/util/getroot.h: Likewise.
7811 * include/pupa/util/misc.h: Likewise.
7812 * include/pupa/util/resolve.h: Likewise.
7813 * kern/device.c: Likewise.
7814 * kern/disk.c: Likewise.
7815 * kern/dl.c: Likewise.
7816 * kern/err.c: Likewise.
7817 * kern/file.c: Likewise.
7818 * kern/fs.c: Likewise.
7819 * kern/loader.c: Likewise.
7820 * kern/main.c: Likewise.
7821 * kern/misc.c: Likewise.
7822 * kern/mm.c: Likewise.
7823 * kern/rescue.c: Likewise.
7824 * kern/term.c: Likewise.
7825 * kern/i386/dl.c: Likewise.
7826 * kern/i386/pc/init.c: Likewise.
7827 * kern/i386/pc/lzo1x.S: Likewise.
7828 * kern/i386/pc/startup.S: Likewise.
7829 * loader/i386/pc/chainloader.c: Likewise.
7830 * loader/i386/pc/linux.c: Likewise.
7831 * loader/i386/pc/multiboot.c: Likewise.
7832 * normal/cmdline.c: Likewise.
7833 * normal/command.c: Likewise.
7834 * normal/main.c: Likewise.
7835 * normal/menu.c: Likewise.
7836 * normal/i386/setjmp.S: Likewise.
7837 * term/i386/pc/console.c: Likewise.
7838 * term/i386/pc/vga.c: Likewise.
7839 * util/console.c: Likewise.
7840 * util/genmoddep.c: Likewise.
7841 * util/misc.c: Likewise.
7842 * util/pupa-emu.c: Likewise.
7843 * util/resolve.c: Likewise.
7844 * util/unifont2pff.rb: Likewise.
7845 * util/i386/pc/biosdisk.c: Likewise.
7846 * util/i386/pc/getroot.c: Likewise.
7847 * util/i386/pc/pupa-mkimage.c: Likewise.
7848 * util/i386/pc/pupa-setup.c: Likewise.
7850 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
7852 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
7853 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
7854 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
7855 reading and reset it after reading.
7856 (pupa_ext2_close): Return PUPA_ERR_NONE.
7858 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
7860 (struct linux_kernel_header): Add kernel_version and
7862 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
7863 pupa_file_read succeeds.
7864 (pupa_rescue_cmd_initrd): Implement.
7866 2003-12-03 Marco Gerards <metgerards@student.han.nl>
7868 * fs/ext2.c (pupa_ext2_label): New function.
7869 (pupa_ext2_fs): Added label.
7870 * fs/fat.c (pupa_fat_label): New function.
7871 (pupa_fat_fs): Added label.
7872 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
7874 * kern/misc.c (pupa_strndup): New function.
7875 * include/pupa/misc.h (pupa_strndup): New prototype.
7877 * include/pupa/normal.h: Include <pupa/err.h>.
7878 (pupa_set_history): New prototype.
7879 (pupa_iterate_commands): New prototype.
7880 * normal/cmdline.c: Include <pupa/machine/partition.h>,
7881 <pupa/disk.h>, <pupa/file.h>.
7882 (hist_size): New variable.
7883 (hist_lines): Likewise.
7884 (hist_end): Likewise.
7885 (hist_used): Likewise.
7886 (pupa_set_history): New function.
7887 (pupa_history_get): Likewise.
7888 (pupa_history_add): Likewise.
7889 (pupa_history_replace): Likewise.
7890 (pupa_tab_complete): Likewise.
7891 (pupa_cmdline_run): Added tab completion and history buffer. Tab
7892 completion shows partitionnames while completing partitions, this
7893 feature was suggested by Jeff Bailey.
7894 * normal/command.c (pupa_iterate_commands): New function.
7895 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
7896 (pupa_normal_init): Initialize history buffer.
7897 (PUPA_MOD_INIT): Likewise.
7898 (pupa_normal_fini): Free the history buffer.
7899 (PUPA_MOD_FINI): Likewise.
7901 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
7904 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
7905 * configure.ac [i386]: Check for regparam bug.
7906 (NESTED_FUNC_ATTR) [! i386]: Defined.
7908 2003-11-17 Marco Gerards <metgerards@student.han.nl>
7910 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
7911 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
7912 (pupa_emu_SOURCES): New variable.
7913 (pupa_emu_LDFLAGS): Likewise.
7914 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
7915 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
7916 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
7917 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
7918 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
7919 (pupa_jmp_buf): New typedef.
7920 (pupa_setjmp) [PUPA_UTIL]: New macro.
7921 (pupa_longjmp) [PUPA_UTIL]: Likewise.
7922 * include/pupa/term.h (struct pupa_term): New member `refresh'.
7923 (pupa_refresh): New prototype.
7924 * include/pupa/util/getroot.h: New file.
7925 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
7927 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
7928 (pupa_rescue_cmd_cat): Likewise.
7929 (pupa_rescue_cmd_ls): Likewise.
7930 (pupa_rescue_cmd_testload): Likewise.
7931 (pupa_rescue_cmd_lsmod): Likewise.
7932 * normal/cmdline.c (pupa_cmdline_get): Likewise.
7933 * normal/menu.c (run_menu): Likewise.
7934 * kern/term.c (pupa_cls): Likewise.
7935 (pupa_refresh): New function.
7936 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
7937 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
7938 * util/console.c: New file.
7940 * util/i386/pc/getroot.c: New file.
7941 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
7942 (pupa_putchar): New function.
7943 (pupa_refresh): Likewise.
7944 (xgetcwd): Function moved to ...
7945 (strip_extra_slashes): Likewise.
7946 (get_prefix): Likewise.
7947 * util/i386/pc/getroot.c: ... here.
7948 (find_root_device): Function moved and renamed to...
7949 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
7950 Changed all callers.
7951 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
7953 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
7954 Changed all callers.
7955 * util/misc.c (pupa_memalign): New function.
7956 (pupa_mm_init_region): Likewise.
7957 (pupa_register_exported_symbols): Likewise.
7958 (pupa_putchar): Function removed.
7959 * util/pupa-emu.c: New file.
7961 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
7963 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
7964 (_multiboot_mod_SOURCES): New variable.
7965 (_multiboot_mod_CFLAGS): Likewise.
7966 * loader/i386/pc/multiboot.c: New file.
7967 * include/pupa/i386/pc/multiboot.h: Likewise.
7968 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
7969 (pupa_multiboot_real_boot): New function.
7970 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
7971 (pupa_multiboot_real_boot): New prototype.
7972 (pupa_rescue_cmd_multiboot): Likewise
7973 (pupa_rescue_cmd_module): Likewise.
7975 * kern/loader.c (pupa_loader_set): Continue when
7976 pupa_loader_unload_func() fails.
7977 (pupa_loader_unset): New function.
7978 * include/pupa/loader.h (pupa_loader_unset): New prototype.
7980 * kern/misc.c (pupa_stpcpy): New function.
7981 * include/pupa/misc.h (pupa_stpcpy): New prototype.
7983 2003-11-12 Marco Gerards <metgerards@student.han.nl>
7985 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
7986 for available extensions.
7988 * include/pupa/i386/pc/time.h: New file.
7989 * kern/disk.c: Include <pupa/machine/time.h>.
7990 (PUPA_CACHE_TIMEOUT): New macro.
7991 (pupa_last_time): New variable.
7992 (pupa_disk_open): Flush the cache when there was a timeout.
7993 (pupa_disk_close): Reset the timer.
7994 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
7996 * util/misc.c: Include <sys/times.h>
7997 (pupa_get_rtc): New function.
7999 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
8001 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
8003 (pupa_ext2_get_file_block): Use blocks member.
8005 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
8006 first block. Return -1 instead of pupa_errno on error.
8008 2003-10-27 Marco Gerards <metgerards@student.han.nl>
8010 * README: In the pupa-mkimage example use _chain instead of chain
8011 and ext2 instead of fat.
8012 * TODO: Replace ext2fs with jfs as an example. Add an item for
8013 adding journal playback for ext2fs.
8014 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
8015 (pkgdata_MODULES): Added ext2.mod.
8016 (ext2_mod_SOURCES): New variable.
8017 (ext2_mod_CFLAGS): Likewise.
8018 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
8019 * include/pupa/misc.h (pupa_strncpy): New prototype.
8020 (pupa_strcat): Likewise.
8021 (pupa_strncmp): Likewise.
8022 * kern/misc.c (pupa_strcat): Enable function.
8023 (pupa_strncpy): New function.
8024 (pupa_strncmp): Likewise.
8025 * fs/ext2.c: New file.
8027 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
8028 when the read failed before retrying.
8029 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
8030 (_FILE_OFFSET_BITS): Likewise.
8031 * configure.ac: Added AC_SYS_LARGEFILE.
8033 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
8035 * genmk.rb (PModule#rule): Make sure to get only symbol names
8036 from the output of nm.
8037 Reported by Robert Millan <zeratul2@wanadoo.es>.
8039 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
8041 I forgot to check in these changes for a long time. This adds
8042 incomplete support for VGA console, and this is still very
8043 buggy. Also, a lot of consideration is required for I18N,
8044 UNICODE, and VGA font issues. Therefore, assume that this is
8045 such that "better than nothing".
8047 * font/manager.c: New file.
8048 * include/pupa/font.h: Likewise.
8049 * include/pupa/i386/pc/vga.h: Likewise.
8050 * term/i386/pc/vga.c: Likewise.
8051 * util/unifont2pff.rb: Likewise.
8053 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
8054 (pkgdata_MODULES): Added vga.mod and font.mod.
8055 (vga_mod_SOURCES): New variables.
8056 (vga_mod_CFLAGS): Likewise.
8057 (font_mod_SOURCES): Likewise.
8058 (font_mod_CFLAGS): Likewise.
8060 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
8062 * include/pupa/term.h: Include pupa/err.h.
8063 (struct pupa_term): Added init and fini.
8064 Changed the argument of putchar to pupa_uint32_t.
8066 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
8067 (pupa_console_real_putchar): New prototype.
8068 (pupa_console_putchar): Removed.
8069 (pupa_console_checkkey): Exported.
8070 (pupa_console_getkey): Likewise.
8072 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
8075 * kern/term.c (pupa_term_set_current): Rewritten.
8076 (pupa_putchar): Likewise.
8077 (pupa_putcode): New function.
8079 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
8080 (pupa_console_real_putchar): ... this.
8081 (pupa_vga_set_mode): New function.
8082 (pupa_vga_get_font): Likewise.
8084 * normal/command.c: Include pupa/term.h.
8085 (terminal_command): New function.
8086 (pupa_command_init): Register the command "terminal".
8088 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
8089 (DISP_UP): Likewise.
8090 (DISP_RIGHT): Likewise.
8091 (DISP_DOWN): Likewise.
8092 (DISP_HLINE): Likewise.
8093 (DISP_VLINE): Likewise.
8094 (DISP_UL): Likewise.
8095 (DISP_UR): Likewise.
8096 (DISP_LL): Likewise.
8097 (DISP_LR): Likewise.
8099 * term/i386/pc/console.c (pupa_console_putchar): New function.
8101 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
8103 * util/resolve.c (pupa_util_resolve_dependencies): BUG
8104 FIX. Reverse the path_list.
8106 * include/pupa/normal.h: Export pupa_register_command and
8107 pupa_unregister_command.
8109 * hello/hello.c (pupa_cmd_hello): New module.
8110 * conf/i386-pc.rmk: Added hello.mod.
8112 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
8114 * kern/i386/pc/lzo1x.S: New file.
8116 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
8117 (compress_kernel): New variable.
8118 (generate_image): Heavily modified to support compressing a
8119 large part of the core image.
8121 * util/misc.c (pupa_util_read_image): Fix a file descriptor
8123 (pupa_util_load_image): New function.
8125 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
8126 (pupa_compressed_size): New variable.
8127 (codestart): Enable Gate A20 here.
8128 Decompress the compressed part of the core image.
8129 Rearrange the code to put functions and variables which are
8130 required for initialization in the non-compressed part.
8133 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
8136 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
8138 * include/pupa/i386/pc/kernel.h
8139 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
8140 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
8141 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
8142 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
8143 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
8145 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
8147 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
8148 (Utility#rule): Likewise.
8150 * configure.ac: Check if LZO is available.
8152 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
8154 * include/pupa/normal.h: New file.
8155 * include/pupa/setjmp.h: Likewise.
8156 * include/pupa/i386/setjmp.h: Likewise.
8157 * normal/cmdline.c: Likewise.
8158 * normal/command.c: Likewise.
8159 * normal/main.c: Likewise.
8160 * normal/menu.c: Likewise.
8161 * normal/i386/setjmp.S: Likewise.
8163 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
8164 (pupa_rescue_cmd_initrd): Likewise.
8166 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
8169 * kern/i386/pc/startup.S (translation_table): New variable.
8170 (translate_keycode): New function.
8171 (pupa_console_getkey): Call translate_keycode.
8173 * kern/rescue.c (attempt_normal_mode): New function.
8174 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
8175 it failed, print a message.
8177 * kern/mm.c (pupa_real_malloc): Print more information when a
8178 free magic is broken.
8179 (pupa_free): If the first free header is not free actually, set
8182 * kern/main.c (pupa_load_normal_mode): Just load the module
8184 (pupa_main): Don't print the message
8185 "Entering into rescue mode..." here.
8187 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
8189 (pupa_rescue_cmd_initrd): Likewise.
8190 (pupa_rescue_cmd_initrd): Likewise.
8192 * include/pupa/symbol.h (FUNCTION): Specify the type.
8193 (VARIABLE): Likewise.
8195 * include/pupa/err.h (pupa_err_t): Added
8196 PUPA_ERR_UNKNOWN_COMMAND.
8198 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
8199 (pupa_dl_get_prefix): Likewise.
8201 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
8202 Added _chain.mod and _linux.mod instead of chain.mod and
8204 (chain_mod_SOURCES): Renamed to ...
8205 (_chain_mod_SOURCES): ... this.
8206 (chain_mod_CFLAGS): Renamed to ...
8207 (_chain_mod_CFLAGS): ... this.
8208 (linux_mod_SOURCES): Renamed to ...
8209 (_linux_mod_SOURCES): ... this.
8210 (linux_mod_CFLAGS): Renamed to ...
8211 (_linux_mod_CFLAGS): ... this.
8212 (normal_mod_SOURCES): New variable.
8213 (normal_mod_CFLAGS): Likewise.
8214 (normal_mod_ASFLAGS): Likewise.
8216 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
8218 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
8221 * kern/dl.c (pupa_dl_ref): Refer dependending modules
8223 (pupa_dl_unref): Unrefer depending modules recursively.
8224 Don't call pupa_dl_unload implicitly, because PUPA can crash if
8225 a module is unloaded before one depending on that module is
8227 (pupa_dl_unload): Unload depending modules explicitly,
8230 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
8232 * include/pupa/i386/pc/linux.h: New file.
8233 * loader/i386/pc/linux.c: Likewise.
8235 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
8237 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
8238 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
8239 of PUPA_CHAINLOADER_BOOT_SECTOR.
8241 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
8242 (pupa_linux_prot_size): New variable.
8243 (pupa_linux_tmp_addr): Likewise.
8244 (pupa_linux_real_addr): Likewise.
8245 (pupa_linux_boot_zimage): New function.
8246 (pupa_linux_boot_bzimage): Likewise.
8248 * kern/i386/pc/init.c (struct mem_region): New structure.
8249 (MAX_REGIONS): New macro.
8250 (mem_regions): New variable.
8251 (num_regions): Likewise.
8252 (pupa_os_area_addr): Likewise.
8253 (pupa_os_area_size): Likewise.
8254 (pupa_lower_mem): Likewise.
8255 (pupa_upper_mem): Likewise.
8256 (add_mem_region): New function.
8257 (compact_mem_regions): Likewise.
8258 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
8259 the size of the conventional memory and that of so-called upper
8260 memory (before the first memory hole).
8261 Instead of adding each found region to free memory, use
8262 add_mem_region and add them after removing overlaps.
8263 Also, add only 1/4 of the upper memory to free memory. The rest
8264 is used for loading OS images. Maybe this is ad hoc, but this
8265 makes it much easier to relocate OS images when booting.
8267 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
8268 (pupa_enter_rescue_mode): Don't register initrd and module.
8270 * kern/mm.c: Include pupa/dl.h.
8272 * kern/main.c: Include pupa/file.h and pupa/device.h.
8274 * kern/loader.c (pupa_loader_load_module_func): Removed.
8275 (pupa_loader_load_module): Likewise.
8277 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
8280 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
8281 (pupa_linux_tmp_addr): Likewise.
8282 (pupa_linux_real_addr): Likewise.
8283 (pupa_linux_boot_zimage): Likewise.
8284 (pupa_linux_boot_bzimage): Likewise.
8286 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
8287 (pupa_upper_mem): Likewise.
8288 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
8289 module is too dangerous.
8291 * include/pupa/loader.h (pupa_os_area_addr): Declared.
8292 (pupa_os_area_size): Likewise.
8293 (pupa_loader_set): Remove the first argument. Loader doesn't
8294 manage modules or initrd any longer.
8295 (pupa_loader_load_module): Removed.
8297 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
8298 (linux_mod_SOURCES): New variable.
8299 (linux_mod_CFLAGS): Likewise.
8301 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
8303 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
8304 the length of a blocklist correctly.
8306 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
8307 Use ioctl only if the OS file is a block device.
8308 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
8309 not very useful for normal files.
8311 * kern/main.c (pupa_set_root_dev): New function.
8312 (pupa_load_normal_mode): Likewise.
8313 (pupa_main): Call those above.
8315 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
8318 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
8320 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8322 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
8323 (setup): Configure the installed partition information and the
8326 * loader/i386/pc/chainloader.c (my_mod): New variable.
8327 (pupa_chainloader_unload): New function.
8328 (pupa_rescue_cmd_chainloader): Refer itself.
8329 (PUPA_MOD_INIT): Save its own module in MY_MOD.
8331 * kern/i386/pc/startup.S (install_partition): Removed.
8332 (version_string): Likewise.
8333 (config_file): Likewise.
8334 (pupa_install_dos_part): New variable.
8335 (pupa_install_bsd_part): Likewise.
8336 (pupa_prefix): Likewise.
8337 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
8339 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
8341 (make_install_device): New function.
8342 (pupa_machine_init): Set the dl prefix.
8344 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
8345 (buf): Renamed to ...
8346 (linebuf): ... this.
8347 (pupa_rescue_cmd_prefix): New function.
8348 (pupa_rescue_cmd_insmod): Likewise.
8349 (pupa_rescue_cmd_rmmod): Likewise.
8350 (pupa_rescue_cmd_lsmod): Likewise.
8351 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
8354 * kern/mm.c (pupa_memalign): If failed even after invalidating
8355 disk caches, unload unneeded modules and retry.
8357 * kern/misc.c (pupa_memmove): New function.
8358 (pupa_memcpy): Removed.
8359 (pupa_strcpy): New function.
8360 (pupa_itoa): Made static.
8362 * kern/dl.c (pupa_dl_iterate): New function.
8363 (pupa_dl_ref): Likewise.
8364 (pupa_dl_unref): Likewise.
8365 (pupa_dl_unload): Return if succeeded or not.
8366 (pupa_dl_unload_unneeded): New function.
8367 (pupa_dl_unload_all): Likewise.
8368 (pupa_dl_init): Renamed to ...
8369 (pupa_dl_set_prefix): ... this.
8370 (pupa_dl_get_prefix): New function.
8372 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
8373 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
8374 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
8375 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
8376 (pupa_install_dos_part): Declared.
8377 (pupa_install_bsd_part): Likewise.
8378 (pupa_prefix): Likewise.
8379 (pupa_boot_drive): Likewise.
8381 * include/pupa/types.h: Fix a typo.
8383 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
8385 (pupa_memmove): Declared.
8386 (pupa_strcpy): Likewise.
8388 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
8389 pupa_mod_init takes one argument, its own module.
8390 (pupa_dl_unload_unneeded): Declared.
8391 (pupa_dl_unload_all): Likewise.
8392 (pupa_dl_ref): Likewise.
8393 (pupa_dl_unref): Likewise.
8394 (pupa_dl_iterate): Likewise.
8395 (pupa_dl_init): Renamed to ...
8396 (pupa_dl_set_prefix): ... this.
8397 (pupa_dl_get_prefix): Declared.
8399 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
8400 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
8402 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
8403 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
8405 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
8406 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
8408 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
8410 * util/i386/pc/pupa-setup.c (setup): Define the internal
8411 function find_first_partition_start at the top level, because GCC
8412 3.0.x cannot compile internal functions in deeper scopes
8414 (find_root_device): Use lstat instead of stat.
8415 Don't follow symbolic links.
8416 Fix the path-constructing code.
8418 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
8419 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
8420 by a BLKGETSIZE ioctl first, because block devices don't fill
8421 the member st_mode of the structure stat on Linux.
8422 [__linux__] (linux_find_partition): Use a temporary buffer
8423 REAL_DEV for the working space. Copy it to DEV before returning.
8424 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
8425 buffer cache consistent.
8426 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
8427 strncmp. The previous value was merely wrong.
8428 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
8430 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
8431 FAT size is 12. The previous value was merely wrong.
8433 * kern/main.c (pupa_main): Don't split the starting message from
8436 * kern/term.c (pupa_putchar): Put CR after LF instead of before
8437 LF, because BIOS goes crazy about character attributes in this
8440 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
8442 * include/i386/pc/util/biosdisk.h: New file.
8443 * util/i386/pc/biosdisk.c: Likewise.
8444 * util/i386/pc/pupa-setup.c: Likewise.
8446 * Makefile.in (INCLUDE_DISTFILES): Added
8447 include/pupa/i386/pc/util/biosdisk.h.
8448 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
8449 directory util/i386/pc.
8450 (install-local): Added a rule for sbin_UTILITIES.
8451 (uninstall): Likewise.
8453 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
8455 * util/misc.c (xrealloc): New function.
8456 (pupa_malloc): Likewise.
8457 (pupa_free): Likewise.
8458 (pupa_realloc): Likewise.
8459 (pupa_stop): Likewise.
8460 (pupa_putchar): Likewise.
8462 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
8464 * include/pupa/util/misc.h (xrealloc): Declared.
8466 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
8468 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
8469 (PUPA_BOOT_MACHINE_BPB_END): ... this.
8471 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
8472 [PUPA_UTIL] (pupa_fat_fini): Likewise.
8474 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
8475 way should be implemented.
8476 [PUPA_UTIL] (pupa_fat_fini): Likewise.
8478 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
8479 the size of NAME for safety.
8480 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
8483 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
8484 (pupa_setup_SOURCES): Likewise.
8486 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
8488 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
8490 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
8491 bunch of pushl's from pusha, because this destroys the return
8494 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
8496 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
8497 This means that any missing prototypes could be fatal. Also, you
8498 must take care when writing assembly code. See the comments at
8499 the beginning of startup.S, for more details.
8501 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
8502 compilation mechanism.
8503 (pupa_chainloader_real_boot): Likewise.
8504 (pupa_biosdisk_rw_int13_extensions): Likewise.
8505 (pupa_biosdisk_rw_standard): Likewise.
8506 (pupa_biosdisk_check_int13_extensions): Likewise.
8507 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
8508 (pupa_biosdisk_get_diskinfo_standard): Likewise.
8509 (pupa_get_memsize): Likewise.
8510 (pupa_get_mmap_entry): Likewise.
8511 (pupa_console_putchar): Likewise.
8512 (pupa_console_setcursor): Likewise.
8513 (pupa_getrtsecs): Use pushl instead of push.
8515 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
8516 memory instead of the stack for a mmap entry, because some
8517 BIOSes may ignore the maximum size and overflow.
8519 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
8521 * genmk.rb (PModule#rule): Compile automatically generated
8522 sources with module-specific CFLAGS as well as other sources.
8524 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
8526 * configure.ac: Check ld.
8527 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
8528 respectively, before checking endianness and sizes.
8530 * Makefile.in (LD): New variable.
8532 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
8534 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
8536 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
8538 * Changelog: New file.