1 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
3 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
6 2009-03-08 Robert Millan <rmh@aybabtu.com>
8 Make loader/i386/linux.c usable on i386-pc again.
10 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
12 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
15 2009-03-07 Bean <bean123ch@gmail.com>
17 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
20 2009-03-06 Robert Millan <rmh@aybabtu.com>
22 Fix display issue on terminals with screen size other than 80x25
23 (e.g. gfxterm with resolution higher than 640x480).
25 * normal/main.c (grub_normal_init_page): Display title text in a
26 position relative to the center of the terminal instead of reliing
27 on a hardcoded offset.
29 2009-03-04 Robert Millan <rmh@aybabtu.com>
31 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
34 * Makefile.in (host_kernel): New variable.
35 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
36 scripts instead of just the windows one.
37 * configure.ac: Initialize and AC_SUBST `host_kernel'.
39 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
41 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
43 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
44 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
45 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
46 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
47 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
48 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
50 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
52 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
53 or if there's no space for the disk label and print the partition number on a
56 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
58 * util/misc.c: Include <time.h>.
59 (grub_millisleep): New function.
61 2009-03-04 Bean <bean123ch@gmail.com>
63 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
64 another option -mno-red-zone.
66 * commands/handler.c: Change module description.
68 * kern/handler.c: Add missing space at the end of description line.
70 * kern/list.c: Likewise.
72 2009-03-03 Robert Millan <rmh@aybabtu.com>
74 Move more components to the relocation area, and fix mbi pointer
75 handling to use the destination rather than the origin (thanks to
76 Vladimir Serbinenko for spotting).
78 * loader/i386/multiboot.c (mbi_dest): New variable.
79 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
80 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
83 2009-03-01 Bean <bean123ch@gmail.com>
85 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
86 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
87 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
88 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
90 * loader/i386/efi/linux.c (acpi_guid): New variable.
91 (acpi_guid): Likewise.
92 (EBDA_SEG_ADDR): New constant.
93 (LOW_MEM_ADDR): Likewise.
94 (FAKE_EBDA_SEG): Likewise.
95 (fake_bios_data): New function.
96 (grub_linux_boot): Call fake_bios_data.
98 2009-03-01 Bean <bean123ch@gmail.com>
100 * commands/terminal.c: Removed.
102 * commands/handler.c: New file.
104 * include/grub/list.h: Likewise.
106 * include/grub/handler.h: Likewise.
108 * kern/list.c: Likewise.
110 * kern/handler.c: Likewise.
112 * kern/term.h: Include header file <grub/handler.h>.
113 (grub_term_input): Move next field to the beginning.
114 (grub_term_output): Likewise.
115 (grub_term_input_class): New variable.
116 (grub_term_output_class): Likewise.
117 (grub_term_register_input): Changed to inline function.
118 (grub_term_register_output): Likewise.
119 (grub_term_unregister_input): Likewise.
120 (grub_term_unregister_output): Likewise.
121 (grub_term_set_current_input): Likewise.
122 (grub_term_set_current_output): Likewise.
123 (grub_term_get_current_input): Likewise.
124 (grub_term_get_current_output): Likewise.
125 (grub_term_iterate_input): Removed.
126 (grub_term_iterate_output): Likewise.
128 * kern/term.c (grub_term_list_input): Removed.
129 (grub_term_list_output): Likewise.
130 (grub_term_input_class): New variable.
131 (grub_term_output_class): Likewise.
132 (grub_cur_term_input): Change variable as macro.
133 (grub_cur_term_output): Likewise.
134 (grub_term_register_input): Removed.
135 (grub_term_register_output): Likewise.
136 (grub_term_unregister_input): Likewise.
137 (grub_term_unregister_output): Likewise.
138 (grub_term_set_current_input): Likewise.
139 (grub_term_set_current_output): Likewise.
140 (grub_term_iterate_input): Likewise.
141 (grub_term_iterate_output): Likewise.
142 (grub_term_get_current_input): Likewise.
143 (grub_term_get_current_output): Likewise.
145 * util/grub-editenv.c: Include header file <grub/handler.h>.
146 (grub_term_get_current_input): Removed.
147 (grub_term_get_current_output): Likewise.
148 (grub_term_input_class): New variable.
149 (grub_term_output_class): Likewise.
151 * util/grub-fstest.c (grub_term_get_current_input): Removed.
152 (grub_term_get_current_output): Likewise.
153 (grub_term_input_class): New variable.
154 (grub_term_output_class): Likewise.
156 * util/grub-probe.c (grub_term_get_current_input): Removed.
157 (grub_term_get_current_output): Likewise.
158 (grub_term_input_class): New variable.
159 (grub_term_output_class): Likewise.
161 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
162 (grub_term_get_current_output): Likewise.
163 (grub_term_input_class): New variable.
164 (grub_term_output_class): Likewise.
166 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
167 (terminal_mod_SOURCES): Likewise.
168 (terminal_mod_CFLAGS): Likewise.
169 (terminal_mod_LDFLAGS): Likewise.
171 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
173 (kernel_img_SOURCES): Add list.c and handler.c.
174 (kernel_img_HEADERS): Add list.h and handler.h.
176 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
178 (kernel_mod_SOURCES): Add list.c and handler.c.
179 (kernel_mod_HEADERS): Add list.h and handler.h.
181 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
183 (kernel_elf_SOURCES): Add list.c and handler.c.
184 (kernel_elf_HEADERS): Add list.h and handler.h.
186 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
188 (kernel_elf_SOURCES): Add list.c and handler.c.
189 (kernel_elf_HEADERS): Add list.h and handler.h.
191 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
193 (kernel_mod_SOURCES): Add list.c and handler.c.
194 (kernel_mod_HEADERS): Add list.h and handler.h.
196 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
198 (kernel_elf_SOURCES): Add list.c and handler.c.
199 (kernel_elf_HEADERS): Add list.h and handler.h.
201 2009-02-27 Robert Millan <rmh@aybabtu.com>
203 Factorize elf32 / elf64 code in Multiboot loader. This will
204 prevent it from getting out of sync again.
206 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
207 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
208 grub_multiboot_load_elf64): Move from here ...
209 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
210 grub_multiboot_load_elf): ... to here (new file).
212 2009-02-27 Robert Millan <rmh@aybabtu.com>
214 * util/grub.d/10_linux.in: Rename "single-user mode" to
217 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
219 Don't leak in SCSI code.
220 * disk/scsi.c (grub_scsi_close): free `scsi'.
222 2009-02-27 Robert Millan <rmh@aybabtu.com>
224 * loader/i386/pc/multiboot.c: Move from here ...
225 * loader/i386/multiboot.c: ... to here. Update all users.
227 2009-02-27 Robert Millan <rmh@aybabtu.com>
229 Patch from Alexandre Bique <bique.alexandre@gmail.com>
230 * util/i386/pc/grub-setup.c (setup): Fix directory path.
232 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
234 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
237 2009-02-27 Robert Millan <rmh@aybabtu.com>
239 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
240 `0x' qualifier as 0 when base is specified as parameter).
242 2009-02-24 Bean <bean123ch@gmail.com>
244 * configure.ac: Check for -mcmodel=large in x86_64 target.
246 * include/grub/efi/api.h (efi_call_10): New macro.
247 (efi_wrap_10): New function.
249 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
250 (GRUB_PE32_REL_BASED_HIGH): Likewise.
251 (GRUB_PE32_REL_BASED_LOW): Likewise.
252 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
253 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
254 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
255 (GRUB_PE32_REL_BASED_SECTION): Likewise.
256 (GRUB_PE32_REL_BASED_REL): Likewise.
257 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
258 (GRUB_PE32_REL_BASED_DIR64): Likewise.
259 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
261 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
264 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
265 (efi_wrap_10): New function.
267 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
269 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
270 MB/MBP model (NV chipset).
271 (devdata_devs): Add devpath_5 to the list.
273 * load/i386/efi/linux.c (video_base): Remove variable.
274 (RGB_MASK): New macro.
275 (RGB_MAGIC): Likewise.
276 (LINE_MIN): Likewise.
277 (LINE_MAX): Likewise.
278 (FBTEST_STEP): Likewise.
279 (FBTEST_COUNT): Likewise.
280 (fb_list): New variable.
281 (grub_find_video_card): Remove function.
282 (find_framebuf): New function.
283 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
286 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
289 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
291 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
293 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
296 2009-02-22 Robert Millan <rmh@aybabtu.com>
298 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
299 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
300 in our relocation, instead of using it directly from heap. Also
301 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
303 2009-02-21 Robert Millan <rmh@aybabtu.com>
305 Implement USB keyboard support (based on patch by Marco Gerards)
307 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
308 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
309 (usb_keyboard_mod_LDFLAGS): New variables.
311 * term/usb_keyboard.c: New file.
313 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
315 Corrected wrong declaration
317 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
319 2009-02-14 Christian Franke <franke@computer.org>
321 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
322 (grub_lspci_iter): Print class code and programming interface byte.
324 2009-02-14 Christian Franke <franke@computer.org>
326 * gendistlist.sh: Ignore `.svn' directories.
328 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
330 * fs/fat.c: Add 2009 to Copyright line.
332 2009-02-14 Christian Franke <franke@computer.org>
334 * commands/hdparm.c: New file. Provides `hdparm' command
335 which sends ATA commands via grub_disk_ata_pass_through ().
337 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
339 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
340 and <grub/cpu/io.h> to include/grub/ata.h.
341 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
342 (GRUB_CDROM_SECTOR_SIZE): Remove.
343 (GRUB_ATA_*): Move to include/grub/ata.h.
344 (GRUB_ATAPI_*): Likewise.
345 (enum grub_ata_commands): Likewise.
346 (enum grub_ata_timeout_milliseconds): Likewise.
347 (struct grub_ata_device): Likewise.
348 (grub_ata_regset): Likewise.
349 (grub_ata_regget): Likewise.
350 (grub_ata_regset2): Likewise.
351 (grub_ata_regget2): Likewise.
352 (grub_ata_check_ready): Likewise.
353 (grub_ata_wait_not_busy): Remove static, exported in
355 (grub_ata_wait_drq): Likewise.
356 (grub_ata_pio_read): Likewise.
358 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
359 function for hdparm.mod.
361 * include/grub/ata.h: New file, contains declarations from
363 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
365 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
366 (grub_disk_ata_pass_through): New exported variable.
368 * kern/disk.c (grub_disk_ata_pass_through): New variable.
370 2009-02-13 Colin D Bennett <colin@gibibit.com>
372 Support multiple fallback entries, and provide an API to support
373 executing default+fallback menu entries. Renamed the `terminal' menu
376 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
377 variable declaration.
378 (grub_menu_execute_callback): New structure declaration.
379 (grub_menu_execute_callback_t): New typedef.
380 (grub_menu_execute_with_fallback): New function declaration.
381 (grub_menu_get_entry): Likewise.
382 (grub_menu_get_timeout): Likewise.
383 (grub_menu_set_timeout): Likewise.
385 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
387 * normal/menu.c (grub_wait_after_message): Moved to
388 `normal/menu_text.c'.
389 (draw_border): Likewise.
390 (print_message): Likewise.
391 (print_entry): Likewise.
392 (print_entries): Likewise.
393 (grub_menu_init_page): Likewise.
394 (get_entry_number): Likewise.
395 (print_timeout): Likewise.
396 (run_menu): Likewise.
397 (grub_menu_execute_entry): Likewise.
398 (show_text_menu): Likewise.
399 (get_and_remove_first_entry_number): New function.
400 (grub_menu_execute_with_fallback): Likewise.
401 (get_entry): Renamed to ...
402 (grub_menu_get_entry): .. this and made it global.
403 (get_timeout): Renamed to ...
404 (grub_menu_get_timeout): ... this and made it global.
405 (set_timeout): Renamed to ...
406 (grub_menu_set_timeout): ... this and made it global.
407 (grub_normal_terminal_menu_viewer): Renamed to ...
408 (grub_normal_text_menu_viewer): ... this.
410 * normal/menu_text.c: New file. Extracted text-menu-specific code
413 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
414 (normal_mod_SOURCES): Likewise.
416 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
417 (normal_mod_SOURCES): Likewise.
419 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
420 (normal_mod_SOURCES): Likewise.
422 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
423 (normal_mod_SOURCES): Likewise.
425 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
426 (normal_mod_SOURCES): Likewise.
428 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
429 (normal_mod_SOURCES): Likewise.
431 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
432 (normal_mod_SOURCES): Likewise.
434 2009-02-11 Robert Millan <rmh@aybabtu.com>
436 * util/grub.d/00_header.in: Update old reference to `font' command.
438 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
440 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
442 Based on patch from Javier MartÃn.
444 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
446 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
447 to avoid false positives with FAT.
448 (grub_fstest_SOURCES): Likewise.
449 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
450 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
451 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
452 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
453 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
454 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
456 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
458 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
459 bpb.version_specific.fat12_or_fat16.fstype and
460 bpb.version_specific.fat32.fstype.
462 2009-02-08 Robert Millan <rmh@aybabtu.com>
464 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
466 2009-02-08 Robert Millan <rmh@aybabtu.com>
468 * Makefile.in (host_os, host_cpu): New variables.
469 (target_os): Remove. Update all users.
471 2009-02-08 Marco Gerards <marco@gnu.org>
473 * Makefile.in (enable_grub_emu_usb): New variable.
474 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
475 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
476 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
477 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
478 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
479 `usbtest.mod' and `usbms.mod'.
480 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
481 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
482 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
483 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
484 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
487 * disk/usbms.c: New file.
489 * include/grub/usb.h: Likewise.
491 * include/grub/usbtrans.h: Likewise.
493 * include/grub/usbdesc.h: Likewise.
495 * bus/usb/usbtrans.c: Likewise.
497 * bus/usb/ohci.c: Likewise.
499 * bus/usb/uhci.c: Likewise.
501 * bus/usb/usbhub.c: Likewise.
503 * bus/usb/usb.c: Likewise.
505 * commands/usbtest.c: Likewise.
507 * util/usb.c: Likewise.
509 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
511 * configure.ac: Test for libusb presence.
513 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
515 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
517 * kern/mm.c: Add more comments.
519 2009-02-08 Robert Millan <rmh@aybabtu.com>
521 Patch from Javier MartÃn.
522 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
523 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
525 2009-02-08 Robert Millan <rmh@aybabtu.com>
527 * fs/cpio.c: Split tar functionality to ...
528 * fs/tar.c: ... here (new file). Update all users.
530 2009-02-07 Robert Millan <rmh@aybabtu.com>
532 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
533 backward-incompatible features.
535 Based on patch from Javier MartÃn, with some adjustments.
537 2009-02-07 Michael Scherer <misc@mandriva.org>
539 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
541 2009-02-07 Robert Millan <rmh@aybabtu.com>
543 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
544 position of `disk/lvm.c' to ensure grub_init_all() always picks it
545 after the RAID stuff.
547 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
549 Fixes problem when running vbetest command as reported by
550 Vladimir Serbinenko <phcoder@gmail.com>.
552 * (grub_vbe_set_video_mode): Fixed problem with text modes.
554 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
556 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
557 /dev/md/NpN style mdraid devices.
559 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
561 * util/unifont2pff.rb: Remove.
563 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
565 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
568 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
570 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
571 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
572 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
573 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
574 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
575 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
576 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
578 2009-02-02 Christian Franke <franke@computer.org>
580 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
582 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
584 * INSTALL: Note that we now require at least autoconf 2.59 and
585 that LZO is optional.
587 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
589 Base on patch on bug #24154 created by Tomas Tintera
592 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
594 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
596 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
599 * normal/parser.y (script_init): Add missing semicolon.
601 2009-01-31 Colin D Bennett <colin@gibibit.com>
603 * normal/main.c: Add include to grub/menu_viewer.h.
604 (free_menu_entry_classes): Added.
605 (grub_normal_menu_addentry): Added class property handling.
606 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
607 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
609 * normal/menu_viewer.c: New file.
611 * normal/menu.c (run_menu_entry): Renamed to ...
612 (grub_menu_execute_entry): ... this and made it as global.
613 (grub_menu_run): Renamed to ...
614 (show_text_menu): ... this and made it local.
615 (show_text_menu): Adapt to new function names.
616 (grub_normal_terminal_menu_viewer): New global variable.
618 * include/grub/menu.h: New file.
620 * include/grub/menu_viewer.h: New file.
622 * include/grub/normal.h: Added include to grub/menu.h.
623 (grub_menu_entry): Moved to include/grub/menu.h.
624 (grub_menu_entry_t): Likewise.
625 (grub_menu): Likewise.
626 (grub_menu_t): Likewise.
627 (grub_normal_terminal_menu_viewer): Added.
628 (grub_menu_execute_entry): Likewise.
629 (grub_menu_run): Removed.
631 * DISTLIST: Added include/grub/menu.h.
632 Added include/grub/menu_viewer.h.
633 Added normal/menu_viewer.c.
635 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
637 * normal/execute.c (grub_script_execute_menuentry): Changed to use
638 arglist for menutitle arguments.
640 * normal/main.c (grub_normal_menu_addentry): Likewise.
642 * normal/parser.y (menuentry): Likewise.
644 * normal/script.c (grub_script_create_cmdmenu): Likewise.
646 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
647 (grub_script_create_cmdmenu): Likewise.
649 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
651 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
654 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
656 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
658 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
660 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
662 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
664 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
666 2009-01-30 Christian Franke <franke@computer.org>
668 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
671 2009-01-27 Pavel Roskin <proski@gnu.org>
673 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
675 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
677 * commands/lsmmap.c: Add include to grub/machine/memory.h.
679 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
681 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
684 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
686 * disk/scsi.c (grub_scsi_read): Fix sign problem.
688 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
690 * util/grub-mkfont.c (usage): Fix typo.
692 * util/elf/grub-mkimage.c (load_modules): Fix warning.
694 2009-01-26 Daniel Mierswa <impulze@impulze.org>
696 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
698 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
700 * kern/misc.c (grub_strcasecmp): New function.
701 (grub_strcasecmp): Use grub_size_t instead of int for length.
703 * include/grub/misc.h: Update function prototypes.
705 2009-01-26 Robert Millan <rmh@aybabtu.com>
707 * configure.ac: Fix cross-compilation check.
709 2009-01-22 Christian Franke <franke@computer.org>
711 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
712 (precision) digit string. Allow `.format2' without `format1' (width).
713 Limit input chars for `%s' output to `format2' if specified. This is
714 compatible with standard printf ().
716 2009-01-22 Christian Franke <franke@computer.org>
718 * disk/ata.c (grub_ata_wait_status): Replace by ...
719 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
720 other status bits may be invalid while BSY is asserted.
721 (grub_ata_check_ready): New function.
722 (grub_ata_cmd): Removed.
723 (grub_ata_wait_drq): New function.
724 (grub_ata_strncpy): Remove inline.
725 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
726 and error check now done by grub_ata_wait_drq ().
727 (grub_ata_pio_write): Likewise.
728 (grub_atapi_identify): Set DEV before check for !BSY. Use
729 grub_ata_wait_drq () to wait for data.
730 (grub_ata_device_initialize): Add status register check to
731 detect missing SATA slave devices. Add debug messages.
732 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
733 (grub_atapi_packet): Set DEV before check for !BSY. Replace
734 transfer loop by grub_ata_pio_write ().
735 (grub_ata_identify): Set DEV before check for !BSY. Use
736 grub_ata_wait_drq () to wait for data.
737 (grub_ata_setaddress): Set DEV before check for !BSY.
738 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
739 read/write in one loop. Fix invalid command on write. Fix incomplete
740 command on (size % batch) == 0. Add missing error check after write of
741 last block. Add debug messages.
742 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
744 2009-01-19 Christian Franke <franke@computer.org>
746 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
747 (GRUB_ATAPI_IREASON_*): Likewise.
748 (grub_ata_pio_write): Fix timeout error return.
749 (grub_atapi_identify): Add grub_ata_wait () after cmd.
750 (grub_atapi_wait_drq): New function.
751 (grub_atapi_packet): New parameter `size'.
752 Use grub_atapi_wait_drq () and direct write instead of
753 grub_ata_pio_write ().
754 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
755 reads the number of bytes requested by the device for each DRQ
757 (grub_atapi_write): Remove old implementation, return not
760 2009-01-19 Christian Franke <franke@computer.org>
762 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
763 of 512 to calculate data size.
764 (grub_scsi_read12): Likewise.
765 (grub_scsi_write10): Likewise.
766 (grub_scsi_write12): Likewise.
767 (grub_scsi_read): Adjust size according to blocksize.
768 Add checks for invalid blocksize and unaligned transfer.
770 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
772 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
774 * term/gfxterm.c (write_char): Fix background rendering for wide
777 2009-01-19 Robert Millan <rmh@aybabtu.com>
779 * config.guess: Update to latest version from config git.
780 * config.sub: Likewise.
782 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
784 * Makefile.in: Change font compilation to use new grub-mkfont instead
787 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
788 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
789 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
790 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
791 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
792 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
793 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
794 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
795 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
797 2009-01-16 Christian Franke <franke@computer.org>
799 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
800 (enum grub_ata_timeout_milliseconds): New enum.
801 (grub_ata_wait_status): Add parameter milliseconds.
802 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
803 recovery from timed-out commands.
804 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
805 return grub_errno instead of REG_ERROR.
806 (grub_ata_pio_write): Add parameter milliseconds.
807 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
808 Pass milliseconds to grub_ata_wait_status () and
809 grub_ata_pio_read ().
810 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
811 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
812 grub_ata_wait_status (). Fix IDENTIFY timeout check.
813 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
814 It is not suitable for device detection, because DEV bit is ignored,
815 the command may run too long, and not all devices set the signature
817 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
818 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
819 Fix device selection, DEV bit must be set first to address the registers
820 of the correct device.
821 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
822 grub_ata_pio_read/write ().
823 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
824 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
826 2009-01-13 Carles Pina i Estany <carles@pina.cat>
828 * util/grub-editenv.c (main): Use fseeko(), not fseek().
830 2009-01-13 Bean <bean123ch@gmail.com>
832 * util/grub-mkfont.c (write_font): forget to remove some debug code.
834 2009-01-13 Bean <bean123ch@gmail.com>
836 * Makefile.in: (enable_grub_mkfont): New variable.
837 (freetype_cflags): Likewise.
838 (freetype_libs): Likewise.
840 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
841 (grub_mkfont_SOURCES): New variable.
842 (grub_mkfont_CFLAGS): Likewise.
843 (grub_mkfont_LDFLAGS): Likewise.
845 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
846 library if `--enable-grub-mkfont' is requested.
847 (enable_grub_mkfont): New variable.
848 (freetype_cflags): Likewise.
849 (freetype_libs): Likewise.
851 * util/grub-mkfont.c: New file.
853 2009-01-12 Christian Franke <franke@computer.org>
855 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
856 mode check. Fix setting of compat_use[].
858 2009-01-10 Robert Millan <rmh@aybabtu.com>
860 Update a few copyright years which we forgot to do in 2008 (only for
861 files whose changes made in 2008 were copyright-significant)
863 * Makefile.in: Add 2008 to Copyright line.
864 * disk/ieee1275/ofdisk.c: Likewise.
865 * disk/efi/efidisk.c: Likewise.
866 * kern/dl.c: Likewise.
867 * kern/sparc64/ieee1275/init.c: Likewise.
868 * kern/mm.c: Likewise.
869 * kern/efi/mm.c: Likewise.
870 * boot/i386/pc/boot.S: Likewise.
871 * genfslist.sh: Likewise.
872 * fs/iso9660.c: Likewise.
873 * fs/hfs.c: Likewise.
874 * fs/jfs.c: Likewise.
875 * fs/minix.c: Likewise.
876 * fs/ufs.c: Likewise.
877 * gensymlist.sh.in: Likewise.
878 * genkernsyms.sh.in: Likewise.
879 * include/grub/misc.h: Likewise.
880 * include/grub/types.h: Likewise.
881 * include/grub/symbol.h: Likewise.
882 * include/grub/elf.h: Likewise.
883 * include/grub/kernel.h: Likewise.
884 * include/grub/disk.h: Likewise.
885 * include/grub/dl.h: Likewise.
886 * include/grub/i386/linux.h: Likewise.
887 * include/grub/i386/pc/biosdisk.h: Likewise.
888 * include/grub/efi/api.h: Likewise.
889 * include/grub/efi/pe32.h: Likewise.
890 * include/grub/util/misc.h: Likewise.
891 * normal/execute.c: Likewise.
892 * normal/arg.c: Likewise.
893 * normal/completion.c: Likewise.
894 * normal/lexer.c: Likewise.
895 * normal/parser.y: Likewise.
896 * normal/misc.c: Likewise.
897 * commands/i386/pc/vbeinfo.c: Likewise.
898 * commands/hexdump.c: Likewise.
899 * commands/terminal.c: Likewise.
900 * commands/ls.c: Likewise.
901 * commands/help.c: Likewise.
902 * partmap/pc.c: Likewise.
903 * loader/efi/chainloader.c: Likewise.
904 * loader/multiboot_loader.c: Likewise.
905 * loader/i386/pc/multiboot2.c: Likewise.
906 * term/efi/console.c: Likewise.
907 * term/i386/pc/serial.c: Likewise.
908 * util/lvm.c: Likewise.
909 * util/console.c: Likewise.
910 * util/i386/efi/grub-mkimage.c: Likewise.
911 * util/raid.c: Likewise.
913 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
915 * commands/videotest.c: Removed include to grub/machine/memory.h.
917 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
918 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
919 (video_mod_SOURCES): Removed.
920 (video_mod_CFLAGS): Likewise.
921 (video_mod_LDFLAGS): Likewise.
922 (gfxterm_mod_SOURCES): Likewise.
923 (gfxterm_mod_CFLAGS): Likewise.
924 (gfxterm_mod_LDFLAGS): Likewise.
925 (videotest_mod_SOURCES): Likewise.
926 (videotest_mod_CFLAGS): Likewise.
927 (videotest_mod_LDFLAGS): Likewise.
928 (bitmap_mod_SOURCES): Likewise.
929 (bitmap_mod_CFLAGS): Likewise.
930 (bitmap_mod_LDFLAGS): Likewise.
931 (tga_mod_SOURCES): Likewise.
932 (tga_mod_CFLAGS): Likewise.
933 (tga_mod_LDFLAGS): Likewise.
934 (jpeg_mod_SOURCES): Likewise.
935 (jpeg_mod_CFLAGS): Likewise.
936 (jpeg_mod_LDFLAGS): Likewise.
937 (png_mod_SOURCES): Likewise.
938 (png_mod_CFLAGS): Likewise.
939 (png_mod_LDFLAGS): Likewise.
941 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
942 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
943 (video_mod_SOURCES): Added.
944 (video_mod_CFLAGS): Likewise.
945 (video_mod_LDFLAGS): Likewise.
946 (videotest_mod_SOURCES): Likewise.
947 (videotest_mod_CFLAGS): Likewise.
948 (videotest_mod_LDFLAGS): Likewise.
949 (bitmap_mod_SOURCES): Likewise.
950 (bitmap_mod_CFLAGS): Likewise.
951 (bitmap_mod_LDFLAGS): Likewise.
952 (tga_mod_SOURCES): Likewise.
953 (tga_mod_CFLAGS): Likewise.
954 (tga_mod_LDFLAGS): Likewise.
955 (jpeg_mod_SOURCES): Likewise.
956 (jpeg_mod_CFLAGS): Likewise.
957 (jpeg_mod_LDFLAGS): Likewise.
958 (png_mod_SOURCES): Likewise.
959 (png_mod_CFLAGS): Likewise.
960 (png_mod_LDFLAGS): Likewise.
961 (gfxterm_mod_SOURCES): Likewise.
962 (gfxterm_mod_CFLAGS): Likewise.
963 (gfxterm_mod_LDFLAGS): Likewise.
965 * term/gfxterm.c: Removed include to grub/machine/memory.h,
966 grub/machine/console.h.
968 2009-01-04 Jerone Young <jerone@gmail.com>
970 Make on screen instructions clearer
972 Based on patch created by Jidanni <jidanni@jidanni.org>
974 * normal/menu.c: print clearer instructions on the screen
976 2009-01-02 Colin D Bennett <colin@gibibit.com>
980 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
981 build system and fixed gfxterm.c to work with different sized fonts.
983 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
985 * configure: Re-generated.
987 * DISTLIST: Removed font/manager.c.
989 Added font/font_cmd.c.
991 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
994 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
996 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
998 * kern/term.c: Changed users of grub_utf8_to_ucs4.
1000 * normal/menu.c: Likewise.
1002 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
1003 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
1005 * include/grub/font.h: Replaced with new file.
1007 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
1008 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
1009 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
1010 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
1011 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
1012 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1013 fg_red, fg_green, fg_blue, fg_alpha.
1014 (grub_video_adapter): Removed blit_glyph.
1015 (grub_video_blit_glyph): Removed.
1017 * font/manager.c: Removed file.
1019 * font/font.c: New file.
1021 * font/font_cmd.c: Likewise.
1023 * video/video.c (grub_video_blit_glyph): Removed.
1025 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
1026 (grub_video_vbe_map_rgba): Likewise.
1027 (grub_video_vbe_unmap_color_int): Likewise.
1028 (grub_video_vbe_blit_glyph): Removed.
1029 (grub_video_vbe_adapter): Removed blit_glyph.
1031 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
1032 (get_pixel): Likewise.
1033 (set_pixel): Likewise.
1035 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
1037 * term/gfxterm.c: Adapted to new font engine.
1039 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
1041 * term/i386/pc/vga.c: Likewise.
1043 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
1045 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
1047 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1049 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1051 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
1053 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
1055 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
1057 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
1059 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1061 * util/grub.d/00_header.in: Changed to use new loadfont command.
1063 * util/grub-mkconfig_lib.in: Changed font extension.
1065 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
1067 * util/getroot.c (grub_util_get_grub_dev): Add support for
1068 /dev/md/dNNpNN style partitionable mdraid devices.
1070 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
1072 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
1073 at a time limit of the PXE TFTP API correctly.
1074 (grub_pxefs_close): Likewise.
1076 2008-11-29 Robert Millan <rmh@aybabtu.com>
1078 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
1079 grub_ata_device_initialize() calls.
1081 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
1083 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
1085 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
1087 2008-11-28 Robert Millan <rmh@aybabtu.com>
1089 Fix build on powerpc-ieee1275. Based on patch created by
1090 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
1091 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1092 `kern/ieee1275/mmap.c'.
1093 * include/grub/powerpc/ieee1275/memory.h: New file.
1095 Provide grub-install on coreboot.
1096 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
1097 (grub_install_SOURCES): New variable.
1098 * util/i386/pc/grub-install.in: Add a few condition checks to make it
1101 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
1103 * util/grub-fstest.c (grub_term_get_current_input): Change return type
1104 to `grub_term_input_t'.
1105 (grub_term_get_current_output): Change return type to
1106 `grub_term_output_t'.
1108 2008-11-22 Robert Millan <rmh@aybabtu.com>
1110 Fix breakage on coreboot due to declaration mismatch.
1111 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
1112 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
1113 grub_vga_text_cls().
1115 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
1116 comments. Avoid copying one more byte than necessary (just in case).
1118 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
1119 to 0x200000 (avoids trouble with some OFW implementations, and matches
1120 with the one in Yaboot).
1121 Reported by Manoel Abranches
1123 2008-11-20 Robert Millan <rmh@aybabtu.com>
1125 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
1126 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
1128 * util/grub-mkconfig_lib.in (grub_warn): New function.
1129 (convert_system_path_to_grub_path): Use grub_warn() when issuing
1130 warnings, to obtain consistent formatting.
1131 * util/grub.d/00_header.in: Likewise.
1132 * util/update-grub_lib.in: Likewise.
1134 * loader/i386/linux.c (allocate_pages): Fix a warning.
1135 Move comment text to `#error' stanza.
1137 Harmonize ieee1275's grub_available_iterate() with the generic
1138 grub_machine_mmap_iterate() interface (fixes a recently-introduced
1139 build problem on i386-ieee1275):
1140 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
1141 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
1142 parameter `type'. Update all users of this function.
1143 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1144 `kern/ieee1275/mmap.c'.
1145 * kern/ieee1275/init.c
1146 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
1148 (grub_machine_mmap_iterate): ... this.
1149 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
1150 return type to `grub_err_t'. Update all implementations of this
1152 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
1155 Add `lsmmap' command (lists firmware-provided memory map):
1156 * commands/lsmmap.c: New file.
1157 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
1158 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
1160 * conf/powerpc-ieee1275.rmk: Likewise.
1161 * conf/i386-coreboot.rmk: Likewise.
1162 * conf/i386-ieee1275.rmk: Likewise.
1164 2008-11-19 Robert Millan <rmh@aybabtu.com>
1166 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
1167 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
1168 constraints to initrd allocation (based on code from
1169 loader/i386/pc/linux.c). Without them, initrd was allocated too high
1170 for Linux to find it.
1172 2008-11-14 Robert Millan <rmh@aybabtu.com>
1174 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
1175 order to cope with duplicate slashes.
1177 2008-11-14 Robert Millan <rmh@aybabtu.com>
1179 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
1180 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
1181 don't want to mess with lower memory, because it is used in the Linux
1184 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
1185 an appropriate place in lower memory, between 0x10000 and 0x90000,
1186 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
1187 is in our heap (probably as a result of it being corrupted during
1188 decompression). Add #error instance with comment to explain why this
1189 loader isn't currently usable on PC/BIOS.
1191 2008-11-14 Robert Millan <rmh@aybabtu.com>
1193 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
1194 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
1196 2008-11-12 Robert Millan <rmh@aybabtu.com>
1198 Make loader/i386/linux.c buildable on i386-pc (although disabled).
1200 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
1201 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
1203 * include/grub/i386/pc/memory.h: ... to here.
1205 2008-11-12 Robert Millan <rmh@aybabtu.com>
1207 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
1210 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
1211 (grub_console_cur_color, grub_console_real_putchar)
1212 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1213 (grub_console_setcolorstate, grub_console_setcolor)
1214 (grub_console_getcolor): Move from here ...
1215 * include/grub/i386/vga_common.h: ... to here (new file).
1217 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
1218 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
1220 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
1221 `<grub/i386/vga_common.h>'.
1223 2008-11-12 Robert Millan <rmh@aybabtu.com>
1225 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
1226 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
1227 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
1229 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1230 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
1232 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
1233 grub_console_init() with call to grub_vga_text_init().
1234 (grub_machine_fini): Replace call to
1235 grub_console_fini() with call to grub_vga_text_fini() and
1236 grub_at_keyboard_fini().
1238 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
1239 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1240 (grub_console_setcolorstate, grub_console_setcolor)
1241 (grub_console_getcolor): New function prototypes.
1243 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
1244 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
1245 (grub_vga_text_setcursor): Static-ize.
1246 (grub_vga_text_term): New structure.
1247 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
1249 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
1250 (grub_console_cur_color, grub_console_standard_color)
1251 (grub_console_normal_color, grub_console_highlight_color)
1252 (map_char, grub_console_putchar, grub_console_getcharwidth)
1253 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
1254 (grub_console_getcolor): Move from here ...
1255 * term/i386/vga_common.c: ... to here (same function names).
1257 2008-11-12 Robert Millan <rmh@aybabtu.com>
1259 Use newly-added Multiboot support in coreboot.
1261 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1262 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
1264 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
1265 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
1266 (codestart): Store the MBI in `startup_multiboot_info' when we're
1267 being loaded using Multiboot.
1269 * kern/i386/coreboot/init.c (grub_machine_init): Move
1270 grub_at_keyboard_init() call to beginning of function (useful for
1271 debugging). Call grub_machine_mmap_init() before attempting to use
1272 grub_machine_mmap_iterate().
1273 (grub_lower_mem, grub_upper_mem): Move from here ...
1274 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
1277 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
1280 2008-11-12 Robert Millan <rmh@aybabtu.com>
1282 Fix a regression introduced by the at_keyboard.mod split. Because
1283 some terminals are default on some platforms and non-default on
1284 others, the first terminal being registered determines which is
1285 going to be default.
1287 * kern/term.c (grub_term_register_input): If this is the first
1288 terminal being registered, set it as the current one.
1289 (grub_term_register_output): Likewise.
1291 * term/efi/console.c (grub_console_init): Do not call
1292 grub_term_set_current_output() or grub_term_set_current_input().
1293 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
1294 * term/i386/pc/console.c (grub_console_init): Likewise.
1295 (grub_console_fini): Do not call grub_term_set_current_input()
1296 (but leave grub_term_set_current_output() to restore text mode).
1298 2008-11-10 Robert Millan <rmh@aybabtu.com>
1300 * util/grub.d/00_header.in: Add backward compatibility check for
1301 versions of terminal.mod that don't understand `terminal_input' or
1304 2008-11-09 Robert Millan <rmh@aybabtu.com>
1306 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
1307 `terminal_input' / `terminal_output', not `terminal'.
1309 2008-11-08 Robert Millan <rmh@aybabtu.com>
1311 * Makefile.in (include_DATA): Fix srcdir=. assumption.
1312 (DISTCLEANFILES): Add `build_env.mk'.
1314 2008-11-08 Robert Millan <rmh@aybabtu.com>
1316 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
1317 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1318 members. Update all users.
1319 * util/console.c (grub_ncurses_term): Split in ...
1320 (grub_ncurses_term_input): ... this, and ...
1321 (grub_ncurses_term_output): ... this. Update all users.
1322 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
1324 2008-11-08 Robert Millan <rmh@aybabtu.com>
1326 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
1327 (PKGDATA): Add $(pkgdata_SRCDIR).
1328 (pkglib_BUILDDIR): New variable.
1329 (pkgdata_SRCDIR): New variable.
1330 (build_env.mk): New target.
1331 (include_DATA): New variable.
1332 (install-local): Install $(include_DATA) files in $(includedir).
1334 2008-11-07 Pavel Roskin <proski@gnu.org>
1336 * gendistlist.sh: Use C locale for sorting to ensure consistent
1337 output on all systems.
1339 * util/grub.d/00_header.in: Remove incorrect space before
1342 2008-11-07 Robert Millan <rmh@aybabtu.com>
1344 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
1346 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
1347 * loader/multiboot_loader.c (find_multi_boot2_header): New function
1348 (based on find_multi_boot1_header).
1349 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
1350 using find_multi_boot2_header(), and abort if neither Multiboot or
1351 Multiboot headers were found.
1353 2008-11-07 Robert Millan <rmh@aybabtu.com>
1355 Modularize at_keyboard.mod:
1357 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
1358 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
1359 (at_keyboard_mod_LDFLAGS): New variables.
1361 Actual terminal split:
1363 * include/grub/term.h (struct grub_term): Split in ...
1364 (struct grub_term_input): ... this, and ...
1365 (struct grub_term_output): ... this. Update all users.
1366 (grub_term_set_current): Split in ...
1367 (grub_term_set_current_input): ... this, and ...
1368 (grub_term_set_current_output): ... this.
1369 (grub_term_get_current): Split in ...
1370 (grub_term_get_current_input): ... this, and ...
1371 (grub_term_get_current_output): ... this.
1372 (grub_term_register): Split in ...
1373 (grub_term_register_input): ... this, and ...
1374 (grub_term_register_output): ... this.
1375 (grub_term_unregister): Split in ...
1376 (grub_term_unregister_input): ... this, and ...
1377 (grub_term_unregister_output): ... this.
1378 (grub_term_iterate): Split in ...
1379 (grub_term_iterate_input): ... this, and ...
1380 (grub_term_iterate_output): ... this.
1382 * kern/term.c (grub_term_list): Split in ...
1383 (grub_term_list_input): ... this, and ...
1384 (grub_term_list_output): ... this. Update all users.
1385 (grub_cur_term): Split in ...
1386 (grub_cur_term_input): ... this, and ...
1387 (grub_cur_term_output): ... this. Update all users.
1388 (grub_term_set_current): Split in ...
1389 (grub_term_set_current_input): ... this, and ...
1390 (grub_term_set_current_output): ... this.
1391 (grub_term_get_current): Split in ...
1392 (grub_term_get_current_input): ... this, and ...
1393 (grub_term_get_current_output): ... this.
1394 (grub_term_register): Split in ...
1395 (grub_term_register_input): ... this, and ...
1396 (grub_term_register_output): ... this.
1397 (grub_term_unregister): Split in ...
1398 (grub_term_unregister_input): ... this, and ...
1399 (grub_term_unregister_output): ... this.
1400 (grub_term_iterate): Split in ...
1401 (grub_term_iterate_input): ... this, and ...
1402 (grub_term_iterate_output): ... this.
1404 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
1405 a check for input and one for output (and only attempt to get keys
1406 from user when input works).
1408 * util/grub-probe.c (grub_term_get_current): Split in ...
1409 (grub_term_get_current_input): ... this, and ...
1410 (grub_term_get_current_output): ... this.
1411 * util/grub-fstest.c: Likewise.
1412 * util/i386/pc/grub-setup.c: Likewise.
1413 * util/grub-editenv.c: Likewise.
1415 Portability adjustments:
1417 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
1418 `term/i386/pc/at_keyboard.c'.
1419 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
1420 grub_keyboard_controller_init() (now handled by terminal .init).
1421 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
1422 grub_at_keyboard_init().
1423 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
1424 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
1425 at_keyboard.mod via input terminal interface).
1426 * include/grub/i386/coreboot/console.h: Convert into a stub for
1427 `<grub/i386/pc/console.h>'.
1429 Migrate full terminals to new API:
1431 * term/efi/console.c (grub_console_term): Split into ...
1432 (grub_console_term_input): ... this, and ...
1433 (grub_console_term_output): ... this. Update all users.
1434 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
1435 (grub_ofconsole_init): Split into ...
1436 (grub_ofconsole_init_input): ... this, and ...
1437 (grub_ofconsole_init_output): ... this.
1438 (grub_ofconsole_term): Split into ...
1439 (grub_ofconsole_term_input): ... this, and ...
1440 (grub_ofconsole_term_output): ... this. Update all users.
1441 * term/i386/pc/serial.c (grub_serial_term): Split into ...
1442 (grub_serial_term_input): ... this, and ...
1443 (grub_serial_term_output): ... this. Update all users.
1444 * term/i386/pc/console.c (grub_console_term): Split into ...
1445 (grub_console_term_input): ... this, and ...
1446 (grub_console_term_output): ... this. Update all users.
1447 (grub_console_term_input): Only enable it on PC/BIOS platform.
1448 (grub_console_init): Remove grub_keyboard_controller_init() call.
1450 Migrate input terminals to new API:
1452 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
1453 `i386' and `i386/pc' to enable build on x86_64 (this driver is
1454 i386-specific anyway).
1455 (grub_console_checkkey): Rename to ...
1456 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
1458 (grub_keyboard_controller_orig): New variable.
1459 (grub_console_getkey): Rename to ...
1460 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
1462 (grub_keyboard_controller_init): Static-ize. Save original
1463 controller value so that it can be restored ...
1464 (grub_keyboard_controller_fini): ... here (new function).
1465 (grub_at_keyboard_term): New structure.
1466 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
1469 Migrate output terminals to new API:
1471 * term/i386/pc/vga.c (grub_vga_term): Change type to
1472 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1473 members. Update all users.
1474 * term/gfxterm.c (grub_video_term): Change type to
1475 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1476 members. Update all users.
1477 * include/grub/i386/pc/console.h (grub_console_checkkey)
1478 (grub_console_getkey): Do not export (no longer needed by gfxterm,
1481 Migrate `terminal' command and userland tools to new API:
1483 * commands/terminal.c (grub_cmd_terminal): Split into ...
1484 (grub_cmd_terminal_input): ... this, and ...
1485 (grub_cmd_terminal_output): ... this.
1486 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
1487 `terminal_input' and `terminal_output'.
1488 * util/grub.d/00_header.in: Adjust `terminal' calls to new
1489 `terminal_input' / `terminal_output' API.
1490 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
1491 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
1492 provided ${GRUB_TERMINAL}, convert it).
1494 2008-11-04 Robert Millan <rmh@aybabtu.com>
1496 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
1498 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
1500 2008-11-03 Bean <bean123ch@gmail.com>
1502 * kern/elf.c (grub_elf32_load): Revert to previous code.
1503 (grub_elf64_load): Likewise.
1505 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
1507 2008-11-01 Robert Millan <rmh@aybabtu.com>
1509 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
1510 (TARGET_CPPFLAGS): Likewise.
1511 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
1513 2008-11-01 Carles Pina i Estany <carles@pina.cat>
1515 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
1517 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
1519 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
1520 addition of objects until the code is not going to be able to fail.
1522 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
1524 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
1525 (add a missing NULL check, and correct them by moving the pointer
1526 operations after the actual check).
1528 2008-10-29 Robert Millan <rmh@aybabtu.com>
1530 * util/i386/pc/grub-install.in: Handle empty string as output from
1531 make_system_path_relative_to_its_root().
1533 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
1535 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
1536 circular metadata worst case scenario. If the metadata is circular
1537 then copy the wrap in place.
1538 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
1539 project lib/format_text/layout.h
1540 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
1542 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
1544 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
1546 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
1548 * util/update-grub_lib.in: Mention filename in warning message.
1550 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
1552 * NEWS: Update for rename of update-grub to grub-mkconfig.
1554 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
1556 * util/update-grub_lib.in: Copy to ...
1557 * util/grub-mkconfig_lib.in: ... this. Update all users.
1558 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
1559 * util/update-grub.in: Rename to ...
1560 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
1561 option. Add `--output' option to allow users to specify the generated
1562 configuration file. Default to stdout.
1563 (update_grub_dir): Rename to ...
1564 (grub_mkconfig_dir): ... this.
1565 (grub_cfg): Default to an empty string.
1566 * conf/common.rmk (update-grub): Rename to ...
1567 (grub-mkconfig): ... this.
1568 (update-grub_lib): Copy to ...
1569 (grub-mkconfig_lib): ... this.
1570 (update-grub_SCRIPTS): Copy to ...
1571 (grub-mkconfig_SCRIPTS): ... this. Update all users.
1572 (update-grub_DATA): Rename to ...
1573 (grub-mkconfig_DATA): ... this.
1575 2008-09-28 Robert Millan <rmh@aybabtu.com>
1577 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
1578 to `modified'. Add the real `created' field.
1579 (grub_iso9660_uuid): Use `modified' rather than `created' for
1580 constructing the UUID.
1582 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
1584 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
1585 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
1587 2008-09-28 Bean <bean123ch@gmail.com>
1589 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
1590 Thanks to Christian Franke for finding this bug.
1592 2008-09-25 Robert Millan <rmh@aybabtu.com>
1594 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
1595 instances of grub_util_get_disk_name() (see previous commit).
1597 2008-09-25 Robert Millan <rmh@aybabtu.com>
1599 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
1600 `util/i386/get_disk_name.c'.
1601 * conf/i386-efi.rmk: Likewise.
1602 * conf/x86_64-efi.rmk: Likewise.
1603 * conf/i386-coreboot.rmk: Likewise.
1604 * conf/i386-ieee1275.rmk: Likewise.
1605 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
1606 `util/ieee1275/get_disk_name.c'.
1607 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
1608 * util/ieee1275/get_disk_name.c: Remove file.
1609 * util/i386/get_disk_name.c: Remove file.
1610 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
1611 "hd%d" for device.map entries, rather than using
1612 grub_util_get_disk_name().
1614 2008-09-24 Carles Pina i Estany <carles@pina.cat>
1616 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
1618 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
1620 2008-09-24 Carles Pina i Estany <carles@pina.cat>
1622 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
1624 (GRUB_TERM_PPAGE): Changed to 0x4900.
1626 2008-09-24 Robert Millan <rmh@aybabtu.com>
1628 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
1629 macros (they were i386-pc specific).
1630 * include/grub/sparc64/ieee1275/console.h: Likewise.
1631 * include/grub/efi/console.h: Likewise.
1633 2008-09-22 Bean <bean123ch@gmail.com>
1635 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
1636 resident and in attribute list.
1638 * include/grub/ntfs.h (BMP_LEN): Removed.
1640 2008-09-22 Bean <bean123ch@gmail.com>
1642 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
1643 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
1645 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
1646 error occurs, as grub_disk_open will call grub_disk_close, which will
1647 call p->close (scsi).
1649 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
1651 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
1652 (AC_PREREQ): Bumped to 2.59.
1653 (AC_TRY_COMPILE): Replace obsolete macro with ...
1654 (AC_COMPILE_IFELSE): ... this.
1655 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
1656 (AC_LINK_IFELSE): ... this.
1658 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
1660 * autogen.sh: Add a call to `gendistlist.sh'.
1662 2008-09-19 Christian Franke <franke@computer.org>
1664 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
1665 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
1666 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
1667 Export __enable_execute_stack() to modules.
1668 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
1671 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
1673 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
1676 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
1678 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
1679 #include <grub/util/hostdisk.h>.
1681 2008-09-08 Robert Millan <rmh@aybabtu.com>
1683 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
1684 segments when their filesz is zero (grub_file_read() interprets
1685 zero-size as "read until EOF", which results in memory corruption).
1686 Use `lowest_segment' rather than 0 for calculating the current
1687 segment load address.
1689 2008-09-08 Robert Millan <rmh@aybabtu.com>
1691 * util/hostdisk.c (open_device): Replace a grub_util_info() call
1692 with grub_dprintf("hostdisk", ...), as it was so verbose that it
1693 clobbered useful information.
1695 2008-09-08 Robert Millan <rmh@aybabtu.com>
1697 * include/grub/util/biosdisk.h: Move to ...
1698 * include/grub/util/hostdisk.h: ... here. Update all users.
1699 * util/biosdisk.c: Move to ...
1700 * util/hostdisk.c: ... here. Update all users.
1702 2008-09-07 Robert Millan <rmh@aybabtu.com>
1704 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
1706 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
1707 and length can be stored directly in the `mbi->mmap_addr' and
1708 `mbi->mmap_length' struct fields.
1710 2008-09-07 Robert Millan <rmh@aybabtu.com>
1712 * conf/i386.rmk: New file. Provides declaration for building
1714 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
1715 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
1717 Include `conf/i386.mk'.
1718 * conf/i386-efi.rmk: Likewise.
1719 * conf/x86_64-efi.rmk: Likewise.
1720 * conf/i386-coreboot.rmk: Likewise.
1721 * conf/i386-ieee1275.rmk: Likewise.
1723 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
1725 Based on patch created by Colin D Bennett <colin@gibibit.com>.
1726 Adds optimization support for BGR based modes.
1728 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
1729 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1730 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1731 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1732 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1733 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1734 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1735 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1736 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1737 (grub_video_i386_vbeblit_index_index): Likewise.
1738 (grub_video_i386_vbeblit_replace_directN): Added.
1739 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1740 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1741 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1742 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1743 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1744 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1745 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1746 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1747 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1748 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1749 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1750 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1751 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1753 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
1754 (grub_video_i386_vbefill_R8G8B8): Likewise.
1755 (grub_video_i386_vbefill_index): Likewise.
1756 (grub_video_i386_vbefill_direct32): Added.
1757 (grub_video_i386_vbefill_direct24): Likewise.
1758 (grub_video_i386_vbefill_direct16): Likewise.
1759 (grub_video_i386_vbefill_direct8): Likewise.
1761 * include/grub/video.h (grub_video_blit_format): Removed
1762 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
1763 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
1764 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
1765 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
1766 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
1768 * video/video.c (grub_video_get_blit_format): Updated to use new
1769 blit formats. Added handling for 16 bit color modes.
1771 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
1773 (common_blitter): Updated to use new blitters.
1775 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
1777 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1778 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1779 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1780 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1781 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1782 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1783 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1784 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1785 (grub_video_i386_vbeblit_index_index): Likewise.
1786 (grub_video_i386_vbeblit_replace_directN): Added.
1787 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1788 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1789 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1790 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1791 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1792 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1793 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1794 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1795 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1796 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1797 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1798 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1799 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1801 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
1802 (grub_video_i386_vbefill_R8G8B8): Likewise.
1803 (grub_video_i386_vbefill_index): Likewise.
1804 (grub_video_i386_vbefill_direct32): Added.
1805 (grub_video_i386_vbefill_direct24): Likewise.
1806 (grub_video_i386_vbefill_direct16): Likewise.
1807 (grub_video_i386_vbefill_direct8): Likewise.
1809 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
1812 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
1815 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
1818 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
1821 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
1823 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
1826 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
1828 * fs/iso9660.c (grub_iso9660_date): New structure.
1829 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
1830 (grub_iso9660_uuid): New function.
1832 2008-09-05 Bean <bean123ch@gmail.com>
1834 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
1836 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
1837 insensitive bit for names in Win32 and Win32 & DOS namespace.
1839 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
1841 * include/grub/types.h (LONG_MAX): Likewise.
1843 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
1845 * util/getroot.c: Include <config.h>.
1846 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
1847 add support for /dev/md/N devices and handle LVM double dash escaping.
1849 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
1851 * config.guess: Update to latest version from config git.
1852 * config.sub: Likewise.
1854 2008-09-03 Robert Millan <rmh@aybabtu.com>
1856 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
1857 `disk->total_sectors'.
1859 2008-09-01 Colin D Bennett <colin@gibibit.com>
1861 * include/grub/normal.h: Fixed incorrect comment for
1862 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
1864 2008-09-01 Colin D Bennett <colin@gibibit.com>
1866 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
1867 values with defines.
1869 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
1870 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
1871 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
1872 (GRUB_VBE_MODEATTR_COLOR): Likewise.
1873 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
1874 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
1875 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
1876 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
1877 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
1878 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
1879 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
1880 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
1881 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
1882 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
1883 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
1884 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
1885 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
1886 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
1887 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
1889 2008-08-31 Robert Millan <rmh@aybabtu.com>
1891 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
1893 (grub_multiboot): Fix a few warnings.
1895 2008-08-31 Robert Millan <rmh@aybabtu.com>
1897 * loader/i386/pc/multiboot.c: Update comment not to say that
1898 boot_device support is unimplemented.
1900 2008-08-31 Robert Millan <rmh@aybabtu.com>
1902 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
1903 or memory map support are unimplemented.
1905 2008-08-31 Colin D Bennett <colin@gibibit.com>
1907 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
1909 2008-08-31 Colin D Bennett <colin@gibibit.com>
1911 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
1912 total video memory in 'vbeinfo' output; show color format details for
1915 2008-08-30 Pavel Roskin <proski@gnu.org>
1917 * util/genmoddep.c: Remove for real this time.
1918 * DISTLIST: Remove util/genmoddep.c.
1920 2008-08-30 Robert Millan <rmh@aybabtu.com>
1922 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
1923 as required by Multiboot spec (it was already 4-byte aligned, but
1926 2008-08-29 Pavel Roskin <proski@gnu.org>
1928 * kern/powerpc/ieee1275/crt0.S: Rename to ...
1929 * kern/powerpc/ieee1275/startup.S: ... this.
1930 * conf/powerpc-ieee1275.rmk: Adjust for the above.
1931 * DISTLIST: Likewise.
1933 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
1934 grub/cpu/kernel.h. Add start label for consistency with other
1935 platforms. Add grub_prefix immediately after start. Add jump
1936 to the code after grub_prefix.
1937 * include/grub/powerpc/kernel.h: Provide valid values for
1938 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
1940 2008-08-29 Bean <bean123ch@gmail.com>
1942 * configure.ac: Change host_os to cygwin for mingw.
1943 (asprintf): New check for function.
1945 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
1946 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
1948 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
1949 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
1950 sync, sleep and grub_util_get_disk_size for mingw.
1952 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
1953 to get size in mingw.
1954 (open_device): Use flag O_BINARY if it's defined.
1955 (find_root_device): Add dummy code for mingw.
1957 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
1958 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
1959 (get_scsi_disk_name): Return 0 for mingw.
1961 * util/hostfs.c: #include <grub/util/misc.h>.
1962 (grub_hostfs_open): Use "rb" flag to open file, use
1963 grub_util_get_disk_size to get disk size for mingw.
1965 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
1966 (asprintf): New function if HAVE_ASPRINTF is not set.
1967 (sync): New function for mingw.
1969 (grub_util_get_disk_size): Likewise.
1971 2008-08-28 Pavel Roskin <proski@gnu.org>
1973 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1976 2008-08-28 Robert Millan <rmh@aybabtu.com>
1978 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
1980 2008-08-28 Robert Millan <rmh@aybabtu.com>
1982 Change find_grub_drive() syntax so it doesn't prevent it from
1983 detecting NULL names as errors.
1985 * util/biosdisk.c (find_grub_drive): Move free slot search code
1987 (find_free_slot): ... to here.
1988 (read_device_map): Use find_free_slot() to search for free slots.
1990 2008-08-27 Marco Gerards <marco@gnu.org>
1992 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
1993 (scsi_mod_SOURCES): New variable.
1994 (scsi_mod_CFLAGS): Likewise
1995 (scsi_mod_LDFLAGS): Likewise.
1997 * disk/scsi.c: New file.
1999 * include/grub/scsi.h: Likewise.
2001 * include/grub/scsicmd.h: Likewise.
2003 * disk/ata.c: Include <grub/scsi.h>.
2004 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
2006 (grub_ata_iterate): Skip ATAPI devices.
2007 (grub_ata_open): Only handle ATAPI devices.
2008 (struct grub_atapi_read): Removed.
2009 (grub_atapi_readsector): Likewise.
2010 (grub_ata_read): No longer handle ATAPI devices.
2011 (grub_ata_write): Likewise.
2012 (grub_atapi_iterate): New function.
2013 (grub_atapi_read): Likewise.
2014 (grub_atapi_write): Likewise.
2015 (grub_atapi_open): Likewise.
2016 (grub_atapi_close): Likewise.
2017 (grub_atapi_dev): New variable.
2018 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
2019 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
2021 * include/grub/disk.h (enum grub_disk_dev_id): Add
2022 `GRUB_DISK_DEVICE_SCSI_ID'.
2024 2008-08-26 Robert Millan <rmh@aybabtu.com>
2026 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
2027 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
2030 2008-08-23 Bean <bean123ch@gmail.com>
2032 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
2033 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2034 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
2035 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
2037 (raid5rec_mod_SOURCES): New macro.
2038 (raid5rec_mod_CFLAGS): Likewise.
2039 (raid5rec_mod_LDFLAGS): Likewise.
2040 (raid6rec_mod_SOURCES): Likewise.
2041 (raid6rec_mod_CFLAGS): Likewise.
2042 (raid6rec_mod_LDFLAGS): Likewise.
2043 (mdraid_mod_SOURCES): Likewise.
2044 (mdraid_mod_CFLAGS): Likewise.
2045 (mdraid_mod_LDFLAGS): Likewise.
2046 (dm_nv_mod_SOURCES): Likewise.
2047 (dm_nv_mod_CFLAGS): Likewise.
2048 (dm_nv_mod_LDFLAGS): Likewise.
2050 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
2051 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2052 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2054 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
2055 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2057 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2059 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2061 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2063 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2065 * disk/raid5_recover.c: New file.
2067 * disk/raid6_recover.c: Likewise.
2069 * disk/mdraid_linux.c: Likewise.
2071 * disk/dmraid_nvidia.c: Likewise.
2073 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
2076 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
2077 calculate the size of raid device.
2078 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
2079 different layout of raid5.
2080 (grub_raid_scan_device): Remove code specific to mdraid.
2081 (grub_raid_list): New variable.
2082 (free_array): New function.
2083 (grub_raid_register): Likewise.
2084 (grub_raid_unregister): Likewise.
2085 (grub_raid_rescan): Likewise.
2086 (GRUB_MOD_INIT): Don't iterate device here.
2087 (GRUB_MOD_FINI): Use free_array to release resource.
2089 * include/grub/raid.h: Remove macro and structure specific to mdraid.
2090 (grub_raid5_recover_func_t): New function variable type.
2091 (grub_raid6_recover_func_t): Likewise.
2092 (grub_raid5_recover_func): New variable.
2093 (grub_raid6_recover_func): Likewise.
2094 (grub_raid_register): New function.
2095 (grub_raid_unregister): Likewise.
2096 (grub_raid_rescan): Likewise.
2097 (grub_raid_block_xor): Likewise.
2099 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
2100 (CMD_CRC): New macro.
2102 (read_file): Handle device as well as file.
2103 (cmd_crc): New function.
2104 (fstest): Handle multiple disks.
2105 (options): Remove part, raw and long, add root and diskcount.
2106 (usage): Add crc, remove -p, -r, -l, add -r and -c.
2107 (main): Find the first non option entry and ignore subsequent options,
2108 add handling for the new options, support multiple disks.
2110 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
2112 2008-08-23 Bean <bean123ch@gmail.com>
2114 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
2116 * genfslist.sh: Ignore kernel.mod.
2118 * genpartmaplist.sh: Likewise.
2120 2008-08-23 Robert Millan <rmh@aybabtu.com>
2122 * util/getroot.c (find_root_device): Skip anything that starts with
2123 a dot, not just directories. This avoids things like /dev/.tmp.md0.
2125 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
2127 * util/update-grub.in (GRUB_GFXMODE): Export variable.
2128 * util/grub.d/00_header.in: Allow the administrator to change default
2129 gfxmode via ${GRUB_GFXMODE}.
2131 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
2133 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
2135 2008-08-21 Robert Millan <rmh@aybabtu.com>
2137 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
2139 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
2140 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
2142 2008-08-20 Carles Pina i Estany <carles@pina.cat>
2144 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
2145 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
2147 2008-08-19 Robert Millan <rmh@aybabtu.com>
2149 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
2150 (struct grub_virtual_screen): Remove `cursor_color'.
2151 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
2153 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
2155 2008-08-18 Robert Millan <rmh@aybabtu.com>
2157 Unify (identical) linux_normal.c files.
2158 * loader/i386/efi/linux_normal.c: Move from here ...
2159 * loader/linux_normal.c: ... to here. Update all users.
2160 * loader/i386/pc/linux_normal.c: Delete. Update all users.
2161 * loader/i386/ieee1275/linux_normal.c: Likewise.
2163 2008-08-18 Robert Millan <rmh@aybabtu.com>
2165 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
2166 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
2167 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
2168 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
2169 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
2171 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
2172 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
2173 (GRUB_LINUX_CL_END_OFFSET): ... to here.
2174 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
2175 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
2176 (GRUB_EFI_CL_END_OFFSET): Rename to ...
2177 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
2178 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
2179 Initialize `params->video_cursor_x' and `params->video_cursor_y'
2180 portably using grub_getxy().
2181 Replace `-EFI' with `-bzImage' in boot message.
2183 2008-08-17 Robert Millan <rmh@aybabtu.com>
2185 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
2187 2008-08-17 Robert Millan <rmh@aybabtu.com>
2189 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
2191 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
2192 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
2193 (grub_machine_mmap_iterate): New function declaration.
2194 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
2196 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
2199 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
2200 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
2201 Move e820 parsing from here ...
2202 * kern/i386/pc/mmap.c: New file.
2203 (grub_machine_mmap_iterate): ... to here.
2205 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
2206 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
2207 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
2208 (grub_available_iterate): Redeclare to return `void', and redeclare
2209 its hook to use grub_uint64_t as addr and size parameters, and rename
2211 (grub_machine_mmap_iterate): ... this. Update all users.
2213 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
2214 to make it more readable. Rename to ...
2215 (grub_machine_mmap_iterate): ... this.
2217 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
2218 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
2219 (grub_multiboot): Allocate an extra region after the payload, and fill
2220 it with a Multiboot memory map. Adjust a.out loader to calculate size
2221 with the extra space.
2222 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
2223 with the extra space.
2225 2008-08-17 Carles Pina i Estany <carles@pina.cat>
2227 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
2229 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
2231 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
2232 mdate-sh to the list `find' searches for.
2233 * DISTLIST: Regenerated.
2235 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
2237 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
2238 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
2239 genmoddep.awk, gensymlist.sh.in.
2240 (DISTDIRS): Add bus, docs, hook, lib.
2241 * DISTLIST: Regenerated.
2242 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
2244 2008-08-16 Robert Millan <rmh@aybabtu.com>
2246 * disk/raid.c (grub_raid_init): Handle/report errors set by
2247 grub_device_iterate().
2248 * disk/lvm.c (grub_lvm_init): Likewise.
2250 2008-08-15 Bean <bean123ch@gmail.com>
2252 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2254 (datetime_mod_SOURCES): New macro.
2255 (datetime_mod_CFLAGS): Likewise.
2256 (datetime_mod_LDFLAGS): Likewise.
2257 (date_mod_SOURCES): Likewise.
2258 (date_mod_CFLAGS): Likewise.
2259 (date_mod_LDFLAGS): Likewise.
2260 (datehook_mod_SOURCES): Likewise.
2261 (datehook_mod_CFLAGS): Likewise.
2262 (datehook_mod_LDFLAGS): Likewise.
2264 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2266 (datetime_mod_SOURCES): New macro.
2267 (datetime_mod_CFLAGS): Likewise.
2268 (datetime_mod_LDFLAGS): Likewise.
2269 (date_mod_SOURCES): Likewise.
2270 (date_mod_CFLAGS): Likewise.
2271 (date_mod_LDFLAGS): Likewise.
2272 (datehook_mod_SOURCES): Likewise.
2273 (datehook_mod_CFLAGS): Likewise.
2274 (datehook_mod_LDFLAGS): Likewise.
2276 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2278 (datetime_mod_SOURCES): New macro.
2279 (datetime_mod_CFLAGS): Likewise.
2280 (datetime_mod_LDFLAGS): Likewise.
2281 (date_mod_SOURCES): Likewise.
2282 (date_mod_CFLAGS): Likewise.
2283 (date_mod_LDFLAGS): Likewise.
2284 (datehook_mod_SOURCES): Likewise.
2285 (datehook_mod_CFLAGS): Likewise.
2286 (datehook_mod_LDFLAGS): Likewise.
2288 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2290 (datetime_mod_SOURCES): New macro.
2291 (datetime_mod_CFLAGS): Likewise.
2292 (datetime_mod_LDFLAGS): Likewise.
2293 (date_mod_SOURCES): Likewise.
2294 (date_mod_CFLAGS): Likewise.
2295 (date_mod_LDFLAGS): Likewise.
2296 (datehook_mod_SOURCES): Likewise.
2297 (datehook_mod_CFLAGS): Likewise.
2298 (datehook_mod_LDFLAGS): Likewise.
2300 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2302 (datetime_mod_SOURCES): New macro.
2303 (datetime_mod_CFLAGS): Likewise.
2304 (datetime_mod_LDFLAGS): Likewise.
2305 (date_mod_SOURCES): Likewise.
2306 (date_mod_CFLAGS): Likewise.
2307 (date_mod_LDFLAGS): Likewise.
2308 (datehook_mod_SOURCES): Likewise.
2309 (datehook_mod_CFLAGS): Likewise.
2310 (datehook_mod_LDFLAGS): Likewise.
2312 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
2314 * commands/date.c: New file.
2316 * hook/datehook.c: Likewise.
2318 * include/grub/lib/datetime.h: Likewise.
2320 * include/grub/i386/cmos.h: Likewise.
2322 * lib/datetime.c: Likewise.
2324 * lib/i386/datetime.c: Likewise.
2326 * lib/efi/datetime.c: Likewise.
2328 2008-08-14 Robert Millan <rmh@aybabtu.com>
2330 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
2331 (grub_mkelfimage_SOURCES): New variable.
2332 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
2334 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
2335 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
2336 * conf/powerpc-ieee1275.rmk: Likewise.
2337 * conf/i386-ieee1275.rmk: Likewise.
2339 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
2340 * kern/i386/coreboot/init.c: Likewise.
2342 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
2343 with `<grub/cpu/kernel.h>'.
2344 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
2346 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
2347 * kern/i386/coreboot/startup.S: Likewise.
2349 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
2350 (GRUB_MOD_GAP): Remove.
2351 * include/grub/powerpc/kernel.h: New file.
2352 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
2353 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2354 * include/grub/i386/kernel.h: New file.
2355 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
2356 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
2357 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2359 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
2361 Use --directory when invoking grub_mkimage.
2363 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
2364 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
2365 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
2366 and GRUB_KERNEL_CPU_PREFIX.
2368 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
2370 * include/grub/err.h (grub_err_printf): New function prototype.
2371 * util/misc.c (grub_err_printf): New function.
2372 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
2374 * kern/err.c (grub_print_error): Use grub_err_printf.
2376 2008-08-13 Robert Millan <rmh@aybabtu.com>
2378 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
2380 2008-08-13 Robert Millan <rmh@aybabtu.com>
2382 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
2385 2008-08-12 Robert Millan <rmh@aybabtu.com>
2387 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
2388 of the relocation code from here ...
2389 (grub_multiboot): ... to here.
2390 (forward_relocator, backward_relocator): Move from here ...
2391 * kern/i386/loader.S (grub_multiboot_forward_relocator)
2392 (grub_multiboot_backward_relocator): ... to here.
2393 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
2394 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
2395 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
2396 (grub_multiboot_forward_relocator_end)
2397 (grub_multiboot_backward_relocator)
2398 (grub_multiboot_backward_relocator_end): New variables.
2400 2008-08-12 Bean <bean123ch@gmail.com>
2402 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
2404 2008-08-11 Robert Millan <rmh@aybabtu.com>
2406 * kern/i386/linuxbios/startup.S: Move from here ...
2407 * kern/i386/coreboot/startup.S: ... to here.
2409 * kern/i386/linuxbios/init.c: Move from here ...
2410 * kern/i386/coreboot/init.c: ... to here.
2412 * kern/i386/linuxbios/table.c: Move from here ...
2413 * kern/i386/coreboot/mmap.c: ... to here.
2415 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
2417 2008-08-11 Robert Millan <rmh@aybabtu.com>
2419 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
2420 errors. Leave it to the upper layer to handle them.
2422 2008-08-09 Christian Franke <franke@computer.org>
2424 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
2425 * conf/common.rmk: Install `grub-pe2elf' only if requested.
2426 Install `grub.d/10_windows' only on Cygwin.
2427 * configure.ac: Add subst of `target_os'.
2428 Check `target_os' also before setting TARGET_OBJ2ELF.
2429 Add `--enable-grub-pe2elf'.
2431 2008-08-08 Robert Millan <rmh@aybabtu.com>
2433 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2434 (grub_last_time): Change type to grub_uint64_t.
2435 (grub_disk_open): Migrate code from to using grub_get_time_ms().
2436 (grub_disk_close): Likewise.
2438 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2439 (run_menu): Migrate code from to using grub_get_time_ms().
2441 * util/misc.c (grub_get_time_ms): New function.
2443 2008-08-08 Marco Gerards <marco@gnu.org>
2445 * disk/ata.c (grub_ata_regget): Change return type to
2447 (grub_ata_regget2): Likewise.
2448 (grub_ata_wait_status): New function.
2449 (grub_ata_wait_busy): Removed function, updated all users to use
2450 `grub_ata_wait_status'.
2451 (grub_ata_wait_drq): Likewise.
2452 (grub_ata_cmd): New function.
2453 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
2455 (grub_ata_pio_write): Add error handling.
2456 (grub_atapi_identify): Likewise.
2457 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
2459 (grub_ata_identify): Use `grub_ata_cmd' and improve error
2460 handling. Actually use the detected registers. Reorder the
2461 detection logic such that it is easier to read.
2462 (grub_ata_pciinit): Do not assign the same ID to each controller.
2463 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
2465 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
2467 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
2469 2008-08-08 Marco Gerards <marco@gnu.org>
2473 2008-08-07 Bean <bean123ch@gmail.com>
2475 * include/grub/x86_64/pci.h: New file.
2477 2008-08-07 Christian Franke <franke@computer.org>
2479 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
2480 (TIMER2_GATE): Likewise.
2481 (grub_pit_wait): Add enable/disable of the timer2 gate
2482 bit of port 0x61. This fixes a possible infinite loop.
2484 2008-08-07 Bean <bean123ch@gmail.com>
2486 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
2487 kern/i386/tsc.c and kern/i386/pit.c.
2489 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
2492 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
2495 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
2497 2008-08-07 Bean <bean123ch@gmail.com>
2499 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
2501 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
2503 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
2504 multiple inclusion. Add #include <grub/types.h>.
2506 2008-08-06 Christian Franke <franke@computer.org>
2508 * conf/common.rmk: Build and install `10_windows'.
2509 * util/grub.d/10_windows.in: New script.
2511 2008-08-06 Pavel Roskin <proski@gnu.org>
2513 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
2515 2008-08-06 Robert Millan <rmh@aybabtu.com>
2517 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
2518 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
2520 2008-08-06 Bean <bean123ch@gmail.com>
2522 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
2523 (grub_pxefs_fs_int): Remove dummy definition.
2524 (grub_pxefs_open): Use data->block_size to store the current block
2526 (grub_pxefs_read): Use block size stored in data->block_size. As the
2527 value of grub_pxe_blksize can be changed after the file is opened.
2529 2008-08-06 Bean <bean123ch@gmail.com>
2531 * fs/i386/pc/pxe.c (curr_file): new variable.
2532 (grub_pxefs_open): Simply the handling of pxe file system. Don't
2533 require the dummy internal file system anymore.
2534 (grub_pxefs_read): Removed.
2535 (grub_pxefs_close): Likewise.
2536 (grub_pxefs_fs_int): Likewise.
2537 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
2538 connection when we switch file.
2539 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
2541 2008-08-06 Robert Millan <rmh@aybabtu.com>
2543 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
2545 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
2546 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
2548 * kern/i386/halt.c: New file.
2549 * kern/i386/reboot.c: Likewise.
2550 * include/grub/i386/reboot.h: Likewise.
2551 * include/grub/i386/halt.h: Likewise.
2553 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
2554 Include `<grub/cpu/halt.h>'.
2555 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
2556 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
2558 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
2559 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
2560 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
2561 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
2562 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
2563 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
2565 * include/grub/i386/at_keyboard.h: ... to here.
2567 2008-08-05 Robert Millan <rmh@aybabtu.com>
2569 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
2570 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
2571 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
2572 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2573 `kern/generic/millisleep.c'.
2575 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
2576 instead of grub_get_rtc().
2577 (grub_tsc_init): Initialize `tsc_boot_time'.
2579 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
2580 (grub_machine_init): Use grub_tsc_init() rather than
2581 installing an RTC-based handler via grub_install_get_time_ms().
2583 * kern/i386/pit.c: New file.
2584 * include/grub/i386/pit.h: Likewise.
2586 2008-08-05 Bean <bean123ch@gmail.com>
2588 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
2590 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
2591 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
2592 (pxe_mod_SOURCES): New macro.
2593 (pxe_mod_CFLAGS): Likewise.
2594 (pxe_mod_LDFLAGS): Likewise.
2595 (pxecmd_mod_SOURCES): Likewise.
2596 (pxecmd_mod_CFLAGS): Likewise.
2597 (pxecmd_mod_LDFLAGS): Likewise.
2599 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
2600 (grub_pxe_call): Likewise.
2602 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
2604 * commands/i386/pc/pxecmd.c: New file.
2606 * fs/i386/pc/pxe.c: Likewise.
2608 * include/grub/i386/pc/pxe.h: Likewise.
2610 2008-08-05 Bean <bean123ch@gmail.com>
2612 * util/console.c (grub_console_cur_color): New variable.
2613 (grub_console_standard_color): Likewise.
2614 (grub_console_normal_color): Likewise.
2615 (grub_console_highlight_color): Likewise.
2616 (color_map): Likewise.
2617 (use_color): Likewise.
2618 (NUM_COLORS): New macro.
2619 (grub_ncurses_setcolorstate): Handle color properly.
2620 (grub_ncurses_setcolor): Don't change color here, just remember the
2621 settings, color will be set in grub_ncurses_setcolorstate.
2622 (grub_ncurses_getcolor): New function.
2623 (grub_ncurses_init): Initialize color pairs.
2624 (grub_ncurses_term): New member grub_ncurses_getcolor.
2626 2008-08-05 Colin D Bennett <colin@gibibit.com>
2628 High resolution timer support. Implemented for x86 CPUs using TSC.
2629 Extracted generic grub_millisleep() so it's linked in only as needed.
2630 This requires a Pentium compatible CPU; if the RDTSC instruction is
2631 not supported, then it falls back on the generic grub_get_time_ms()
2632 implementation that uses the machine's RTC.
2634 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
2635 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2636 `kern/generic/millisleep.c'.
2638 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
2639 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
2641 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
2642 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
2644 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2646 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2647 `kern/generic/millisleep.c'.
2649 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2651 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
2653 * kern/generic/rtc_get_time_ms.c: New file.
2655 * kern/generic/millisleep.c: New file.
2657 * kern/misc.c: Don't include
2658 <kern/time.h> anymore.
2659 (grub_millisleep_generic): Removed.
2661 * commands/sleep.c (grub_interruptible_millisleep): Uses
2662 grub_get_time_ms() instead of grub_get_rtc().
2664 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
2666 (grub_cpu_is_cpuid_supported): New inline function.
2667 (grub_cpu_is_tsc_supported): New inline function.
2668 (grub_tsc_init): New function prototype.
2669 (grub_tsc_get_time_ms): New function prototype.
2671 * kern/i386/tsc.c (grub_get_time_ms): New file.
2673 * include/grub/time.h: Include <grub/types.h.
2674 (grub_millisleep_generic): Removed.
2675 (grub_get_time_ms): New prototype.
2676 (grub_install_get_time_ms): New prototype.
2677 (grub_rtc_get_time_ms): New prototype.
2679 * kern/time.c (grub_get_time_ms): New function.
2680 (grub_install_get_time_ms): New function.
2682 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
2683 <grub/time.h> anymore.
2684 (grub_millisleep): Removed.
2685 (grub_machine_init): Call grub_tsc_init.
2687 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
2688 get_time_ms() implementation.
2690 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
2691 (ieee1275_get_time_ms): New function.
2692 (grub_machine_init): Install get_time_ms() implementation.
2694 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
2695 (grub_machine_init): Call grub_tsc_init().
2696 (grub_millisleep): Removed.
2698 * kern/ieee1275/init.c (grub_millisleep): Removed.
2699 (grub_machine_init): Install ieee1275_get_time_ms()
2701 (ieee1275_get_time_ms): New function.
2702 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
2705 2008-08-05 Marco Gerards <marco@gnu.org>
2707 * disk/ata.c: Include <grub/pci.h>.
2708 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
2709 (grub_ata_initialize): Rewritten.
2710 (grub_ata_device_initialize): New function.
2712 2008-08-04 Pavel Roskin <proski@gnu.org>
2714 * kern/main.c: Include grub/mm.h.
2716 2008-08-04 Robert Millan <rmh@aybabtu.com>
2718 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
2719 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
2720 corruption problem).
2722 2008-08-04 Robert Millan <rmh@aybabtu.com>
2724 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
2725 warnings introduced in my last commit.
2727 2008-08-03 Robert Millan <rmh@aybabtu.com>
2729 Make PCI available on all i386 architectures.
2731 * include/grub/i386/pc/pci.h: Move from here ...
2732 * include/grub/i386/pci.h: ... to here.
2734 * include/grub/i386/pc/pci.h: Remove.
2735 * include/grub/i386/efi/pci.h: Remove.
2736 * include/grub/x86_64/efi/pci.h: Remove.
2738 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
2741 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
2742 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
2743 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
2745 * conf/i386-ieee1275.rmk: Likewise.
2747 2008-08-03 Robert Millan <rmh@aybabtu.com>
2749 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
2750 (grub_console_setcursor): Make it possible to set cursor off.
2752 2008-08-03 Robert Millan <rmh@aybabtu.com>
2754 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
2755 of modules instead of assuming which platform provides what.
2756 * util/update-grub.in: Likewise.
2758 2008-08-03 Robert Millan <rmh@aybabtu.com>
2760 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
2761 instead of `grub_install_dos_part' to determine whether a drive needs
2762 to be prepended to prefix (`grub_install_dos_part' is not reliable,
2763 because it can be overridden when loading GRUB via Multiboot).
2765 2008-08-02 Robert Millan <rmh@aybabtu.com>
2767 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
2769 2008-08-02 Robert Millan <rmh@aybabtu.com>
2771 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
2772 of informational grub_dprintf() calls.
2774 2008-08-02 Robert Millan <rmh@aybabtu.com>
2776 * disk/memdisk.c (memdisk_size): Don't initialize.
2777 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
2779 * include/grub/i386/pc/kernel.h
2780 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
2781 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
2782 (grub_memdisk_image_size, grub_arch_memdisk_addr)
2783 (grub_arch_memdisk_size): Remove.
2785 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
2786 field (was only used to transfer a constant). Add `type' field to
2787 support multiple module types.
2788 (grub_module_iterate): New function.
2790 * kern/device.c (grub_device_open): Do not hide error messages
2791 when grub_disk_open() fails. Use grub_print_error() instead.
2793 * kern/i386/pc/init.c (grub_arch_modules_addr)
2794 (grub_arch_memdisk_size): Remove functions.
2795 (grub_arch_modules_addr): Return the module address in high memory
2796 (now that it isn't copied anymore).
2798 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
2799 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
2800 decompression routine (grub_total_module_size already includes that
2801 now). Don't copy modules back to low memory.
2803 * kern/main.c: Include `<grub/mm.h>'.
2804 (grub_load_modules): Split out (and use) ...
2805 (grub_module_iterate): ... this function, which iterates through
2806 module objects and runs a hook.
2807 Comment out grub_mm_init_region() call, as it would cause non-ELF
2808 modules to be overwritten.
2810 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
2811 the memdisk image in its own region, make it part of the module list.
2812 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
2813 (main): Parse --memdisk|-m option, and pass user-provided path as
2814 parameter to generate_image().
2815 (add_segments): Pass `memdisk_path' down to load_modules().
2816 (load_modules): Embed memdisk image in module section when requested.
2817 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
2818 `header.type' instead of `header.offset'.
2820 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
2821 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
2822 (memdisk_mod_LDFLAGS): New variables.
2823 * conf/i386-coreboot.rmk: Likewise.
2824 * conf/i386-ieee1275.rmk: Likewise.
2826 2008-08-02 Robert Millan <rmh@aybabtu.com>
2828 * loader/i386/pc/multiboot.c (playground, forward_relocator)
2829 (backward_relocator): New variables. Used to allocate and relocate
2830 the payload, respectively.
2831 (grub_multiboot_load_elf32): Load into heap instead of requested
2832 address, install the appropriate relocator code in each bound of
2833 the payload, and set the entry point such that
2834 grub_multiboot_real_boot() will jump to one of them.
2836 * kern/i386/loader.S (grub_multiboot_payload_size)
2837 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2838 (grub_multiboot_payload_entry_offset): New variables.
2839 (grub_multiboot_real_boot): Set cpu context to what the relocator
2840 expects, and jump to the relocator instead of the payload.
2842 * include/grub/i386/loader.h (grub_multiboot_payload_size)
2843 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2844 (grub_multiboot_payload_entry_offset): Export.
2846 2008-08-01 Bean <bean123ch@gmail.com>
2848 * normal/menu_entry.c (editor_getline): Don't return the original
2849 string as result, as it will be released by lexer once it has done
2852 2008-08-01 Robert Millan <rmh@aybabtu.com>
2854 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
2855 within menuentries, not before them.
2856 util/grub.d/10_hurd.in: Likewise.
2858 2008-08-01 Bean <bean123ch@gmail.com>
2860 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
2861 (bufio_mod_SOURCES): New macro.
2862 (bufio_mod_CFLAGS): Likewise.
2863 (bufio_mod_LDFLAGS): Likewise.
2865 * include/grub/bufio.h: New file.
2867 * io/bufio.c: Likewise.
2869 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
2870 (grub_video_reader_png): Use grub_buffile_open to open file.
2872 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
2873 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
2875 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
2876 (grub_video_reader_tga): Use grub_buffile_open to open file.
2878 * font/manager.c: Include <grub/bufio.h>.
2879 (add_font): Use grub_buffile_open to open file.
2881 2008-07-31 Robert Millan <rmh@aybabtu.com>
2883 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
2884 ELF segments, use a macro for arbitrarily accessing any of them instead
2885 of preparing a pointer that allows access to one at a time.
2886 (grub_multiboot_load_elf64): Likewise.
2888 2008-07-31 Bean <bean123ch@gmail.com>
2890 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
2891 GRUB_KERNEL_MACHINE_DATA_END.
2893 2008-07-30 Robert Millan <rmh@aybabtu.com>
2895 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
2896 Increase from 0x50 to 0x60.
2897 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
2898 use UUIDs to identify the root drive for them. If that's not
2900 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
2901 check, for cross-disk installs.
2903 2008-07-30 Robert Millan <rmh@aybabtu.com>
2905 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
2906 is non-empty, use it to set the `prefix' environment variable instead
2907 of the usual approach.
2908 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
2909 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
2910 environment variable instead of dummy make_install_device().
2912 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
2913 (start): Insert a data section, with `grub_prefix' variable.
2914 * kern/i386/linuxbios/startup.S: Likewise.
2916 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
2917 New variable reference.
2918 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
2919 New macro. Defines offset of `grub_prefix' within startup.S (relative
2921 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
2922 section within startup.S (relative to `start').
2923 * include/grub/i386/coreboot/kernel.h: Likewise.
2925 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
2926 Overwrite grub_prefix with its contents, at the beginning of the
2928 (main): Understand -p|--prefix.
2930 2008-07-30 Robert Millan <rmh@aybabtu.com>
2932 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
2934 2008-07-30 Robert Millan <rmh@aybabtu.com>
2936 * term/i386/pc/vga_text.c (grub_console_cls): Use
2937 grub_console_gotoxy() to go back to beginning of the screen.
2938 Found by Patrick Georgi <patrick.georgi@coresystems.de>
2940 2008-07-29 Christian Franke <franke@computer.org>
2942 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2943 Add conversion of emulated mount points on Cygwin.
2945 2008-07-29 Christian Franke <franke@computer.org>
2947 * util/update-grub.in: Add a check for admin
2949 Remove old `grub.cfg.new' before creation.
2950 Add `-f' to `mv' to handle the different filesystem
2951 semantics of Windows.
2953 2008-07-29 Bean <bean123ch@gmail.com>
2955 * normal/main.c (get_line): Fix buffer overflow bug.
2957 2008-07-28 Robert Millan <rmh@aybabtu.com>
2959 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
2960 (struct grub_apple_header): New struct. Describes the layout of
2962 (apple_partition_map_iterate): Check the header magic as well as the
2963 partition magic (which was already being checked).
2965 2008-07-28 Pavel Roskin <proski@gnu.org>
2967 * genmk.rb: Add a warning to the beginning of the output that
2968 it's a generated file and should not be edited.
2970 2008-07-28 Robert Millan <rmh@aybabtu.com>
2972 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2973 with the same number are found, just use issue a warning with
2974 grub_dprintf(), as this error has been reported to be non-fatal.
2976 2008-07-27 Robert Millan <rmh@aybabtu.com>
2978 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
2981 2008-07-27 Bean <bean123ch@gmail.com>
2983 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
2984 (grub_fat_find_dir): Ignore case when comparing filename.
2986 2008-07-27 Bean <bean123ch@gmail.com>
2988 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
2989 smallino, as it's more descriptive, and i8count can be confused with
2990 the other field count.
2991 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
2994 2008-07-27 Bean <bean123ch@gmail.com>
2996 * commands/crc.c: New file.
2998 * lib/crc.c: Likewise.
3000 * include/grub/lib/crc.h: Likewise.
3002 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
3004 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
3005 (hexdump): Move this function to ...
3007 * lib/hexdump.c: ... here.
3009 * include/grub/hexdump.h: Renamed to ...
3011 * include/grub/lib/hexdump.h: ... this.
3013 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
3015 * util/grub-editenv.c: Likewise.
3017 * include/envblk.h: Renamed to ...
3019 * include/lib/envblk.h: ... this.
3021 * util/envblk.c: Renamed to ...
3023 * lib/envblk.c: ... this.
3025 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
3027 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
3028 (pkglib_MODULES): Add crc.mod.
3029 (hexdump_mod_SOURCES): Add lib/hexdump.c.
3030 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
3031 (crc_mod_SOURCES): New macro.
3032 (crc_mod_CFLAGS): Likewise.
3033 (crc_mod_LDFLAGS): Likewise.
3035 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
3037 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3039 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3041 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3043 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3045 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
3047 * commands/help.c: Include <grub/term.h>.
3048 (TERM_WIDTH): Removed. Updated all users.
3050 2008-07-27 Pavel Roskin <proski@gnu.org>
3052 * util/getroot.c (find_root_device): Rephrase a comment to avoid
3053 spurious warnings about a comment within a comment.
3055 2008-07-25 Robert Millan <rmh@aybabtu.com>
3057 * util/getroot.c (find_root_device): Skip devices that match
3058 /dev/dm-[0-9]. This lets the real device be found for any type of
3059 abstraction (LVM, EVMS, RAID..).
3060 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
3061 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
3062 device is found first, find_root_device() will now skip it.
3064 2008-07-24 Pavel Roskin <proski@gnu.org>
3066 * include/grub/types.h: Use __builtin_bswap32() and
3067 __builtin_bswap64() with gcc 4.3 and newer.
3069 2008-07-24 Christian Franke <franke@computer.org>
3071 * util/i386/pc/grub-install.in: If `--debug' is specified,
3072 pass `--verbose' to grub-setup.
3073 Abort script if make_system_path_relative_to_its_root() fails.
3075 2008-07-24 Bean <bean123ch@gmail.com>
3077 * configure.ac: Fixed a bug caused by the previous cygwin patch,
3078 variable `target_platform' should be `platform'.
3080 2008-07-24 Bean <bean123ch@gmail.com>
3082 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
3083 (grub_png_init_fixed_block): New function.
3084 (grub_png_decode_image_data): Handle fixed huffman code compression.
3086 2008-07-24 Bean <bean123ch@gmail.com>
3088 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
3089 (grub_pe2elf_SOURCES): New macro.
3090 (CLEANFILES): Add grub-pe2elf.
3092 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
3093 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
3094 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
3095 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
3096 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
3097 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
3098 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
3099 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
3100 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
3101 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
3102 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
3103 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
3104 (GRUB_PE32_DT_FUNCTION): Likewise.
3105 (GRUB_PE32_REL_I386_DIR32): Likewise.
3106 (GRUB_PE32_REL_I386_REL32): Likewise.
3107 (grub_pe32_symbol): New structure.
3108 (grub_pe32_reloc): Likewise.
3110 * util/grub-pe2elf.c: New file.
3112 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
3113 start symbol in non pc platform.
3115 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
3117 The following patches are from Christian Franke.
3119 * include/grub/dl.h: Remove .previous, gas supports this only
3122 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
3123 Remove .type, gas supports this only for ELF format.
3125 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
3126 nullbytes in symbol table. This fixes an infinite loop if table is
3129 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
3130 TARGET_IMG_LDFLAGS and EXEEXT.
3132 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
3133 TARGET_IMG_LDFLAGS_AC.
3134 (grub_CHECK_STACK_ARG_PROBE): New function.
3136 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
3138 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
3140 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
3141 to set TARGET_IMG_LD* accordingly.
3142 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
3143 Add call to grub_CHECK_STACK_ARG_PROBE.
3144 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
3146 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
3148 * genmk.rb: Add EXEEXT to CLEANFILES.
3150 2008-07-23 Robert Millan <rmh@aybabtu.com>
3152 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
3153 define the codes for arrows and lines used for the menu).
3154 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
3157 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
3158 fonts, because the latter are too slow.
3160 2008-07-21 Bean <bean123ch@gmail.com>
3162 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
3163 a20. Run keyboard test last, as it will cause macbook to halt.
3165 2008-07-18 Pavel Roskin <proski@gnu.org>
3167 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
3168 load foreign architecture modules correctly anyway. Keep
3169 support for loading host architecture modules, whether we
3170 compile them or not.
3172 2008-07-17 Pavel Roskin <proski@gnu.org>
3174 * configure.ac: Use -m32 or -m64 regardless of whether we had to
3175 change target_cpu. The compiler default can mismatch target_cpu
3178 * disk/efi/efidisk.c: Fix format warnings on x86_64.
3179 * kern/efi/efi.c: Likewise.
3181 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
3182 target compiler is functional.
3183 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
3186 * configure.ac: Default to efi platform for x86_64-apple. Allow
3187 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
3188 adjustments from the rest, only do them if target is not
3189 explicitly given. Merge other adjustments with the final sanity
3190 check. Remove an extraneous check for supported CPU. Be
3191 specific which CPU and which platform is not supported.
3193 * configure.ac: Default to pc platform for x86_64.
3195 2008-07-17 Robert Millan <rmh@aybabtu.com>
3197 Partial LinuxBIOS -> Coreboot rename.
3199 * conf/i386-linuxbios.rmk: Renamed to ...
3200 * conf/i386-coreboot.rmk: ... this.
3201 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
3202 * configure.ac: Accept "coreboot" as input platform (but maintain
3203 compatibility with "linuxbios").
3204 * include/grub/i386/linuxbios: Renamed to ...
3205 * include/grub/i386/coreboot: ... this.
3207 2008-07-17 Bean <bean123ch@gmail.com>
3209 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
3210 (appleldr_mod_SOURCE): New variable.
3211 (appleldr_mod_CFLAGS): Likewise.
3212 (appleldr_mod_LDFLAGS): Likewise.
3213 (pci_mod_SOURCES): Likewise.
3214 (pci_mod_CFLAGS): Likewise.
3215 (pci_mod_LDFLAGS): Likewise.
3216 (lspci_mod_SOURCES): Likewise.
3217 (lspci_mod_CFLAGS): Likewise.
3218 (lspci_mod_LDFLAGS): Likewise.
3220 * conf/x86_64-efi.rmk: New file.
3222 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
3224 (grub_efidisk_write): Likewise.
3226 * include/efi/api.h (efi_call_0): New macro.
3227 (efi_call_1): Likewise.
3228 (efi_call_2): Likewise.
3229 (efi_call_3): Likewise.
3230 (efi_call_4): Likewise.
3231 (efi_call_5): Likewise.
3232 (efi_call_6): Likewise.
3234 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
3235 grub_rescue_cmd_chainloader.
3237 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
3238 (grub_pe32_optional_header): Change some fields based on i386 or
3240 (GRUB_PE32_PE32_MAGIC): Likewise.
3242 * include/grub/efi/uga_draw.h: New file.
3244 * include/grub/elf.h (STN_ABS): New constant.
3245 (R_X86_64_NONE): Relocation constant for x86_64.
3246 (R_X86_64_64): Likewise.
3247 (R_X86_64_PC32): Likewise.
3248 (R_X86_64_GOT32): Likewise.
3249 (R_X86_64_PLT32): Likewise.
3250 (R_X86_64_COPY): Likewise.
3251 (R_X86_64_GLOB_DAT): Likewise.
3252 (R_X86_64_JUMP_SLOT): Likewise.
3253 (R_X86_64_RELATIVE): Likewise.
3254 (R_X86_64_GOTPCREL): Likewise.
3255 (R_X86_64_32): Likewise.
3256 (R_X86_64_32S): Likewise.
3257 (R_X86_64_16): Likewise.
3258 (R_X86_64_PC16): Likewise.
3259 (R_X86_64_8): Likewise.
3260 (R_X86_64_PC8): Likewise.
3262 * include/grub/i386/efi/pci.h: New file.
3264 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
3265 Change it value based on platform.
3266 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
3267 (GRUB_E820_RAM): Likewise.
3268 (GRUB_E820_RESERVED): Likewise.
3269 (GRUB_E820_ACPI): Likewise.
3270 (GRUB_E820_NVS): Likewise.
3271 (GRUB_E820_EXEC_CODE): Likewise.
3272 (GRUB_E820_MAX_ENTRY): Likewise.
3273 (grub_e820_mmap): New structure.
3274 (linux_kernel_header): Change the efi field according to different
3275 kernel version, also field from linux_kernel_header.
3277 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
3279 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
3280 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
3281 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
3282 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
3283 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
3284 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
3285 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
3286 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
3287 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
3288 (GRUB_PCI_ADDR_IO_MASK): Likewise.
3290 * include/grub/x86_64/efi/kernel.h: New file.
3292 * include/grub/x86_64/efi/loader.h: Likewise.
3294 * include/grub/x86_64/efi/machine.h: Likewise.
3296 * include/grub/x86_64/efi/pci.h: Likewise.
3298 * include/grub/x86_64/efi/time.h: Likewise.
3300 * include/grub/x86_64/linux.h: Likewise.
3302 * include/grub/x86_64/setjmp.h: Likewise.
3304 * include/grub/x86_64/time.h: Likewise.
3306 * include/grub/x86_64/types.h: Likewise.
3308 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
3309 GRUB_TARGET_SIZEOF_VOID_P.
3311 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
3312 (grub_efi_locate_handle): Likewise.
3313 (grub_efi_open_protocol): Likewise.
3314 (grub_efi_set_text_mode): Likewise.
3315 (grub_efi_stall): Likewise.
3316 (grub_exit): Likewise.
3317 (grub_reboot): Likewise.
3318 (grub_halt): Likewise.
3319 (grub_efi_exit_boot_services): Likewise.
3320 (grub_get_rtc): Likewise.
3322 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
3323 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
3324 (grub_efi_allocate_pages): Wrap efi calls.
3325 (grub_efi_free_pages): Wrap efi calls.
3326 (grub_efi_get_memory_map): Wrap efi calls.
3328 * kern/x86_64/dl.c: New file.
3330 * kern/x86_64/efi/callwrap.S: Likewise.
3332 * kern/x86_64/efi/startup.S: Likewise.
3334 * loader/efi/appleloader.c: Likewise.
3336 * loader/efi/chainloader.c (cmdline): New variable.
3337 (grub_chainloader_unload): Wrap efi calls.
3338 (grub_chainloader_boot): Likewise.
3339 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
3342 * loader/efi/chainloader_normal.c (chainloader_command):
3343 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
3346 * loader/i386/efi/linux.c (allocate_pages): Change allocation
3348 (grub_e820_add_region): New function.
3349 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
3351 (grub_find_video_card): New function.
3352 (grub_linux_setup_video): New function.
3353 (grub_rescue_cmd_linux): Probe for video information.
3355 * normal/x86_64/setjmp.S: New file.
3357 * term/efi/console.c (map_char): New function.
3358 (grub_console_putchar): Map unicode char.
3359 (grub_console_checkkey): Wrap efi calls.
3360 (grub_console_getkey): Likewise.
3361 (grub_console_getwh): Likewise.
3362 (grub_console_gotoxy): Likewise.
3363 (grub_console_cls): Likewise.
3364 (grub_console_setcolorstate): Likewise.
3365 (grub_console_setcursor): Likewise.
3367 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
3369 2008-07-16 Pavel Roskin <proski@gnu.org>
3371 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
3374 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
3375 pointer, not an integer. This fixes a warning and prevents
3376 precision loss on 64-bit systems.
3377 (relocate_addresses): Remove unneeded cast.
3379 2008-07-15 Pavel Roskin <proski@gnu.org>
3381 * kern/i386/ieee1275/init.c: Include grub/cache.h.
3383 * term/ieee1275/ofconsole.c: Disable code unused on i386.
3385 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
3386 Fix comparison between signed and unsigned.
3388 * include/grub/i386/ieee1275/console.h: Declare
3389 grub_console_init() and grub_console_fini().
3391 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
3392 It's empty and unused.
3394 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
3395 beginning to avoid warnings with some compilers.
3397 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
3398 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
3400 2008-07-14 Pavel Roskin <proski@gnu.org>
3402 * kern/env.c (grub_register_variable_hook): Don't copy empty
3403 string, it leaks memory. Pass "" to grub_env_set(), it should
3404 handle constant strings.
3406 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
3407 * commands/cmp.c (grub_cmd_cmp): Likewise.
3408 * kern/dl.c (grub_dl_flush_cache): Likewise.
3409 (grub_dl_load_core): Likewise.
3410 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
3411 (grub_elf64_load_phdrs): Likewise.
3413 2008-07-13 Pavel Roskin <proski@gnu.org>
3415 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
3416 between signed and unsigned.
3417 (LzmaEnc_Finish): Fix warning about an unused parameter.
3419 2008-07-13 Bean <bean123ch@gmail.com>
3421 * Makefile.in (enable_lzo): New rule.
3423 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
3425 * configure.ac (ENABLE_LZO): New option --enable-lzo.
3427 * boot/i386/pc/lnxboot.S: #include <config.h>.
3429 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
3430 its value according to the compression algorithm used, lzo or lzma.
3432 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
3433 compression algorithm according to configure macro.
3435 * kern/i386/pc/startup.S (codestart): Likewise.
3437 * kern/i386/pc/lzma_decode.S: New file.
3439 * include/grub/lib/LzFind.h: Likewise.
3441 * include/grub/lib/LzHash.h: Likewise.
3443 * include/grub/lib/LzmaDec.h: Likewise.
3445 * include/grub/lib/LzmaEnc.h: Likewise.
3447 * include/grub/lib/LzmaTypes.h: Likewise.
3449 * lib/LzFind.c: Likewise.
3451 * lib/LzmaDec.c: Likewise.
3453 * lib/LzmaEnc.c: Likewise.
3455 2008-07-13 Bean <bean123ch@gmail.com>
3457 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
3458 (grub_ext4_extent_header): New structure.
3459 (grub_ext4_extent): Likewise.
3460 (grub_ext4_extent_idx): Likewise.
3461 (grub_ext4_find_leaf): New function.
3462 (grub_ext2_read_block): Handle extents.
3464 2008-07-12 Robert Millan <rmh@aybabtu.com>
3466 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
3468 2008-07-11 Robert Millan <rmh@aybabtu.com>
3470 * util/grub.d/40_custom.in: New file. Example on how to add custom
3471 entries to /etc/grub.d.
3472 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
3473 40_custom (implicitly, by merging all the grub.d rules).
3475 2008-07-11 Pavel Roskin <proski@gnu.org>
3477 * commands/read.c (grub_getline): Fix invalid memory access.
3478 Don't add newline to the variable value.
3480 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
3481 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
3482 (serial_hw_get_port): Check validity of the port number.
3483 (grub_cmd_serial): Check return value of serial_hw_get_port().
3485 2008-07-07 Pavel Roskin <proski@gnu.org>
3487 * boot/i386/pc/diskboot.S (notification_string): Replace
3488 "Loading kernel" with just "loading". This is shorter, less
3489 confusing and saves a few bytes for possible future changes.
3491 2008-07-05 Pavel Roskin <proski@gnu.org>
3493 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
3494 size for ATAPI devices, they are undefined. Output sector
3495 number in decimal form.
3497 * disk/ata.c: Use named constants for status bits.
3499 2008-07-04 Pavel Roskin <proski@gnu.org>
3501 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
3502 grub_addr_t before casting it to the void pointer to fix a
3503 warning. Non-addressable regions are discarded earlier.
3504 (grub_arch_modules_addr): Cast _end to grub_addr_t.
3505 * kern/i386/linuxbios/table.c: Include grub/misc.h.
3506 (check_signature): Don't shadow table_header.
3507 (grub_linuxbios_table_iterate): Cast numeric constants to
3508 grub_linuxbios_table_header_t.
3509 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
3512 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
3515 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
3516 pointer, which can cause warnings. Support 64-bit addresses.
3518 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
3519 of sizeof(long). This fixes PowerPC image generation on x86_64.
3521 2008-07-04 Robert Millan <rmh@aybabtu.com>
3523 This fixes a performance issue when pc & gpt partmap iterators
3524 didn't abort iteration even after our hook found what it was
3525 looking for (often causing expensive probes of non-existent drives).
3527 Some callers relied on previous buggy behaviour, since they would
3528 raise an error when their own hooks caused early abortion of its
3531 * kern/device.c (grub_device_open): Improve error message.
3532 * disk/lvm.c (grub_lvm_open): Likewise.
3533 * disk/raid.c (grub_raid_open): Likewise.
3535 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
3536 when hook requests it, independently of grub_errno.
3537 (pc_partition_map_probe): Do not fail when find_func() caused
3538 early abortion of pc_partition_map_iterate().
3540 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
3541 when hook requests it, independently of grub_errno.
3542 (gpt_partition_map_probe): Do not fail when find_func() caused
3543 early abortion of gpt_partition_map_iterate().
3545 * kern/partition.c (grub_partition_iterate): Abort parent iteration
3546 when hook requests it, independently of grub_errno. Do not fail when
3547 part_map_iterate_hook() caused early abortion of p->iterate().
3549 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
3550 when grub_partition_iterate() returned with non-zero.
3552 2008-07-03 Pavel Roskin <proski@gnu.org>
3554 * disk/ata.c (grub_ata_pio_write): Check status before writing,
3555 like we do in grub_ata_pio_read().
3556 (grub_ata_readwrite): Always write individual sectors. Fix the
3557 sector count for the remainder.
3558 (grub_ata_write): Enable writing to ATA devices. Correctly
3559 report error for ATAPI devices.
3561 2008-07-02 Pavel Roskin <proski@gnu.org>
3563 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
3566 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
3567 for every read sector, we already increment it for the whole
3568 batch. This fixes reading more than 256 sectors at once.
3570 * util/grub-editenv.c (cmd_info): Cast argument to long
3571 explicitly. ptrdiff_t reduces to int on i386.
3573 * util/grub-editenv.c (main): Be specific which parameter is
3576 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
3577 (memdisk): Make memdisk_orig_addr a pointer.
3579 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
3580 for file offsets, use grub_off_t instead. Fix printf format
3583 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
3584 there. Real unexpected warnings should not drown in the noise
3585 about known problems.
3587 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
3588 grub_disk_addr_t for memory addresses.
3590 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
3591 explicitly to fix a warning.
3593 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
3595 * Makefile.in (MODULE_LDFLAGS): New variable.
3596 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
3597 the linker accepts --build-id=none.
3598 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
3600 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
3602 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
3603 those in Linux XFS code. Provide a way to access 64-bit parent
3605 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
3606 the end of struct grub_xfs_dir_header.
3608 2008-07-02 Bean <bean123ch@gmail.com>
3610 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
3611 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3612 and GRUB_IEEE1275_FLAG_NO_ANSI.
3614 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
3615 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3616 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
3618 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
3619 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
3621 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
3622 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
3624 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
3625 esc sequence on non ANSI terminal.
3626 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
3628 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
3631 2008-07-02 Bean <bean123ch@gmail.com>
3633 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
3634 (grub_editenv_SOURCES): New variable.
3635 (pkglib_MODULES): Add loadenv.mod.
3636 (loadenv_mod_SOURCES): New variable.
3637 (loadenv_mod_CFLAGS): Likewise.
3638 (loadenv_mod_LDFLAGS): Likewise.
3640 * include/grub/envblk.h: New file.
3642 * util/envblk.c: New file.
3644 * util/grub-editenv.c: New file.
3646 * commands/loadenv.c: New file.
3648 2008-07-01 Pavel Roskin <proski@gnu.org>
3650 * include/multiboot2.h (struct multiboot_tag_module): Use char,
3651 not unsigned char. This fixes warnings and is consistent with
3654 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
3656 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
3658 * term/tparm.c (analyze): Always set *popcount.
3660 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
3661 cast to fix a warning.
3663 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
3664 cast to suppress a warning.
3666 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
3667 grub_fshelp_read_file() expects.
3669 * fs/fat.c: Fix UUID calculation on big-endian systems. We
3670 write uuid as a 32-bit value in CPU byte order, so declare and
3673 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
3674 long if the format specifier expects it.
3675 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
3676 * partmap/pc.c (pc_partition_map_iterate): Likewise.
3677 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
3678 long to fix a warning.
3679 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
3680 grub_dprintf() arguments to fix warnings.
3682 2008-06-30 Pavel Roskin <proski@gnu.org>
3684 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
3685 install_bsd_part immediately before core.img is embedded or
3686 modified on disk. This fixes core.img verification if core.img
3689 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
3690 core_path to calculate the blocklist.
3691 Patch from Javier MartÃn <lordhabbit@gmail.com>
3693 2008-06-29 Robert Millan <rmh@aybabtu.com>
3695 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
3696 block to disk block.
3697 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
3698 Patch from Niels Böhm <bitbucket@arcor.de>
3700 2008-06-29 Robert Millan <rmh@aybabtu.com>
3702 * util/update-grub_lib.in (font_path): Search for fonts in
3703 /boot/grub first, which is more likely to be readable (we aren't
3704 deciding where fonts live, just looking for them).
3706 2008-06-26 Pavel Roskin <proski@gnu.org>
3708 * util/biosdisk.c (read_device_map): Don't leave dead map
3709 entries for devices failing stat() check.
3711 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
3712 core_path_dev for the core.img path on the target device.
3714 2008-06-26 Robert Millan <rmh@aybabtu.com>
3716 * disk/fs_uuid.c: New file.
3717 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
3718 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
3719 (fs_uuid_mod_LDFLAGS): New variables.
3720 * include/grub/disk.h (grub_disk_dev_id): Add
3721 `GRUB_DISK_DEVICE_UUID_ID'.
3722 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
3723 implement iterate().
3725 2008-06-26 Robert Millan <rmh@aybabtu.com>
3727 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
3728 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
3729 Linux image includes no initrd.
3731 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
3733 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
3734 call to resolve the core image location that effectively appended the
3737 2008-06-21 Robert Millan <rmh@aybabtu.com>
3739 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
3742 * util/grub.d/10_hurd.in: ... to here ...
3743 * util/grub.d/10_linux.in: ... and here.
3745 2008-06-19 Robert Millan <rmh@aybabtu.com>
3747 * kern/main.c (grub_main): Export `prefix' variable immediately
3748 after it has been set by grub_machine_set_prefix().
3750 2008-06-19 Robert Millan <rmh@aybabtu.com>
3752 * commands/search.c (search_label, search_fs_uuid, search_file): Print
3753 search result when not saving to variable, not the other way around.
3754 When saving to variable, abort iteration as soon as a match is found.
3756 2008-06-19 Robert Millan <rmh@aybabtu.com>
3758 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
3759 check for partition that provides /boot/grub. Its logic is flawed,
3760 as it prevents prepare_grub_to_access_device() from being called
3763 2008-06-19 Robert Millan <rmh@aybabtu.com>
3765 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
3766 "insmod" command directly when abstraction modules are needed,
3767 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3768 since it had already been processed).
3770 2008-06-19 Pavel Roskin <proski@gnu.org>
3772 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
3773 changed. This is needed in case GRUB_LIBDIR changes.
3774 * conf/i386-ieee1275.rmk: Likewise.
3775 * conf/i386-linuxbios.rmk: Likewise.
3776 * conf/i386-pc.rmk: Likewise.
3777 * conf/powerpc-ieee1275.rmk: Likewise.
3779 2008-06-18 Pavel Roskin <proski@gnu.org>
3781 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
3782 kernel_elf_symlist.c to symlist.c for consistency with other
3783 architectures. Update all users.
3784 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3786 2008-06-18 Robert Millan <rmh@aybabtu.com>
3788 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
3791 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
3792 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
3793 a RAID device, run setup() for all members independently on whether
3794 LVM abstraction is being used.
3795 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
3796 If grub-mkimage has set `*install_dos_part == -2', don't override this
3798 Perform *install_dos_part adjustments independently on whether
3799 we're embedding or not.
3800 Clarify error message when image is too big for embedding.
3801 Remove duplicate *install_dos_part stanza.
3803 2008-06-17 Robert Millan <rmh@aybabtu.com>
3805 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
3806 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
3808 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
3809 values in grub_ofconsole_normal_color and
3810 grub_ofconsole_highlight_color (they're not directly related to
3811 background and foreground).
3812 (grub_ofconsole_setcolorstate): Extract background and foreground
3813 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
3815 2008-06-17 Robert Millan <rmh@aybabtu.com>
3817 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
3818 /boot/grub for the check in last commit, not /boot (they could be
3819 different partitions).
3821 2008-06-16 Robert Millan <rmh@aybabtu.com>
3823 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
3824 asked to setup access for the same partition that provides /boot,
3825 don't bother using UUIDs since our root already has the value we
3828 2008-06-16 Robert Millan <rmh@aybabtu.com>
3830 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
3832 Patch from Sven Mueller <sven@debian.org>.
3834 2008-06-16 Robert Millan <rmh@aybabtu.com>
3836 * util/update-grub.in: Check for $EUID instead of $UID.
3837 Reported by Vincent Zweije.
3839 2008-06-16 Bean <bean123ch@gmail.com>
3841 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
3842 (grub_ext2_read_block): Likewise.
3843 (grub_ext2_read_inode): Likewise.
3844 (grub_ext2_mount): Likewise.
3845 (grub_ext2_close): Likewise.
3846 (grub_ext3_get_journal): Removed.
3848 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
3849 (grub_reiserfs_read_symlink): Likewise.
3850 (grub_reiserfs_mount): Likewise.
3851 (grub_reiserfs_open): Likewise.
3852 (grub_reiserfs_read): Likewise.
3853 (grub_reiserfs_close): Likewise.
3854 (grub_reiserfs_get_journal): Removed.
3856 * fs/fshelp.c (grub_fshelp_read): Removed.
3857 (grub_fshelp_map_block): Likewise.
3859 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
3860 (grub_fshelp_journal): Likewise.
3861 (grub_fshelp_read): Likewise.
3862 (grub_fshelp_map_block): Likewise.
3864 2008-06-16 Pavel Roskin <proski@gnu.org>
3866 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
3867 floating point anymore.
3868 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
3870 2008-06-15 Pavel Roskin <proski@gnu.org>
3872 * commands/ls.c (grub_ls_list_files): Use integer calculations
3873 for human readable format, avoid floating point use.
3874 * kern/misc.c (grub_ftoa): Remove.
3875 (grub_vsprintf): Remove floating point support.
3877 2008-06-15 Robert Millan <rmh@aybabtu.com>
3879 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
3881 Reported by Max Vozeler.
3883 2008-06-15 Robert Millan <rmh@aybabtu.com>
3885 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
3886 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
3888 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
3889 the beginning of the prefix.
3891 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
3892 It is assumed that if we have a memdisk, grub-mkimage has set
3893 grub_prefix to include the "(memdisk)" drive in it.
3895 2008-06-15 Robert Millan <rmh@aybabtu.com>
3897 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
3898 Initialize keyboard controller after registering the terminal, so that
3899 grub_printf() can be called from grub_keyboard_controller_init().
3901 2008-06-15 Robert Millan <rmh@aybabtu.com>
3903 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
3904 extent-btree which is written as big endian on disk.
3905 Reported by Alain Greppin <al@chilibi.org>.
3907 2008-06-14 Robert Millan <rmh@aybabtu.com>
3909 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
3910 * util/i386/pc/grub-install.in (modules): Likewise.
3912 2008-06-13 Pavel Roskin <proski@gnu.org>
3914 * commands/ls.c (grub_ls_list_files): Fix format warnings.
3916 2008-06-13 Bean <bean123ch@gmail.com>
3918 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
3920 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
3922 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
3923 to indicate sparse block.
3925 2008-06-12 Pavel Roskin <proski@gnu.org>
3927 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
3928 number, grub_fshelp_read() does it for us.
3930 * fs/fshelp.c (grub_fshelp_read): New function. Implement
3931 linear disk read with journal translation.
3932 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
3933 * include/grub/fshelp.h: Declare grub_fshelp_read().
3935 2008-06-09 Pavel Roskin <proski@gnu.org>
3937 * fs/minix.c (grub_minix_mount): Handle error reading
3940 2008-06-08 Robert Millan <rmh@aybabtu.com>
3942 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
3943 don't append the RAID prefix afterwards.
3944 Reported by Clint Adams.
3946 2008-06-08 Robert Millan <rmh@aybabtu.com>
3948 Based on description from Pavel:
3949 * kern/disk.c (grub_disk_check_range): Rename to ...
3950 (grub_disk_adjust_range): ... this. Add a comment explaining the
3951 tasks performed by this function.
3953 2008-06-08 Robert Millan <rmh@aybabtu.com>
3955 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
3956 `num_serial' (for consistency with other variables).
3957 (struct grub_ntfs_data): Add `uuid' member.
3958 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
3959 (grub_ntfs_uuid): New function.
3960 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
3962 2008-06-07 Pavel Roskin <proski@gnu.org>
3964 * util/biosdisk.c (open_device): Revert last change to the
3965 function, it broke installation. The sector needs to be
3966 different dependent on which device is opened.
3968 2008-06-06 Robert Millan <rmh@aybabtu.com>
3970 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
3971 rest of GRUB, and breakage doesn't happen if its value were modified.
3973 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
3974 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
3975 a constant (same value).
3976 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
3977 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
3979 2008-06-06 Robert Millan <rmh@aybabtu.com>
3981 * util/biosdisk.c (open_device): Do not modify sector offset when
3982 accessing a partition. kern/disk.c already handles this for us.
3984 2008-06-06 Robert Millan <rmh@aybabtu.com>
3986 * util/grub-emu.c (grub_machine_init): Move code in this function from
3988 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
3989 segfault in case grub_printf() is called).
3991 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
3992 grub_probe. Update all users not to explicitly add it again.
3993 (grub_device): New variable; contains corresponding device for grubdir.
3994 (fs_module, partmap_module, devabstraction_module): Pass
3995 `--device ${grub_device}' to grub_probe to avoid traversing /dev
3998 2008-06-05 Robert Millan <rmh@aybabtu.com>
4000 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
4001 is found, print it (same layout as with labels).
4003 2008-06-04 Robert Millan <rmh@aybabtu.com>
4005 * util/biosdisk.c (get_drive): Rename to ...
4006 (find_grub_drive): ... this. Update all users.
4008 (get_os_disk): Rename to ...
4009 (convert_system_partition_to_system_disk): ... this. Update all users.
4011 (find_drive): Rename to ...
4012 (find_system_device): ... this. Update all users.
4014 2008-06-04 Robert Millan <rmh@aybabtu.com>
4016 * util/biosdisk.c (get_os_disk): Handle IDA devices.
4017 * util/grub-mkdevicemap.c (get_mmc_disk_name)
4018 (make_device_map): Likewise.
4020 2008-06-01 Robert Millan <rmh@aybabtu.com>
4022 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
4023 before dereferencing it.
4025 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
4026 union with fat12/fat16-specific ones. Add some new fields, including
4027 `num_serial' for both versions.
4028 (struct grub_fat_data): Add `uuid' member.
4029 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
4030 names. Initialize `data->uuid' using `num_serial'.
4031 (grub_fat_uuid): New function.
4032 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
4034 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
4035 (grub_reiserfs_uuid): New function.
4036 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
4039 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
4040 (grub_xfs_uuid): New function.
4041 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
4043 2008-06-01 Robert Millan <rmh@aybabtu.com>
4045 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
4046 code that is backward compatible with pre-uuid search command.
4048 2008-05-31 Robert Millan <rmh@aybabtu.com>
4050 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
4051 floppies after everything else, to ensure floppy drive isn't accessed
4052 unnecessarily (patch from Bean).
4054 2008-05-31 Robert Millan <rmh@aybabtu.com>
4056 * commands/search.c (search_label, search_fs_uuid, search_file): Do
4057 not print device names when we were asked to set a variable.
4059 2008-05-31 Robert Millan <rmh@aybabtu.com>
4061 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
4062 using "cursor-on" and "cursor-off" commands (understood at least by
4063 the Open Firmware flavour on OLPC).
4065 2008-05-31 Michael Gorven <michael@gorven.za.net>
4067 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
4068 on and off sequences.
4070 2008-05-31 Robert Millan <rmh@aybabtu.com>
4072 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
4073 * util/update-grub.in: Likewise.
4075 2008-05-30 Pavel Roskin <proski@gnu.org>
4077 * util/biosdisk.c (linux_find_partition): Simplify logic and
4078 make the code more universal. Keep special processing for
4079 devfs, but use a simple rule for all other devices. If the
4080 device ends with a number, append 'p' and the partition number.
4081 Otherwise, append only the partition number.
4083 2008-05-30 Robert Millan <rmh@aybabtu.com>
4085 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
4086 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
4087 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
4088 the `root' parameter to Linux.
4090 2008-05-30 Robert Millan <rmh@aybabtu.com>
4092 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
4093 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
4094 --fs_uuid with --fs-uuid.
4095 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
4096 all filesystems support them).
4098 2008-05-30 Robert Millan <rmh@aybabtu.com>
4100 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
4101 grub_printf() flags, since we're printing in units of 2 bytes.
4103 2008-05-30 Robert Millan <rmh@aybabtu.com>
4105 * util/grub.d/00_header.in: Remove obsolete comment referencing
4106 convert_system_path_to_grub_path().
4107 * util/update-grub.in: Likewise.
4108 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
4109 (convert_system_path_to_grub_path): Add a warning message explaining
4110 that this function is deprecated. Rely on is_path_readable_by_grub()
4111 for the readability checks.
4112 (font_path): Use is_path_readable_by_grub() for the readability
4113 check rather than convert_system_path_to_grub_path().
4115 2008-05-30 Robert Millan <rmh@aybabtu.com>
4117 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
4118 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
4119 converting it first.
4120 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
4121 grub.cfg for access to font file, and afterwards call it again to set
4124 2008-05-30 Robert Millan <rmh@aybabtu.com>
4126 * commands/search.c (options): Add --fs_uuid option.
4127 (search_fs_uuid): New function.
4128 (grub_cmd_search): Fix --set argument passing.
4129 Use search_fs_uuid() when requested via --fs_uuid.
4130 (grub_search_init): Update help message.
4131 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
4132 and redeclare it as an array of 16-bit words.
4133 (grub_ext2_uuid): New function.
4134 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
4135 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
4136 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
4137 (GRUB_DEVICE_BOOT_UUID): New variables.
4138 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
4139 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
4141 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
4142 just assume `root' variable has the right value.
4143 * util/grub.d/10_linux.in: Likewise.
4144 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
4146 (main): Recognise `-t fs_uuid' argument.
4148 2008-05-30 Robert Millan <rmh@aybabtu.com>
4150 * util/biosdisk.c (map): Redefine structure to hold information
4151 about GRUB drive name.
4152 (get_drive): Reimplement without assuming (and verifying) BIOS-like
4154 (call_hook): Remove.
4155 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
4156 member. Assume drive has partitions.
4157 (grub_util_biosdisk_open): Access device names via `.device' struct
4159 (open_device): Likewise.
4160 (find_drive): Likewise.
4161 (read_device_map): Adjust map[] usage to match the new struct
4162 definition. Don't check for duplicates (still possible, but not cheap
4164 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
4165 (make_device_name): Remove assumption of BIOS-like drive names.
4167 2008-05-30 Pavel Roskin <proski@gnu.org>
4169 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
4170 compiling execute.c doesn't need grub_script.tab.h anymore.
4171 (normal/command.c_DEPENDENCIES): Likewise.
4172 (normal/function.c_DEPENDENCIES): Likewise.
4173 * conf/i386-ieee1275.rmk: Likewise.
4174 * conf/i386-linuxbios.rmk: Likewise.
4175 * conf/i386-pc.rmk: Likewise.
4176 * conf/powerpc-ieee1275.rmk: Likewise.
4177 * conf/sparc64-ieee1275.rmk: Likewise.
4179 2008-05-29 Pavel Roskin <proski@gnu.org>
4181 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
4182 when scanning metadata for volume group name.
4184 * include/grub/script.h: Don't include grub_script.tab.h. It's
4185 a generated file, which may only be included from the files with
4186 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
4187 use union YYSTYPE, as the later allows forward declaration.
4188 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
4190 2008-05-29 Robert Millan <rmh@aybabtu.com>
4192 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
4193 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
4194 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
4195 (grub_console_checkkey): Add grub_dprintf() call to report unknown
4198 2008-05-29 Robert Millan <rmh@aybabtu.com>
4200 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
4201 control key combinations.
4203 2008-05-29 Robert Millan <rmh@aybabtu.com>
4205 * util/powerpc/ieee1275/grub-install.in: Move from here ...
4206 * util/ieee1275/grub-install.in: ... to here.
4207 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
4208 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
4209 (grub_install_SOURCES): Likewise.
4211 2008-05-29 Robert Millan <rmh@aybabtu.com>
4213 * fs/affs.c: Update copyright year.
4214 * fs/ext2.c: Likewise.
4215 * fs/fshelp.c: Likewise.
4216 * fs/hfsplus.c: Likewise.
4217 * fs/ntfs.c: Likewise.
4218 * fs/xfs.c: Likewise.
4219 * include/grub/fshelp.h: Likewise.
4220 * util/grub-mkdevicemap.c: Likewise.
4222 2008-05-28 Robert Millan <rmh@aybabtu.com>
4224 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
4225 might need to be fatfs to support some firmware implementations
4228 2008-05-28 Robert Millan <rmh@aybabtu.com>
4230 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
4232 * util/grub-mkdevicemap.c (get_mmc_disk_name)
4233 (make_device_map): Likewise.
4235 2008-05-20 Bean <bean123ch@gmail.com>
4237 * fs/fshelp.c (grub_fshelp_map_block): New function.
4238 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
4239 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
4241 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
4242 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
4243 (grub_fshelp_journal): New structure.
4244 (grub_fshelp_map_block): New function prototype.
4245 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
4246 (grub_fshelp_map_block): Likewise.
4248 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
4249 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
4250 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
4251 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
4252 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
4253 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
4254 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
4255 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
4256 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
4257 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
4258 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
4259 (grub_ext2_sblock): New members for journal support.
4260 (grub_ext3_journal_header): New structure.
4261 (grub_ext3_journal_revoke_header): Likewise.
4262 (grub_ext3_journal_block_tag): Likewise.
4263 (grub_ext3_journal_sblock): Likewise.
4264 (grub_fshelp_node): New members logfile and journal.
4265 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
4266 grub_fshelp_map_block to get real block number.
4267 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
4269 (grub_ext2_read_inode): Likewise.
4270 (grub_ext3_get_journal): New function.
4271 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
4272 (grub_ext2_close): Release memory used by journal.
4274 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
4275 (REISERFS_MAGIC_DESC_BLOCK): New macro.
4276 (grub_reiserfs_transaction_header): Renamed to
4277 grub_reiserfs_description_block, replace field data with real_blocks.
4278 (grub_reiserfs_commit_block): New structure.
4279 (grub_reiserfs_data): New member journal.
4280 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
4282 (grub_reiserfs_read_symlink): Likewise.
4283 (grub_reiserfs_iterate_dir): Likewise.
4284 (grub_reiserfs_open): Likewise.
4285 (grub_reiserfs_read): Likewise.
4286 (grub_reiserfs_get_journal): New function.
4287 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
4288 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
4289 using grub_reiserfs_get_journal.
4290 (grub_reiserfs_close): Release memory used by journal.
4292 * fs/affs.c (grub_affs_read_block): Change block type to
4293 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
4295 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
4297 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
4299 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
4301 * fs/udf.c (grub_udf_read_block): Change block type to
4302 grub_disk_addr_t. Use type cast to avoid warning.
4304 * fs/xfs.c (grub_xfs_read_block): Likewise.
4306 2008-05-16 Christian Franke <franke@computer.org>
4308 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
4309 to ensure that break with ESC will always work.
4310 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
4311 Remove ESC from keyboard queue.
4313 2008-05-16 Christian Franke <franke@computer.org>
4315 * util/biosdisk.c: [__CYGWIN__] Add includes.
4316 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
4317 (get_os_disk): Move variable declarations to OS specific
4318 parts to avoid warning.
4319 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
4320 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
4321 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
4323 * util/getroot.c: [__CYGWIN__] Add includes.
4324 (strip_extra_slashes): Fix "/" case.
4325 [__CYGWIN__] (get_win32_path): New function.
4326 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
4327 [__CYGWIN__] (find_root_device): Disable.
4328 [__CYGWIN__] (get_bootsec_serial): New function.
4329 [__CYGWIN__] (find_cygwin_root_device): Likewise.
4330 [__linux__] (grub_guess_root_device): Add early returns to simplify
4332 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
4333 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
4334 check for Linux only.
4336 2008-05-15 Bean <bean123ch@gmail.com>
4338 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
4339 keyboard hang problem in apple's intel mac.
4341 2008-05-09 Robert Millan <rmh@aybabtu.com>
4343 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
4345 * util/grub-mkdevicemap.c (get_virtio_disk_name)
4346 (make_device_map): Likewise.
4347 Reported by Aurelien Jarno <aurel32@debian.org>
4349 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
4351 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
4352 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
4353 (make_device_map): Output entries for xvd type disks.
4355 2008-05-07 Robert Millan <rmh@aybabtu.com>
4357 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
4359 * util/grub-mkdevicemap.c (get_cciss_disk_name)
4360 (make_device_map): Likewise.
4361 Reported by Roland Dreier <rdreier@cisco.com>
4363 2008-05-07 Robert Millan <rmh@aybabtu.com>
4365 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
4366 grub_strstr() call. Correct a few mistakes in failure path handling.
4368 2008-05-06 Robert Millan <rmh@aybabtu.com>
4370 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4371 Do not print a trailing slash (therefore, the root directory is an
4373 (convert_system_path_to_grub_path): Do not remove trailing slash
4374 from make_system_path_relative_to_its_root() output.
4376 * util/i386/pc/grub-install.in: Add trailing slash to output from
4377 make_system_path_relative_to_its_root().
4379 2008-05-06 Robert Millan <rmh@aybabtu.com>
4381 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
4382 ensures that output lines aren't intermangled with those sent to
4383 stderr (via grub_util_info()).
4384 * util/grub-probe.c (grub_refresh): Likewise.
4385 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
4387 2008-05-05 Christian Franke <franke@computer.org>
4389 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
4390 Add Cygwin device names.
4391 (get_ide_disk_name) [__CYGWIN__]: Likewise.
4392 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
4393 (check_device): Return error instead of success on empty name.
4394 (make_device_map): Move label inside linux specific code to
4395 prevent compiler warning.
4397 2008-04-30 Robert Millan <rmh@aybabtu.com>
4399 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
4400 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
4402 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
4404 2008-04-29 Robert Millan <rmh@aybabtu.com>
4406 * docs/grub.cfg: New file (example GRUB configuration).
4408 2008-04-26 Robert Millan <rmh@aybabtu.com>
4410 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
4411 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
4412 and `disk/ieee1275/nand.c'.
4414 2008-04-25 Bean <bean123ch@gmail.com>
4416 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
4419 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
4420 change the buffer size to 4096 for cdrom device.
4422 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
4424 (_linux_mod_SOURCES): New variable.
4425 (_linux_mod_CFLAGS): Likewise.
4426 (_linux_mod_LDFLAGS): Likewise.
4427 (linux_mod_SOURCES): Likewise.
4428 (linux_mod_CFLAGS): Likewise.
4429 (linux_mod_LDFLAGS): Likewise.
4430 (nand_mod_SOURCES): Likewise.
4431 (nand_mod_CFLAGS): Likewise.
4432 (nand_mod_LDFLAGS): Likewise.
4434 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
4435 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
4436 type property. (nand device in olpc don't have this property)
4438 * include/grub/disk.h (grub_disk_dev_id): New macro
4439 GRUB_DISK_DEVICE_NAND_ID.
4441 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
4443 (grub_rescue_cmd_initrd): Likewise.
4445 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
4446 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
4447 ofw_cif_handler and ofw_idt, adjust padding number.
4449 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
4450 GRUB_MACHINE_IEEE1275 is defined.
4452 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
4453 Use NESTED_FUNC_ATTR attribute on the hook parameter.
4455 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
4456 on nested function heap_init.
4457 (grub_upper_mem): New variable for i386-ieee1275.
4458 (grub_get_extended_memory): New function for i386-ieee1275.
4459 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
4461 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
4462 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
4465 * loader/i386/ieee1275/linux.c: New file.
4467 * loader/i386/ieee1275/linux_normal.c: New file.
4469 * disk/ieee1275/nand.c: New file.
4471 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
4473 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
4475 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
4477 2008-04-18 Robert Millan <rmh@aybabtu.com>
4479 Restructures early code path on ieee1275 to unify grub_main() as
4480 the first C function that is executed in every platform.
4482 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
4483 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
4485 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
4486 * kern/ieee1275/cmain.c (cmain): Rename to ...
4487 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
4488 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
4491 2008-04-18 Robert Millan <rmh@aybabtu.com>
4493 * util/update-grub.in: Fix syntax error when setting
4494 `GRUB_PRELOAD_MODULES'.
4495 Reported by Stephane Chazelas <stephane@artesyncp.com>
4497 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
4499 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
4500 section into account, newer toolchains generate unique build ids
4501 * configure.ac: remove the test for --build-id=none acceptance,
4502 we want build ids to be preserved
4503 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
4504 far from other sections don't cause the raw binary images grow
4507 2008-04-15 Robert Millan <rmh@aybabtu.com>
4509 * disk/lvm.c: Update copyright year.
4510 * kern/misc.c: Likewise.
4512 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
4514 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
4515 there is no memory left for physical volume name.
4517 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
4519 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
4520 volume name mapping to support bigger than 9 character names properly.
4522 2008-04-13 Robert Millan <rmh@aybabtu.com>
4524 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
4525 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
4527 2008-04-13 Christian Franke <franke@computer.org>
4529 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
4530 to create a floppy emulation boot CD when non emulation mode
4532 Enable Joliet CD filesystem extension.
4534 2008-04-13 Robert Millan <rmh@aybabtu.com>
4536 * kern/misc.c (grub_strncat): Fix off-by-one error.
4537 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
4539 * kern/env.c (grub_env_context_close): Clear current context, not
4541 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
4543 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
4545 2008-04-13 Robert Millan <rmh@aybabtu.com>
4547 Improve robustness when handling LVM.
4549 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
4550 (and leave `*p' unmodified).
4551 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
4553 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
4554 iterating through it.
4555 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
4557 (grub_lvm_scan_device): Check the return value (and fail gracefully
4558 when due) on each grub_lvm_getvalue() or grub_strstr() call.
4559 Don't assume `vg->pvs != NULL' when iterating through it.
4561 2008-04-13 Robert Millan <rmh@aybabtu.com>
4563 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
4564 * genmk.rb (partmap): New variable.
4565 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
4566 (#{partmap}): New target rule.
4567 * genpartmaplist.sh: New file.
4568 * Makefile.in (pkglib_DATA): Add partmap.lst.
4569 (partmap.lst): New target rule.
4570 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
4571 modules (including all partition maps), instead of preloading them.
4573 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
4575 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
4576 `linux-boot-prober' (if installed) to detect other operating
4577 systems which are installed on the computer and add them to
4579 * conf/common.rmk: Build and install 30_os-prober.
4581 2008-04-12 Robert Millan <rmh@aybabtu.com>
4583 * kern/powerpc/ieee1275/init.c: Move from here ...
4584 * kern/ieee1275/init.c: ... to here. Update all users.
4586 * kern/powerpc/ieee1275/cmain.c: Move from here ...
4587 * kern/ieee1275/cmain.c: ... to here. Update all users.
4589 * kern/powerpc/ieee1275/openfw.c: Move from here ...
4590 * kern/ieee1275/openfw.c: ... to here. Update all users.
4592 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
4593 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
4595 2008-04-10 Pavel Roskin <proski@gnu.org>
4597 * configure.ac: Always use "_cv_" in cache variables for
4598 compatibility with Autoconf 2.62.
4600 2008-04-07 Robert Millan <rmh@aybabtu.com>
4602 Revert grub/machine/init.h addition by Pavel (since it breaks on
4603 i386-ieee1275 and others):
4604 * util/i386/pc/misc.c: Remove grub/machine/init.h.
4605 * util/powerpc/ieee1275/misc.c: Likewise.
4607 2008-04-07 Robert Millan <rmh@aybabtu.com>
4609 * util/grub-probe.c (probe): Improve error message.
4611 2008-04-07 Robert Millan <rmh@aybabtu.com>
4613 * util/biosdisk.c (read_device_map): Skip devices that don't exist
4614 (this prevents the presence of a bogus entry from ruining the whole
4617 2008-04-06 Pavel Roskin <proski@gnu.org>
4619 * util/biosdisk.c: Include grub/util/biosdisk.h.
4620 * util/grub-fstest.c (execute_command): Make static.
4621 * util/grub-mkdevicemap.c (check_device): Likewise.
4622 * util/i386/pc/misc.c: Include grub/machine/init.h.
4623 * util/powerpc/ieee1275/misc.c: Likewise.
4624 * util/lvm.c: Include grub/util/lvm.h.
4625 * util/misc.c: Include grub/kernel.h, grub/misc.h and
4627 * util/raid.c: Include grub/util/raid.h.
4628 (grub_util_getdiskname): Make static.
4630 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
4631 grub_hostfs_fini(), as they are called from grub_init_all() and
4632 grub_fini_all() respectively. This fixes an infinite loop in
4633 grub-fstest due to double registration of hostfs.
4634 Reported by Christian Franke <Christian.Franke@t-online.de>
4636 2008-04-05 Pavel Roskin <proski@gnu.org>
4638 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
4639 all 8 functions. Otherwise, probe function 0 only.
4641 2008-04-04 Pavel Roskin <proski@gnu.org>
4643 * commands/lspci.c (grub_lspci_iter): Print the bus number
4646 * commands/lspci.c (grub_pci_classes): Fix typos.
4647 (grub_lspci_iter): Don't print func twice. Print vendor ID
4648 before device ID, as it's normally done.
4650 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
4651 Fix signedness warnings.
4652 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
4654 * util/ieee1275/get_disk_name.c: Include config.h so that
4655 _GNU_SOURCE is defined and getline() is declared. Mark an
4656 unused argument as such. Fix a signedness warning.
4658 2008-04-02 Pavel Roskin <proski@gnu.org>
4660 * genkernsyms.sh.in: Use more robust assignments for CC and
4661 srcdir. Quote srcdir.
4662 * gensymlist.sh.in: Likewise. Assert at the compile time that
4663 the symbol table is not empty.
4665 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
4666 * fs/cpio.c (grub_cpio_read): Likewise.
4668 2008-04-01 Pavel Roskin <proski@gnu.org>
4670 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
4671 * disk/host.c (grub_host_open): Likewise.
4672 * disk/loopback.c (grub_loopback_open): Likewise.
4673 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
4674 disk->id as in disk/host.c, not a multi-character constant.
4676 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
4677 later is obsolete, potentially dangerous and sets a bad example.
4678 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
4679 * util/misc.c (grub_util_get_image_size): Likewise.
4681 * disk/loopback.c (options): Improve help for "--partitions".
4683 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
4684 options to align them with the short options, e.g. "echo -e".
4686 2008-03-31 Bean <bean123ch@gmail.com>
4688 * video/reader/png.c (grub_png_data): New member is_16bit and
4690 (grub_png_decode_image_header): Detect 16 bit png image.
4691 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
4692 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
4693 (grub_video_reader_png): Release memory occupied by image_data.
4695 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
4697 (grub_nfs_mount): Skip the test for sector per cluster.
4699 * include/grub/ntfs.h (MAX_SPC): Removed.
4701 2008-03-31 Bean <bean123ch@gmail.com>
4703 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
4704 (grub_probe_SOURCES): Add fs/afs.c.
4705 (grub_fstest_SOURCES): Likewise.
4706 (afs_mod_SOURCES): New variable.
4707 (afs_mod_CFLAGS): Likewise.
4708 (afs_mod_LDFLAGS): Likewise.
4710 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
4711 (grub_emu_SOURCES): Likewise.
4713 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4715 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4717 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4719 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4721 * fs/afs.c: New file.
4723 2008-03-30 Pavel Roskin <proski@gnu.org>
4725 * disk/host.c: Include grub/misc.h to fix a warning.
4726 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
4727 warnings about implicit declarations.
4729 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
4731 * include/grub/i386/loader.h: Change declaration of
4732 grub_linux_boot() to match what grub_loader_set() expects.
4733 * util/getroot.c (grub_guess_root_device): Return const char* to
4735 * util/grub-probe.c (probe): Fix a warning about uninitialized
4736 abstraction_name variable.
4737 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
4738 second argument as unused to fix a warning.
4740 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
4741 missing grub_error() call.
4743 * util/update-grub_lib.in: Define datarootdir, since Autoconf
4744 2.60 and newer uses it to define datadir.
4746 * commands/sleep.c: Fix warning about implicit declaration.
4747 * disk/memdisk.c: Likewise.
4748 * loader/aout.c: Likewise.
4749 * loader/i386/bsd_normal.c: Likewise.
4750 * util/grub-probe.c: Likewise.
4752 * commands/i386/cpuid.c (has_longmode): Make static.
4753 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
4754 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
4756 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
4757 GDT. This is more robust, as %ds can change.
4758 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
4759 calling real_to_prot().
4760 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
4762 2008-03-28 Pavel Roskin <proski@gnu.org>
4764 * kern/i386/pc/startup.S: Assert that uncompressed functions
4765 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
4766 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
4767 code, as they push parts of the code (error handlers) beyond
4768 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
4769 code as correctness and size.
4771 2008-03-28 Pavel Roskin <proski@gnu.org>
4773 * kern/i386/pc/startup.S
4774 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
4775 data block address to the real mode, keep offset minimal. This
4776 works around a bug in AWARD BIOS on old Athlon systems, which
4777 makes CD detection hang.
4779 2008-03-26 Pavel Roskin <proski@gnu.org>
4781 * normal/color.c (grub_parse_color_name_pair): Make `name' a
4783 * include/grub/normal.h: Add grub_parse_color_name_pair()
4786 2008-03-24 Bean <bean123ch@gmail.com>
4788 * disk/i386/pc/biosdisk.c (cd_start): Removed.
4789 (cd_count): Removed.
4790 (cd_drive): New variable.
4791 (grub_biosdisk_get_drive): Don't check for (cdN) device.
4792 (grub_biosdisk_call_hook): Likewise.
4793 (grub_biosdisk_iterate): Change cdrom detection method.
4794 (grub_biosdisk_open): Replace cd_start with cd_drive.
4795 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
4796 detect cdrom device.
4798 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
4800 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
4801 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
4802 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
4803 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
4804 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
4805 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
4806 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
4807 (grub_biosdisk_cdrp): New structure.
4808 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
4810 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
4812 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
4815 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
4818 2008-03-20 Robert Millan <rmh@aybabtu.com>
4820 Remove 2 TiB limit in ata.mod.
4821 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
4822 (grub_ata_dumpinfo): Print sector count with 0x%llx.
4823 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
4824 grub_uint64_t instead of grub_uint32_t.
4826 2008-03-05 Bean <bean123ch@gmail.com>
4828 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
4829 (grub_multiboot): Set boot device.
4831 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
4833 2008-03-02 Bean <bean123ch@gmail.com>
4835 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
4838 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
4840 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
4843 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
4846 * docs/fdl.texi: New file.
4848 * docs/mdate-sh: New file. Copied from gnulib.
4849 * docs/texinfo.tex: Likewise.
4851 * config.guess: Updated from gnulib.
4852 * install-sh: Likewise.
4854 2008-02-28 Robert Millan <rmh@aybabtu.com>
4856 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
4857 (aout_mod_SOURCES): New variable.
4858 (aout_mod_CFLAGS): Likewise.
4859 (aout_mod_LDFLAGS): Likewise.
4861 * conf/i386-ieee1275.rmk: Likewise.
4863 2008-02-28 Robert Millan <rmh@aybabtu.com>
4865 * util/update-grub.in: Reorganise terminal validity check. Accept
4866 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
4867 Based on suggestion by Franklin PIAT.
4869 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
4871 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
4873 * util/getroot.c (grub_util_check_block_device): New function that
4874 returns the given argument if it is a block device and returns NULL else.
4875 * util/grub-probe.c (argument_is_device): New variable.
4876 (probe): Promote device_name from a variable to an argument. Receive
4877 device_name from grub_util_check_block_device() if path is NULL and from
4878 grub_guess_root_device() else. Do not free() device_name anymore.
4879 (options): Introduce new parameter '-d, --device'.
4880 (main): Add description of the new parameter to the help screen.
4881 Rename path variable to argument. Set argument_is_device if the '-d'
4882 option is given. Pass argument to probe() depending on
4885 2008-02-24 Bean <bean123ch@gmail.com>
4887 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
4888 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
4889 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
4890 (GRUB_ISO9660_VOLDESC_PART): Likewise.
4891 (GRUB_ISO9660_VOLDESC_END): Likewise.
4892 (grub_iso9660_primary_voldesc): New member escape.
4893 (grub_iso9660_data): New member joliet.
4894 (grub_iso9660_convert_string): New function.
4895 (grub_iso9660_mount): Detect joliet extension.
4896 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
4897 (grub_iso9660_iso9660_label): Likewise.
4899 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
4900 (grub_setup_SOURCES): Add fs/udf.c.
4901 (grub_fstest_SOURCES): Likewise.
4902 (udf_mod_SOURCES): New variable.
4903 (udf_mod_CFLAGS): Likewise.
4904 (udf_mod_LDFLAGS): Likewise.
4906 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
4907 (grub_emu_SOURCES): Likewise.
4909 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4911 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4913 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4915 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4917 * fs/udf.c: New file.
4919 2008-02-24 Robert Millan <rmh@aybabtu.com>
4921 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
4922 (normal/lexer.c_DEPENDENCIES): New variables.
4923 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4924 (normal/lexer.c_DEPENDENCIES): Likewise.
4925 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
4926 (normal/lexer.c_DEPENDENCIES): Likewise.
4927 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
4928 (normal/lexer.c_DEPENDENCIES): Likewise.
4929 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4930 (normal/lexer.c_DEPENDENCIES): Likewise.
4931 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4932 (normal/lexer.c_DEPENDENCIES): Likewise.
4934 2008-02-23 Robert Millan <rmh@aybabtu.com>
4936 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
4937 since they were intended to be in hex. This didn't break previously
4938 because of a bug in gpt_partition_map_iterate() (see below).
4940 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
4941 when checking the validity of GPT header.
4942 Remove `partno', since it always provides the same information as `i'.
4944 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
4946 * include/grub/efi/time.h: Fix a wrong comment.
4948 2008-02-19 Pavel Roskin <proski@gnu.org>
4950 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
4953 2008-02-19 Bean <bean123ch@gmail.com>
4955 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
4956 (aout_mod_SOURCES): New variable.
4957 (aout_mod_CFLAGS): Likewise.
4958 (aout_mod_LDFLAGS): Likewise.
4959 (_bsd_mod_SOURCES): New variable.
4960 (_bsd_mod_CFLAGS): Likewise.
4961 (_bsd_mod_LDFLAGS): Likewise.
4962 (bsd_mod_SOURCES): New variable.
4963 (bsd_mod_CFLAGS): Likewise.
4964 (bsd_mod_LDFLAGS): Likewise.
4966 * include/grub/aout.h: New file.
4968 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
4970 * include/grub/i386/bsd.h: New file.
4972 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
4975 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
4976 function is called, so that it's possible to change it inside the hook.
4977 (grub_elf64_load): Likewise.
4978 (grub_elf_file): Don't close the file if elf header is not found.
4979 (grub_elf_close): Close the file if grub_elf_file fails (The new
4980 grub_elf_file won't close it).
4981 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
4982 (grub_elf64_size): Likewise.
4984 * kern/i386/loader.S (grub_unix_real_boot): New function.
4986 * loader/aout.c: New file.
4988 * loader/i386/bsd.c: New file.
4990 * loader/i386/bsd_normal.c: New file.
4992 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
4994 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
4995 can test other formats.
4997 2008-02-19 Robert Millan <rmh@aybabtu.com>
4999 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
5000 (grub_gpt_partition_type_empty): Redefine with macro from
5001 `<grub/gpt_partition.h>'.
5002 (gpt_partition_map_iterate): Adjust partition type comparison.
5004 Export `entry' as partmap-specific `part.data' struct.
5005 (grub_gpt_header, grub_gpt_partentry): Move from here ...
5007 * include/grub/gpt_partition.h (grub_gpt_header)
5008 (grub_gpt_partentry): ... to here (new file).
5010 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
5012 (grub_gpt_partition_type_bios_boot): New const variable, defined
5013 with macro from `<grub/gpt_partition.h>'.
5015 (setup): Replace `first_start' with `embed_region', which keeps
5016 track of the embed region (and is partmap-agnostic).
5018 Replace find_first_partition_start() with find_usable_region(),
5019 which finds a usable region for embedding using partmap-specific
5020 knowledge (supports PC/MSDOS and GPT).
5022 Fix all assumptions that the embed region start at sector 1, using
5023 `embed_region.start' from now on. Similarly, use `embed_region.end'
5024 rather than `first_start' to calculate available size.
5026 In grub_util_info() message, replace "into after the MBR" with an
5027 indication of the specific sector our embed region starts at.
5029 2008-02-19 Robert Millan <rmh@aybabtu.com>
5031 * DISTLIST: Replace `commands/ieee1275/halt.c' and
5032 `commands/ieee1275/reboot.c' with `commands/halt.c' and
5033 `commands/reboot.c'.
5034 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5035 (halt_mod_SOURCES): Likewise.
5036 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5037 (halt_mod_SOURCES): Likewise.
5039 2008-02-17 Christian Franke <franke@computer.org>
5041 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
5043 2008-02-17 Robert Millan <rmh@aybabtu.com>
5045 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5046 set `first_start' to 0 for non-PC/MSDOS partition maps.
5048 2008-02-16 Robert Millan <rmh@aybabtu.com>
5050 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5051 do not assume partition map is PC/MSDOS before performing checks that
5052 are specific to that layout.
5054 2008-02-13 Robert Millan <rmh@aybabtu.com>
5056 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
5057 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
5058 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
5060 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
5062 * configure.ac: Only a cosmetic change on the handling of
5063 -fno-stack-protector.
5065 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
5067 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
5068 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
5070 (grub_install_SOURCES): Add halt.mod and reboot.mod.
5071 (halt_mod_SOURCES): New variable.
5072 (halt_mod_CFLAGS): Likewise.
5073 (halt_mod_LDFLAGS): Likewise.
5074 (reboot_mod_SOURCES): Likewise.
5075 (reboot_mod_CFLAGS): Likewise.
5076 (reboot_mod_LDFLAGS): Likewise.
5078 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
5079 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
5081 (halt_mod_SOURCES): Likewise.
5082 (reboot_mod_SOURCES): Likewise.
5084 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
5085 commands/i386/pc/reboot.c by commands/reboot.c.
5086 (reboot_mod_SOURCES): Likewise.
5088 * commands/i386/pc/reboot.c: merge this file ...
5090 * commands/ieee1275/reboot.c: ... and this file ...
5092 * commands/reboot.c: ... to this file.
5093 Add some precompiler directive to include the correct header for
5096 * commands/ieee1275/halt.c: move this file ...
5098 * commands/halt.c: ... to here.
5099 Add some precompiler directive to include the correct header for
5102 * include/grub/efi/efi.h (grub_reboot): New function declaration.
5103 (grub_halt): Likewise.
5105 * kern/efi/efi.c (grub_reboot): New function.
5106 (grub_halt): Likewise.
5108 2008-02-12 Robert Millan <rmh@aybabtu.com>
5110 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
5111 /dev (like it is done for /dev/mapper). This doesn't provide support
5112 for EVMS, but at least it is now easy to identify the problem when it
5115 2008-02-11 Robert Millan <rmh@aybabtu.com>
5117 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
5118 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
5119 comparing it with -1, not 0.
5121 2008-02-10 Robert Millan <rmh@aybabtu.com>
5123 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
5125 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5126 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
5128 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
5129 `disk/lvm.c' to the end of the list.
5130 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5131 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5133 2008-02-10 Robert Millan <rmh@aybabtu.com>
5135 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
5136 grub_print_error() instead. This will let user know why we're entering
5138 Based on suggestions from Sam Morris.
5140 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
5142 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
5143 on remaining N args, instead of "--" arg N times.
5145 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
5147 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
5148 (fill_with_default_glyph): Changed to use unknown_glyph for fill
5149 pattern for unknown glyphs.
5151 2008-02-09 Robert Millan <rmh@aybabtu.com>
5153 * configure.ac: Probe for `help2man'.
5154 * Makefile.in (builddir): New variable.
5155 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
5156 or otherwise add a few flags/options to it.
5157 (install-local): For every executable utility or script that is
5158 installed, invoke $(HELP2MAN) to install a manpage based on --help
5161 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
5162 that it doesn't prevent --help from working in build tree.
5164 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
5165 with `bug-grub@gnu.org'.
5166 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
5167 * util/update-grub.in (usage): New function.
5168 Implement proper argument check, with support for --help and --version
5169 (as well as existing -y).
5171 2008-02-09 Christian Franke <franke@computer.org>
5173 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
5174 avoid overwriting previous output.
5175 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
5177 2008-02-09 Robert Millan <rmh@aybabtu.com>
5179 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
5182 2008-02-09 Robert Millan <rmh@aybabtu.com>
5184 * commands/sleep.c: New file.
5185 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
5186 (sleep_mod_SOURCES): New variable.
5187 (sleep_mod_CFLAGS): Likewise.
5188 (sleep_mod_LDFLAGS): Likewise.
5190 2008-02-09 Robert Millan <rmh@aybabtu.com>
5192 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
5193 situations in which we can deduce the RAID size and the superblock
5196 2008-02-09 Robert Millan <rmh@aybabtu.com>
5198 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
5199 and return a grub_diskmemberlist_t composed of LVM physical volumes.
5200 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
5202 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
5203 and return a grub_diskmemberlist_t composed of physical array members.
5204 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
5206 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
5208 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
5209 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
5210 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
5212 * util/grub-probe.c (probe): Move partmap probing code from here ...
5213 (probe_partmap): ... to here.
5214 (probe): Use probe_partmap() once for the disk we're probing, and
5215 additionally, when such disk contains a memberlist() struct member,
5216 once for each disk that is contained in the structure returned by
5219 2008-02-09 Robert Millan <rmh@aybabtu.com>
5221 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
5222 environment variable to 'all' in order to obtain debug output from
5224 * util/i386/pc/grub-setup.c (main): Likewise.
5226 2008-02-08 Robert Millan <rmh@aybabtu.com>
5228 * disk/raid.c (grub_raid_scan_device): Check for
5229 `array->device[sb.this_disk.number]' rather than for
5230 `array->device[sb.this_disk.number]->name', since the latter is not
5231 guaranteed to be accessible.
5233 2008-02-08 Robert Millan <rmh@aybabtu.com>
5235 * disk/raid.c: Update copyright.
5236 * fs/cpio.c: Likewise.
5237 * include/grub/raid.h: Likewise.
5238 * loader/i386/pc/multiboot.c: Likewise.
5239 * util/hostfs.c: Likewise.
5241 2008-02-08 Robert Millan <rmh@aybabtu.com>
5243 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
5244 to a grub_disk_t array.
5245 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
5247 (grub_raid_scan_device): Replace `device[x].name' accesses with
5248 `device[x]->name'. Simplify initialization of `array->device[x]'.
5250 2008-02-08 Robert Millan <rmh@aybabtu.com>
5252 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
5253 grub_dprintf() calls.
5254 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
5257 2008-02-07 Christian Franke <franke@computer.org>
5259 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
5260 instead of fseek and ftell to support large files.
5261 (grub_hostfs_read): Likewise.
5263 2008-02-07 Robert Millan <rmh@aybabtu.com>
5265 Patch from Jeroen Dekkers.
5266 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
5267 failure, since successfully reading all array members might not be
5270 2008-02-06 Robert Millan <rmh@aybabtu.com>
5272 * util/grub-probe.c (probe): Simplify partmap probing (with the
5273 assumption that the first word up to the underscore equals to
5276 2008-02-06 Christian Franke <franke@computer.org>
5278 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
5279 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
5280 last block of a cpio or tar stream.
5281 Check for "TRAILER!!!" instead of any empty data
5282 block to detect last block of a cpio stream.
5283 (grub_cpio_dir): Fix constness of variable np.
5284 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
5285 cpio or tar trailer is detected. This fixes a crash
5286 on open of a non existing file.
5288 2008-02-05 Bean <bean123ch@gmail.com>
5290 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
5292 (grub_multiboot_load_elf64): Likewise.
5293 (grub_multiboot): Initialize mbi structure.
5295 * util/grub-fstest.c: Don't include unused header file script.h.
5297 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
5299 (grub_fstest_SOURCES): Likewise.
5301 2008-02-05 Robert Millan <rmh@aybabtu.com>
5303 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
5304 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
5305 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
5306 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
5308 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
5309 (translation_table): Replace hardcoded values with macros
5310 provided by `<grub/term.h>'.
5312 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
5313 (keyboard_map): Correct/add a few values, with macros provided
5315 (keyboard_map_shift): Zero values that don't differ from their
5316 `keyboard_map' equivalents.
5317 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
5318 Discard the second scan code that is always sent by Caps lock.
5319 Only use `keyboard_map_shift' when it provides a non-zero value,
5320 otherwise fallback to `keyboard_map'.
5322 2008-02-04 Bean <bean123ch@gmail.com>
5324 * Makefile.in (enable_grub_fstest): New variable.
5326 * conf/common.rmk (grub_fstest_init.lst): New rule.
5327 (grub_fstest_init.h): Likewise.
5328 (grub_fstest_init.c): Likewise.
5329 (util/grub-fstest.c_DEPENDENCIES): New variable.
5330 (grub_fstest_SOURCES): Likewise.
5332 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
5334 * util/grub-fstest.c: New file.
5336 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5338 Make grub-setup handle a separate root device.
5340 * util/i386/pc/grub-setup.c (setup): Always open the root device,
5341 so that the root device can be compared with the destination
5343 When embedding the core image, if the root and destination devices
5344 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
5346 When not embedding, set ROOT_DRIVE to 0xFF.
5348 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5350 Add support for having a grub directory in a different drive. This
5351 is still only the data handling part.
5353 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
5354 (codestart): Save %dh in GRUB_ROOT_DRIVE.
5355 (grub_root_drive): New variable.
5357 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
5358 instead of GRUB_BOOT_DRIVE to construct a device name. Set
5359 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
5362 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
5364 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
5366 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
5368 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
5369 is bogus, because PXE booting does not specify any drive
5372 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
5373 am not sure if this is really correct.
5375 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
5376 is always identical to the boot drive when booting from a CD.
5378 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
5380 (root_drive): New variable.
5381 (real_start): Unconditionally set %dh to ROOT_DRIVE.
5382 (setup_sectors): Push %dx right after popping it, because %dh will
5384 (copy_buffer): Restore %dx.
5386 2008-02-03 Robert Millan <rmh@aybabtu.com>
5388 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
5389 use `cdboot.img' for cdrom images.
5391 2008-02-03 Robert Millan <rmh@aybabtu.com>
5393 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
5394 only setup gfxterm when `font' command has succeeded.
5396 2008-02-03 Robert Millan <rmh@aybabtu.com>
5398 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
5399 (grub_rescue_cmd_multiboot_loader)
5400 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
5402 2008-02-03 Pavel Roskin <proski@gnu.org>
5404 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
5405 %edx and %esi from stack only after grub_gate_a20() is called.
5406 grub_gate_a20() clobbers %edx.
5408 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5410 * configure.ac (AC_INIT): Bumped to 1.96.
5412 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
5413 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
5414 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
5415 video/readers/png.c.
5417 2008-02-03 Bean <bean123ch@gmail.com>
5419 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
5420 (cdboot_img_SOURCES): New variable.
5421 (cdboot_img_ASFLAGS): New variable.
5422 (cdboot_img_LDFLAGS): New variable.
5424 * boot/i386/pc/cdboot.S: New file.
5426 * disk/i386/pc/biosdisk.c (cd_start): New variable.
5427 (cd_count): Likewise.
5428 (grub_biosdisk_get_drive): Add support for cd device.
5429 (grub_biosdisk_call_hook): Likewise.
5430 (grub_biosdisk_iterate): Likewise.
5431 (grub_biosdisk_open): Likewise.
5432 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
5433 (grub_biosdisk_rw): Support reading from cd device.
5434 (GRUB_MOD_INIT): Iterate cd devices.
5436 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
5437 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
5438 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
5440 * kern/i386/pc/init.c (make_install_device): Check for cd device.
5442 2008-02-02 Robert Millan <rmh@aybabtu.com>
5444 * commands/read.c: New file.
5445 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
5446 (read_mod_SOURCES): New variable.
5447 (read_mod_CFLAGS): Likewise.
5448 (read_mod_LDFLAGS): Likewise.
5450 2008-02-02 Robert Millan <rmh@aybabtu.com>
5452 * normal/main.c (grub_normal_execute): Check for `menu->size' when
5453 determining whether menu has to be displayed.
5455 2008-02-02 Marco Gerards <marco@gnu.org>
5457 * bus/pci.c: New file.
5459 * include/grub/pci.h: Likewise.
5461 * include/grub/i386/pc/pci.h: Likewise.
5463 * commands/lspci.c: Likewise.
5465 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
5467 (pci_mod_SOURCES): New variable.
5468 (pci_mod_CFLAGS): Likewise.
5469 (pci_mod_LDFLAGS): Likewise.
5470 (lspci_mod_SOURCES): Likewise.
5471 (lspci_mod_CFLAGS): Likewise.
5472 (lspci_mod_LDFLAGS): Likewise.
5474 2008-02-02 Bean <bean123ch@gmail.com>
5476 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
5477 (grub_ufs_get_file_block): Fix indirect block calculation problem.
5479 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
5480 (grub_xfs_btree_node): New structure.
5481 (grub_xfs_btree_root): New structure.
5482 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
5483 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
5484 (GRUB_XFS_EXTENT_BLOCK): Likewise.
5485 (GRUB_XFS_EXTENT_SIZE): Likewise.
5486 (grub_xfs_read_block): Support btree format type.
5487 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
5488 Use directory block as basic unit.
5490 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
5492 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
5493 __attribute__ ((__regparm__ (1))).
5495 2008-02-01 Robert Millan <rmh@aybabtu.com>
5497 Correct a mistake in previous commit.
5499 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
5501 (normal/command.c_DEPENDENCIES): New variable.
5503 2008-02-01 Robert Millan <rmh@aybabtu.com>
5505 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
5507 (normal/command.c_DEPENDENCIES): New variable.
5508 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
5509 * conf/i386-ieee1275.rmk: Likewise.
5510 * conf/i386-linuxbios.rmk: Likewise.
5511 * conf/i386-pc.rmk: Likewise.
5512 * conf/sparc64-ieee1275.rmk: Likewise.
5513 * conf/powerpc-ieee1275.rmk: Likewise.
5514 (grub_emu_SOURCES): Add `fs/fshelp.c'.
5516 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
5518 2008-02-01 Robert Millan <rmh@aybabtu.com>
5520 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
5521 call at beginning of function.
5523 2008-01-31 Pavel Roskin <proski@gnu.org>
5525 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
5526 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
5527 (grub_mkrescue_SOURCES): Likewise.
5528 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
5530 2008-01-30 Robert Millan <rmh@aybabtu.com>
5532 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
5533 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
5534 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
5535 (grub_probe_SOURCES): ... to here.
5537 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
5538 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
5539 * conf/i386-ieee1275.rmk: Likewise.
5540 * conf/i386-linuxbios.rmk: Likewise.
5541 * conf/powerpc-ieee1275.rmk: Likewise.
5543 2008-01-30 Tristan Gingold <gingold@free.fr>
5545 * kern/rescue.c: Silently accept empty lines.
5547 2008-01-29 Bean <bean123ch@gmail.com>
5549 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
5550 (real_code_2): Code cleanup and change comment style.
5551 (move_memory): Avoid using 32-bit address mode.
5553 2008-01-29 Bean <bean123ch@gmail.com>
5555 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
5556 (png_mod_SOURCES): New variable.
5557 (png_mod_CFLAGS): Likewise.
5558 (png_mod_LDFLAGS): Likewise.
5560 * video/readers/png.c: New file.
5562 2008-01-28 Robert Millan <rmh@aybabtu.com>
5564 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
5565 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
5566 `ifndef GRUB_MOD_GAP' hack.
5567 * util/elf/grub-mkimage.c (add_segments): Likewise.
5569 2008-01-27 Robert Millan <rmh@aybabtu.com>
5571 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
5572 `GRUB_MOD_GAP' for platforms in which it's not defined.
5573 * util/elf/grub-mkimage.c (add_segments): Likewise.
5575 2008-01-27 Robert Millan <rmh@aybabtu.com>
5577 Get grub-emu to build again (including parallel builds).
5579 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
5581 (util/grub-emu.c_DEPENDENCIES): ... this, ...
5582 (normal/execute.c_DEPENDENCIES): ... this, ...
5583 (grub-emu_DEPENDENCIES): ... and this.
5585 * conf/i386-efi.rmk: Likewise.
5586 * conf/i386-linuxbios.rmk: Likewise.
5587 * conf/i386-ieee1275.rmk: Likewise.
5588 * conf/powerpc-ieee1275.rmk: Likewise.
5589 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
5591 2008-01-27 Robert Millan <rmh@aybabtu.com>
5593 * NEWS: Add a few items.
5595 2008-01-27 Robert Millan <rmh@aybabtu.com>
5597 Fix parallel builds with grub-emu. Based on earlier commit for
5598 grub-probe and grub-setup.
5600 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5601 (util/grub-emu.c_DEPENDENCIES): ... this.
5602 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5603 (util/grub-emu.c_DEPENDENCIES): ... this.
5604 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5605 (util/grub-emu.c_DEPENDENCIES): ... this.
5606 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5607 (util/grub-emu.c_DEPENDENCIES): ... this.
5608 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5609 (util/grub-emu.c_DEPENDENCIES): ... this.
5611 2008-01-27 Pavel Roskin <proski@gnu.org>
5613 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
5614 to create a gap between _end and the modules added to the image
5615 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
5616 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
5617 * util/elf/grub-mkimage.c (add_segments): Likewise.
5619 2008-01-26 Pavel Roskin <proski@gnu.org>
5621 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
5622 just return an error.
5624 2008-01-26 Bean <bean123ch@gmail.com>
5626 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
5627 (grub_reiserfs_get_item): Save offset of the next item.
5628 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
5630 2008-01-25 Robert Millan <rmh@aybabtu.com>
5632 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
5633 make all filesystem sources appear together (possibly fixing omissions
5635 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5636 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5637 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5638 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5640 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
5642 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
5643 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5644 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
5645 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5647 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
5648 (probe): Add a sanity check to make sure of our ability to read
5649 requested files when probing for filesystem type.
5651 * genmk.rb: Update copyright year (2007).
5653 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
5654 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
5655 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
5656 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
5657 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
5658 : Remove function prototypes.
5660 2008-01-25 Robert Millan <rmh@aybabtu.com>
5662 Revert my previous commits (based on wrong assumption of how grub_errno
5665 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
5666 * kern/file.c (grub_file_open): Likewise.
5668 2008-01-24 Pavel Roskin <proski@gnu.org>
5670 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
5671 that hang if GRUB tries to setup colors.
5672 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
5673 colors for firmwares that don't support it.
5674 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
5675 Recognize Open Hack'Ware, set flags to work around its
5678 2008-01-24 Robert Millan <rmh@aybabtu.com>
5680 * kern/file.c (grub_file_open): Do not account previous failures of
5681 unrelated functions when grub_errno is checked for.
5682 Reported by Oleg Strikov.
5684 2008-01-24 Bean <bean123ch@gmail.com>
5686 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
5687 (grub_ufs_sblock): New member volume name.
5688 (grub_ufs_find_file): Fix string copy bug.
5689 (grub_ufs_label): Implement this function properly.
5691 * fs/hfs.c (grub_hfs_cnid_type): New enum.
5692 (grub_hfs_iterate_records): Use the correct file number for extents
5693 and catalog file. Fix problem in next index calculation.
5694 (grub_hfs_find_node): Replace recursive function call with loop.
5695 (grub_hfs_iterate_dir): Replace recursive function call with loop.
5697 2008-01-23 Robert Millan <rmh@aybabtu.com>
5699 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
5700 `<grub/symbol.h>' and `<grub/multiboot.h>'.
5701 (grub_multiboot2_real_boot): New function prototype.
5703 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
5704 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
5706 * kern/i386/ieee1275/init.c (grub_os_area_addr)
5707 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
5709 2008-01-23 Robert Millan <rmh@aybabtu.com>
5711 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
5712 #ifdef'ed out grub_printf().
5714 2008-01-23 Robert Millan <rmh@aybabtu.com>
5716 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
5717 grub_dprintf calls, since they make "debug=all" mode unusable.
5718 (grub_console_checkkey): Likewise.
5720 2008-01-23 Robert Millan <rmh@aybabtu.com>
5722 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5723 `term/i386/pc/at_keyboard.c'.
5724 (pkglib_MODULES): Add `serial.mod'.
5725 (serial_mod_SOURCES): New variable.
5726 (serial_mod_CFLAGS): Likewise.
5727 (serial_mod_LDFLAGS): Likewise.
5729 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
5730 `<grub/powerpc/ieee1275/console.h>'.
5731 (grub_keyboard_controller_init): New function prototype.
5732 (grub_console_checkkey): Likewise.
5733 (grub_console_getkey): Likewise.
5735 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
5738 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
5739 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
5741 2008-01-23 Robert Millan <rmh@aybabtu.com>
5743 * kern/i386/pc/init.c (make_install_device): When memdisk image is
5744 present, "(memdisk)/boot/grub" becomes the default prefix.
5746 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
5747 a memdisk tarball with all the modules. Add --overlay=DIR option that
5748 allows users to overlay additional files into the image.
5750 2008-01-23 Robert Millan <rmh@aybabtu.com>
5752 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
5753 and `machine/memory.h'.
5754 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
5755 (_multiboot_mod_SOURCES): New variable.
5756 (_multiboot_mod_CFLAGS): Likewise.
5757 (_multiboot_mod_LDFLAGS): Likewise.
5758 (multiboot_mod_SOURCES): Likewise.
5759 (multiboot_mod_CFLAGS): Likewise.
5760 (multiboot_mod_LDFLAGS): Likewise.
5762 * include/grub/i386/ieee1275/loader.h: New file.
5764 * include/grub/i386/ieee1275/machine.h: Likewise.
5766 * include/grub/i386/ieee1275/memory.h: Likewise.
5768 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
5769 variable declaration.
5770 (grub_os_area_size): Likewise.
5772 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
5773 (grub_lower_mem, grub_upper_mem): New variables.
5774 (grub_stop_floppy): New function (just to make
5775 grub_multiboot2_real_boot() happy).
5777 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
5778 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
5779 (grub_stop): New function.
5780 Include `"../realmode.S"' and `"../loader.S"'.
5782 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
5783 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
5785 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
5786 rely on grub_multiboot2_real_boot() for final boot.
5788 2008-01-22 Robert Millan <rmh@aybabtu.com>
5790 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
5791 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
5792 device that doesn't look like an SD card.
5793 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5794 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
5795 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
5796 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
5799 2008-01-22 Robert Millan <rmh@aybabtu.com>
5801 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
5802 avoid claiming over our own code.
5804 2008-01-22 Bean <bean123ch@gmail.com>
5806 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
5807 (jpeg_mod_SOURCES): New variable.
5808 (jpeg_mod_CFLAGS): Likewise.
5809 (jpeg_mod_LDFLAGS): Likewise.
5811 * video/readers/jpeg.c : New file.
5813 2008-01-22 Bean <bean123ch@gmail.com>
5815 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
5816 there are no more items.
5818 2008-01-21 Robert Millan <rmh@aybabtu.com>
5820 * kern/mm.c (grub_mm_init_region): Improve debug message.
5822 2008-01-21 Robert Millan <rmh@aybabtu.com>
5824 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
5825 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
5827 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
5829 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
5830 Indicates start of upper memory.
5831 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
5832 (generate_image): Abort when image size is big enough to corrupt
5835 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
5836 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
5837 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5838 instead of hardcoding 0xA0000.
5839 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
5840 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5841 instead of hardcoding 0xA0000.
5843 2008-01-21 Robert Millan <rmh@aybabtu.com>
5845 * disk/memdisk.c (memdisk_size): New variable.
5846 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
5848 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
5849 image to dynamic memory.
5850 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
5851 `memdisk_size'. Free memdisk block.
5853 2008-01-21 Robert Millan <rmh@aybabtu.com>
5855 Fix detection of very small filesystems (like tar).
5857 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
5858 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
5859 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
5860 a problem with this disk).
5862 2008-01-21 Robert Millan <rmh@aybabtu.com>
5864 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
5865 on grub_biosdisk_rw_standard() error.
5867 2008-01-21 Robert Millan <rmh@aybabtu.com>
5869 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
5871 * kern/elf.c: Likewise.
5872 * kern/ieee1275/ieee1275.c: Likewise.
5873 * kern/powerpc/ieee1275/openfw.c: Likewise.
5874 * term/ieee1275/ofconsole.c: Likewise.
5876 2008-01-21 Robert Millan <rmh@aybabtu.com>
5878 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
5880 * include/grub/kernel.h (grub_arch_memdisk_addr)
5881 (grub_arch_memdisk_size): Moved from here ...
5883 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
5884 (grub_arch_memdisk_size): ... to here.
5886 2008-01-21 Robert Millan <rmh@aybabtu.com>
5888 Mostly based on bugfix from Bean.
5890 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
5891 attribute with hook() parameter.
5892 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
5894 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
5895 attribute with hook() parameter.
5896 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
5899 2008-01-21 Robert Millan <rmh@aybabtu.com>
5901 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
5902 (pkglib_MODULES): Add `memdisk.mod'.
5903 (memdisk_mod_SOURCES): New variable.
5904 (memdisk_mod_CFLAGS): Likewise.
5905 (memdisk_mod_LDFLAGS): Likewise.
5907 * disk/memdisk.c: New file.
5909 * include/grub/disk.h (grub_disk_dev_id): Add
5910 `GRUB_DISK_DEVICE_MEMDISK_ID'.
5912 * include/grub/i386/pc/kernel.h
5913 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
5914 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
5915 (grub_kernel_image_size): New variable declaration.
5916 (grub_total_module_size): Likewise.
5917 (grub_memdisk_image_size): Likewise.
5919 * include/grub/i386/pc/memory.h
5920 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
5922 * include/grub/kernel.h: Include `<grub/symbol.h>'.
5923 (grub_arch_memdisk_addr): New variable declaration.
5924 (grub_arch_memdisk_size): Likewise.
5926 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
5927 (grub_arch_memdisk_size): Likewise.
5929 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
5930 (codestart): Replace hardcoded `0x100000' with
5931 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
5933 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
5934 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
5935 not NULL, append the contents of the file it refers to, at the end of
5936 the compressed kernel image. Initialize `grub_memdisk_image_size'
5937 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
5938 (options): Add "memdisk"|'m' option.
5939 (main): Parse --memdisk|-m option, and pass user-provided path as
5940 parameter to generate_image().
5942 2008-01-20 Robert Millan <rmh@aybabtu.com>
5944 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
5945 grub_dprintf() calls from here ...
5946 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
5948 2008-01-20 Robert Millan <rmh@aybabtu.com>
5950 Fix detection of "real mode" when /options/real-mode? doesn't exist.
5952 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
5954 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
5955 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
5956 `GRUB_IEEE1275_FLAG_REAL_MODE'.
5957 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
5959 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
5960 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
5962 2008-01-19 Robert Millan <rmh@aybabtu.com>
5964 Get rid of confusing function (superseded by
5965 `grub_ieee1275_get_integer_property')
5966 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
5968 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
5970 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
5971 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
5972 in native endianness from grub_ieee1275_get_integer_property().
5974 2008-01-19 Robert Millan <rmh@aybabtu.com>
5976 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
5977 command after "shut-down", since implementations differ on which
5978 the command for halt is.
5980 2008-01-19 Robert Millan <rmh@aybabtu.com>
5982 * include/grub/i386/linuxbios/console.h: Add header protection.
5983 (grub_keyboard_controller_init): New function prototype.
5984 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
5985 (KEYBOARD_COMMAND_READ): Likewise.
5986 (KEYBOARD_COMMAND_WRITE): Likewise.
5987 (KEYBOARD_SCANCODE_SET1): Likewise.
5988 (grub_keyboard_controller_write): New function.
5989 (grub_keyboard_controller_read): Likewise.
5990 (grub_keyboard_controller_init): Likewise.
5992 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
5993 (grub_console_init): On coreboot/LinuxBIOS, call
5994 grub_keyboard_controller_init().
5996 2008-01-19 Robert Millan <rmh@aybabtu.com>
5998 PowerPC changes provided by Pavel Roskin.
6000 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
6001 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
6002 don't rely on cmain() doing it.
6003 * kern/i386/ieee1275/startup.S (_start): Store %eax in
6004 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
6006 2008-01-16 Robert Millan <rmh@aybabtu.com>
6008 * include/grub/i386/linuxbios/memory.h
6009 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
6010 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
6011 receive `table_header' as argument. Instead, probe for it in the
6012 known memory ranges where it can be present.
6013 (grub_available_iterate): Do not pass a fixed `table_header' address
6014 to grub_linuxbios_table_iterate().
6016 2008-01-15 Robert Millan <rmh@aybabtu.com>
6018 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
6019 * conf/i386-ieee1275.rmk: New file.
6020 * include/grub/i386/ieee1275/console.h: Likewise.
6021 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
6022 * include/grub/i386/ieee1275/kernel.h: Likewise.
6023 * include/grub/i386/ieee1275/time.h: Likewise.
6024 * kern/i386/ieee1275/init.c: Likewise.
6025 * kern/i386/ieee1275/startup.S: Likewise.
6027 2008-01-15 Robert Millan <rmh@aybabtu.com>
6029 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
6030 when pointers are 32-bit (but still do set it to one when they are
6033 2008-01-15 Robert Millan <rmh@aybabtu.com>
6035 * include/grub/ieee1275/ieee1275.h
6036 (grub_ieee1275_get_integer_property): New function prototype.
6038 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
6039 (grub_ieee1275_get_integer_property): New function. Wraps around
6040 grub_ieee1275_get_property() to handle endianness.
6042 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
6043 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
6045 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
6046 (grub_map): Likewise.
6047 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
6049 2008-01-15 Bean <bean123ch@gmail.com>
6051 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
6052 (grub_script_execute_cmdline): Reset grub_errno.
6054 * normal/main.c (read_config_file): Reset grub_errno.
6056 * normal/parse.y (script_init): New.
6057 (script): Move function and menuentry here.
6059 (command): Add delimiter at the end of command.
6060 (commands): Adjust to match the new command.
6061 (commandblock): Remove grub_script_lexer_record_start.
6062 (menuentry): Add grub_script_lexer_record_start, use the new commands.
6063 (if): Use the new commands.
6065 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
6067 2008-01-15 Robert Millan <rmh@aybabtu.com>
6069 * normal/menu.c (run_menu): Move timeout message from here ...
6070 (print_timeout): ... to here.
6071 (run_menu): Use print_timeout() once during initial draw to print
6072 the whole message, and again in every clock tick to update only
6073 the number of seconds.
6075 2008-01-15 Robert Millan <rmh@aybabtu.com>
6077 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
6078 actual size of `available' from grub_ieee1275_get_property(), and
6079 restrict parsing to that bound.
6081 2008-01-15 Christian Franke <franke@computer.org>
6083 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
6084 (argp_program_version): Remove variable.
6085 (argp_program_bug_address): Likewise.
6086 (options): Convert from struct argp_option to struct option.
6087 (struct arguments): Remove.
6088 (parse_opt): Remove.
6089 (usage): New function.
6090 (main): Replace struct args members by simple variables.
6091 Replace argp_parse() by getopt_long().
6092 Add switch to evaluate options.
6093 Add missing "(...)" around root_dev in prefix string.
6095 2008-01-14 Robert Millan <rmh@aybabtu.com>
6097 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
6098 for grub_ieee1275_exit(), in order to improve portability.
6100 2008-01-14 Robert Millan <rmh@aybabtu.com>
6102 * util/grub.d/10_linux.in (prefix): Define.
6103 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
6105 2008-01-13 Pavel Roskin <proski@gnu.org>
6107 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
6108 grub_errno if no errors have been detected.
6110 2008-01-12 Robert Millan <rmh@aybabtu.com>
6112 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
6113 (grub_util_get_dev_abstraction): New function prototype.
6115 * util/getroot.c: Include `<grub/util/getroot.h>'
6116 (grub_util_get_grub_dev): Move detection of abstraction type to ...
6117 (grub_util_get_dev_abstraction): ... here (new function).
6119 * util/grub-probe.c: Convert PRINT_* to an enum. Add
6120 `PRINT_ABSTRACTION'.
6121 (probe): Probe for abstraction type when requested.
6122 (main): Understand `--target=abstraction'.
6124 * util/i386/efi/grub-install.in: Add abstraction module to core
6125 image when it is found to be necessary.
6126 * util/i386/pc/grub-install.in: Likewise.
6127 * util/powerpc/ieee1275/grub-install.in: Likewise.
6129 * util/update-grub_lib.in (font_path): Return system path without
6130 converting to GRUB path.
6131 * util/update-grub.in: Convert system path returned by font_path()
6132 to a GRUB path. Use `grub-probe -t abstraction' to determine what
6133 abstraction module is needed for loading fonts (if any). Export
6134 that as `GRUB_PRELOAD_MODULES'.
6135 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
6138 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
6140 Remove some unused code from reiserfs.
6142 * fs/reiserfs.c (struct grub_reiserfs_key)
6143 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
6144 (struct grub_reiserfs_node_body): Removed.
6145 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6147 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6149 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6151 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6153 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6155 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
6157 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6158 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6159 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6161 2008-01-10 Robert Millan <rmh@aybabtu.com>
6163 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
6164 Determines if a file is garbage left by packaging systems, etc.
6165 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
6166 for processing /etc/grub.d scripts.
6167 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
6168 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
6169 as a condition for processing Linux images.
6171 2008-01-10 Pavel Roskin <proski@gnu.org>
6173 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
6174 to compile reiserfs.c on PowerPC.
6176 2008-01-10 Robert Millan <rmh@aybabtu.com>
6178 * kern/device.c (grub_device_iterate): Do not abort device iteration
6179 when one of the devices cannot be opened.
6180 * kern/disk.c (grub_disk_open): Do not account previous failures of
6181 unrelated functions when grub_errno is checked for.
6183 2008-01-08 Robert Millan <rmh@aybabtu.com>
6185 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
6186 `! grub_linux_is_bzimage', change order of address comparison to make
6187 it more intuitive, and improve "too big zImage" error message.
6189 2008-01-08 Robert Millan <rmh@aybabtu.com>
6191 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
6192 `$(update-grub_DATA)'.
6193 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
6196 2008-01-07 Robert Millan <rmh@aybabtu.com>
6198 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
6199 which instruction is modified by grub-setup during installation
6200 (since it wasn't obvious by only looking at this file).
6202 2008-01-07 Robert Millan <rmh@aybabtu.com>
6204 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
6205 listing actual TODO items.
6207 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6209 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
6211 (grub_reiserfs_get_key_offset): Likewise.
6212 (grub_reiserfs_set_key_offset): Likewise.
6213 (grub_reiserfs_set_key_type): Likewise.
6214 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
6216 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
6217 better to remove the bitfield version completely.
6219 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6221 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
6222 allocated from the heap, due to the fshelp implementation.
6223 (grub_reiserfs_dir): Free NODE, due to the same reason.
6225 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6227 Mostly from Vincent Pelletier:
6229 * fs/reiserfs.c: New file.
6231 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
6232 (reiserfs_mod_SOURCES): New variable.
6233 (reiserfs_mod_CFLAGS): Likewise.
6234 (reiserfs_mod_LDFLAGS): Likewise.
6236 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
6237 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
6238 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
6241 2008-01-06 Robert Millan <rmh@aybabtu.com>
6243 * normal/color.c: Remove `<grub/env.h>'.
6245 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
6247 * include/grub/normal.h: Include <grub/env.h>.
6249 2008-01-05 Robert Millan <rmh@aybabtu.com>
6251 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
6252 usage example with `(hd0,1)'.
6253 Reported by Samuel Thibault.
6255 2008-01-05 Robert Millan <rmh@aybabtu.com>
6257 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
6258 (grub_linux_boot_zimage): Rename to ...
6259 (grub_linux_boot): ... this.
6260 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
6261 (grub_linux_boot_zimage): Conditionalize zImage copy.
6263 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
6264 (grub_linux_boot_bzimage): Remove prototype.
6265 (grub_linux_boot_zimage): Rename to ...
6266 (grub_linux_boot): ... this.
6268 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
6269 (grub_linux_boot): Remove function.
6271 2008-01-05 Robert Millan <rmh@aybabtu.com>
6273 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
6274 (grub_env_write_color_highlight): Likewise.
6275 (grub_wait_after_message): Likewise.
6277 * normal/color.c: New file.
6279 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6280 (normal_mod_DEPENDENCIES): Likewise.
6282 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6283 (normal_mod_DEPENDENCIES): Likewise.
6285 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6286 (normal_mod_DEPENDENCIES): Likewise.
6288 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6289 (normal_mod_DEPENDENCIES): Likewise.
6291 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
6292 for waiting after a message is printed.
6293 * normal/main.c (read_config_file): Likewise.
6294 (grub_normal_init): Register grub_env_write_color_normal() and
6295 grub_env_write_color_highlight() hooks. Mark `color_normal' and
6296 `color_highlight' variables as global.
6298 * normal/menu.c (grub_wait_after_message): New function.
6299 (grub_color_menu_normal): New variable. Replaces ...
6300 (GRUB_COLOR_MENU_NORMAL): ... this macro.
6301 (grub_color_menu_highlight): New variable. Replaces ...
6302 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
6303 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
6304 `GRUB_TERM_COLOR_STANDARD'.
6305 (print_message): Use `grub_setcolorstate' to reload colors. Rename
6306 `normal_code' and `highlight_code' to `old_color_normal' and
6307 `old_color_highlight', respectively.
6308 (grub_menu_init_page): Update colors when drawing the menu, based on
6309 `menu_color_normal' and `menu_color_highlight' variables.
6310 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
6311 a message is printed.
6313 2008-01-05 Robert Millan <rmh@aybabtu.com>
6315 * kern/env.c (grub_env_context_open): Propagate hooks for global
6316 variables to new context.
6318 * kern/main.c (grub_set_root_dev): Export `root' variable.
6320 2008-01-05 Robert Millan <rmh@aybabtu.com>
6322 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
6323 discs unconditionally, since udev and others have options to provide
6326 2008-01-05 Robert Millan <rmh@aybabtu.com>
6328 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
6330 2008-01-04 Christian Franke <franke@computer.org>
6332 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
6335 2008-01-03 Pavel Roskin <proski@gnu.org>
6337 * kern/i386/linuxbios/init.c: Put "void" to all function
6338 declarations with no arguments.
6339 * kern/powerpc/ieee1275/init.c: Likewise.
6340 * term/i386/pc/at_keyboard.c: Likewise.
6341 * term/i386/pc/vga_text.c: Likewise.
6342 * util/grub-mkdevicemap.c: Likewise.
6344 2008-01-02 Robert Millan <rmh@aybabtu.com>
6346 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
6347 message when loaded image is out of bounds.
6348 (grub_multiboot_load_elf64): Likewise.
6350 2008-01-02 Pavel Roskin <proski@gnu.org>
6352 * util/grub.d/10_linux.in: Try version without ".old" when
6353 looking for initrd. It's better to use initrd from the newer
6354 kernel of the same version than no initrd at all.
6356 2008-01-01 Robert Millan <rmh@aybabtu.com>
6358 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
6360 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
6362 * include/grub/video.h: Added grub_video_unmap_color and
6363 grub_video_get_active_render_target.
6364 (grub_video_adapter): Added unmap_color and get_active_render_target.
6366 * video/video.c: Added grub_video_unmap_color and
6367 grub_video_get_active_render_target.
6368 (grub_video_get_info): Changed method to accept NULL pointer as an
6369 argument to allow detection of active video adapter.
6371 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
6372 grub_video_vbe_unmap_color_int.
6373 Added grub_video_vbe_unmap_color and
6374 grub_video_vbe_get_active_render_target.
6375 (grub_video_vbe_adapter): Added unmap_color and
6376 get_active_render_target.
6378 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
6379 with grub_video_vbe_unmap_color_int.
6381 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
6382 (DEFAULT_NORMAL_COLOR): Likewise.
6383 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
6384 (DEFAULT_FG_COLOR): Removed.
6385 (DEFAULT_BG_COLOR): Likewise.
6386 (DEFAULT_CURSOR_COLOR): Changed value.
6387 (grub_virtual_screen): Added standard_color_setting,
6388 normal_color_setting, highlight_color_setting and term_color.
6389 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
6390 (bitmap_width): Added.
6391 (bitmap_height): Likewise.
6393 (set_term_color): Likewise.
6394 (grub_virtual_screen_setup): Changed to use new terminal coloring
6396 (grub_gfxterm_init): Added init for bitmap.
6397 (grub_gfxterm_fini): Added destroy for bitmap.
6398 (redraw_screen_rect): Updated to use background bitmap and new
6400 (scroll_up): Added optimization for case when there is no bitmap.
6401 (grub_gfxterm_cls): Fixed to use correct background color.
6402 (grub_virtual_screen_setcolorstate): Changed to use new terminal
6404 (grub_virtual_screen_setcolor): Likewise.
6405 (grub_virtual_screen_getcolor): Added.
6406 (grub_gfxterm_background_image_cmd): Likewise.
6407 (grub_video_term): Added setcolor and getcolor.
6408 (MOD_INIT): Added registration of background_image command.
6409 (MOD_TERM): Added unregistration for background_image command.
6411 2007-12-30 Pavel Roskin <proski@gnu.org>
6413 * loader/multiboot_loader.c: Fix multiboot command
6414 unregistration. Fix all typos in the word "multiboot".
6416 2007-12-29 Pavel Roskin <proski@gnu.org>
6418 * util/grub.d/10_linux.in: Refactor search for initrd. Add
6419 support for initrd names used in Fedora.
6421 2007-12-26 Bean <bean123ch@gmail.com>
6423 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
6424 (cpio_mod_SOURCES): New variable.
6425 (cpio_mod_CFLAGS): Likewise.
6426 (cpio_mod_LDFLAGS): Likewise.
6428 * fs/cpio.c: New file.
6430 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
6432 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6434 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6436 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6438 2007-12-25 Robert Millan <rmh@aybabtu.com>
6440 * include/grub/term.h (struct grub_term): Add `getcolor' function.
6441 (grub_getcolor): New function.
6443 * kern/term.c (grub_getcolor): New function.
6444 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
6445 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
6446 (print_entry): Set normal and highlight colors to
6447 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
6448 respectively, before printing and restore them to old
6450 (grub_menu_init_page): Likewise. Fill an additional colored space
6451 that would otherwise be left blank.
6453 * term/efi/console.c (grub_console_getcolor): New function.
6454 (struct grub_console_term.getcolor): New variable.
6455 * term/i386/pc/console.c (grub_console_getcolor): New function.
6456 (struct grub_console_term.getcolor): New variable.
6457 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
6458 (struct grub_console_term.getcolor): New variable.
6460 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
6461 (struct grub_console_term.setcolor): Remove variable.
6462 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
6463 (struct grub_console_term.setcolor): Remove variable.
6464 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
6465 (struct grub_console_term.setcolor): Remove variable.
6466 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
6467 (struct grub_console_term.setcolor): Remove variable.
6469 2007-12-25 Robert Millan <rmh@aybabtu.com>
6471 * configure.ac: Search for possible unifont.hex locations, and
6472 define UNIFONT_HEX if found.
6474 * Makefile.in (UNIFONT_HEX): Define variable.
6475 (DATA): Rename to ...
6476 (PKGLIB): ... this. Update all users.
6477 (PKGDATA): New variable.
6478 (pkgdata_IMAGES): Rename to ...
6479 (pkglib_IMAGES): ... this. Update all users.
6480 (pkgdata_MODULES): Rename to ...
6481 (pkglib_MODULES): ... this. Update all users.
6482 (pkgdata_PROGRAMS): Rename to ...
6483 (pkglib_PROGRAMS): ... this. Update all users.
6484 (pkgdata_DATA): Rename to ...
6485 (pkglib_DATA): ... this. Update all users.
6486 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
6487 (unicode.pff, ascii.pff): New rules.
6488 (all-local): Add `$(PKGDATA)' dependency.
6489 (install-local): Process `$(PKGDATA)'.
6491 * util/update-grub_lib.in (font_path): Search for *.pff files in
6492 a few more locations, including `${pkgdata}'.
6494 2007-12-23 Robert Millan <rmh@aybabtu.com>
6496 Patch from Bean <bean123ch@gmail.com>:
6497 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
6500 2007-12-21 Bean <bean123ch@gmail.com>
6502 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
6503 (ntfscomp_mod_SOURCES): New variable.
6504 (ntfscomp_mod_CFLAGS): Likewise.
6505 (ntfscomp_mod_LDFLAGS): Likewise.
6507 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
6508 (grub_probe_SOURCES): Likewise.
6509 (grub_emu_SOURCES): Likewise.
6511 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6512 (grub_emu_SOURCES): Likewise.
6514 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6515 (grub_emu_SOURCES): Likewise.
6517 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6518 (grub_emu_SOURCES): Likewise.
6520 * fs/ntfs.c (grub_ntfscomp_func): New variable.
6521 (read_run_list): Renamed to grub_ntfs_read_run_list.
6522 (decomp_nextvcn): Moved to ntfscomp.c.
6523 (decomp_getch): Likewise.
6524 (decomp_get16): Likewise.
6525 (decomp_block): Likewise.
6526 (read_block): Likewise.
6527 (read_data): Partially moved to ntfscomp.c.
6528 (fixup): Change unsigned to grub_uint16_t.
6529 (read_mft): Change unsigned long to grub_uint32_t.
6530 (read_attr): Likewise.
6531 (read_data): Likewise.
6532 (read_run_data): Likewise.
6533 (read_run_list): Likewise.
6534 (read_mft): Likewise.
6536 * fs/ntfscomp.c: New file.
6538 * include/grub/ntfs.h: New file.
6540 2007-12-16 Robert Millan <rmh@aybabtu.com>
6542 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
6543 IDE disk check, since Linux is known to support 20 IDE disks.
6544 Reported by Colin Watson.
6546 2007-12-15 Bean <bean123ch@gmail.com>
6548 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
6549 (lnxboot_img_SOURCES): New variable.
6550 (lnxboot_img_ASFLAGS): Likewise.
6551 (lnxboot_img_LDFLAGS): Likewise.
6553 * boot/i386/pc/lnxboot.S: New file.
6555 2007-11-24 Pavel Roskin <proski@gnu.org>
6557 * configure.ac: Test if '--build-id=none' is supported by the
6558 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
6559 objcopy to generate incorrect binary files (binutils
6560 2.17.50.0.18-1 as shipped by Fedora 8).
6561 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
6562 linking, so that build ID doesn't break the test.
6564 2007-11-24 Pavel Roskin <proski@gnu.org>
6566 * include/grub/i386/time.h: use "void" in the argument list
6568 * include/grub/powerpc/time.h: Likewise.
6569 * include/grub/sparc64/time.h: Likewise.
6571 2007-11-18 Christian Franke <franke@computer.org>
6573 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
6574 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
6575 This fixes the problem that function keys did not work in grub-emu.
6577 2007-11-18 Christian Franke <franke@computer.org>
6579 * disk/host.c (grub_host_open): Remove attribute unused from
6580 name parameter. Add check for "host". This fixes the problem
6581 that grub-emu does not find partitions.
6583 2007-11-18 Christian Franke <franke@computer.org>
6585 * util/hostfs.c (is_dir): New function.
6586 (grub_hostfs_dir): Handle missing dirent.d_type case.
6587 (grub_hostfs_read): Add missing fseek().
6588 (grub_hostfs_label): Clear label pointer. This fixes a crash
6589 of grub-emu on "ls (host)".
6591 2007-11-18 Christian Franke <franke@computer.org>
6593 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
6594 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
6595 to 64 bit boundary by default.
6597 2007-11-18 Bean <bean123ch@gmail.com>
6599 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
6600 (hexdump_mod_SOURCES): New variable.
6601 (hexdump_mod_CFLAGS): Likewise.
6602 (hexdump_mod_LDFLAGS): Likewise.
6604 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6606 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6608 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6610 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6612 * include/grub/hexdump.h: New file.
6614 * commands/hexdump.c: New file.
6616 2007-11-10 Robert Millan <rmh@aybabtu.com>
6618 * commands/i386/pc/play.c (beep_off): Switch order of arguments
6619 in grub_outb() calls.
6620 (beep_on): Likewise.
6622 2007-11-10 Christian Franke <franke@computer.org>
6624 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
6625 (grub_menu_run): Likewise.
6627 2007-11-10 Robert Millan <rmh@aybabtu.com>
6629 * include/grub/i386/efi/machine.h: New file.
6630 * include/grub/i386/linuxbios/machine.h: Likewise.
6631 * include/grub/i386/pc/machine.h: Likewise.
6632 * include/grub/powerpc/ieee1275/machine.h: Likewise.
6633 * include/grub/sparc64/ieee1275/machine.h: Likewise.
6635 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
6636 (serial_hw_io_addr): New variable.
6637 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
6638 instead of `(unsigned short *) 0x400'.
6640 2007-11-10 Bean <bean123ch@gmail.com>
6642 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
6644 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6646 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
6647 (vga_mod_SOURCES): Added.
6648 (vga_mod_CFLAGS): Likewise.
6649 (vga_mod_LDFLAGS): Likewise.
6651 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
6653 (set_map_mask): Likewise.
6654 (set_read_map): Likewise.
6655 (set_read_address): Likewise.
6656 (vga_font): Removed variable.
6657 (get_vga_glyph): Removed function.
6658 (invalidate_char): Likewise.
6659 (write_char): Changed to use grub_font_get_glyph() for font
6661 (grub_vga_putchar): Likewise.
6662 (grub_vga_getcharwidth): Likewise.
6664 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6666 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
6668 (pxeboot_img_LDFLAGS): Likewise.
6669 (diskboot_img_LDFLAGS): Likewise.
6670 (kernel_img_LDFLAGS): Likewise.
6672 2007-11-06 Robert Millan <rmh@aybabtu.com>
6674 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
6675 in grub_outb() calls.
6676 (serial_hw_init): Likewise.
6678 2007-11-05 Robert Millan <rmh@aybabtu.com>
6680 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
6681 spaces. Skip non-regular files.
6683 2007-11-05 Robert Millan <rmh@aybabtu.com>
6685 * kern/disk.c (grub_disk_firmware_fini)
6686 (grub_disk_firmware_is_tainted): New variables.
6688 * include/grub/disk.h (grub_disk_firmware_fini)
6689 (grub_disk_firmware_is_tainted): Likewise.
6691 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
6692 (grub_disk_biosdisk_fini): ... to here.
6693 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
6694 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
6695 is set. Register grub_disk_biosdisk_fini() in
6696 `grub_disk_firmware_fini'.
6698 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
6699 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
6700 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
6701 to finish existing firmware disk interface.
6703 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
6704 (ata_mod_SOURCES): New variable.
6705 (ata_mod_CFLAGS): Likewise.
6706 (ata_mod_LDFLAGS): Likewise.
6708 2007-11-05 Robert Millan <rmh@aybabtu.com>
6710 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
6711 (grub_ata_wait): Reimplement using grub_millisleep().
6713 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
6714 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
6716 2007-11-03 Marco Gerards <marco@gnu.org>
6718 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
6719 (CRTC_ADDR_PORT): New macro.
6720 (CRTC_DATA_PORT): Likewise.
6721 (CRTC_CURSOR): Likewise.
6722 (CRTC_CURSOR_ADDR_HIGH): Likewise.
6723 (CRTC_CURSOR_ADDR_LOW): Likewise.
6724 (update_cursor): New function.
6725 (grub_console_real_putchar): Call `update_cursor'.
6726 (grub_console_gotoxy): Likewise.
6727 (grub_console_cls): Set the default color when clearing the
6729 (grub_console_setcursor): Implemented.
6731 2007-11-03 Marco Gerards <marco@gnu.org>
6733 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
6735 (grub_ata_pio_write): Likewise.
6737 (grub_atapi_identify): Wait after issuing an ATA command.
6738 (grub_atapi_packet): Likewise.
6739 (grub_ata_identify): Likewise.
6740 (grub_ata_readwrite): Likewise.
6742 2007-11-03 Marco Gerards <marco@gnu.org>
6744 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
6745 (grub_ata_pio_write): Likewise.
6746 (grub_ata_readwrite): Use `grub_error', instead of
6747 returning `grub_errno'.
6749 2007-11-03 Marco Gerards <marco@gnu.org>
6751 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
6752 grub_ata_pio_write once for every single sector, instead of for
6755 2007-10-31 Robert Millan <rmh@aybabtu.com>
6757 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
6759 * conf/i386-linuxbios.rmk: New file.
6761 * kern/i386/pc/hardware.c: Likewise.
6762 * term/i386/pc/at_keyboard.c: Likewise.
6763 * term/i386/pc/vga_text.c: Likewise.
6765 * include/grub/i386/linuxbios/boot.h: Likewise.
6766 * include/grub/i386/linuxbios/console.h: Likewise.
6767 * include/grub/i386/linuxbios/init.h: Likewise.
6768 * include/grub/i386/linuxbios/kernel.h: Likewise.
6769 * include/grub/i386/linuxbios/loader.h: Likewise.
6770 * include/grub/i386/linuxbios/memory.h: Likewise.
6771 * include/grub/i386/linuxbios/serial.h: Likewise.
6772 * include/grub/i386/linuxbios/time.h: Likewise.
6774 * kern/i386/linuxbios/init.c: Likewise.
6775 * kern/i386/linuxbios/startup.S: Likewise.
6776 * kern/i386/linuxbios/table.c: Likewise.
6778 2007-10-31 Marco Gerards <marco@gnu.org>
6780 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
6781 (ata_mod_SOURCES): New variable.
6782 (ata_mod_CFLAGS): Likewise.
6783 (ata_mod_LDFLAGS): Likewise.
6785 * disk/ata.c: New file.
6787 * include/grub/disk.h (grub_disk_dev_id): Add
6788 `GRUB_DISK_DEV_ATA_ID'.
6790 2007-10-31 Robert Millan <rmh@aybabtu.com>
6792 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
6793 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
6795 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
6796 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
6798 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
6801 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
6803 2007-10-27 Robert Millan <rmh@aybabtu.com>
6805 * include/grub/types.h (ULONG_MAX): Define macro.
6807 2007-10-22 Robert Millan <rmh@aybabtu.com>
6809 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
6811 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
6813 2007-10-22 Robert Millan <rmh@aybabtu.com>
6815 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
6816 (pkgdata_MODULES): Add `biosdisk.mod'.
6817 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
6820 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
6821 (grub_biosdisk_init): Replace with ...
6822 (GRUB_MOD_INIT(biosdisk)): ... this.
6823 (grub_biosdisk_fini): Replace with ...
6824 (GRUB_MOD_FINI(biosdisk)): ... this.
6826 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
6827 (grub_machine_init): Remove call to grub_biosdisk_init().
6828 (grub_machine_fini): Remove call to grub_machine_fini().
6830 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
6832 2007-10-22 Robert Millan <rmh@aybabtu.com>
6834 * include/grub/time.h: New file.
6835 * include/grub/i386/time.h: Likewise.
6836 * include/grub/powerpc/time.h: Likewise.
6837 * include/grub/sparc64/time.h: Likewise.
6839 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
6841 (KERNEL_MACHINE_TIME_HEADER): ... this.
6842 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6844 (KERNEL_MACHINE_TIME_HEADER): ... this.
6845 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6847 (KERNEL_MACHINE_TIME_HEADER): ... this.
6849 * kern/i386/efi/init.c: Include `<grub/time.h>'.
6850 (grub_millisleep): New function.
6851 * kern/i386/pc/init.c: Include `<grub/time.h>'.
6852 (grub_millisleep): New function.
6853 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
6854 Remove `grub/machine/time.h' include.
6855 (grub_millisleep): New function.
6856 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
6857 Remove `grub/machine/time.h' include.
6858 (grub_millisleep): New function.
6860 * include/grub/misc.h (grub_div_roundup): New function.
6862 * kern/misc.c: Include `<grub/time.h>'.
6863 (grub_millisleep_generic): New function.
6865 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
6867 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
6869 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
6870 `machine/time.h'. Add `time.h'.
6871 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6873 2007-10-21 Robert Millan <rmh@aybabtu.com>
6875 * include/grub/misc.h (grub_max): New function.
6877 2007-10-21 Robert Millan <rmh@aybabtu.com>
6879 * util/misc.c (grub_util_info): Call fflush() before returning.
6881 2007-10-20 Robert Millan <rmh@aybabtu.com>
6883 * genmk.rb (Image): Copy `extra_flags' from here ...
6884 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
6886 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
6887 to `argc' and `args' arguments.
6889 2007-10-17 Robert Millan <rmh@aybabtu.com>
6891 * kern/i386/loader.S: New file.
6893 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
6894 * kern/i386/loader.S (grub_linux_prot_size)... to here.
6895 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
6896 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
6897 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
6898 * kern/i386/loader.S (grub_linux_real_addr)... to here.
6899 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
6900 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
6901 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
6902 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
6903 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
6904 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
6905 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
6906 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
6908 * kern/i386/realmode.S: New file.
6910 * kern/i386/pc/startup.S (protstack): Moved from here ...
6911 * kern/i386/realmode.S (protstack)... to here.
6912 * kern/i386/pc/startup.S (gdt): Moved from here ...
6913 * kern/i386/realmode.S (gdt)... to here.
6914 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
6915 * kern/i386/realmode.S (prot_to_real)... to here.
6917 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
6918 `kern/i386/realmode.S'.
6920 2007-10-17 Robert Millan <rmh@aybabtu.com>
6922 * include/grub/i386/loader.h: New file.
6924 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
6925 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6926 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6927 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6928 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
6929 * include/grub/i386/loader.h (grub_linux_prot_size)
6930 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6931 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6932 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6933 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
6935 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
6937 2007-10-15 Robert Millan <rmh@aybabtu.com>
6939 * normal/misc.c (grub_normal_print_device_info): Do not probe for
6940 filesystem when dev->disk is unset.
6941 Do probe for filesystem even when dev->disk->has_partitions is set.
6942 In case a filesystem is found, always report it.
6943 In case it isn't, if dev->disk->has_partitions is set, report that
6944 a partition table was found instead of reporting that no filesystem
6945 could be identified.
6947 2007-10-12 Robert Millan <rmh@aybabtu.com>
6949 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
6950 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
6952 * include/grub/types.h (grub_host_to_target16): New macro.
6953 (grub_host_to_target32): Likewise.
6954 (grub_host_to_target64): Likewise.
6955 (grub_target_to_host16): Likewise.
6956 (grub_target_to_host32): Likewise.
6957 (grub_target_to_host64): Likewise.
6959 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6961 (GRUB_MOD_ALIGN): ...this. Update all users.
6963 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
6964 grub_host_to_target32.
6965 Replace grub_be_to_cpu32 with grub_target_to_host32.
6966 (load_modules): Likewise.
6967 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
6968 Replace grub_be_to_cpu32 with grub_target_to_host32.
6969 Replace grub_cpu_to_be16 with grub_host_to_target16.
6970 Replace grub_cpu_to_be32 grub_host_to_target32.
6972 2007-10-12 Robert Millan <rmh@aybabtu.com>
6974 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
6975 * util/elf/grub-mkimage.c: ... here.
6977 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
6978 `util/powerpc/ieee1275/grub-mkimage.c'.
6980 2007-10-07 Robert Millan <rmh@aybabtu.com>
6982 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
6983 and make it easier to figure out.
6984 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
6985 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
6986 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
6987 leave us with less than HEAP_MIN_SIZE total heap.
6988 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
6990 2007-10-03 Robert Millan <rmh@aybabtu.com>
6992 * include/grub/i386/io.h: New file.
6993 * commands/i386/pc/play.c (inb): Removed.
6995 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6997 * term/i386/pc/serial.c (inb): Removed.
6999 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7001 * term/i386/pc/vga.c (inb): Removed.
7003 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7006 2007-10-02 Robert Millan <rmh@aybabtu.com>
7008 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
7009 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7010 Reported by Marcin Kurek.
7012 2007-09-07 Robert Millan <rmh@aybabtu.com>
7014 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
7015 SmartFirmware version updates (as released by Sven Luther), and avoid
7016 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
7017 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
7020 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7023 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
7024 when merging two regions.
7026 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7028 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
7029 * normal/completion.c (grub_normal_do_completion): Likewise.
7030 Reported by Hitoshi Ozeki.
7032 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7034 Do not use devices at boot in chainloading.
7036 * loader/i386/pc/chainloader.c (boot_drive): New variable.
7037 (boot_part_addr): Likewise.
7038 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
7039 with BOOT_DRIVE and BOOT_PART_ADDR.
7040 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
7041 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
7043 2007-08-29 Robert Millan <rmh@aybabtu.com>
7045 Patch from Simon Peter <dn.tlp@gmx.net>:
7046 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
7047 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
7048 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
7049 util/i386/pc/grub-setup.c_DEPENDENCIES.
7050 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
7051 util/grub-probe.c_DEPENDENCIES.
7052 * conf/powerpc-ieee1275.rmk: Likewise.
7054 2007-08-28 Robert Millan <rmh@aybabtu.com>
7056 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
7057 to tell grub-mkdevicemap how to name devices.
7058 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
7061 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
7062 util/i386/get_disk_name.c.
7063 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
7064 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
7065 util/ieee1275/get_disk_name.c.
7067 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
7069 * DISTLIST: Add util/i386/get_disk_name.c and
7070 util/ieee1275/get_disk_name.c.
7072 * util/grub-mkdevicemap.c: Replace device naming logic with
7073 grub_util_get_disk_name() calls.
7075 2007-08-20 Robert Millan <rmh@aybabtu.com>
7077 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
7078 (so that it works for both plural and singular quantities).
7080 2007-08-05 Robert Millan <rmh@aybabtu.com>
7082 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
7083 so that [xz] isn't taken into account when determining order.
7085 2007-08-02 Marco Gerards <marco@gnu.org>
7087 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
7088 `include/multiboot2.h', `include/grub/elfload.h',
7089 `include/multiboot.h', `include/grub/multiboot.h',
7090 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
7091 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
7092 `kern/elf.c', `loader/multiboot_loader.c',
7093 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
7094 `loader/i386/pc/multiboot2.c',
7095 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
7096 `util/i386/pc/grub-mkrescue.in'. Remove
7097 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
7098 `include/grub/i386/pc/util/biosdisk.h' and
7099 `include/grub/powerpc/ieee1275/multiboot.h'.
7101 2007-08-02 Bean <bean123ch@gmail.com>
7103 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
7104 (ntfs_mod_SOURCES): New variable.
7105 (ntfs_mod_CFLAGS): Likewise.
7106 (ntfs_mod_LDFLAGS): Likewise.
7108 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
7109 (grub_probe_SOURCES): Likewise.
7110 (grub_emu_SOURCES): Likewise.
7112 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7113 (grub_emu_SOURCES): Likewise.
7115 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7116 (grub_emu_SOURCES): Likewise.
7118 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
7120 * fs/ntfs.c: New file.
7122 2007-08-02 Bean <bean123ch@gmail.com>
7124 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
7126 * file.h (grub_file): Likewise.
7128 * fshelp.h (grub_fshelp_read_file): Likewise.
7130 * util/i386/pc/grub-setup.c (setup): Likewise.
7131 (save_first_sector): Likewise.
7132 (save_blocklists): Likewise.
7134 * fs/affs.c (grub_affs_read_file): Likewise.
7136 * fs/ext2.c (grub_ext2_read_file): Likewise.
7138 * fs/fat.c (grub_fat_read_data): Likewise.
7140 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
7142 * fs/hfs.c (grub_hfs_read_file): Likewise.
7144 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7146 * fs/jfs.c (grub_jfs_read_file): Likewise.
7148 * fs/minix.c (grub_minix_read_file): Likewise.
7150 * fs/sfs.c (grub_sfs_read_file): Likewise.
7152 * fs/ufs.c (grub_ufs_read_file): Likewise.
7154 * fs/xfs.c (grub_xfs_read_file): Likewise.
7156 * command/blocklist.c (read_blocklist): Likewise.
7157 (print_blocklist): Likewise.
7159 2007-08-02 Marco Gerards <marco@gnu.org>
7161 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
7164 * disk/host.c: New file.
7166 * util/hostfs.c: Likewise.
7168 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
7169 return `GRUB_ERR_BAD_FS'.
7170 * fs/sfs.c (grub_sfs_mount): Likewise.
7171 * fs/xfs.c (grub_xfs_mount): Likewise.
7173 * include/grub/disk.h (enum grub_disk_dev_id): Add
7174 `GRUB_DISK_DEVICE_HOST_ID'.
7176 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
7178 2007-07-24 Jerone Young <jerone@gmail.com>
7180 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
7181 modules for compilation.
7182 * conf/powerpc-ieee1275.rmk: Likewise.
7184 * include/multiboot.h: Move multiboot definitions to one file. Rename
7185 many definitions to not get grub specific.
7186 * include/multiboot2.h: Create header with multiboot 2 definitions.
7187 * include/grub/multiboot.h: Header for grub specific function
7188 prototypes and definitions.
7189 * include/grub/multiboot2.h: Likewise.
7190 * include/grub/multiboot_loader.h: Likewise.
7191 * include/grub/i386/pc/multiboot.h: Removed.
7192 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
7194 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
7195 and 2 to allow for one multiboot and module commands.
7196 * loader/multiboot2.c: Add multiboot2 functionality.
7197 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
7198 and definition names.
7199 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
7201 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
7202 ieee1275 specific multiboot2 code.
7204 * kern/i386/pc/startup.S: Change headers and definition names for
7205 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
7207 2007-07-22 Robert Millan <rmh@aybabtu.com>
7209 * geninitheader.sh: Process file specified in first parameter rather
7210 than hardcoding grub_modules_init.lst.
7211 * geninit.sh: Likewise. Also, construct header name dynamically rather
7212 than hardcoding grub_modules_init.h.
7214 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
7215 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
7216 grub_probe_init.[ch] and grub_setup_init.[ch].
7218 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
7219 grub_modules_init.h with grub_emu_init.h.
7220 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
7221 grub_probe_init.[ch] files.
7222 * conf/i386-efi.rmk: Likewise.
7223 * conf/i386-pc.rmk: Likewise.
7224 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
7225 grub_setup_init.[ch] files.
7227 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
7228 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
7229 to initialize modules rather than a list of hardcoded functions.
7230 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
7231 grub_init_all() to initialize modules rather than a list of hardcoded
7234 2007-07-22 Robert Millan <rmh@aybabtu.com>
7236 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
7237 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
7239 2007-07-22 Robert Millan <rmh@aybabtu.com>
7241 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7242 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
7243 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
7244 flag when running on SmartFirmware.
7245 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
7246 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
7249 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7250 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
7251 rather than decreasing it.
7253 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
7254 there's not enough space to do it, fail in the same way as when it
7255 can't be done because there are no partitions.
7257 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
7258 when nvsetenv failed.
7260 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
7262 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
7263 because this rule is automatically generated.
7264 (grub-mkrescue): Removed for the same reason as above.
7266 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
7268 Migrate to GNU General Public License Version 3.
7270 * COPYING: Replaced with the plain text version of GPLv3.
7272 * config.guess: Updated from gnulib.
7273 * config.sub: Likewise.
7275 * geninit.sh: Output a GPLv3 copyright notice.
7276 * geninitheader.sh: Likewise.
7277 * genmodsrc.sh: Likewise.
7278 * gensymlist.sh.in: Likewise.
7280 * boot/i386/pc/boot.S: Upgraded to GPLv3.
7281 * boot/i386/pc/diskboot.S: Likewise.
7282 * boot/i386/pc/pxeboot.S: Likewise.
7283 * commands/blocklist.c: Likewise.
7284 * commands/boot.c: Likewise.
7285 * commands/cat.c: Likewise.
7286 * commands/cmp.c: Likewise.
7287 * commands/configfile.c: Likewise.
7288 * commands/echo.c: Likewise.
7289 * commands/help.c: Likewise.
7290 * commands/ls.c: Likewise.
7291 * commands/search.c: Likewise.
7292 * commands/terminal.c: Likewise.
7293 * commands/test.c: Likewise.
7294 * commands/videotest.c: Likewise.
7295 * commands/i386/cpuid.c: Likewise.
7296 * commands/i386/pc/halt.c: Likewise.
7297 * commands/i386/pc/play.c: Likewise.
7298 * commands/i386/pc/reboot.c: Likewise.
7299 * commands/i386/pc/vbeinfo.c: Likewise.
7300 * commands/i386/pc/vbetest.c: Likewise.
7301 * commands/ieee1275/halt.c: Likewise.
7302 * commands/ieee1275/reboot.c: Likewise.
7303 * commands/ieee1275/suspend.c: Likewise.
7304 * disk/loopback.c: Likewise.
7305 * disk/lvm.c: Likewise.
7306 * disk/raid.c: Likewise.
7307 * disk/efi/efidisk.c: Likewise.
7308 * disk/i386/pc/biosdisk.c: Likewise.
7309 * disk/ieee1275/ofdisk.c: Likewise.
7310 * font/manager.c: Likewise.
7311 * fs/affs.c: Likewise.
7312 * fs/ext2.c: Likewise.
7313 * fs/fat.c: Likewise.
7314 * fs/fshelp.c: Likewise.
7315 * fs/hfs.c: Likewise.
7316 * fs/hfsplus.c: Likewise.
7317 * fs/iso9660.c: Likewise.
7318 * fs/jfs.c: Likewise.
7319 * fs/minix.c: Likewise.
7320 * fs/sfs.c: Likewise.
7321 * fs/ufs.c: Likewise.
7322 * fs/xfs.c: Likewise.
7323 * hello/hello.c: Likewise.
7324 * include/grub/acorn_filecore.h: Likewise.
7325 * include/grub/arg.h: Likewise.
7326 * include/grub/bitmap.h: Likewise.
7327 * include/grub/boot.h: Likewise.
7328 * include/grub/cache.h: Likewise.
7329 * include/grub/device.h: Likewise.
7330 * include/grub/disk.h: Likewise.
7331 * include/grub/dl.h: Likewise.
7332 * include/grub/elfload.h: Likewise.
7333 * include/grub/env.h: Likewise.
7334 * include/grub/err.h: Likewise.
7335 * include/grub/file.h: Likewise.
7336 * include/grub/font.h: Likewise.
7337 * include/grub/fs.h: Likewise.
7338 * include/grub/fshelp.h: Likewise.
7339 * include/grub/gzio.h: Likewise.
7340 * include/grub/hfs.h: Likewise.
7341 * include/grub/kernel.h: Likewise.
7342 * include/grub/loader.h: Likewise.
7343 * include/grub/lvm.h: Likewise.
7344 * include/grub/misc.h: Likewise.
7345 * include/grub/mm.h: Likewise.
7346 * include/grub/net.h: Likewise.
7347 * include/grub/normal.h: Likewise.
7348 * include/grub/parser.h: Likewise.
7349 * include/grub/partition.h: Likewise.
7350 * include/grub/pc_partition.h: Likewise.
7351 * include/grub/raid.h: Likewise.
7352 * include/grub/rescue.h: Likewise.
7353 * include/grub/script.h: Likewise.
7354 * include/grub/setjmp.h: Likewise.
7355 * include/grub/symbol.h: Likewise.
7356 * include/grub/term.h: Likewise.
7357 * include/grub/terminfo.h: Likewise.
7358 * include/grub/tparm.h: Likewise.
7359 * include/grub/types.h: Likewise.
7360 * include/grub/video.h: Likewise.
7361 * include/grub/efi/api.h: Likewise.
7362 * include/grub/efi/chainloader.h: Likewise.
7363 * include/grub/efi/console.h: Likewise.
7364 * include/grub/efi/console_control.h: Likewise.
7365 * include/grub/efi/disk.h: Likewise.
7366 * include/grub/efi/efi.h: Likewise.
7367 * include/grub/efi/pe32.h: Likewise.
7368 * include/grub/efi/time.h: Likewise.
7369 * include/grub/i386/linux.h: Likewise.
7370 * include/grub/i386/setjmp.h: Likewise.
7371 * include/grub/i386/types.h: Likewise.
7372 * include/grub/i386/efi/kernel.h: Likewise.
7373 * include/grub/i386/efi/loader.h: Likewise.
7374 * include/grub/i386/efi/time.h: Likewise.
7375 * include/grub/i386/pc/biosdisk.h: Likewise.
7376 * include/grub/i386/pc/boot.h: Likewise.
7377 * include/grub/i386/pc/chainloader.h: Likewise.
7378 * include/grub/i386/pc/console.h: Likewise.
7379 * include/grub/i386/pc/init.h: Likewise.
7380 * include/grub/i386/pc/kernel.h: Likewise.
7381 * include/grub/i386/pc/loader.h: Likewise.
7382 * include/grub/i386/pc/memory.h: Likewise.
7383 * include/grub/i386/pc/multiboot.h: Likewise.
7384 * include/grub/i386/pc/serial.h: Likewise.
7385 * include/grub/i386/pc/time.h: Likewise.
7386 * include/grub/i386/pc/vbe.h: Likewise.
7387 * include/grub/i386/pc/vbeblit.h: Likewise.
7388 * include/grub/i386/pc/vbefill.h: Likewise.
7389 * include/grub/i386/pc/vbeutil.h: Likewise.
7390 * include/grub/i386/pc/vga.h: Likewise.
7391 * include/grub/ieee1275/ieee1275.h: Likewise.
7392 * include/grub/ieee1275/ofdisk.h: Likewise.
7393 * include/grub/powerpc/libgcc.h: Likewise.
7394 * include/grub/powerpc/setjmp.h: Likewise.
7395 * include/grub/powerpc/types.h: Likewise.
7396 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
7397 * include/grub/powerpc/ieee1275/console.h: Likewise.
7398 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
7399 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
7400 * include/grub/powerpc/ieee1275/loader.h: Likewise.
7401 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
7402 * include/grub/powerpc/ieee1275/time.h: Likewise.
7403 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
7404 * include/grub/sparc64/libgcc.h: Likewise.
7405 * include/grub/sparc64/setjmp.h: Likewise.
7406 * include/grub/sparc64/types.h: Likewise.
7407 * include/grub/sparc64/ieee1275/console.h: Likewise.
7408 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
7409 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
7410 * include/grub/sparc64/ieee1275/time.h: Likewise.
7411 * include/grub/util/biosdisk.h: Likewise.
7412 * include/grub/util/getroot.h: Likewise.
7413 * include/grub/util/lvm.h: Likewise.
7414 * include/grub/util/misc.h: Likewise.
7415 * include/grub/util/raid.h: Likewise.
7416 * include/grub/util/resolve.h: Likewise.
7417 * io/gzio.c: Likewise.
7418 * kern/device.c: Likewise.
7419 * kern/disk.c: Likewise.
7420 * kern/dl.c: Likewise.
7421 * kern/elf.c: Likewise.
7422 * kern/env.c: Likewise.
7423 * kern/err.c: Likewise.
7424 * kern/file.c: Likewise.
7425 * kern/fs.c: Likewise.
7426 * kern/loader.c: Likewise.
7427 * kern/main.c: Likewise.
7428 * kern/misc.c: Likewise.
7429 * kern/mm.c: Likewise.
7430 * kern/parser.c: Likewise.
7431 * kern/partition.c: Likewise.
7432 * kern/rescue.c: Likewise.
7433 * kern/term.c: Likewise.
7434 * kern/efi/efi.c: Likewise.
7435 * kern/efi/init.c: Likewise.
7436 * kern/efi/mm.c: Likewise.
7437 * kern/i386/dl.c: Likewise.
7438 * kern/i386/efi/init.c: Likewise.
7439 * kern/i386/efi/startup.S: Likewise.
7440 * kern/i386/pc/init.c: Likewise.
7441 * kern/i386/pc/lzo1x.S: Likewise.
7442 * kern/i386/pc/startup.S: Likewise.
7443 * kern/ieee1275/ieee1275.c: Likewise.
7444 * kern/powerpc/cache.S: Likewise.
7445 * kern/powerpc/dl.c: Likewise.
7446 * kern/powerpc/ieee1275/cmain.c: Likewise.
7447 * kern/powerpc/ieee1275/crt0.S: Likewise.
7448 * kern/powerpc/ieee1275/init.c: Likewise.
7449 * kern/powerpc/ieee1275/openfw.c: Likewise.
7450 * kern/sparc64/cache.S: Likewise.
7451 * kern/sparc64/dl.c: Likewise.
7452 * kern/sparc64/ieee1275/init.c: Likewise.
7453 * kern/sparc64/ieee1275/openfw.c: Likewise.
7454 * loader/efi/chainloader.c: Likewise.
7455 * loader/efi/chainloader_normal.c: Likewise.
7456 * loader/i386/efi/linux.c: Likewise.
7457 * loader/i386/efi/linux_normal.c: Likewise.
7458 * loader/i386/pc/chainloader.c: Likewise.
7459 * loader/i386/pc/chainloader_normal.c: Likewise.
7460 * loader/i386/pc/linux.c: Likewise.
7461 * loader/i386/pc/linux_normal.c: Likewise.
7462 * loader/i386/pc/multiboot.c: Likewise.
7463 * loader/i386/pc/multiboot_normal.c: Likewise.
7464 * loader/powerpc/ieee1275/linux.c: Likewise.
7465 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
7466 * normal/arg.c: Likewise.
7467 * normal/cmdline.c: Likewise.
7468 * normal/command.c: Likewise.
7469 * normal/completion.c: Likewise.
7470 * normal/execute.c: Likewise.
7471 * normal/function.c: Likewise.
7472 * normal/lexer.c: Likewise.
7473 * normal/main.c: Likewise.
7474 * normal/menu.c: Likewise.
7475 * normal/menu_entry.c: Likewise.
7476 * normal/misc.c: Likewise.
7477 * normal/parser.y: Likewise.
7478 * normal/script.c: Likewise.
7479 * normal/i386/setjmp.S: Likewise.
7480 * normal/powerpc/setjmp.S: Likewise.
7481 * normal/sparc64/setjmp.S: Likewise.
7482 * partmap/acorn.c: Likewise.
7483 * partmap/amiga.c: Likewise.
7484 * partmap/apple.c: Likewise.
7485 * partmap/gpt.c: Likewise.
7486 * partmap/pc.c: Likewise.
7487 * partmap/sun.c: Likewise.
7488 * term/gfxterm.c: Likewise.
7489 * term/terminfo.c: Likewise.
7490 * term/efi/console.c: Likewise.
7491 * term/i386/pc/console.c: Likewise.
7492 * term/i386/pc/serial.c: Likewise.
7493 * term/i386/pc/vesafb.c: Likewise.
7494 * term/i386/pc/vga.c: Likewise.
7495 * term/ieee1275/ofconsole.c: Likewise.
7496 * util/biosdisk.c: Likewise.
7497 * util/console.c: Likewise.
7498 * util/genmoddep.c: Likewise.
7499 * util/getroot.c: Likewise.
7500 * util/grub-emu.c: Likewise.
7501 * util/grub-mkdevicemap.c: Likewise.
7502 * util/grub-probe.c: Likewise.
7503 * util/lvm.c: Likewise.
7504 * util/misc.c: Likewise.
7505 * util/raid.c: Likewise.
7506 * util/resolve.c: Likewise.
7507 * util/update-grub.in: Likewise.
7508 * util/update-grub_lib.in: Likewise.
7509 * util/grub.d/00_header.in: Likewise.
7510 * util/grub.d/10_hurd.in: Likewise.
7511 * util/grub.d/10_linux.in: Likewise.
7512 * util/i386/efi/grub-install.in: Likewise.
7513 * util/i386/efi/grub-mkimage.c: Likewise.
7514 * util/i386/pc/grub-install.in: Likewise.
7515 * util/i386/pc/grub-mkimage.c: Likewise.
7516 * util/i386/pc/grub-mkrescue.in: Likewise.
7517 * util/i386/pc/grub-setup.c: Likewise.
7518 * util/i386/pc/misc.c: Likewise.
7519 * util/powerpc/ieee1275/grub-install.in: Likewise.
7520 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
7521 * util/powerpc/ieee1275/misc.c: Likewise.
7522 * video/bitmap.c: Likewise.
7523 * video/video.c: Likewise.
7524 * video/i386/pc/vbe.c: Likewise.
7525 * video/i386/pc/vbeblit.c: Likewise.
7526 * video/i386/pc/vbefill.c: Likewise.
7527 * video/i386/pc/vbeutil.c: Likewise.
7528 * video/readers/tga.c: Likewise.
7530 2007-07-02 Robert Millan <rmh@aybabtu.com>
7532 * conf/i386-efi.rmk: Replace obsolete reference to
7533 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
7534 with util/getroot.c.
7535 * conf/powerpc-ieee1275.rmk: Likewise.
7536 * conf/sparc64-ieee1275.rmk: Likewise.
7538 * util/grub-emu.c (main): Fix unchecked pointer handling.
7540 2007-07-02 Robert Millan <rmh@aybabtu.com>
7542 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
7543 invocation to fail, in order to support partition-less media.
7545 * util/i386/pc/grub-install.in: Likewise.
7547 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
7548 which fs or partmap modules are needed (akin to its sister scripts).
7550 Also use grub-probe to get rid of unportable /proc/mounts check.
7552 Print the same informational message that the other scripts do, before
7555 2007-06-23 Robert Millan <rmh@aybabtu.com>
7557 * util/update-grub_lib.in (font_path): New function. Determine whether
7558 a font file can be found and, if so, echo the GRUB path to it.
7560 * util/update-grub.in: Handle multiple terminals depending on user
7561 input, platform availability and font file presence. Propagate
7562 variables of our findings to /etc/grub.d/ children.
7564 * util/grub.d/00_header.in: Handle multiple terminals, based on
7565 environment setup by update-grub.
7567 2007-06-23 Robert Millan <rmh@aybabtu.com>
7569 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
7571 2007-06-21 Robert Millan <rmh@aybabtu.com>
7573 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
7574 indicate end of data section in kernel image.
7575 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
7576 GRUB_KERNEL_MACHINE_DATA_END.
7578 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
7580 * kern/i386/efi/startup.S: Likewise.
7582 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
7583 during image generation. Implement --prefix option to override this
7585 * util/i386/efi/grub-mkimage.c: Likewise.
7587 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
7588 code to make path relative to its root into a separate function.
7590 * util/i386/pc/grub-install.in: Use newly provided
7591 make_system_path_relative_to_its_root() to convert ${grubdir}, then
7592 pass the result to grub-install --prefix.
7594 2007-06-13 Robert Millan <rmh@aybabtu.com>
7596 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
7598 * util/grub-emu.c: Use above definitions from misc.h instead of
7600 * util/grub-mkdevicemap.c: Likewise.
7601 * util/i386/pc/grub-setup.c: Likewise.
7602 * util/grub-probe.c: Likewise.
7603 (probe): Abort with grub_util_error() when either
7604 grub_guess_root_device or grub_util_get_grub_dev fails.
7606 2007-06-12 Robert Millan <rmh@aybabtu.com>
7608 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
7610 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
7612 * util/grub-probe.c (probe): Likewise for "drive_name".
7614 2007-06-11 Robert Millan <rmh@aybabtu.com>
7616 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
7617 not just the cdrom one.
7619 2007-06-11 Robert Millan <rmh@aybabtu.com>
7621 * util/i386/pc/grub-mkrescue.in: Add "set -e".
7622 Add --pkglibdir=DIR option to override pkglibdir.
7623 Mention --image-type=TYPE in help output.
7624 Fix --grub-mkimage (it was a no-op).
7625 Abort gracefully when no parameter is given.
7627 2007-06-11 Robert Millan <rmh@aybabtu.com>
7629 * util/i386/pc/grub-mkrescue.in: New file.
7630 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
7631 * Makefile.in: Handle bin_SCRIPTS.
7633 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
7635 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
7636 list of video modes.
7638 2007-06-06 Robert Millan <rmh@aybabtu.com>
7640 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
7641 file doesn't exist, or if it is in a filesystem grub can't read.
7643 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
7644 not abort if GRUB_DRIVE could not be defined. Rearrange generated
7645 header comment to fit in 80 columns when the variables are resolved.
7647 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
7648 could be identified by update-grub. Remove redundant check for
7649 unifont.pff existence (since convert_system_path_to_grub_path now
7652 2007-06-04 Robert Millan <rmh@aybabtu.com>
7654 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
7656 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
7658 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
7660 2007-06-04 Robert Millan <rmh@aybabtu.com>
7662 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
7664 * include/grub/partition.h: Declare grub_apple_partition_map_init and
7665 grub_apple_partition_map_fini.
7668 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
7669 to access >2 TiB disks).
7671 Print disk->total_sectors with %llu instead of %lu, since this
7672 variable is always 64-bit (prevents wrong disk size from being displayed
7673 on either >2 TiB disk or big-endian CPU).
7675 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
7676 into a generic case that supports all (sane) partition maps.
7678 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
7681 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
7682 and grub_apple_partition_map_fini() after that.
7684 2007-06-01 Robert Millan <rmh@aybabtu.com>
7686 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
7688 * util/grub.d/00_header.in: Only enable gfxterm when
7689 convert_system_path_to_grub_path() succeeds.
7691 2007-05-20 Robert Millan <rmh@aybabtu.com>
7693 * util/update-grub_lib.in: New file.
7694 * DISTLIST: Add update-grub_lib.in.
7695 * conf/common.rmk: Generate update-grub_lib and install it in
7697 * Makefile.in: Add install routine for $(lib_DATA).
7699 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
7700 function provided by update-grub_lib to support arbitrary paths of
7702 * util/update-grub.in: Use convert_system_path_to_grub_path() to
7703 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
7705 2007-05-19 Robert Millan <rmh@aybabtu.com>
7707 * commands/i386/cpuid.c: New module.
7709 * conf/i386-efi.rmk: Enable cpuid.mod.
7710 * conf/i386-pc.rmk: Likewise.
7712 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7714 * kern/disk.c (grub_disk_read): Check return value of
7717 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7719 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
7721 * disk/raid.c (grub_raid_open): Likewise.
7723 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7725 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
7726 stack instead of on the heap.
7728 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
7729 before doing a read on it.
7731 * configure.ac: Only use -fno-stack-protector for the target
7734 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7736 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
7737 __attribute_ ((unused)) to mode_type argument.
7739 * util/getroot.c (grub_guess_root_device): Fix #endif.
7741 * kern/misc.c (memcmp): Fix prototype.
7743 * include/grub/partition.h [GRUB_UTIL]
7744 (grub_gpt_partition_map_init): Add prototype.
7745 (grub_gpt_partition_map_fini): Likewise.
7747 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
7750 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
7751 (grub_fat_read_data): Likewise.
7752 (grub_fat_find_dir): Likewise.
7754 * font/manager.c (find_glyph): Make table a const.
7755 (grub_font_get_glyph): Remove bitmap from if statement.
7757 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
7759 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
7760 code, first search for device in /dev/mapper, then in /dev.
7761 (grub_util_get_grub_dev): New function.
7762 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
7764 * util/grub-probe.c (probe): Remove check for RAID, call
7765 grub_util_get_grub_dev() instead of
7766 grub_util_biosdisk_get_grub_dev().
7767 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
7768 grub_util_biosdisk_get_grub_dev().
7769 * util/i386/pc/grub-setup.c (main): Likewise.
7771 2007-05-16 Robert Millan <rmh@aybabtu.com>
7773 * DISTLIST: Update for the latest changes.
7774 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
7775 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
7776 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
7777 grub/util/biosdisk.h.
7778 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
7779 grub/util/biosdisk.h.
7781 2007-05-16 Robert Millan <rmh@aybabtu.com>
7783 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
7785 2007-05-16 Robert Millan <rmh@aybabtu.com>
7787 * util/i386/efi/grub-install.in: New.
7788 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
7789 newly added grub-install.
7790 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
7792 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
7793 grub/util/biosdisk.h.
7794 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
7795 grub/util/biosdisk.h.
7797 2007-05-16 Robert Millan <rmh@aybabtu.com>
7799 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
7800 * include/grub/util/biosdisk.h: ... here.
7801 * util/i386/pc/biosdisk.c: Moved to ...
7802 * util/biosdisk.c: ... here.
7803 * util/i386/pc/getroot.c: Moved to ...
7804 * util/getroot.c: ... here.
7805 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
7806 * util/grub-mkdevicemap.c: ... here.
7807 * util/i386/pc/grub-probe.c: Moved to ...
7808 * util/grub-probe.c: ... here.
7810 2007-05-15 Robert Millan <rmh@aybabtu.com>
7812 * util/update-grub.in: Remove duplicated line in grub.cfg header
7815 2007-05-13 Robert Millan <rmh@aybabtu.com>
7817 * util/update-grub.in: Fix a few assumptions about the devices holding
7818 /, /boot and /boot/grub being the same.
7819 * util/grub.d/00_header.in: Likewise.
7820 * util/grub.d/10_hurd.in: Likewise.
7821 * util/grub.d/10_linux.in: Likewise.
7823 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
7824 patterns. Use that to define the `.old' suffix as older than `'.
7826 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
7828 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
7829 the grub.cfg header message.
7831 2007-05-11 Robert Millan <rmh@aybabtu.com>
7833 * util/update-grub.in: Create device.map if it doesn't already exist,
7834 before attempting to run grub-probe.
7835 Check for grub-probe and grub-mkdevicemap with the same code
7836 grub-install is using.
7839 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
7841 * Makefile.in: Add the datarootdir autoconf variable.
7843 2007-05-09 Robert Millan <rmh@aybabtu.com>
7845 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
7846 fail gracefully if dev->disk->partition == NULL.
7848 2007-05-07 Robert Millan <rmh@aybabtu.com>
7850 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
7851 determine partition map module.
7852 * util/i386/pc/grub-install.in: Use this feature to decide which
7853 partition module to load, instead of hardcoding pc and gpt.
7855 2007-05-07 Robert Millan <rmh@aybabtu.com>
7857 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
7858 source directory differs from build directory.
7860 2007-05-05 Robert Millan <rmh@aybabtu.com>
7862 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
7865 2007-05-05 Robert Millan <rmh@aybabtu.com>
7867 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
7869 2007-05-05 Robert Millan <rmh@aybabtu.com>
7871 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
7872 command-line arguments via ${GRUB_CMDLINE_LINUX}.
7874 2007-05-05 Robert Millan <rmh@aybabtu.com>
7876 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
7877 (grub_probe_SOURCES): Likewise.
7878 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
7879 GPT and initialize dos_part and bsd_part accordingly.
7880 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
7882 (main): Activate gpt module for use during partition identification,
7883 and deactivate it afterwards.
7884 * util/i386/pc/grub-install.in: Add gpt module to core.img.
7885 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
7886 partition identification, and deactivate it afterwards.
7888 2007-05-05 Robert Millan <rmh@aybabtu.com>
7890 * term/i386/pc/console.c (grub_console_fini): Call
7891 grub_term_set_current() before grub_term_unregister().
7893 2007-05-04 Robert Millan <rmh@aybabtu.com>
7895 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
7896 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
7897 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
7898 and update-grub_DATA.
7899 * conf/common.rmk: Build and install update-grub components.
7900 * conf/common.mk: Regenerate.
7901 * util/update-grub.in: New. Core of update-grub.
7902 * util/grub.d/00_header.in: New. Generates grub.cfg header.
7903 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
7904 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
7905 * util/grub.d/README: New. Document grub.d directory layout.
7907 2007-05-01 Robert Millan <rmh@aybabtu.com>
7909 * util/grub-emu.c: Move initialization functions
7910 grub_util_biosdisk_init() and grub_init_all() before
7911 grub_util_biosdisk_get_grub_dev(), which relies on them.
7913 2007-04-19 Robert Millan <rmh@aybabtu.com>
7915 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
7918 2007-04-18 Jerone Young <jerone@gmail.com>
7920 * kernel/elf.c: Add missing parenthesis for conditional statement
7923 2007-04-10 Jerone Young <jerone@gmail.com>
7925 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
7926 continue on and look for device node with real device name.
7928 2007-04-10 Jerone Young <jerone@gmail.com>
7930 * configure.ac: Add argument for autoconf to use transformation
7932 * Makefile.in: Add autoconf package transformation code.
7933 * util/i386/pc/grub-install.in: Likewise.
7934 * util/powerpc/ieee1275/grub-install.in: Likewise.
7936 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
7938 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
7939 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
7940 (EXT2_REVISION): Likewise.
7941 (EXT2_INODE_SIZE): Likewise.
7942 (struct grub_ext2_block_group): Added a missing member
7944 (grub_ext2_read_inode): Divide by the inode size in a superblock
7945 instead of 128 to obtain INODES_PER_BLOCK.
7946 Use the macro EXT2_INODE_SIZE instead of directly using
7949 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
7951 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
7952 superblock instead of the structure size to compute an
7953 offset. This fixes the problem that GRUB could not read a
7954 filesystem when inode size is different from 128-byte.
7956 2007-03-05 Marco Gerards <marco@gnu.org>
7958 * normal/main.c (read_config_file): When "menu" is not set, create
7961 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7963 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
7964 (HEAP_LIMIT): New macro.
7965 (grub_claim_heap): Claim memory up to `heaplimit'.
7967 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7969 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
7970 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
7972 (grub_arch_modules_addr): Return address after `_end'.
7973 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
7974 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
7975 (add_segments): Calculate `_end' from phdr size and location.
7976 (ALIGN_UP): Moved to ...
7977 * include/grub/misc.h: here.
7978 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7980 (GRUB_IEEE1275_MODULE_BASE): Removed.
7982 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7984 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
7987 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7989 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
7991 (grub_elf64_load_hook_t): Likewise.
7992 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
7995 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7997 * kern/mm.c: Update copyright.
7998 (grub_mm_debug): Correct syntax error.
7999 (grub_mm_dump_free): New function.
8000 (grub_debug_free): Call `grub_free'.
8001 * include/grub/mm.h: Update copyright.
8002 (grub_mm_dump_free): Add declaration.
8004 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8006 * include/grub/ieee1275/ieee1275.h: Update copyright.
8007 * kern/powerpc/ieee1275/init.c: Likewise.
8008 * kern/powerpc/ieee1275/openfw.c: Likewise.
8010 * loader/powerpc/ieee1275/linux.c: Likewise.
8011 * include/grub/elfload.h: Likewise.
8012 * kern/elf.c: Likewise.
8013 (grub_elf32_load): Pass `base' and `size' parameters. Update all
8015 (grub_elf64_load): Likewise.
8016 (grub_elf32_load_segment): Move to a nested function.
8017 (grub_elf64_load_segment): Likewise.
8019 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8021 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
8023 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
8024 (grub_heap_len): Likewise.
8025 (HEAP_SIZE): New macro.
8026 (grub_claim_heap): New function.
8027 (grub_machine_init): Don't claim heap directly. Call
8029 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
8030 (grub_available_iterate): New function.
8032 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
8034 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
8035 * configure.ac: Use it for testing the HOST and TARGET compilers.
8037 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
8039 * Makefile.in (enable_grub_emu): New variable.
8040 * configure.ac (--enable-grub-emu): New option.
8041 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
8042 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
8043 * conf/i386-pc.rmk: Likewise.
8044 * conf/powerpc-ieee1275.rmk: Likewise.
8045 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
8047 2006-12-12 Marco Gerards <marco@gnu.org>
8049 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
8051 * kern/env.c (grub_env_unset): Don't free the member `value' when
8052 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
8055 * normal/main.c (current_menu): Removed.
8056 (free_menu): Unset the `menu' environment variable.
8057 (grub_normal_menu_addentry): Make use of the environment variable
8058 `menu', instead of using the global `current_menu'. Allocate
8059 memory for the sourcecode of this entry.
8060 (read_config_file): New argument `nested', changed all callers.
8061 Only in the case of a new context, initialize a new menu. Set the
8062 `menu' environment variable.
8063 (grub_normal_execute): Don't set and unset the environment
8064 variable `menu' here anymore. Only free the menu when leaving the
8067 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
8070 2006-12-11 Marco Gerards <marco@gnu.org>
8072 * normal/menu_entry.c (run): Fix off by one bug so the last line
8073 is executed. Move the loader check to outside the loop.
8075 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
8077 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
8079 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
8081 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
8082 the number of sectors. Reported by Andrey Shuvikov
8083 <mr_hyro@yahoo.com>.
8085 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
8087 * kern/disk.c (grub_disk_read): When there is a read error, always
8088 try to read only the necessary data.
8090 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
8092 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
8094 [GRUB_UTIL] (grub_raid_fini): Likewise.
8095 [GRUB_UTIL] (grub_lvm_init): Likewise.
8096 [GRUB_UTIL] (grub_lvm_fini): Likewise.
8097 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
8098 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
8099 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
8100 and grub_raid_fini().
8102 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
8104 * include/grub/types.h (__unused): Rename to UNUSED.
8105 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
8106 (grub_elf64_size): Likewise.
8108 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8110 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
8111 grub_error_push and grub_error_pop in the error-handling path.
8112 (grub_elf32_load_segment): Only call grub_file_read with non-zero
8115 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8117 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
8118 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8119 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8120 (kernel_elf_SOURCES): Likewise.
8121 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
8122 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
8123 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8124 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8125 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
8126 (elf_mod_SOURCES): New variable.
8127 (elf_mod_CFLAGS): Likewise.
8128 (elf_mod_LDFLAGS): Likewise.
8129 * include/grub/types.h (__unused): New macro.
8130 * include/grub/elfload.h: New file.
8131 * kern/elf.c: Likewise.
8132 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
8133 (ELF32_LOADMASK): New macro.
8134 (ELF64_LOADMASK): Likewise.
8136 (grub_linux_load32): New function.
8137 (grub_linux_load64): Likewise.
8138 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
8139 Use grub_elf_t instead of grub_file_t.
8141 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
8143 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
8144 `catch_result' to struct set_color_args.
8146 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
8148 * normal/menu.c: Include grub/script.h.
8149 * normal/menu_entry.c: Likewise.
8150 * include/grub/normal.h: Do not include grub/script.h.
8152 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8154 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
8156 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8158 * kern/disk.c (grub_disk_open): Print debug messages when opening a
8160 (grub_disk_close): Print debug messages when closing a disk.
8161 (grub_disk_read): Print debug messages when disk read fails.
8162 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
8164 * kern/partition.c: Include misc.h.
8165 (grub_partition_iterate): Print debug messages when detecting
8168 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8170 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
8172 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
8174 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
8176 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8177 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
8179 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
8181 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
8182 instead of sizeof(lv). Patch by Michael Guntsche.
8184 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
8186 * disk/lvm.c: Rename VGS to VG_LIST.
8187 (grub_lvm_iterate): Change VGS->LV to VG-LV.
8188 (grub_lvm_open): Likewise.
8189 Thanks to Michael Guntsche for finding this bug.
8191 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8193 * configure.ac (AC_INIT): Bumped to 1.95.
8195 2006-10-14 Robert Millan <rmh@aybabtu.com>
8197 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
8198 with "/dev/.static/dev/md".
8200 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
8202 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
8203 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
8204 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
8205 DRIVE_NAME are always freed.
8207 * util/i386/pc/biosdisk.c (make_device_name): Add one into
8208 DOS_PART, as a DOS partition is counted from one instead of zero
8209 now. Reported by Robert Millan.
8211 2006-10-14 Robert Millan <rmh@aybabtu.com>
8213 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
8214 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
8215 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
8216 string returned by grub_guess_root_device.
8217 * util/i386/pc/grub-setup.c: Likewise.
8218 * util/i386/pc/grub-probefs.c: Likewise.
8220 * util/i386/pc/grub-probefs.c: Rename to ...
8221 * util/i386/pc/grub-probe.c: ... this.
8222 * DISTLIST: Remove grub-probefs, add grub-probe.
8223 * conf/i386-efi.rmk: Likewise.
8224 * conf/i386-pc.rmk: Likewise.
8225 * util/i386/pc/grub-install.in: Likewise.
8227 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
8228 choose which information we want to print.
8230 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
8232 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
8233 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
8234 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
8235 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
8236 video/readers/tga.c and video/i386/pc/vbeutil.c.
8238 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
8240 Added support for RAID and LVM.
8242 * disk/lvm.c: New file.
8243 * disk/raid.c: Likewise.
8244 * include/grub/lvm.h: Likewise.
8245 * include/grub/raid.h: Likewise.
8246 * include/grub/util/lvm.h: Likewise.
8247 * include/grub/util/raid.h: Likewise.
8248 * util/lvm.c: Likewise.
8249 * util/raid.c: Likewise.
8251 * include/grub/disk.h (grub_disk_dev_id): Add
8252 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
8253 (grub_disk_get_size): New prototype.
8254 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
8255 returns a partition.
8256 (grub_disk_get_size): New function.
8258 * kern/i386/pc/init.c (make_install_device): Copy the prefix
8259 verbatim if grub_install_dos_part is -2.
8261 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
8264 * util/i386/pc/grub-setup.c (setup): New argument
8265 MUST_EMBED. Force embedding of GRUB when the argument is
8266 true. Close FILE before returning.
8267 (main): Add support for RAID and LVM.
8269 * conf/common.rmk: Add RAID and LVM modules.
8270 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
8272 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
8274 * kern/misc.c (grub_strstr): New function.
8275 * include/grub/misc.h (grub_strstr): New prototype.
8277 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
8279 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
8281 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
8283 * kern/misc.c (grub_strtoull): Guess the base only if not
8286 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
8288 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
8291 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
8293 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
8295 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
8296 Remove `flags' argument. All callers changed.
8297 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
8298 (IEEE1275_IHANDLE_INVALID): New variable.
8299 (IEEE1275_CELL_INVALID): New variable.
8300 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
8301 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
8302 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
8303 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
8304 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
8305 codes from Open Firmware. All callers updated.
8306 (grub_ieee1275_next_property): Directly return Open Firmware return
8308 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8309 Standardize error checking from `grub_ieee1275_get_property'.
8310 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
8311 `devalias' to `aliases'. Correct comments. Consolidate error paths.
8313 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
8315 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
8316 `instance_to_package_args' to `instance_to_path_args'.
8318 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
8319 `grub_ieee1275_chosen'.
8321 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
8322 `grub_ieee1275_interpret'.
8324 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
8326 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
8328 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
8330 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
8331 (__cmpdi): Likewise.
8333 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
8334 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
8337 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
8339 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
8340 to type `grub_ssize_t'.
8341 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
8343 2006-09-22 Marco Gerards <marco@gnu.org>
8345 * normal/script.c (grub_script_create_cmdmenu): Skip leading
8348 2006-09-22 Marco Gerards <marco@gnu.org>
8350 * commands/echo.c: New file.
8352 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
8354 * conf/common.rmk (echo_mod_SOURCES): New variable.
8355 (echo_mod_CFLAGS): Likewise.
8356 (echo_mod_LDFLAGS): Likewise.
8358 2006-09-22 Marco Gerards <marco@gnu.org>
8360 * normal/main.c (get_line): Malloc memory instead of using
8361 preallocated memory. Removed the arguments `cmdline' and
8362 `max_len'. Updated all callers.
8364 2006-09-22 Marco Gerards <marco@gnu.org>
8366 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
8367 (normal_mod_DEPENDENCIES): Likewise.
8369 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
8370 (normal_mod_DEPENDENCIES): Likewise.
8372 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
8374 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
8376 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
8378 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
8379 (normal_mod_DEPENDENCIES): Likewise.
8380 * conf/i386-pc.mk: Regenerate.
8381 * conf/i386-efi.mk: Likewise
8382 * conf/common.mk: Likewise.
8383 * conf/powerpc-ieee1275.mk: Likewise.
8384 * conf/sparc64-ieee1275.mk: Likewise.
8386 2006-09-22 Robert Millan <rmh@aybabtu.com>
8388 Sync with i386 version.
8389 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
8390 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
8392 2006-09-21 Robert Millan <rmh@aybabtu.com>
8394 Import from GRUB Legacy (lib/device.c):
8395 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
8396 (init_device_map) [__linux__]: Add support for I2O devices.
8398 2006-09-14 Marco Gerards <marco@gnu.org>
8400 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
8403 2006-09-14 Robert Millan <rmh@aybabtu.com>
8405 * util/i386/pc/grub-install.in: Skip menu.lst when removing
8408 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
8410 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
8411 before adding it to device.map.
8413 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
8415 * genmk.rb: Let GCC generate dependencies the first time it
8416 compiles a file; using the -MD option.
8417 * conf/common.mk: Regenerate.
8418 * conf/i386-pc.mk: Likewise.
8419 * conf/i386-efi.mk: Likewise.
8420 * conf/powerpc-ieee1275.mk: Likewise.
8421 * conf/sparc64-ieee1275.mk: Likewise.
8423 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
8425 Move the prototypes of grub_setjmp and grub_longjmp to
8426 cpu/setjmp.h, so that each architecture may specify different
8429 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
8430 (grub_longjmp): Likewise.
8431 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
8432 (grub_longjmp): Likewise.
8433 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
8434 (grub_longjmp): Likewise.
8436 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
8437 [!GRUB_UTIL] (grub_longjmp): Removed.
8439 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
8441 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
8442 "color!" method does not return any value.
8444 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8446 * include/grub/bitmap.h: New file.
8448 * include/grub/i386/pc/vbeutil.h: Likewise.
8450 * video/bitmap.c: Likewise.
8452 * video/readers/tga.c: Likewise.
8454 * video/i386/pc/vbeutil.c: Likewise.
8456 * commands/videotest.c: Code cleanup and updated to reflect to new
8459 * term/gfxterm.c: Likewise.
8461 * video/video.c: Likewise.
8463 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
8464 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
8465 (bitmap_mod_SOURCES): New entry.
8466 (bitmap_mod_CFLAGS): Likewise.
8467 (bitmap_mod_LDFLAGS): Likewise.
8468 (tga_mod_SOURCES): Likewise.
8469 (tga_mod_CFLAGS): Likewise.
8470 (tga_mod_LDFLAGS): Likewise.
8472 * include/grub/video.h (grub_video_blit_operators): New enum type.
8473 (grub_video_render_target): Changed as forward declaration and moved
8474 actual definition to be video driver specific.
8475 (grub_video_adapter.blit_bitmap): Added blitting operator.
8476 (grub_video_adapter.blit_render_target): Likewise.
8477 (grub_video_blit_bitmap): Likewise.
8478 (grub_video_blit_render_target): Likewise.
8480 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
8481 driver specific render target definition.
8482 (grub_video_vbe_map_rgba): Added driver internal helper.
8483 (grub_video_vbe_unmap_color): Updated to use
8484 grub_video_i386_vbeblit_info.
8485 (grub_video_vbe_get_video_ptr): Likewise.
8487 * include/grub/i386/pc/vbeblit.h
8488 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
8489 grub_video_i386_vbeblit_info.
8490 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
8491 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
8492 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
8493 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
8494 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
8495 (grub_video_i386_vbeblit_index_index): Likewise.
8496 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
8497 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
8498 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
8499 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
8501 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
8504 * video/i386/pc/vbeblit.c: Updated to reflect changes on
8505 include/grub/i386/pc/vbeblit.h.
8507 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
8508 Updated to use grub_video_i386_vbeblit_info.
8509 (grub_video_i386_vbefill_R8G8B8): Likewise.
8510 (grub_video_i386_vbefill_index): Likewise.
8511 (grub_video_i386_vbefill): Added generic filler.
8513 * video/i386/pc/vbefill.c: Updated to reflect changes on
8514 include/grub/i386/pc/vbefill.h.
8516 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
8517 grub_video_i386_vbeblit_info.
8518 (grub_video_vbe_unmap_color): Likewise.
8519 (grub_video_vbe_blit_glyph): Likewise.
8520 (grub_video_vbe_scroll): Likewise.
8521 (grub_video_vbe_draw_pixel): Removed function.
8522 (grub_video_vbe_get_pixel): Likewise.
8523 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
8524 updated code to use it.
8525 (common_blitter): Added common blitter for render target and bitmap.
8526 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
8527 (grub_video_vbe_blit_render_target): Likewise.
8529 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
8531 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
8532 is in text mode if there is no console control protocol instance
8535 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8537 * include/grub/video.h: Code cleanup.
8539 * include/grub/i386/pc/vbe.h: Likewise.
8541 * video/i386/pc/vbe.c: Likewise.
8543 * video/i386/pc/vbeblit.c: Likewise.
8545 * video/i386/pc/vbefill.c: Likewise.
8547 * video/video.c: Likewise. Also added more comments.
8549 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8551 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
8552 (struct grub_biosdisk_dap): Likewise.
8554 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
8555 linkage settings for all functions.
8557 2006-07-12 Marco Gerards <marco@gnu.org>
8559 * configure.ac (--enable-mm-debug): Fix typo.
8561 * genkernsyms.sh.in: Use proper quoting for `CC'.
8563 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
8565 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
8566 (normal_mod_ASFLAGS): Remove "-m32".
8568 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
8570 * util/misc.c: Include config.h.
8571 [!HAVE_MEMALIGN]: Do not include malloc.h.
8572 (grub_memalign): Use posix_memalign, if present. Then, use
8573 memalign, if present. Otherwise, emit an error.
8575 * util/grub-emu.c: Do not include malloc.h.
8577 * include/grub/util/misc.h: Include unistd.h. This is required for
8578 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
8579 D. Eades III <hde@foobar-qux.org>.
8581 * configure.ac (AC_GNU_SOURCE): Added.
8582 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
8585 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
8587 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
8588 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
8590 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
8592 * include/grub/types.h (grub_host_addr_t): Rename to
8594 (grub_host_off_t): Rename to grub_target_off_t.
8595 (grub_host_size_t): Rename to grub_target_size_t.
8596 (grub_host_ssize_t): Rename to grub_target_ssize_t.
8597 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
8599 * include/grub/kernel.h (struct grub_module_header): Change type
8600 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
8601 (grub_module_info): Likewise.
8603 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8605 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
8606 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
8607 Velazquez <jesus.velazquez@gmail.com>.
8609 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8611 Count partitions from 1 instead of 0 in the string representation
8612 of partitions. Still use 0-based internally.
8614 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
8615 (sun_partition_map_iterate): Use grub_partition_t instead of
8616 struct grub_partition *. Cast DESC->START_CYLINDER to
8617 grub_uint64_t after converting the endian.
8618 (sun_partition_map_probe): Subtract 1 for PARTNUM.
8619 (sun_partition_map_get_name): Add 1 to P->INDEX.
8621 * partmap/pc.c (grub_partition_parse): Subtract 1 for
8623 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
8625 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
8626 zero instead of one.
8627 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
8628 (gpt_partition_map_get_name): Add 1 into P->INDEX.
8630 * partmap/apple.c (apple_partition_map_iterate): Change the type
8632 (apple_partition_map_probe): Subtract 1 for PARTNUM.
8633 (apple_partition_map_get_name): Add 1 into P->INDEX.
8635 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
8637 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
8638 calculate the offset of a partition.
8639 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
8640 (amiga_partition_map_get_name): Add 1 into P->INDEX.
8642 * partmap/acorn.c (acorn_partition_map_find): Change the type of
8643 SECTOR to grub_disk_addr_t.
8644 (acorn_partition_map_iterate): Likewise.
8645 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
8646 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
8648 (acorn_partition_map_get_name): Add 1 into P->INDEX.
8650 * kern/i386/pc/init.c (make_install_device): Add 1 into
8651 GRUB_INSTALL_DOS_PART.
8653 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
8656 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8658 Clean up the code to support 64-bit addressing in disks and
8659 files. This change is not enough for filesystems yet.
8661 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
8662 type of "start" to grub_uint64_t.
8663 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
8664 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
8665 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
8668 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
8669 to grub_disk_addr_t.
8671 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
8674 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8676 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
8679 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
8681 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
8683 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
8685 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
8686 to grub_off_t, to detect an error from grub_file_seek.
8687 (grub_multiboot_load_elf32): Likewise.
8689 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
8690 maximum unsigned long value when an overflow is detected.
8691 (grub_strtoull): New function.
8692 (grub_divmod64): Likewise.
8693 (grub_lltoa): use grub_divmod64.
8695 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
8697 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
8698 the pointer to next character. Use grub_strtoull instead of
8700 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
8701 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
8704 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
8705 return value is signed.
8706 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
8707 test if OFFSET is less than zero, as OFFSET is unsigned now.
8709 * kern/disk.c (struct grub_disk_cache): Change the type of
8710 "sector" to grub_disk_addr_t.
8711 (grub_disk_cache_get_index): Change the type of SECTOR to
8712 grub_disk_addr_t. Calculate the hash with SECTOR casted to
8713 unsigned after shifting.
8714 (grub_disk_cache_invalidate): Change the type of SECTOR to
8716 (grub_disk_cache_unlock): Likewise.
8717 (grub_disk_cache_store): Likewise.
8718 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
8719 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
8720 grub_disk_addr_t and grub_uint64_t, respectively.
8721 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
8722 body, as the value of OFFSET is tweaked by
8723 grub_disk_check_range. Change the types of START_SECTOR, LEN and
8724 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
8726 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
8727 body, as the value of OFFSET is tweaked by
8728 grub_disk_check_range. Change the types of LEN and N to
8731 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
8732 and "saved_offset" to grub_off_t.
8733 (test_header): Cast BUF to char *.
8734 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
8736 (grub_gzio_read): Change the types of OFFSET and SIZE to
8737 grub_off_t and grub_size_t, respectively.
8739 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
8741 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
8742 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
8743 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
8744 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
8745 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
8747 * include/grub/types.h (grub_off_t): Unconditionally set to
8749 (grub_disk_addr_t): Changed to grub_uint64_t.
8751 * include/grub/partition.h (struct grub_partition): Change the
8752 types of "start", "len" and "offset" to grub_disk_addr_t,
8753 grub_uint64_t and grub_disk_addr_t, respectively.
8754 (grub_partition_get_start): Return grub_disk_addr_t.
8755 (grub_partition_get_len): Return grub_uint64_t.
8757 * include/grub/misc.h (grub_strtoull): New prototype.
8758 (grub_divmod64): Likewise.
8760 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
8761 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
8762 grub_off_t, respectively.
8763 All callers and references changed.
8765 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
8766 grub_size_t in "read".
8767 All callers and references changed.
8769 * include/grub/file.h (struct grub_file): Change the types of
8770 "offset" and "size" to grub_off_t and grub_off_t,
8771 respectively. Change the type of SECTOR to grub_disk_addr_t in
8773 (grub_file_read): Change the type of LEN to grub_size_t.
8774 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
8776 (grub_file_size): Return grub_off_t.
8777 (grub_file_tell): Likewise.
8778 All callers and references changed.
8780 * include/grub/disk.h (struct grub_disk_dev): Change the types of
8781 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
8783 (struct grub_disk): Change the type of "total_sectors" to
8784 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
8786 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
8787 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
8788 (grub_disk_write): Likewise.
8789 All callers and references changed.
8791 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
8792 char * for grub_strncmp to silence gcc.
8793 (grub_iso9660_mount): Likewise.
8794 (grub_iso9660_mount): Likewise.
8795 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
8797 (grub_iso9660_iterate_dir): Likewise.
8798 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
8800 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
8801 LEN to grub_disk_addr_t and grub_size_t, respectively.
8803 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8805 * fs/jfs.c (grub_jfs_read_file): Likewise.
8807 * fs/minix.c (grub_jfs_read_file): Likewise.
8809 * fs/sfs.c (grub_jfs_read_file): Likewise.
8811 * fs/ufs.c (grub_jfs_read_file): Likewise.
8813 * fs/xfs.c (grub_jfs_read_file): Likewise.
8815 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
8816 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
8819 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
8820 BLKNR to -1 instead of returning GRUB_ERRNO.
8821 (grub_ext2_read_file): Change the types of SECTOR and
8822 LEN to grub_disk_addr_t and grub_size_t, respectively.
8824 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
8825 LEN to grub_disk_addr_t and grub_size_t, respectively.
8827 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
8830 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
8831 string. Do not cast SECTOR explicitly.
8833 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
8834 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
8835 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
8836 grub_disk_addr_t and grub_size_t, respectively. If the sector is
8837 over 2TB and LBA mode is not supported, raise an error.
8838 (get_safe_sectors): New function.
8839 (grub_biosdisk_read): Use get_safe_sectors.
8840 (grub_biosdisk_write): Likewise.
8842 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
8843 (grub_efidisk_write): Likewise.
8845 * disk/loopback.c (delete_loopback): Cosmetic changes.
8846 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
8848 (grub_loopback_open): Likewise.
8849 (grub_loopback_read): Likewise. Also, change the type of POS to
8850 grub_off_t, and fix the usage of grub_memset.
8852 * commands/i386/pc/play.c: Include grub/machine/time.h.
8854 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
8857 * commands/configfile.c: Include grub/env.h.
8859 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
8860 GRUB_ERRNO directly instead. Change the type of POS to
8861 grub_off_t. Follow the coding standard.
8863 * commands/blocklist.c: Include grub/partition.h.
8864 (grub_cmd_blocklist): Return an error if the underlying device is
8865 not a disk. Take the starting sector of a partition into account,
8866 if a partition is used.
8868 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
8870 (lba_mode): Support 64-bit addresses.
8871 (chs_mode): Likewise.
8872 (copy_buffer): Adapted to the new offsets of a length field and a
8874 (blocklist_default_start): Allocate 64-bit space.
8876 * boot/i386/pc/boot.S (force_lba): Removed.
8877 (boot_drive): Moved to under KERNEL_SECTOR.
8878 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
8880 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
8882 (lba_mode): Refactored to support a 64-bit address. More size
8884 (setup_sectors): Likewise.
8886 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8888 * DISTLIST: Added include/grub/i386/linux.h. Removed
8889 include/grub/i386/pc/linux.h
8891 * configure.ac (AC_INIT): Bumped to 1.94.
8893 * config.guess: Updated from gnulib.
8894 * config.sub: Likewise.
8895 * install-sh: Likewise.
8896 * mkinstalldirs: Likewise.
8898 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8900 * conf/common.rmk (grub_modules_init.lst): Depended on
8901 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
8904 * genmk.rb (PModule::rule): Reverted the previous change.
8906 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8908 * conf/common.rmk (grub_modules_init.lst): Depends on
8909 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
8910 that the target does not exist before producing.
8911 (grub_modules_init.h): Remove the target before generating.
8912 (grub_emu_init.c): Likewise.
8914 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
8916 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
8918 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
8919 for the target-specific tests. Make sure that we also have the
8920 up-to-date target variables for those tests.
8922 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8924 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
8925 (PModule::rule): Likewise.
8927 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8929 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
8930 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
8931 target-specific flags should be prefixed.
8932 (PModule::rule): Likewise.
8934 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
8936 * configure.ac (CMP): Check if cmp is available explicitly.
8938 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
8940 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
8941 (target_cpu): New variable.
8942 (pkglibdir): Use target_cpu instead of host_cpu.
8944 * util/i386/pc/grub-install.in (host_cpu): Removed.
8945 (target_cpu): New variable.
8946 (pkglibdir): Use target_cpu instead of host_cpu.
8948 * util/genmoddep.c: Removed.
8950 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
8951 instead of GRUB_HOST_SIZEOF_VOID_P.
8952 * kern/dl.c: Likewise.
8954 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
8956 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8957 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8958 (GRUB_TARGET_SIZEOF_LONG): ... this.
8959 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8960 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8961 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8963 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8964 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8965 (GRUB_TARGET_SIZEOF_LONG): ... this.
8966 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8967 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8968 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8970 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8971 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8972 (GRUB_TARGET_SIZEOF_LONG): ... this.
8973 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8974 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8976 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
8977 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
8978 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
8979 instead of GRUB_HOST_SIZEOF_LONG.
8980 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
8981 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
8982 GRUB_CPU_WORDS_BIGENDIAN.
8983 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
8984 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
8987 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
8988 (genmoddep_SOURCES): Likewise.
8989 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
8990 (genmoddep_SOURCES): Likewise.
8991 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
8992 (genmoddep_SOURCES): Likewise.
8993 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
8995 (genmoddep_SOURCES): Likewise.
8997 * genmoddep.awk: New file.
8999 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
9000 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
9001 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
9002 (PModule::rule): Likewise.
9003 (Program::rule): Likewise.
9004 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
9005 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
9008 * configure.ac: Rewritten intensively to use host and target
9009 instead of build and host, respectively.
9011 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
9012 (host_cpu): Removed.
9013 (target_cpu): New variable.
9014 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
9015 (BUILD_CC): Removed.
9016 (BUILD_CFLAGS): Likewise.
9017 (BUILD_CPPFLAGS): Likewise.
9018 (TARGET_CC): New variable.
9019 (TARGET_CFLAGS): Likewise.
9020 (TARGET_CPPFLAGS): Likewise.
9021 (TARGET_LDFLAGS): Likewise.
9023 (include): Use target_cpu instead of host_cpu.
9024 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
9026 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
9028 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
9030 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
9031 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
9032 field 'false' to 'exec_on_false'.
9033 (grub_script_create_cmdif): Renamed argument names to reflect above
9036 * normal/execute.c (grub_script_execute_cmdif): Likewise.
9038 * normal/script.c (grub_script_create_cmdif): Likewise.
9040 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
9042 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
9044 (grub_hfsplus_btree_recptr): Likewise.
9045 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
9046 FILEBLOCK both to pass a block number and store next block
9048 (grub_hfsplus_read_block): Rewritten heavily to support an extent
9049 overflow file correctly. Specify errors appropriately, because
9050 fshelp expects that GRUB_ERRNO is set when fails. Reuse
9051 grub_hfsplus_btree_recptr to get the pointer to a found key.
9052 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
9055 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
9057 (_linux_mod_SOURCES): New variable.
9058 (_linux_mod_CFLAGS): Likewise.
9059 (_linux_mod_LDFLAGS): Likewise.
9060 (linux_mod_SOURCES): Likewise.
9061 (linux_mod_CFLAGS): Likewise.
9062 (linux_mod_LDFLAGS): Likewise.
9064 * DISTLIST: Added loader/i386/efi/linux.c,
9065 loader/i386/efi/linux_normal.c and
9066 include/grub/i386/efi/loader.h.
9068 * loader/i386/efi/linux.c: New file.
9069 * loader/i386/efi/linux_normal.c: Likewise.
9070 * include/grub/i386/efi/loader.h: Likewise.
9072 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
9074 * commands/blocklist.c: New file.
9076 * DISTLIST: Added commands/blocklist.c.
9078 * term/efi/console.c (grub_console_highlight_color): Use a lighter
9079 color for the background, and a darker color for the foreground.
9080 (grub_console_checkkey): Return READ_KEY.
9081 (grub_console_cls): Set the background to
9082 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
9084 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
9086 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
9087 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
9089 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
9092 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
9093 BG. The spec is wrong again.
9095 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
9097 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
9099 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9100 commands/blocklist.c.
9101 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9103 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
9104 (blocklist_mod_SOURCES): New variable.
9105 (blocklist_mod_CFLAGS): Likewise.
9106 (blocklist_mod_LDFLAGS): Likewise.
9108 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
9110 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
9112 (lba_mode): Use %eax more intensively to reduce the code size.
9114 2006-05-20 Marco Gerards <marco@gnu.org>
9116 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
9118 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
9120 (script): Accept leading newlines.
9121 (newlines): New rule to describe 0 or more newlines.
9122 (commands): Accept `command' with trailing newline. Fixed the
9123 order in which arguments were passed to `grub_script_add_cmd'.
9124 Accept commands separated by newlines.
9125 (function): Changed to accept newlines.
9126 (menuentry) Rewritten.
9128 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
9129 front of the list, instead of to the end.
9131 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
9133 * util/i386/pc/grub-install.in (bindir): New variable.
9134 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
9135 Shaver <lbgwjl@gmail.com>.
9137 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
9139 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
9140 grub/machine/linux.h
9141 * loader/i386/pc/linux.c: Likewise.
9143 * include/grub/i386/pc/linux.h: Moved to ...
9144 * include/grub/i386/linux.h: ... here.
9146 * include/grub/i386/linux.h (struct linux_kernel_params): New
9149 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
9151 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
9153 (grub_video_vbe_blit_glyph): Likewise.
9154 (grub_video_vbe_blit_bitmap): Likewise.
9155 (grub_video_vbe_blit_render_target): Likewise.
9157 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
9159 * configure.ac (--with-platform): Properly quote the square
9162 2006-05-08 Marco Gerards <marco@gnu.org>
9164 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
9166 (kernel_elf_HEADERS): ...to this. Updated all users.
9167 (grubof_symlist.c): Renamed from this...
9168 (kernel_elf_symlist.c): ...to this. Updated all users.
9169 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9170 (grubof_SOURCES): Renamed from this...
9171 (kernel_elf_SOURCES): ...to this.
9172 (grubof_HEADERS): Renamed from this...
9173 (kernel_elf_HEADERS): ...to this.
9174 (grubof_CFLAGS): Renamed from this...
9175 (kernel_elf_CFLAGS): ...to this.
9176 (grubof_ASFLAGS): Renamed from this...
9177 (kernel_elf_ASFLAGS): ...to this.
9178 (grubof_LDFLAGS): Renamed from this...
9179 (kernel_elf_LDFLAGS): ...to this.
9181 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
9183 (kernel_elf_HEADERS): ...to this. Updated all users.
9184 (grubof_symlist.c): Renamed from this...
9185 (kernel_elf_symlist.c): ...to this. Updated all users.
9186 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9187 (grubof_SOURCES): Renamed from this...
9188 (kernel_elf_SOURCES): ...to this.
9189 (grubof_HEADERS): Renamed from this...
9190 (kernel_elf_HEADERS): ...to this.
9191 (grubof_CFLAGS): Renamed from this...
9192 (kernel_elf_CFLAGS): ...to this.
9193 (grubof_ASFLAGS): Renamed from this...
9194 (kernel_elf_ASFLAGS): ...to this.
9195 (grubof_LDFLAGS): Renamed from this...
9196 (kernel_elf_LDFLAGS): ...to this.
9198 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
9199 `kernel.elf' instead of `grubof'.
9201 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
9203 Add --with-platform to configure. Use pkglibdir instead of
9204 pkgdatadir. This is reported by Roger Leigh.
9206 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
9207 (host_vendor): Likewise.
9208 (host_os): Likewise.
9209 (pkgdatadir): Likewise.
9210 (platform): New variable.
9211 (pkglibdir): Likewise.
9212 Use PKGLIBDIR instead of PKGDATADIR.
9214 * util/i386/pc/grub-install.in (datadir): Removed.
9215 (host_vendor): Likewise.
9216 (host_os): Likewise.
9217 (pkgdatadir): Likewise.
9218 (platform): New variable.
9219 (pkglibdir): Likewise.
9220 Use PKGLIBDIR instead of PKGDATADIR.
9222 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
9223 instead of GRUB_DATADIR.
9225 * util/i386/pc/grub-mkimage.c (usage): Likewise.
9227 * util/i386/efi/grub-mkimage.c (usage): Likewise.
9230 * configure.ac (--with-platform): New option.
9231 Use PLATFORM instead of HOST_VENDOR to specify a platform.
9233 * Makefile.in: Include a makefile based on PLATFORM instead of
9235 (pkgdatadir): Not appended by the machine type.
9236 (pkglibdir): Appended by the machine type.
9237 (host_vendor): Removed.
9238 (platform): New variable.
9239 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
9240 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
9241 (uninstall): Likewise.
9243 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
9245 Use the environment context in the menu. Remove the commands
9246 "default" and "timeout", and use variables instead.
9248 * normal/menu.c: Include grub/env.h.
9249 (print_entry): Cast TITLE to silence gcc.
9250 (get_timeout): New function.
9251 (set_timeout): Likewise.
9252 (get_entry_number): Likewise.
9253 (run_menu): Use a default entry, a fallback entry and a timeout
9254 in the environment variables "default", "fallback" and
9255 "timeout". Also, tweak the default entry if it is not within the
9256 current menu entries.
9257 (grub_menu_run): Use a fallback entry in the environment variable
9260 * normal/main.c (read_config_file): Do not initialize
9261 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
9263 (grub_normal_execute): Use a data slot to store the menu.
9265 * include/grub/normal.h (struct grub_menu): Removed default_entry,
9266 fallback_entry and timeout.
9267 (struct grub_menu_list): Removed.
9268 (grub_menu_list_t): Likewise.
9269 (struct grub_context): Likewise.
9270 (grub_context_t): Likewise.
9271 (grub_context_get): Likewise.
9272 (grub_context_get_current_menu): Likewise.
9273 (grub_context_push_menu): Likewise.
9274 (grub_context_pop_menu): Likewise.
9275 (grub_default_init): Likewise.
9276 (grub_default_fini): Likewise.
9277 (grub_timeout_init): Likewise.
9278 (grub_timeout_fini): Likewise.
9280 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
9282 (normal_mod_SOURCES): Removed normal/context.c.
9284 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
9285 commands/default.c, commands/timeout.c and normal/context.c.
9286 (normal_mod_SOURCES): Removed normal/context.c.
9288 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
9289 commands/timeout.c and normal/context.c.
9290 (normal_mod_SOURCES): Removed normal/context.c.
9292 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
9293 commands/default.c, commands/timeout.c and normal/context.c.
9294 (normal_mod_SOURCES): Removed normal/context.c.
9296 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
9298 (default_mod_SOURCES): Removed.
9299 (default_mod_CFLAGS): Likewise.
9300 (default_mod_LDFLAGS): Likewise.
9301 (timeout_mod_SOURCES): Removed.
9302 (timeout_mod_CFLAGS): Likewise.
9303 (timeout_mod_LDFLAGS): Likewise.
9305 * DISTLIST: Removed commands/default.c, commands/timeout.c and
9308 * commands/default.c: Removed.
9309 * commands/timeout.c: Likewise.
9310 * normal/context.c: Likewise.
9312 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
9314 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
9316 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
9318 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
9319 "next" to "prev" for readability.
9320 (struct grub_env_sorted_var): New struct.
9321 (grub_env_context): Renamed to ...
9322 (initial_context): ... this.
9323 (grub_env_var_context): Renamed to ...
9324 (current_context): ... this.
9325 (grub_env_find): Look only at CURRENT_CONTEXT.
9326 (grub_env_context_open): Rewritten to copy exported variables from
9328 (grub_env_context_close): Rewritten according to the new
9329 scheme. Also, add an assertion to prevent the initial context from
9331 (grub_env_insert): Removed the code for the sorted list.
9332 (grub_env_remove): Likewise.
9333 (grub_env_export): Simply mark the variable with
9334 GRUB_ENV_VAR_GLOBAL.
9335 (grub_env_set): A cosmetic change for naming consistency.
9336 (grub_env_get): Likewise.
9337 (grub_env_unset): Likewise.
9338 (grub_env_iterate): Rewritten to sort variables within this
9340 (grub_register_variable_hook): Fixed for naming consistency. Call
9341 grub_env_find again, only if NAME is not found at the first time.
9342 (mangle_data_slot_name): New function.
9343 (grub_env_set_data_slot): Likewise.
9344 (grub_env_get_data_slot): Likewise.
9345 (grub_env_unset_data_slot): Likewise.
9347 * include/grub/env.h (grub_env_var_type): New enum.
9348 (GRUB_ENV_VAR_LOCAL): New constant.
9349 (GRUB_ENV_VAR_GLOBAL): Likewise.
9350 (GRUB_ENV_VAR_DATA): Likewise.
9351 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
9353 (grub_env_set): Replace VAR with NAME for consistency.
9354 (grub_register_variable_hook): Likewise.
9355 (grub_env_export): Specify the name of the argument.
9356 (grub_env_set_data_slot): New prototype.
9357 (grub_env_get_data_slot): Likewise.
9358 (grub_env_unset_data_slot): Likewise.
9360 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
9362 Extend the loader so that GRUB can accept a loader which comes
9363 back to GRUB when a loaded image exits. Also, this change adds
9364 support for a chainloader on EFI.
9366 * term/efi/console.c: Include grub/misc.h.
9367 (grub_console_checkkey): Display a scan code on the top for
9368 debugging. This will be removed once the EFI port gets stable.
9369 Correct the scan code mapping.
9371 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
9372 allocate memory from larger regions, in order to reduce the number
9373 of allocated regions. Otherwise, the MacOSX loader panics.
9374 (filter_memory_map): Avoid less than 1MB for compatibility with
9376 (add_memory_regions): Allocate from the tail of a region, if
9377 possible, to avoid allocating a region near to 1MB, for the MacOSX
9380 * kern/efi/init.c (grub_efi_set_prefix): Specify
9381 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
9383 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
9384 argument IMAGE_HANDLE and specify it to get a loaded image.
9385 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
9386 grub_efi_get_loaded_image.
9387 (grub_efi_get_filename): Divide the length by the size of
9389 (grub_efi_get_device_path): New function.
9390 (grub_efi_print_device_path): Print End Device Path nodes. Divide
9391 the length by the size of grub_efi_char16_t for a file path device
9394 * kern/loader.c (grub_loader_noreturn): New variable.
9395 (grub_loader_set): Accept a new argument NORETURN. Set
9396 GRUB_LOADER_NORETURN to NORETURN.
9397 All callers changed.
9398 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
9401 * include/grub/efi/efi.h (grub_efi_get_device_path): New
9403 (grub_efi_get_loaded_image): Take an argument to specify an image
9406 * include/grub/loader.h (grub_loader_set): Added one more argument
9409 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
9410 instead of grub_efi_open_protocol.
9411 (grub_efidisk_get_device_name): Likewise.
9412 (grub_efidisk_close): Print a newline.
9413 (grub_efidisk_get_device_handle): Fixed to use
9414 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
9415 GRUB_EFI_DEVICE_PATH_TYPE.
9417 * disk/efi/efidisk.c (device_path_guid): Moved to ...
9418 * kern/efi/efi.c (device_path_guid): ... here.
9420 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
9422 (kernel_mod_HEADERS): Added efi/disk.h.
9423 (_chain_mod_SOURCES): New variable.
9424 (_chain_mod_CFLAGS): Likewise.
9425 (_chain_mod_LDFLAGS): Likewise.
9426 (chain_mod_SOURCES): Likewise.
9427 (chain_mod_CFLAGS): Likewise.
9428 (chain_mod_LDFLAGS): Likewise.
9430 * DISTLIST: Added include/grub/efi/chainloader.h,
9431 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
9433 * include/grub/efi/chainloader.h: New file.
9434 * loader/efi/chainloader.c: Likewise.
9435 * loader/efi/chainloader_normal.c: Likewise.
9437 2006-04-30 Marco Gerards <marco@gnu.org>
9439 * commands/configfile.c (grub_cmd_source): New function.
9440 (GRUB_MOD_INIT): Register the commands `source' and `.'.
9441 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
9443 2006-04-30 Marco Gerards <marco@gnu.org>
9445 * normal/execute.c (grub_script_execute_cmd): Change the return
9446 type to `grub_err_t'. Correctly return the error.
9447 (grub_script_execute_cmdline): In case a command line is not a
9448 command or a function, try to interpret it as an assignment.
9450 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
9452 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
9453 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
9454 skip a node whose name is obviously invalid as UTF-16,
9455 i.e. contains a NUL character. Stop the iteration when the last
9456 directory entry is found. Instead of using the return value of
9457 grub_hfsplus_btree_iterate_node, store the value in RET and use
9458 it, because the iterator can be stopped by the last directory
9461 2006-04-30 Marco Gerards <marco@gnu.org>
9463 * include/grub/env.h (grub_env_export): New prototype. Reported
9464 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
9466 2006-04-30 Marco Gerards <marco@gnu.org>
9468 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
9469 size of the extents in a catalog file record.
9471 2006-04-29 Marco Gerards <marco@gnu.org>
9473 * commands/configfile.c (grub_cmd_configfile): Execute the
9474 configfile within its own context.
9476 * include/grub/env.h (grub_env_context_open): New prototype.
9477 (grub_env_context_close): Likewise.
9479 * kern/env.c (grub_env): Removed.
9480 (grub_env_sorted): Likewise.
9481 (grub_env_context): New variable.
9482 (grub_env_var_context): Likewise.
9483 (grub_env_find): Search both the active context and the global
9485 (grub_env_context_open): New function.
9486 (grub_env_context_close): Likewise.
9487 (grub_env_insert): Likewise.
9488 (grub_env_remove): Likewise.
9489 (grub_env_export): Likewise.
9490 (grub_env_set): Changed to use helper functions to avoid code
9492 (grub_env_iterate): Rewritten so both the current context and the
9493 global context are being used.
9495 * normal/command.c (export_command): New function.
9496 (grub_command_init): Register the `export' function.
9498 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
9500 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
9501 explicitly to suppress gcc's warnings.
9502 * fs/fat.c (grub_fat_find_dir): Likewise.
9503 (grub_fat_label): Likewise.
9504 * fs/xfs.c (grub_xfs_read_inode): Likewise.
9505 (grub_xfs_mount): Likewise.
9506 (grub_xfs_label): Likewise.
9507 * fs/affs.c (grub_affs_mount): Likewise.
9508 (grub_affs_label): Likewise.
9509 (grub_affs_iterate_dir): Likewise.
9510 * fs/sfs.c (grub_sfs_mount): Likewise.
9511 (grub_sfs_iterate_dir): Likewise.
9512 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
9513 * fs/hfs.c (grub_hfs_mount): Likewise.
9514 (grub_hfs_cmp_catkeys): Likewise.
9515 (grub_hfs_find_dir): Likewise.
9516 (grub_hfs_dir): Likewise.
9517 (grub_hfs_label): Likewise.
9518 * fs/jfs.c (grub_jfs_mount): Likewise.
9519 (grub_jfs_opendir): Likewise.
9520 (grub_jfs_getent): Likewise.
9521 (grub_jfs_lookup_symlink): Likewise.
9522 (grub_jfs_label): Likewise.
9523 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
9524 (grub_hfsplus_iterate_dir): Likewise.
9525 (grub_hfsplus_btree_iterate_node): Made static.
9527 * util/grub-emu.c (prefix): New variable.
9528 (grub_machine_set_prefix): New function.
9529 (main): Do not set the environment variable "prefix" here. Only
9530 set PREFIX, which is used later by grub_machine_set_prefix.
9532 * include/grub/video.h: Do not include grub/symbol.h.
9533 (grub_video_register): Not exported. This symbol is not defined in
9535 (grub_video_unregister): Likewise.
9536 (grub_video_iterate): Likewise.
9537 (grub_video_setup): Likewise.
9538 (grub_video_restore): Likewise.
9539 (grub_video_get_info): Likewise.
9540 (grub_video_get_blit_format): Likewise.
9541 (grub_video_set_palette): Likewise.
9542 (grub_video_get_palette): Likewise.
9543 (grub_video_set_viewport): Likewise.
9544 (grub_video_get_viewport): Likewise.
9545 (grub_video_map_color): Likewise.
9546 (grub_video_map_rgb): Likewise.
9547 (grub_video_map_rgba): Likewise.
9548 (grub_video_fill_rect): Likewise.
9549 (grub_video_blit_glyph): Likewise.
9550 (grub_video_blit_bitmap): Likewise.
9551 (grub_video_blit_render_target): Likewise.
9552 (grub_video_scroll): Likewise.
9553 (grub_video_swap_buffers): Likewise.
9554 (grub_video_create_render_target): Likewise.
9555 (grub_video_delete_render_target): Likewise.
9556 (grub_video_set_active_render_target): Likewise.
9558 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
9560 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
9562 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
9563 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9564 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9565 instead of $(srcdir)/genkernsyms.sh.
9567 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
9568 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9569 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9570 instead of $(srcdir)/genkernsyms.sh.
9572 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
9573 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9574 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9575 instead of $(srcdir)/genkernsyms.sh.
9577 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
9578 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9579 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9580 instead of $(srcdir)/genkernsyms.sh.
9582 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
9585 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
9587 (gensymlist.sh): New target.
9588 (genkernsyms.sh): Likewise.
9590 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
9591 genkernsyms.sh.in and gensymlist.sh.in.
9593 * genkernsyms.sh: Removed.
9594 * gensymlist.sh: Likewise.
9596 * genkernsyms.sh.in: New file.
9597 * gensymlist.sh.in: Likewise.
9599 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9601 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
9602 clobber "prefix", since we may have already set it manually.
9604 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9606 * kern/misc.c (abort): New alias for grub_abort.
9608 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
9610 A new machine-specific function "grub_machine_set_prefix" is
9611 defined. This is called after loading modules, so that a prefix
9612 initialization can use modules. Also, this change adds an
9613 intensive debugging feature for the memory manager via the
9614 configure option "--enable-mm-debug".
9616 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
9619 * kern/sparc64/ieee1275/init.c (abort): Removed.
9620 (grub_stop): Likewise.
9621 (grub_exit): New function.
9622 (grub_set_prefix): Renamed to ...
9623 (grub_machine_set_prefix): ... this.
9624 (grub_machine_init): Do not call grub_set_prefix.
9626 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
9627 (grub_machine_set_prefix): ... this.
9628 (grub_machine_init): Do not call grub_set_prefix.
9630 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
9631 (grub_machine_init): Do not set the prefix here.
9633 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
9635 * kern/efi/init.c: Include grub/mm.h.
9636 (grub_efi_set_prefix): New function.
9638 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
9639 (grub_efi_get_filename): New function.
9640 (grub_print_device_path): Renamed to ...
9641 (grub_efi_print_device_path): ... this.
9643 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
9644 [MM_DEBUG] (grub_realloc): Likewise.
9645 [MM_DEBUG] (grub_free): Likewise.
9646 [MM_DEBUG] (grub_memalign): Likewise.
9647 [MM_DEBUG] (grub_mm_debug): New variable.
9648 [MM_DEBUG] (grub_debug_malloc): New function.
9649 [MM_DEBUG] (grub_debug_free): New function.
9650 [MM_DEBUG] (grub_debug_realloc): New function.
9651 [MM_DEBUG] (grub_debug_memalign): New function.
9653 * kern/misc.c (grub_abort): Print a newline to distinguish
9656 * kern/main.c (grub_main): Call grub_machine_set_prefix and
9657 grub_set_root_dev after loading modules. This is necessary when
9658 setting a prefix depends on modules.
9660 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
9661 (grub_efi_print_device_path): ... this.
9662 (grub_efi_get_filename): New prototype.
9663 (grub_efi_set_prefix): Likewise.
9665 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
9667 (grub_efidisk_get_device_handle): New prototype.
9668 (grub_efidisk_get_device_name): Likewise.
9670 * include/grub/mm.h: Include config.h.
9671 (MM_DEBUG): Removed.
9672 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
9673 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
9674 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
9675 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
9676 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
9677 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
9678 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
9679 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
9680 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
9682 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
9684 * disk/efi/efidisk.c: Include grub/partition.h.
9685 (iterate_child_devices): New function.
9686 (add_device): First, compare only last device path nodes, so that
9687 devices are sorted by the types.
9688 (grub_efidisk_get_device_handle): New function.
9689 (grub_efidisk_get_device_name): Likewise.
9691 * configure.ac (--enable-mm-debug): New option to enable the
9692 memory manager debugging feature. This makes the binary much
9693 bigger, so is disabled by default.
9695 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
9697 Use grub_abort instead of grub_stop, and grub_exit must be
9698 define in each architecture now. Also, this change adds support
9701 * util/i386/pc/grub-probefs.c: Include grub/term.h.
9702 (grub_getkey): New function.
9703 (grub_term_get_current): Likewise.
9705 * util/i386/pc/grub-setup.c: Include grub/term.h.
9706 (grub_getkey): New function.
9707 (grub_term_get_current): Likewise.
9709 * util/misc.c (grub_stop): Renamed to ...
9710 (grub_exit): ... this.
9712 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
9713 (grub_exit): ... this.
9714 (grub_machine_init): Use grub_abort instead of abort.
9715 (grub_stop): Removed.
9717 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
9720 * kern/i386/pc/startup.S (grub_exit): New function.
9721 (cold_reboot): New label.
9723 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
9724 (grub_efi_init): Call grub_efidisk_init.
9725 (grub_efi_fini): Call grub_efidisk_fini.
9727 * kern/efi/efi.c: Include grub/mm.h.
9728 (grub_efi_console_control_guid): Renamed to ...
9729 (console_control_guid): ... this.
9730 (grub_efi_loaded_image_guid): Renamed to ...
9731 (loaded_image_guid): ... this.
9732 (grub_efi_locate_handle): New function.
9733 (grub_efi_open_protocol): Likewise.
9734 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
9735 GRUB_EFI_CONSOLE_CONTROL_GUID.
9736 (grub_efi_exit): Removed.
9737 (grub_stop): Likewise.
9738 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
9739 (grub_exit): New function.
9740 (grub_print_device_path): Likewise.
9742 * kern/rescue.c (grub_rescue_cmd_exit): New function.
9743 (grub_enter_rescue_mode): Register "exit".
9745 * kern/misc.c (grub_real_dprintf): A cosmetic change.
9746 (grub_abort): New function.
9748 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
9750 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
9752 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
9754 * include/grub/efi/efi.h (grub_efi_exit): Removed.
9755 (grub_print_device_path): New prototype.
9756 (grub_efi_locate_handle): Likewise.
9757 (grub_efi_open_protocol): Likewise.
9759 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
9760 * disk/efi/efidisk.c: Likewise.
9762 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
9764 * include/grub/efi/console_control.h
9765 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
9767 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
9768 last 8 bytes as an array.
9769 (GRUB_EFI_DISK_IO_GUID): New macro.
9770 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
9771 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
9772 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
9774 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
9775 (struct grub_efi_device_path): Rename the member "sub_type" to
9777 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
9778 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
9779 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
9780 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
9781 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
9782 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
9783 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
9784 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
9785 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
9786 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
9787 (struct grub_efi_pci_device_path): New structure.
9788 (grub_efi_pci_device_path_t): New type.
9789 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
9790 (struct grub_efi_pccard_device_path): New structure.
9791 (grub_efi_pccard_device_path_t): New type.
9792 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
9793 (struct grub_efi_memory_mapped_device_path): New structure.
9794 (grub_efi_memory_mapped_device_path_t): New type.
9795 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
9796 (struct grub_efi_vendor_device_path): New structure.
9797 (grub_efi_vendor_device_path_t): New type.
9798 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
9799 (struct grub_efi_controller_device_path): New structure.
9800 (grub_efi_controller_device_path_t): New type.
9801 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
9802 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
9803 (struct grub_efi_acpi_device_path): New structure.
9804 (grub_efi_acpi_device_path_t): New type.
9805 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
9806 (struct grub_efi_expanded_acpi_device_path): New structure.
9807 (grub_efi_expanded_acpi_device_path_t): New type.
9808 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
9809 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
9810 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
9811 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
9812 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
9813 (struct grub_efi_atapi_device_path): New structure.
9814 (grub_efi_atapi_device_path_t): New type.
9815 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
9816 (struct grub_efi_fibre_channel_device_path): New structure.
9817 (grub_efi_fibre_channel_device_path_t): New type.
9818 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
9819 (struct grub_efi_1394_device_path): New structure.
9820 (grub_efi_1394_device_path_t): New type.
9821 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
9822 (struct grub_efi_usb_device_path): New structure.
9823 (grub_efi_usb_device_path_t): New type.
9824 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
9825 (struct grub_efi_usb_class_device_path): New structure.
9826 (grub_efi_usb_class_device_path_t): New type.
9827 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
9828 (struct grub_efi_i2o_device_path): New structure.
9829 (grub_efi_i2o_device_path_t): New type.
9830 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
9831 (struct grub_efi_mac_address_device_path): New structure.
9832 (grub_efi_mac_address_device_path_t): New type.
9833 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
9834 (struct grub_efi_ipv4_device_path): New structure.
9835 (grub_efi_ipv4_device_path_t): New type.
9836 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
9837 (struct grub_efi_ipv6_device_path): New structure.
9838 (grub_efi_ipv6_device_path_t): New type.
9839 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
9840 (struct grub_efi_infiniband_device_path): New structure.
9841 (grub_efi_infiniband_device_path_t): New type.
9842 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
9843 (struct grub_efi_uart_device_path): New structure.
9844 (grub_efi_uart_device_path_t): New type.
9845 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
9846 (struct grub_efi_vendor_messaging_device_path): New structure.
9847 (grub_efi_vendor_messaging_device_path_t): New type.
9848 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
9849 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
9850 (struct grub_efi_hard_drive_device_path): New structure.
9851 (grub_efi_hard_drive_device_path_t): New type.
9852 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
9853 (struct grub_efi_cdrom_device_path): New structure.
9854 (grub_efi_cdrom_device_path_t): New type.
9855 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
9856 (struct grub_efi_vendor_media_device_path): New structure.
9857 (grub_efi_vendor_media_device_path_t): New type.
9858 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
9859 (struct grub_efi_file_path_device_path): New structure.
9860 (grub_efi_file_path_device_path_t): New type.
9861 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
9862 (struct grub_efi_protocol_device_path): New structure.
9863 (grub_efi_protocol_device_path_t): New type.
9864 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
9865 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
9866 (struct grub_efi_bios_device_path): New structure.
9867 (grub_efi_bios_device_path_t): New type.
9868 (struct grub_efi_disk_io): New structure.
9869 (grub_efi_disk_io_t): New type.
9870 (struct grub_efi_block_io_media): New structure.
9871 (grub_efi_block_io_media_t): New type.
9872 (struct grub_efi_block_io): New structure.
9873 (grub_efi_block_io_t): New type.
9875 * include/grub/misc.h (grub_stop): Removed.
9876 (grub_exit): New prototype.
9877 (grub_abort): Likewise.
9879 * include/grub/disk.h (enum grub_disk_dev_id): Added
9880 GRUB_DISK_DEVICE_EFIDISK_ID.
9882 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
9884 (kernel_syms.lst): Remove the target if an error occurs.
9886 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
9888 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
9889 as it was simply too buggy.
9891 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
9893 * kern/misc.c (grub_lltoa): New function.
9894 (grub_vsprintf): Added support for the long long suffix,
9897 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
9899 * Makefile.in (LDFLAGS): Add variable.
9900 (LD): Remove variable.
9901 * configure.ac: Add -m32 to LDFLAGS.
9902 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
9903 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
9904 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
9905 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
9906 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
9908 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
9909 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
9910 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
9912 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
9914 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
9915 length for unknown glyph.
9917 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9919 Add support for pre-loaded modules into the EFI port.
9921 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
9922 completely. Accept one more argument DIR. The caller has changed.
9924 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
9926 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
9927 (grub_efi_loaded_image_guid): New variable.
9928 (grub_efi_get_loaded_image): New function.
9929 (grub_arch_modules_addr): Likewise.
9931 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
9934 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
9935 (struct grub_efi_loaded_image): New structure.
9936 (grub_efi_loaded_image_t): New type.
9938 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9940 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
9941 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
9942 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
9944 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
9946 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
9948 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
9950 * DISTLIST: Added include/grub/efi/console.h,
9951 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
9952 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9954 * include/grub/efi/console.h: New file.
9955 * include/grub/efi/time.h: Likewise.
9956 * include/grub/i386/efi/kernel.h: Likewise.
9957 * kern/efi/init.c: Likewise.
9958 * kern/efi/mm.c: Likewise.
9959 * term/efi/console.c: Likewise.
9961 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
9962 (grub_stop): Removed.
9963 (grub_get_rtc): Likewise.
9964 (grub_machine_init): Simply call grub_efi_init.
9965 (grub_machine_fini): Call grub_efi_fini.
9967 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
9968 (grub_efi_output_string): Removed.
9969 (grub_efi_stall): New function.
9970 (grub_stop): Likewise.
9971 (grub_get_rtc): Likewise.
9973 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
9974 (grub_efi_stall): New prototype.
9975 (grub_efi_allocate_pages): Likewise.
9976 (grub_efi_free_pages): Likewise.
9977 (grub_efi_get_memory_map): Likewise.
9978 (grub_efi_mm_init): Likewise.
9979 (grub_efi_mm_fini): Likewise.
9980 (grub_efi_init): Likewise.
9981 (grub_efi_fini): Likewise.
9983 * include/grub/i386/efi/time.h: Do not include
9984 grub/symbol.h. Include grub/efi/time.h.
9985 (GRUB_TICKS_PER_SECOND): Removed.
9986 (grub_get_rtc): Likewise.
9988 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
9989 Added padding. The EFI spec is buggy.
9990 (GRUB_EFI_BLACK): New macro.
9991 (GRUB_EFI_BLUE): Likewise.
9992 (GRUB_EFI_GREEN): Likewise.
9993 (GRUB_EFI_CYAN): Likewise.
9994 (GRUB_EFI_RED): Likewise.
9995 (GRUB_EFI_MAGENTA): Likewise.
9996 (GRUB_EFI_BROWN): Likewise.
9997 (GRUB_EFI_LIGHTGRAY): Likewise.
9998 (GRUB_EFI_BRIGHT): Likewise.
9999 (GRUB_EFI_DARKGRAY): Likewise.
10000 (GRUB_EFI_LIGHTBLUE): Likewise.
10001 (GRUB_EFI_LIGHTGREEN): Likewise.
10002 (GRUB_EFI_LIGHTCYAN): Likewise.
10003 (GRUB_EFI_LIGHTRED): Likewise.
10004 (GRUB_EFI_LIGHTMAGENTA): Likewise.
10005 (GRUB_EFI_YELLOW): Likewise.
10006 (GRUB_EFI_WHITE): Likewise.
10007 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
10008 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
10009 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
10010 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
10011 (GRUB_EFI_BACKGROUND_RED): Likewise.
10012 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
10013 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
10014 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
10015 (GRUB_EFI_TEXT_ATTR): Likewise.
10017 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
10018 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10019 (kernel_mod_HEADERS): Added efi/time.h.
10021 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
10023 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
10024 include/grub/efi/api.h, include/grub/efi/console_control.h,
10025 include/grub/efi/efi.h, include/grub/efi/pe32.h,
10026 include/grub/i386/efi/time.h, kern/efi/efi.c,
10027 kern/i386/efi/init.c, kern/i386/efi/startup.S,
10028 and util/i386/efi/grub-mkimage.c.
10030 * Makefile.in (RMKFILES): Added i386-efi.rmk.
10032 * genmk.rb (PModule#rule): Do not export symbols if
10033 #{prefix}_EXPORTS is set to "no".
10035 * conf/i386-efi.mk: New file.
10036 * conf/i386-efi.rmk: Likewise.
10037 * include/grub/efi/api.h: Likewise.
10038 * include/grub/efi/console_control.h: Likewise.
10039 * include/grub/efi/efi.h: Likewise.
10040 * include/grub/efi/pe32.h: Likewise.
10041 * include/grub/i386/efi/time.h: Likewise.
10042 * kern/efi/efi.c: Likewise.
10043 * kern/i386/efi/init.c: Likewise.
10044 * kern/i386/efi/startup.S: Likewise.
10045 * util/i386/efi/grub-mkimage.c: Likewise.
10047 2006-04-17 Marco Gerards <marco@gnu.org>
10049 * include/grub/script.h: Include <grub/parser.h> and
10050 "grub_script.tab.h".
10051 (struct grub_lexer_param): New struct.
10052 (struct grub_parser_param): Likewise.
10053 (grub_script_create_arglist): Pass the state in an argument.
10054 (grub_script_add_arglist): Likewise.
10055 (grub_script_create_cmdline): Likewise.
10056 (grub_script_create_cmdblock): Likewise.
10057 (grub_script_create_cmdif): Likewise.
10058 (grub_script_create_cmdmenu): Likewise.
10059 (grub_script_add_cmd): Likewise.
10060 (grub_script_arg_add): Likewise.
10061 (grub_script_lexer_ref): Likewise.
10062 (grub_script_lexer_deref): Likewise.
10063 (grub_script_lexer_record_start): Likewise.
10064 (grub_script_lexer_record_stop): Likewise.
10065 (grub_script_mem_record): Likewise.
10066 (grub_script_mem_record_stop): Likewise.
10067 (grub_script_malloc): Likewise.
10068 (grub_script_yylex): Likewise.
10069 (grub_script_yyparse): Likewise.
10070 (grub_script_yyerror): Likewise.
10071 (grub_script_yylex): Likewise.
10072 (grub_script_lexer_init): Return the state.
10074 * normal/lexer.c (grub_script_lexer_state): Removed variable.
10075 (grub_script_lexer_done): Likewise.
10076 (grub_script_lexer_getline): Likewise.
10077 (grub_script_lexer_refs): Likewise.
10078 (script): Likewise.
10079 (newscript): Likewise.
10080 (record): Likewise.
10081 (recording): Likewise.
10082 (recordpos): Likewise.
10083 (recordlen): Likewise.
10084 (grub_script_lexer_init): Return the state instead of setting
10086 (grub_script_lexer_ref): Use the newly added argument for state
10087 instead of globals.
10088 (grub_script_lexer_deref): Likewise.
10089 (grub_script_lexer_record_start): Likewise.
10090 (grub_script_lexer_record_stop): Likewise.
10091 (recordchar): Likewise.
10092 (nextchar): Likewise.
10093 (grub_script_yylex2): Likewise.
10094 (grub_script_yylex): Likewise.
10095 (grub_script_yyerror): Likewise.
10097 * normal/parser.y (func_mem): Removed variable.
10098 (menu_entry): Likewise.
10100 (%lex-param): New parser option.
10101 (%parse-param): Likewise.
10102 (script): Always return the AST.
10103 (argument): Pass the state around.
10104 (arguments): Likewise.
10105 (grubcmd): Likewise.
10106 (commands): Likewise.
10107 (function): Likewise.
10108 (menuentry): Likewise.
10109 (if_statement): Likewise.
10112 * normal/script.c (grub_script_memused): Removed variable.
10113 (grub_script_parsed): Likewise.
10114 (grub_script_malloc): Added a state argument. Use that instead of
10116 (grub_script_mem_record): Likewise.
10117 (grub_script_mem_record_stop): Likewise.
10118 (grub_script_arg_add): Likewise.
10119 (grub_script_add_arglist): Likewise.
10120 (grub_script_create_cmdline): Likewise.
10121 (grub_script_create_cmdif): Likewise.
10122 (grub_script_create_cmdmenu): Likewise.
10123 (grub_script_add_cmd): Likewise.
10124 (grub_script_parse): Setup the state before calling the parser.
10126 2006-04-16 Marco Gerards <marco@gnu.org>
10128 * normal/command.c (grub_command_init): Remove the title command.
10130 * normal/lexer.c (grub_script_yylex): Renamed from this...
10131 (grub_script_yylex2): ... to this.
10132 (grub_script_yylex): New function. Temporary
10133 introduced to filter some tokens.
10134 (grub_script_yyerror): Print a newline.
10136 * normal/main.c (read_config_file): Output information about the
10137 lines that contain errors. Wait for a key after all lines have
10138 been processed. Don't return an empty menu.
10140 * normal/parser.y (func_mem): Don't initialize.
10141 (menu_entry): Likewise.
10142 (err): New variable.
10143 (script): Don't return anything when an error was encountered.
10144 (ws, returns): Removed rules.
10145 (argument): Disabled concatenated variable support.
10146 (arguments): Remove explicit separators.
10147 (grubcmd): Likewise.
10148 (function): Likewise.
10149 (menuentry): Likewise.
10151 (commands): Likewise. Add error handling.
10153 * normal/script.c (grub_script_create_cmdline): If
10154 `grub_script_parsed' is 0, assume the parser encountered an error.
10156 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
10158 * configure.ac: Add support for EFI. Fix the typo
10159 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
10161 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
10163 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
10164 foreign multibyte characters should be shown correctly.
10166 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
10168 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
10170 (read_config_file): Made it to close file before returning.
10172 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
10174 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
10175 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
10176 video/i386/pc/vbefill.c.
10178 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
10179 video/i386/pc/vbefill.c.
10181 * include/grub/video.h (grub_video_blit_format): New enum.
10182 (grub_video_mode_info): Added new member blit_format.
10183 (grub_video_get_blit_format): New function prototype.
10185 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
10186 function prototype.
10187 (grub_video_vbe_map_rgb): Likewise.
10188 (grub_video_vbe_unmap_color): Likewise.
10190 * include/grub/i386/pc/vbeblit.h: New file.
10192 * include/grub/i386/pc/vbefill.h: New file.
10194 * video/video.c (grub_video_get_blit_format): New function.
10195 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
10196 (grub_video_vbe_map_rgb): Likewise.
10197 (grub_video_vbe_unmap_color): Likewise.
10199 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
10201 (grub_video_vbe_blit_render_target): Changed to use more optimized
10203 (grub_video_vbe_setup): Added detection for optimized settings.
10204 (grub_video_vbe_create_render_target): Likewise.
10206 * video/i386/pc/vbeblit.c: New file.
10208 * video/i386/pc/vbefill.c: New file.
10210 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
10212 * font/manager.c (grub_font_get_glyph): Removed font fixup from
10215 * util/unifont2pff.rb: ... and moved it to here. Improved argument
10216 parsing to support both hex and dec ranges. If filename was missing
10217 show usage information.
10219 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
10221 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
10222 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
10224 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
10225 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
10226 (video_mod_SOURCES): Added.
10227 (video_mod_CFLAGS): Likewise.
10228 (video_mod_LDFLAGS): Likewise.
10229 (gfxterm_mod_SOURCES): Likewise.
10230 (gfxterm_mod_CFLAGS): Likewise.
10231 (gfxterm_mod_LDFLAGS): Likewise.
10232 (videotest_mod_SOURCES): Likewise.
10233 (videotest_mod_CFLAGS): Likewise.
10234 (videotest_mod_LDFLAGS): Likewise.
10235 (vesafb_mod_SOURCES): Removed.
10236 (vesafb_mod_CFLAGS): Likewise.
10237 (vesafb_mod_LDFLAGS): Likewise.
10238 (vga_mod_SOURCES): Likewise.
10239 (vga_mod_CFLAGS): Likewise.
10240 (vga_mod_LDFLAGS): Likewise.
10242 * commands/videotest.c: New file.
10244 * font/manager.c (fill_with_default_glyph): Modified to use
10246 (grub_font_get_glyph): Likewise.
10247 (fontmanager): Renamed from this...
10248 (font_manager): ... to this.
10250 * include/grub/font.h (grub_font_glyph): Added new structure.
10251 (grub_font_get_glyph): Modified to use grub_font_glyph.
10253 * include/grub/misc.h (grub_abs): Added as inline function.
10255 * include/grub/video.h: New file.
10257 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
10258 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
10259 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
10260 (grub_vbe_get_controller_info): Renamed from this...
10261 (grub_vbe_bios_get_controller_info): ... to this.
10262 (grub_vbe_get_mode_info): Renamed from this...
10263 (grub_vbe_bios_get_mode_info): ... to this.
10264 (grub_vbe_set_mode): Renamed from this...
10265 (grub_vbe_bios_set_mode): ... to this.
10266 (grub_vbe_get_mode): Renamed from this...
10267 (grub_vbe_bios_get_mode): ... to this.
10268 (grub_vbe_set_memory_window): Renamed from this...
10269 (grub_vbe_bios_set_memory_window): ... to this.
10270 (grub_vbe_get_memory_window): Renamed from this...
10271 (grub_vbe_bios_get_memory_window): ... to this.
10272 (grub_vbe_set_scanline_length): Renamed from this...
10273 (grub_vbe_set_scanline_length): ... to this.
10274 (grub_vbe_get_scanline_length): Renamed from this...
10275 (grub_vbe_bios_get_scanline_length): ... to this.
10276 (grub_vbe_set_display_start): Renamed from this...
10277 (grub_vbe_bios_set_display_start): ... to this.
10278 (grub_vbe_get_display_start): Renamed from this...
10279 (grub_vbe_bios_get_display_start): ... to this.
10280 (grub_vbe_set_palette_data): Renamed from this...
10281 (grub_vbe_bios_set_palette_data): ... to this.
10282 (grub_vbe_set_pixel_rgb): Removed.
10283 (grub_vbe_set_pixel_index): Likewise.
10285 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
10287 (grub_vbe_bios_get_controller_info): ... to this.
10288 (grub_vbe_get_mode_info): Renamed from this...
10289 (grub_vbe_bios_get_mode_info): ... to this.
10290 (grub_vbe_set_mode): Renamed from this...
10291 (grub_vbe_bios_set_mode): ... to this.
10292 (grub_vbe_get_mode): Renamed from this...
10293 (grub_vbe_bios_get_mode): ... to this.
10294 (grub_vbe_set_memory_window): Renamed from this...
10295 (grub_vbe_bios_set_memory_window): ... to this.
10296 (grub_vbe_get_memory_window): Renamed from this...
10297 (grub_vbe_bios_get_memory_window): ... to this.
10298 (grub_vbe_set_scanline_length): Renamed from this...
10299 (grub_vbe_set_scanline_length): ... to this.
10300 (grub_vbe_get_scanline_length): Renamed from this...
10301 (grub_vbe_bios_get_scanline_length): ... to this.
10302 (grub_vbe_set_display_start): Renamed from this...
10303 (grub_vbe_bios_set_display_start): ... to this.
10304 (grub_vbe_get_display_start): Renamed from this...
10305 (grub_vbe_bios_get_display_start): ... to this.
10306 (grub_vbe_set_palette_data): Renamed from this...
10307 (grub_vbe_bios_set_palette_data): ... to this.
10308 (grub_vbe_bios_get_controller_info): Fixed problem with registers
10309 getting corrupted after calling it. Added more pushes and pops.
10310 (grub_vbe_bios_set_mode): Likewise.
10311 (grub_vbe_bios_get_mode): Likewise.
10312 (grub_vbe_bios_get_memory_window): Likewise.
10313 (grub_vbe_bios_set_scanline_length): Likewise.
10314 (grub_vbe_bios_get_scanline_length): Likewise.
10315 (grub_vbe_bios_get_display_start): Likewise.
10316 (grub_vbe_bios_set_palette_data): Likewise.
10318 * normal/cmdline.c (cl_set_pos): Refresh the screen.
10319 (cl_insert): Likewise.
10320 (cl_delete): Likewise.
10322 * term/gfxterm.c: New file.
10324 * term/i386/pc/vesafb.c: Removed file.
10326 * video/video.c: New file.
10328 * video/i386/pc/vbe.c (real2pm): Added new function.
10329 (grub_video_vbe_draw_pixel): Likewise.
10330 (grub_video_vbe_get_video_ptr): Likewise.
10331 (grub_video_vbe_get_pixel): Likewise
10332 (grub_video_vbe_init): Likewise.
10333 (grub_video_vbe_fini): Likewise.
10334 (grub_video_vbe_setup): Likewise.
10335 (grub_video_vbe_get_info): Likewise.
10336 (grub_video_vbe_set_palette): Likewise.
10337 (grub_video_vbe_get_palette): Likewise.
10338 (grub_video_vbe_set_viewport): Likewise.
10339 (grub_video_vbe_get_viewport): Likewise.
10340 (grub_video_vbe_map_color): Likewise.
10341 (grub_video_vbe_map_rgb): Likewise.
10342 (grub_video_vbe_map_rgba): Likewise.
10343 (grub_video_vbe_unmap_color): Likewise.
10344 (grub_video_vbe_fill_rect): Likewise.
10345 (grub_video_vbe_blit_glyph): Likewise.
10346 (grub_video_vbe_blit_bitmap): Likewise.
10347 (grub_video_vbe_blit_render_target): Likewise.
10348 (grub_video_vbe_scroll): Likewise.
10349 (grub_video_vbe_swap_buffers): Likewise.
10350 (grub_video_vbe_create_render_target): Likewise.
10351 (grub_video_vbe_delete_render_target): Likewise.
10352 (grub_video_vbe_set_active_render_target): Likewise.
10353 (grub_vbe_set_pixel_rgb): Remove function.
10354 (grub_vbe_set_pixel_index): Likewise.
10355 (index_color_mode): Remove static variable.
10356 (active_mode): Likewise.
10357 (framebuffer): Likewise.
10358 (bytes_per_scan_line): Likewise.
10359 (grub_video_vbe_adapter): Added new static variable.
10360 (framebuffer): Likewise.
10361 (render_target): Likewise.
10362 (initial_mode): Likewise.
10363 (mode_in_use): Likewise.
10364 (mode_list): Likewise.
10366 2006-03-10 Marco Gerards <marco@gnu.org>
10368 * configure.ac (AC_INIT): Bumped to 1.93.
10370 * DISTLIST: Added `include/grub/hfs.h'.
10372 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
10374 * boot/i386/pc/boot.S (general_error): Before looping, try INT
10375 18H, which might help the BIOS falling back to next boot media.
10377 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
10379 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
10380 Poe Chen <poe.poechen@gmail.com>.
10382 2006-01-17 Marco Gerards <marco@gnu.org>
10384 * include/grub/normal.h: Include <grub/script.h>.
10385 (grub_command_list): Removed struct.
10386 (grub_command_list_t): Removed type.
10387 (grub_menu_entry): Remove members `num' and `command_list'. Add
10388 members `commands' and `sourcecode'.
10389 * include/grub/script.h: Add inclusion guards.
10390 (grub_script_cmd_menuentry): New struct.
10391 (grub_script_execute_menuentry): New prototype.
10392 (grub_script_lexer_record_start): Likewise.
10393 (grub_script_lexer_record_stop): Likewise.
10394 * normal/execute.c (grub_script_execute_menuentry): New function.
10395 * normal/lexer.c (record, recording, recordpos, recordlen): New
10397 (grub_script_lexer_record_start): New function.
10398 (grub_script_lexer_record_stop): Likewise.
10399 (recordchar): Likewise.
10400 (nextchar): Likewise.
10401 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
10402 2048 as the buffer size. Add the tokens `menuentry' and `@'.
10403 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
10404 (current_menu): New variable.
10405 (free_menu): Mainly rewritten.
10406 (grub_normal_menu_addentry): New function.
10407 (read_config_file): Rewritten.
10408 * normal/menu.c (run_menu_entry): Mainly rewritten.
10409 * normal/menu_entry.c (make_screen): Rewritten the code to insert
10411 (run): Mainly rewritten.
10412 * normal/parser.y (menu_entry): New variable.
10413 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
10414 (menuentry): New rule.
10415 (command): Add `menuentry'.
10416 (if_statement): Allow additional returns before `fi'.
10417 * normal/script.c (grub_script_create_cmdmenu): New function.
10419 2006-01-03 Marco Gerards <marco@gnu.org>
10421 * INSTALL: GNU Bison is required.
10422 * configure.ac: Rewritten the test to detect Bison.
10423 * Makefile.in (YACC): New variable. Reported by Xun Sun
10424 <xun.sun.cn@gmail.com>.
10426 2006-01-03 Marco Gerards <marco@gnu.org>
10428 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
10429 the HFS+ filesystem to filesystem blocks.
10430 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
10431 GCC warning is silenced.
10433 2006-01-03 Marco Gerards <marco@gnu.org>
10435 * partmap/apple.c (apple_partition_map_iterate): Convert the data
10436 read from disk from big endian to host byte order.
10438 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
10440 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
10442 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
10443 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
10444 embedded HFS+ filesystem.
10445 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
10446 (grub_hfs_sblock): Move from here...
10447 * include/grub/hfs.h: To here... New file.
10448 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
10450 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
10452 (grub_hfsplus_volheader): Change type of member `magic' to
10454 (grub_hfsplus_data): Add new member `embedded_offset'.
10455 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
10457 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
10458 Calculate the offset.
10460 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10462 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
10464 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
10466 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10468 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
10469 ENV->NAME is NULL after allocating ENV->VALUE.
10471 2005-12-25 Marco Gerards <marco@gnu.org>
10473 * kern/env.c (grub_env_set): Rewritten the error handling code.
10475 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10477 * geninit.sh: Made more robust, and more portable.
10479 2005-12-25 Marco Gerards <marco@gnu.org>
10481 Add support for Apple HFS+ filesystems.
10483 * fs/hfsplus.c: New file.
10485 * DISTLIST: Added `fs/hfsplus.c'.
10487 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
10488 (hfsplus_mod_SOURCES): New variable.
10489 (hfsplus_mod_CFLAGS): Likewise.
10490 (hfsplus_mod_LDFLAGS): Likewise.
10491 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
10492 (grub_setup_SOURCES): Likewise.
10493 (grub_mkdevicemap_SOURCES): Likewise.
10494 (grub_emu_SOURCES): Likewise.
10495 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10497 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
10499 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
10501 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10503 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
10504 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
10505 include/grub/parser.h, include/grub/script.h, kern/parser.c,
10506 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
10507 normal/lexer.c, normal/parser.y, normal/script.c, and
10509 Removed kern/sparc64/cache.c.
10511 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
10512 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
10515 * configure.ac (AC_INIT): Bumped to 1.92.
10517 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
10519 * kern/err.c (grub_error_push): Added new function to support error
10521 (grub_error_pop): Likewise.
10522 (grub_error_stack_items): New local variable to support error stacks.
10523 (grub_error_stack_pos): Likewise.
10524 (grub_error_stack_assert): Likewise.
10525 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
10527 (grub_print_error): Added support to print errors from error stack.
10529 * include/grub/err.h (grub_error_push): Added function prototype.
10530 (grub_error_pop): Likewise.
10532 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
10534 * configure.ac: Accept `powerpc64' as host_cpu.
10535 (amd64): Rename to `biarch32'.
10537 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
10538 non-cacheline-aligned addresses.
10540 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
10541 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
10542 if `size' is non-zero.
10544 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
10546 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
10547 and `cd' to make sure the filename is not prefixed with a
10549 (pkgdata_MODULES): Add `gpt.mod'.
10550 (gpt_mod_SOURCES): New variable.
10551 (gpt_mod_CFLAGS): Likewise.
10552 (gpt_mod_LDFLAGS): Likewise.
10554 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
10556 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
10559 * partmap/gpt.c: New file.
10561 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
10562 GPT partition map is detected.
10564 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
10566 * commands/i386/pc/play.c: New file.
10567 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
10568 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
10571 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
10573 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
10574 ((unused))' to silence gcc warning.
10576 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
10578 * configure.ac: Correct `AC_PROG_YACC' test.
10580 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10582 * util/powerpc/ieee1275/grub-install.in: Run the mount point
10583 check before installing files.
10585 2005-11-22 Mike Small <smallm@panix.com>
10587 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
10588 number regex so multidigit numbers are recognized correctly.
10590 2005-11-22 Mike Small <smallm@panix.com>
10592 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
10593 debugging message before attempting to claim memory.
10594 (grub_rescue_cmd_initrd): Add a claim debugging message and try
10595 multiple addresses in case of failure.
10597 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10599 * term/tparm.c (get_space): Remove empty `if' statement.
10601 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
10603 * kern/parser.c (check_varstate): Rename `state' to 's'.
10605 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10607 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
10608 variable definitions to the beginning of each function. Sort stack
10610 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
10611 `buf' argument to `char *'.
10613 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10615 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
10616 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10617 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10618 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10619 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10620 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10621 configfile.mod, search.mod, gzio.mod and test.mod.
10622 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10623 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10624 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10625 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10626 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10627 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10628 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10629 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10630 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10631 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10632 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10633 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10634 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10635 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10636 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10637 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10638 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10639 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10640 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10641 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10642 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10643 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10644 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
10646 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
10648 (pkgdata_MODULES): Add test.mod.
10650 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10652 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
10653 appending to variables with "+=".
10654 (PModule): Use full pathname to generate *.lst filenames.
10656 * Makefile.in: Fixed list rules moved from genmk.rb.
10657 (.DELETE_ON_ERROR): New special target.
10658 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
10660 * conf/i386-pc.rmk: Include conf/common.mk.
10661 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10662 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10663 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10664 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10665 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10666 configfile.mod, search.mod, gzio.mod and test.mod.
10667 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10668 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10669 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10670 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10671 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10672 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10673 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10674 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10675 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10676 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10677 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10678 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10679 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10680 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10681 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10682 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10683 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10684 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10685 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10686 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10687 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10688 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10689 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
10691 * conf/common.rmk: ... to here. New file.
10693 * conf/common.mk: New file.
10695 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
10697 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
10698 (grub_script.tab.c): ... here.
10700 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
10701 (grub_script.tab.c): ... here.
10703 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
10704 (grub_script.tab.c): ... here.
10706 * normal/command.c (grub_command_find): Fixed a memory leak of
10707 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
10709 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10711 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
10712 "@" which marks the start of a comment on ARM.
10713 (VARIABLE): Likewise.
10715 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10717 Add support for Linux/ADFS partition tables.
10719 * partmap/acorn.c: New file.
10721 * include/grub/acorn_filecore.h: Likewise.
10723 * DISTLIST: Added `partmap/acorn.c' and
10724 `include/grub/acorn_filecore.h'.
10726 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10728 (pkgdata_MODULES): Add `acorn.mod'.
10729 (acorn_mod_SOURCES): New variable.
10730 (acorn_mod_CFLAGS): Likewise.
10732 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10734 (pkgdata_MODULES): Add `acorn.mod'.
10735 (acorn_mod_SOURCES): New variable.
10736 (acorn_mod_CFLAGS): Likewise.
10738 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
10739 (pkgdata_MODULES): Add `acorn.mod'.
10740 (acorn_mod_SOURCES): New variable.
10741 (acorn_mod_CFLAGS): Likewise.
10742 (acorn_mod_LDFLAGS): Likewise.
10744 * include/types.h (grub_disk_addr_t): New typedef.
10746 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
10748 * geninit.sh: New file.
10750 * geninitheader.sh: Likewise.
10752 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
10753 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
10754 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
10755 * commands/configfile.c (grub_configfile_init)
10756 (grub_configfile_fini): Likewise.
10757 * commands/default.c (grub_default_init, grub_default_fini):
10759 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
10760 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
10761 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
10762 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
10764 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
10765 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
10767 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
10768 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
10770 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
10772 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
10774 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
10775 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
10776 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
10777 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
10778 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
10779 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
10780 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
10781 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
10782 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
10783 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
10784 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
10785 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
10786 * partmap/amiga.c (grub_amiga_partition_map_init)
10787 (grub_amiga_partition_map_fini): Likewise.
10788 * partmap/apple.c (grub_apple_partition_map_init)
10789 (grub_apple_partition_map_fini): Likewise.
10790 * partmap/pc.c (grub_pc_partition_map_init)
10791 (grub_pc_partition_map_fini): Likewise.
10792 * partmap/sun.c (grub_sun_partition_map_init,
10793 grub_sun_partition_map_fini): Likewise.
10794 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
10797 * util/grub-emu.c: Include <grub_modules_init.h>.
10798 (main): Don't initialize and de-initialize any modules directly,
10799 use `grub_init_all' and `grub_fini_all' instead.
10801 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
10802 `grub_vesafb_mod_init'.
10803 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
10805 * term/i386/pc/vga.c (grub_vga_init): Renamed to
10806 `grub_vga_mod_init'. Updated all users.
10807 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
10809 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
10810 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
10813 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
10814 Generate a function to initialize the module in utilities.
10815 Updated all callers.
10816 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
10817 initialize the module in utilities. Updated all callers.
10819 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10821 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
10822 escape sequence and a literal ^L to clear the screen.
10824 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
10825 when returning from Open Firmware.
10827 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10829 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
10830 (grub_ofconsole_height): Likewise.
10831 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
10832 manually insert a '\n'.
10833 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
10834 `grub_ofconsole_height'. Return early if these are already set.
10836 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
10838 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10839 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
10840 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
10841 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
10842 and `normal/script.c'.
10843 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10844 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10845 (test_mod_SOURCES): New variable.
10846 (test_mod_CFLAGS): Likewise.
10847 (test_mod_LDFLAGS): Likewise.
10848 (pkgdata_MODULES): Add `test.mod'.
10849 (grub_script.tab.c): New rule.
10850 (grub_script.tab.h): Likewise.
10852 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
10854 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10855 `commands/test.c', `normal/execute.c', `normal/lexer.c',
10856 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10857 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10858 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10859 (test_mod_SOURCES): New variable.
10860 (test_mod_CFLAGS): Likewise.
10861 (pkgdata_MODULES): Add `test.mod'.
10862 (grub_script.tab.c): New rule.
10863 (grub_script.tab.h): Likewise.
10865 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
10867 Add initial scripting support.
10869 * commands/test.c: New file.
10870 * include/grub/script.h: Likewise.
10871 * normal/execute.c: Likewise.
10872 * normal/function.c: Likewise.
10873 * normal/lexer.c: Likewise.
10874 * normal/parser.y: Likewise.
10875 * normal/script.c: Likewise.
10877 * configure.ac: Add `AC_PROG_YACC' test.
10879 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
10880 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
10881 `normal/function.c' and `normal/script.c'.
10882 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10883 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10884 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
10886 (pkgdata_MODULES): Add `test.mod'.
10887 (grub_script.tab.c): New rule.
10888 (grub_script.tab.h): Likewise.
10890 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
10892 * include/grub/normal.h (grub_test_init): New prototype.
10893 (grub_test_fini): Likewise.
10895 * normal/command.c: Include <grub/script.h>.
10896 (grub_command_execute): Rewritten.
10898 * util/grub-emu.c (main): Call `grub_test_init' and
10901 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10903 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
10905 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
10906 there are no pending characters.
10908 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10910 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
10911 `grub_strndup' to drop device arguments. Replace unnecessary
10912 `grub_strndup' with `grub_strdup'.
10914 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10916 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
10917 `debug' environment variable has been set.
10919 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
10921 * Makefile.in (install-local): Use $(DATA).
10922 (uninstall): Likewise.
10923 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
10924 (sbin_UTILITIES): ... to here.
10925 (sbin_SCRIPTS): New variable.
10926 (grub_install_SOURCES): New variable.
10927 * util/powerpc/ieee1275/grub-install.in: New file.
10928 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
10930 (add_segments): Call `grub_util_get_path'.
10932 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10934 From Timothy Baldwin:
10935 * commands/ls.c (grub_ls_list_files): Close FILE with
10937 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
10939 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
10941 * include/grub/parser.h: New file.
10943 * kern/parser.c: Likewise.
10945 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
10946 (grub_setup_SOURCES): Likewise.
10947 (grub_probefs_SOURCES): Likewise.
10948 (grub_emu_SOURCES): Likewise.
10949 (kernel_img_HEADERS): Add `parser.h'.
10951 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10952 (grub_emu_SOURCES): Add `kern/parser.c'.
10953 (grubof_SOURCES): Likewise.
10955 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10956 (grubof_SOURCES): Add `kern/parser.c'.
10958 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
10960 * kern/misc.c (grub_split_cmdline): Removed function.
10962 * kern/rescue.c: Include <grub/parser.h>.
10963 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
10964 of `grub_split_cmdline'.
10966 * normal/command.c: Include <grub/parser.h>.
10967 (grub_command_execute): Use `grub_parser_split_cmdline' instead
10968 of `grub_split_cmdline'.
10970 * normal/completion.c: Include <grub/parser.h>.
10971 (cmdline_state): New variable.
10972 (iterate_dir): End the filename with a quote depending on the
10973 command line state.
10974 (get_state): new function.
10975 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
10976 split the arguments and determine the current argument. When the
10977 argument string is not quoted, escape all spaces.
10979 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10981 * normal/sparc64/setjmp.S: New file.
10983 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10985 * include/grub/sparc64/libgcc.h: New file.
10986 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
10987 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
10988 normal/sparc64/setjmp.c.
10990 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10992 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
10993 * kern/sparc64/cache.S: New file.
10994 * kern/sparc64/cache.c: Removed.
10995 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
10996 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
10998 (COMMON_LDFLAGS): Add -melf64_sparc.
10999 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
11000 (grubof_SOURCES): Use cache.S instead of cache.c.
11001 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
11002 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
11003 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
11005 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
11006 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
11007 (linux_mod_CFLAGS): Commented out.
11008 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
11009 out because module isn't built.
11010 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
11011 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
11012 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
11013 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
11014 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
11015 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11016 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11017 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
11018 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
11019 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
11020 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11021 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11022 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
11023 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
11025 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
11027 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
11028 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
11029 longer, because HFS should not be used on PC.
11031 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11033 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
11034 consistently within the loop.
11036 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
11038 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
11039 directory can not be read.
11041 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11043 * configure.ac (AC_INIT): Increase the version number to 1.91.
11045 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
11046 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
11047 term/i386/pc/serial.c.
11049 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11051 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
11052 file size must be permitted.
11054 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
11055 between %ah and %al.
11057 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11059 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
11061 Call the hook with a NUL-terminated filename.
11062 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
11065 * kern/term.c (cursor_state): New variable.
11066 (grub_term_set_current): Reset the cursor state on a new
11068 (grub_setcursor): Rewritten to use CURSOR_STATE.
11069 (grub_getcursor): New function.
11071 * include/grub/term.h (grub_getcursor): New prototype.
11073 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
11074 integers on ARM. Reported by Timothy Baldwin
11075 <T.E.Baldwin99@members.leeds.ac.uk>.
11077 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
11079 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
11081 (grub_sfs_dir): Likewise.
11083 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
11085 Add support for the SFS filesystem.
11087 * fs/sfs.c: New file.
11089 * DISTLIST: Added `fs/sfs.c'.
11091 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
11092 (grub_probefs_SOURCES): Likewise.
11093 (grub_emu_SOURCES): Likewise.
11094 (pkgdata_MODULES): Add `sfs.mod'.
11095 (sfs_mod_SOURCES): New variable.
11096 (sfs_mod_CFLAGS): Likewise.
11097 (sfs_mod_LDFLAGS): Likewise.
11099 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
11100 (pkgdata_MODULES): Add `sfs.mod'.
11101 (sfs_mod_SOURCES): New variable.
11102 (sfs_mod_CFLAGS): Likewise.
11104 * util/grub-emu.c (main): Call `grub_sfs_init' and
11107 * include/grub/fs.h (grub_sfs_init): New prototype.
11108 (grub_sfs_fini): Likewise.
11110 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
11112 Add support for the AFFS filesystem.
11114 * fs/affs.c: New file.
11116 * DISTLIST: Added `fs/affs.c'.
11118 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
11119 (grub_probefs_SOURCES): Likewise.
11120 (grub_emu_SOURCES): Likewise.
11121 (pkgdata_MODULES): Add `affs.mod'.
11122 (affs_mod_SOURCES): New variable.
11123 (affs_mod_CFLAGS): Likewise.
11124 (affs_mod_LDFLAGS): Likewise.
11126 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
11127 (pkgdata_MODULES): Add `affs.mod'.
11128 (affs_mod_SOURCES): New variable.
11129 (affs_mod_CFLAGS): Likewise.
11131 * util/grub-emu.c (main): Call `grub_affs_init' and
11134 * include/grub/fs.h (grub_affs_init): New prototype.
11135 (grub_affs_fini): Likewise.
11137 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
11139 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
11141 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
11143 * configure.ac: Accept `x86_64' as host_cpu. In that case add
11146 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
11149 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
11150 (COMMON_LDFLAGS): New variable.
11151 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
11152 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
11153 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
11154 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
11155 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
11156 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
11157 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
11158 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
11159 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
11160 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
11161 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11162 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11163 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
11164 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
11165 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
11167 (normal_mod_ASFLAGS): Add `-m32'.
11169 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
11170 (grub_host_size_t, grub_host_ssize_t): New types.
11171 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
11172 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
11173 `GRUB_HOST_SIZEOF_VOID_P'.
11175 * include/grub/kernel.h (struct grub_module_header): Type of
11176 member offset changed to `grub_host_off_t'. Type of member size
11177 changed to `grub_host_size_t'.
11178 (struct grub_module_info): Type of member offset changed to
11179 `grub_host_off_t'. Type of member size changed to
11180 `grub_host_size_t'.
11182 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
11184 Make GRUB's kernel compliant to Multiboot Specification.
11186 * kern/i386/pc/startup.S (multiboot_header): New label.
11187 (multiboot_entry): Likewise.
11188 (multiboot_trampoline): Likewise.
11190 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11191 Increased to 0x4A0.
11193 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
11194 put parentheses after a question mark.
11195 [!GRUB_UTIL] (my_mod): New variable.
11197 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
11199 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
11201 Adds support for the XFS filesystem. Btrees are not supported
11204 * fs/xfs.c: New file.
11206 * DISTLIST: Added `fs/xfs.c'.
11208 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
11209 (grub_probefs_SOURCES): Likewise.
11210 (grub_emu_SOURCES): Likewise.
11211 (pkgdata_MODULES): Add `xfs.mod'.
11212 (xfs_mod_SOURCES): New variable.
11213 (xfs_mod_CFLAGS): Likewise.
11215 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
11216 (pkgdata_MODULES): Add `xfs.mod'.
11217 (xfs_mod_SOURCES): New variable.
11218 (xfs_mod_CFLAGS): Likewise.
11220 * util/grub-emu.c (main): Call `grub_xfs_init' and
11223 * include/grub/fs.h (grub_xfs_init): New prototype.
11224 (grub_xfs_fini): Likewise.
11227 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
11229 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
11230 color modes, allow greater than 16 colors to be configured as
11233 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11235 * normal/completion.c (complete_arguments): Add the qualifier
11236 const into OPTIONS.
11238 From Omniflux <omniflux+lists@omniflux.com>:
11239 * include/grub/terminfo.h: New file.
11240 * include/grub/tparm.h: Likewise.
11241 * include/grub/i386/pc/serial.h: Likewise.
11242 * term/terminfo.c: Likewise.
11243 * term/tparm.c: Likewise.
11244 * term/i386/pc/serial.c: Likewise.
11245 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
11247 (terminfo_mod_SOURCES): New variable.
11248 (terminfo_mod_CFLAGS): Likewise.
11249 (serial_mod_SOURCES): Likewise.
11250 (serial_mod_CFLAGS): Likewise.
11252 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
11254 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
11255 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
11256 and kern/powerpc/ieee1275/cmain.c, respectively.
11258 * boot/powerpc/ieee1275/crt0.S: Moved to ...
11259 * kern/powerpc/ieee1275/crt0.S: ... here.
11261 * boot/powerpc/ieee1275/cmain.c: Moved to ...
11262 * kern/powerpc/ieee1275/cmain.c: ... here.
11264 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
11265 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
11266 instead of boot/powerpc/ieee1275/crt0.S and
11267 boot/powerpc/ieee1275/cmain.c, respectively.
11269 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
11270 sectors. It was not used anyway.
11272 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
11274 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
11275 `unused parameter' warning.
11277 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
11279 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
11281 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
11284 2005-08-28 Marco Gerards <metgerards@student.han.nl>
11286 * include/grub/normal.h (enum grub_completion_type): Added
11287 `GRUB_COMPLETION_TYPE_ARGUMENT'.
11289 * normal/cmdline.c (print_completion): Handle
11290 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
11291 * normal/menu_entry.c (store_completion): Likewise.
11293 * normal/completion.c (complete_arguments): New function.
11294 (grub_normal_do_completion): Call `complete_arguments' when the
11295 current words start with a dash.
11297 2005-08-27 Marco Gerards <metgerards@student.han.nl>
11299 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
11300 `gzio.mod' instead of `io.mod').
11302 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
11304 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
11305 (DISTDIRS): Added io and video.
11306 Rewrite the search routine to make an output consistently.
11308 * DISTLIST: Added conf/sparc64-ieee1275.mk,
11309 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
11310 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
11311 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
11312 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
11313 util/powerpc/ieee1275/misc.c.
11315 * include/grub/gzio.h: New file.
11316 * io/gzio.c: Likewise.
11318 * kern/file.c (grub_file_close): Call grub_device_close only if
11319 FILE->DEVICE is not NULL.
11321 * include/grub/mm.h [!NULL] (NULL): New macro.
11323 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
11325 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
11326 (pkgdata_MODULES): Added gzio.mod.
11327 (gzio_mod_SOURCES): New variable.
11328 (gzio_mod_CFLAGS): Likewise.
11330 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
11331 (pkgdata_MODULES): Added gzio.mod.
11332 (gzio_mod_SOURCES): New variable.
11333 (gzio_mod_CFLAGS): Likewise.
11335 * commands/cat.c: Include grub/gzio.h.
11336 (grub_cmd_cat): Use grub_gzfile_open instead of
11339 * commands/cmp.c: Include grub/gzio.h.
11340 (grub_cmd_cmp): Use grub_gzfile_open instead of
11343 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
11344 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
11346 (grub_rescue_cmd_module): Likewise.
11348 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
11350 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
11351 kern/sparc64/ieee1275/init.c because it contains _start.
11352 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
11354 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
11356 * configure.ac: Add support for sparc64 host with ieee1275
11358 * configure: Generated from configure.ac.
11359 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
11361 (grub_ofdisk_read): Likewise.
11362 (grub_ofdisk_open): Use %p to print pointer values, and cast the
11363 pointers as (void *) to remove a warning.
11364 (grub_ofdisk_close): Likewise.
11365 (grub_ofdisk_read): Likewise.
11366 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
11367 returns, so make it return void to remove a warning.
11368 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
11369 Corresponding prototype change.
11370 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
11371 values, and cast the pointers as (void *) to remove a warning.
11372 (grub_mm_dump): Likewise.
11373 * conf/sparc64-ieee1275.mk: New file.
11374 * conf/sparc64-ieee1275.rmk: Likewise.
11375 * include/grub/sparc64/setjmp.h: Likewise.
11376 * include/grub/sparc64/types.h: Likewise.
11377 * include/grub/sparc64/ieee1275/console.h: Likewise.
11378 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11379 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11380 * include/grub/sparc64/ieee1275/time.h: Likewise.
11381 * kern/sparc64/cache.c: Likewise.
11382 * kern/sparc64/dl.c: Likewise.
11383 * kern/sparc64/ieee1275/init.c: Likewise.
11384 * kern/sparc64/ieee1275/openfw.c: Likewise.
11386 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
11388 * util/console.c (grub_ncurses_putchar): If C is greater than
11389 0x7f, set C to a question mark.
11390 (grub_ncurses_getcharwidth): New function.
11391 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
11394 * normal/menu.c (print_entry): Made aware of Unicode. First,
11395 convert TITLE to UCS-4, and predict the cursor position by
11398 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
11400 * kern/misc.c (grub_utf16_to_utf8): Likewise.
11402 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11404 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
11405 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11408 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
11409 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11410 grub_strcpy and grub_strlen. Take it into account that a space
11411 character is inserted as a delimiter.
11413 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11415 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
11416 invalid magic in the error.
11418 * commands/search.c: New file.
11420 * util/grub-emu.c (main): Call grub_search_init and
11423 * kern/rescue.c (grub_rescue_print_disks): Removed.
11424 (grub_rescue_print_devices): New function.
11425 (grub_rescue_cmd_ls): Use grub_device_iterate with
11426 grub_rescue_print_devices instead of grub_disk_dev_iterate with
11427 grub_rescue_print_disks.
11429 * kern/partition.c (grub_partition_iterate): Return the result of
11430 PARTMAP->ITERATE instead of GRUB_ERRNO.
11432 * kern/device.c: Include grub/partition.h.
11433 (grub_device_iterate): New function.
11435 * include/grub/partition.h (grub_partition_iterate): Return int
11436 instead of grub_err_t.
11438 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
11440 [GRUB_UTIL] (grub_search_fini): Likewise.
11442 * include/grub/device.h (grub_device_iterate): New prototype.
11444 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11446 (pkgdata_MODULES): Added search.mod.
11447 (search_mod_SOURCES): New variable.
11448 (search_mod_CFLAGS): Likewise.
11450 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
11451 (pkgdata_MODULES): Added search.mod.
11452 (search_mod_SOURCES): New variable.
11453 (search_mod_CFLAGS): Likewise.
11455 * commands/ls.c (grub_ls_list_disks): Renamed to ...
11456 (grub_ls_list_devices): ... this, and use grub_device_iterate.
11457 All callers changed.
11459 * DISTLIST: Added commands/search.c.
11461 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11463 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
11465 (grub_getcharwidth): New function.
11467 * kern/misc.c (grub_utf8_to_ucs4): New function.
11469 * include/grub/term.h (struct grub_term): Added a new member
11471 (grub_getcharwidth): New prototype.
11473 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
11475 * term/i386/pc/console.c (map_char): New function. Segregated from
11476 grub_console_putchar.
11477 (grub_console_putchar): Use map_char.
11478 (grub_console_getcharwidth): New function.
11479 (grub_console_term): Specified grub_console_getcharwidth as
11482 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
11483 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
11485 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
11487 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
11488 on grub_strtoul completely.
11489 (write_char): Declare local variables in the beginning of the
11491 (grub_vesafb_getcharwidth): New function.
11492 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
11495 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
11497 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
11498 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
11499 commands/i386/pc/vbetest.c.
11501 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
11502 call grub_vbe_get_controller_info again, because the returned
11503 information is volatile.
11504 (grub_vbe_set_video_mode): Mostly rewritten.
11505 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
11506 grub_vbe_status_t correctly.
11507 (grub_vbe_get_video_mode_info): Likewise.
11508 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
11509 several if statements.
11511 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
11512 * commands/i386/pc/vbeinfo.c: ... this.
11514 * commands/i386/pc/vbe_test.c: Renamed to ...
11515 * commands/i386/pc/vbetest.c: ... this.
11517 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
11519 (grub_cmd_vbeinfo): ... this. Save video modes before
11520 iterating. Skip a video mode, if it is not available, not enough
11521 information is given or it is monochrome. Show the memory
11522 model. Leave the interpretation of MODEVAR to grub_strtoul
11524 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
11525 (GRUB_MOD_FINI): Likewise.
11527 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
11528 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
11529 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
11530 duplicated grub_env_get. Leave the interpretation of MODEVAR to
11531 grub_strtoul completely.
11532 (real2pm): Removed.
11533 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
11534 (GRUB_MOD_FINI): Likewise.
11536 * normal/misc.c: Include grub/mm.h.
11538 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
11539 vbe_list_modes with vbetest.mod and vbeinfo.mod.
11540 (vbe_list_modes_mod_SOURCES): Removed.
11541 (vbe_list_modes_mod_CFLAGS): Likewise.
11542 (vbe_test_mod_SOURCES): Likewise.
11543 (vbe_test_mod_CFLAGS): Likewise.
11544 (vbeinfo_mod_SOURCES): New variable.
11545 (vbeinfo_mod_CFLAGS): Likewise.
11546 (vbetest_mod_SOURCES): Likewise.
11547 (vbetest_mod_CFLAGS): Likewise.
11549 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
11551 * normal/misc.c: New file.
11553 * DISTLIST: Added normal/misc.c.
11555 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
11556 DISK to HOOK. Call HOOK with DISK.
11557 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11558 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11559 * partmap/sun.c (sun_partition_map_iterate): Likewise.
11561 * normal/menu_entry.c (struct screen): Added a new member
11562 "completion_shown".
11563 (completion_buffer): New global variable.
11564 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
11565 (store_completion): New function.
11566 (complete): Likewise.
11567 (clear_completions): Likewise.
11568 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
11569 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
11570 a tab, call complete.
11572 * normal/completion.c (disk_dev): Removed.
11573 (print_simple_completion): Likewise.
11574 (print_partition_completion): Likewise.
11575 (print_func): New global variable.
11576 (add_completion): Do not take the arguments WHAT or PRINT any
11577 longer. Added a new argument TYPE. Instead of printing directly,
11578 call PRINT_FUNC if not NULL.
11579 All callers changed.
11580 (complete_device): Use a local variable DEV instead of
11581 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
11582 (grub_normal_do_completion): Take a new argument HOOK. Do not
11583 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
11584 empty string, return NULL instead.
11585 All callers changed.
11587 * normal/cmdline.c (print_completion): New function.
11589 * kern/partition.c (grub_partition_iterate): Add an argument DISK
11591 All callers changed.
11593 * kern/disk.c (grub_print_partinfo): Removed.
11595 * include/grub/partition.h (struct grub_partition_map): Add a new
11596 argument DISK into HOOK of ITERATE.
11597 (grub_partition_iterate): Add a new argument DISK to HOOK.
11599 * include/grub/normal.h (enum grub_completion_type): New enum.
11600 (grub_completion_type_t): New type.
11601 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
11602 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
11603 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
11604 (GRUB_COMPLETION_TYPE_FILE): Likewise.
11605 (grub_normal_do_completion): Added a new argument HOOK.
11606 (grub_normal_print_device_info): New prototype.
11608 * include/grub/disk.h (grub_print_partinfo): Removed.
11610 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
11611 (normal_mod_SOURCES): Likewise.
11612 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11613 (normal_mod_SOURCES): Likewise.
11615 * commands/ls.c (grub_ls_list_disks): Use
11616 grub_normal_print_device_info instead of grub_print_partinfo. Free
11618 (grub_ls_list_files): Use grub_normal_print_device_info instead of
11619 duplicating the code.
11621 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11623 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
11624 follow GCS more precisely.
11625 * commands/i386/pc/vbe_test.c: Likewise.
11626 * include/grub/i386/pc/vbe.h: Likewise.
11627 * term/i386/pc/vesafb.c: Likewise.
11628 * video/i386/pc/vbe.c: Likewise.
11630 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11632 * DISTLIST: Added term/i386/pc/vesafb.c
11633 DISTLIST: Added video/i386/pc/vbe.c
11634 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
11635 DISTLIST: Added commands/i386/pc/vbe_test.c.
11636 * commands/i386/pc/vbe_list_modes.c: New file.
11637 * commands/i386/pc/vbe_test.c: Likewise.
11638 * term/i386/pc/vesafb.c: Likewise.
11639 * video/i386/pc/vbe.c: Likewise.
11640 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
11641 (grub_vbe_probe) Added prototype.
11642 (grub_vbe_set_video_mode) Likewise.
11643 (grub_vbe_get_video_mode) Likewise.
11644 (grub_vbe_get_video_mode_info) Likewise.
11645 (grub_vbe_set_pixel_rgb) Likewise.
11646 (grub_vbe_set_pixel_index) Likewise.
11647 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
11648 (pkgdata_MODULES): Added vesafb.mod.
11649 (pkgdata_MODULES): Added vbe_list_modes.mod.
11650 (pkgdata_MODULES): Added vbe_test.mod.
11651 (vbe_mod_SOURCES): Added.
11652 (vbe_mod_CFLAGS): Likewise.
11653 (vesafb_mod_SOURCES): Likewise.
11654 (vesafb_mod_CFLAGS): Likewise.
11655 (vbe_list_modes_mod_SOURCES): Likewise.
11656 (vbe_list_modes_mod_CFLAGS): Likewise.
11657 (vbe_test_mod_SOURCES): Likewise.
11658 (vbe_test_mod_CFLAGS): Likewise.
11660 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
11662 * normal/command.c (grub_command_execute): If INTERACTIVE is
11663 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
11664 CMDLINE. Disable the pager if INTERACTIVE is true.
11665 All callers are changed.
11667 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
11668 before reading a config file.
11669 * normal/main.c (read_config_file): Even if a command is not
11670 found, register it if it is within an entry.
11672 * util/grub-emu.c: Include sys/types.h and unistd.h.
11673 (options): Added --hold.
11674 (struct arguments): Added a new member "hold".
11675 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
11677 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
11678 cleared by a debugger, if it is not zero.
11680 * include/grub/normal.h (grub_command_execute): Add an argument
11683 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
11685 * DISTLIST: Added include/grub/i386/pc/vbe.h.
11687 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
11689 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
11690 program with another one, because the old one didn't detect a bug
11691 in gcc-3.4. Always use regparm 2, because the new test is still
11692 not enough for gcc-4.0. Someone must investigate a simple test
11693 case which detects a bug in gcc-4.0.
11695 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
11697 * DISTLIST: Added normal/completion.c.
11699 * normal/completion.c: New file.
11701 * term/i386/pc/console.c (grub_console_getwh): New function.
11702 (grub_console_term): Assign grub_console_getwh to getwh.
11704 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
11705 function is defined in normal/completion.c as
11706 grub_normal_do_completion.
11707 (grub_cmdline_get): Use grub_normal_do_completion instead of
11710 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
11711 returns non-zero, otherwise return 0.
11712 (grub_partition_iterate): First, probe the partition map. Then,
11713 call ITERATE only for this partition map.
11715 * kern/misc.c (grub_strncmp): Rewritten.
11717 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
11718 returns non-zero. Otherwise return 0.
11720 * include/grub/partition.h (grub_partition_map_iterate): Return
11721 int instead of void.
11723 * include/grub/normal.h (grub_normal_do_completion): New prototype.
11725 * include/grub/misc.h (grub_strncmp): Change the type of N to
11728 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
11731 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
11732 unsigned explicitly before comparing it with I.
11734 * kern/main.c (grub_env_write_root): Add the attribute unused into
11737 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11738 normal/completion.c.
11739 (normal_mod_SOURCES): Likewise.
11740 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11741 (normal_mod_SOURCES): Likewise.
11743 * normal/command.c (grub_iterate_commands): If ITERATE returns
11744 non-zero, return one immediately.
11746 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
11748 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
11749 * kern/i386/pc/startup.S: Updated Global Descriptor table's
11751 (grub_vbe_get_controller_info): New function.
11752 (grub_vbe_get_mode_info): Likewise.
11753 (grub_vbe_set_mode): Likewise.
11754 (grub_vbe_get_mode): Likewise.
11755 (grub_vbe_set_memory_window): Likewise.
11756 (grub_vbe_get_memory_window): Likewise.
11757 (grub_vbe_set_scanline_length): Likewise.
11758 (grub_vbe_get_scanline_length): Likewise.
11759 (grub_vbe_set_display_start): Likewise.
11760 (grub_vbe_get_display_start): Likewise.
11761 (grub_vbe_set_palette_data): Likewise.
11762 * include/grub/i386/pc/vbe.h: New file.
11764 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11766 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11767 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
11768 * DISTLIST: Likewise.
11769 * kern/ieee1275/of.c: Moved to ...
11770 * kern/ieee1275/ieee1275.c: ... here.
11772 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11774 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
11775 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
11776 Pass 0 as `end' parameter to grub_strtoul().
11778 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11780 * include/grub/powerpc/ieee1275/console.h: Do not include
11781 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
11783 (grub_console_cur_color): Remove i386-specific prototype.
11784 (grub_console_real_putchar): Likewise.
11785 (grub_console_checkkey): Likewise.
11786 (grub_console_getkey): Likewise.
11787 (grub_console_getxy): Likewise.
11788 (grub_console_gotoxy): Likewise.
11789 (grub_console_cls): Likewise.
11790 (grub_console_setcursor): Likewise.
11791 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
11792 Include <grub/machine/console.h>.
11793 * term/ieee1275/ofconsole.c: Likewise.
11795 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
11797 * Makefile.in (LIBLZO): New variable.
11799 * configure.ac: Check for LZO version 2.
11801 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
11802 lzo/lzo1x.h instead of lzo1x.h.
11804 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
11807 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
11808 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
11810 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
11811 copying the data from PARTITION to P.
11813 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11815 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
11816 negative, unload the module.
11818 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
11819 map is "pc_partition_map" but not "pc".
11820 (usage): Fix the description. The options are --boot-image and
11821 --core-image but not --boot-file or --core-file.
11822 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
11823 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
11826 * util/i386/pc/grub-install.in: Do not specify --boot-file or
11827 --core-file. Specify INSTALL_DEVICE as an argument.
11829 * util/console.c: Include config.h.
11830 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
11831 [HAVE_NCURSES_H]: Include ncurses.h.
11832 [HAVE_CURSES_H]: Include curses.h.
11833 [!A_NORMAL] (A_NORMAL): Defined as zero.
11834 [!A_STANDOUT] (A_STANDOUT): Likewise.
11836 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
11838 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
11840 * configure.ac: Check for curses libraries and headers.
11842 * Makefile.in (LIBCURSES): New variable.
11844 * genmk.rb (Script::rule): Set the executable bits.
11846 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
11847 name of the PC partition map is "pc_partition_map" but not "pc".
11849 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11851 * util/i386/pc/grub-install.in (grub_probefs): New variable.
11852 (modules): Likewise.
11853 (usage): Added descriptions for --modules and --grub-probefs.
11854 Handle --modules and --grub-probefs. Save the arguments in MODULES
11855 and GRUB_PROBEFS, respectively.
11856 Auto-detect a filesystem module against GRUBDIR. If the result is
11857 empty and modules are not specified explicitly, abort the
11858 installation. Add the result to MODULES.
11860 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
11861 disk/powerpc/ieee1275/ofdisk.c,
11862 include/grub/powerpc/ieee1275/init.h and
11863 term/powerpc/ieee1275/ofconsole.c.
11864 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
11865 term/ieee1275/ofconsole.c.
11867 * include/grub/powerpc/ieee1275/console.h: Resurrected.
11869 * COPYING: Upgraded to the latest version. Only the address of the
11870 FSF office has changed.
11872 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11874 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11875 kern/ieee1275.c with kern/ieee1275/of.c.
11877 * kern/ieee1275.c: Moved to ...
11878 * kern/ieee1275/of.c: ... here.
11880 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
11882 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
11885 * config.guess: Updated to the latest version from gnulib.
11886 * config.sub: Likewise.
11887 * install.sh: Likewise.
11888 * mkinstalldirs: Likewise.
11890 * include/grub/console.h: Removed. This file is arch-specific. Do
11891 not put this in include/grub.
11893 * include/grub/i386/pc/console.h: Resurrected.
11895 * util/console.c: Include grub/machine/console.h instead of
11897 * util/grub-emu.c: Likewise.
11899 2005-08-04 Marco Gerards <metgerards@student.han.nl>
11901 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
11904 From Vincent Pelletier <subdino2004@yahoo.fr>
11905 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
11906 Redefined to use grub_getwh.
11907 (grub_term): New member named getwh.
11908 (grub_getwh): New prototype.
11909 * kern/term.c (grub_getwh): New function.
11910 * term/i386/pc/console.c (grub_console_getwh): New function.
11911 (grub_console_term): New member `getwh'.
11912 * term/i386/pc/vga.c (grub_vga_getwh): New function.
11913 (grub_vga_term): New member `getwh'.
11914 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
11916 (grub_ofconsole_getw): New function.
11917 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
11918 (grub_ofconsole_term): New field named getwh and new initial
11921 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
11923 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
11924 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
11925 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
11926 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
11927 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
11928 of <grub/machine/ieee1275.h>.
11929 * commands/ieee1275/reboot.c: Likewise.
11930 * boot/powerpc/ieee1275/ieee1275.c: Move ...
11931 * kern/ieee1275.c: ... to here. All users updated. Change all
11932 parameter structs to use new type `grub_ieee1275_cell_t'.
11933 * term/powerpc/ieee1275/ofconsole.c: Move ...
11934 * term/ieee1275/ofconsole.c: ... to here. All users updated.
11935 * disk/powerpc/ieee1275/ofdisk.c: Move ...
11936 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
11937 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
11939 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
11940 Remove unused prototypes. All users updated.
11941 * include/grub/powerpc/ieee1275/console.h: Removed.
11942 * include/grub/powerpc/ieee1275/ieee1275.h: Define
11943 `grub_ieee1275_cell_t'.
11944 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
11945 Cast comparisons with -1 to the correct type.
11946 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
11947 type to match `grub_ieee1275_entry_fn'.
11949 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
11951 * DISTLIST: Added util/i386/pc/grub-probefs.c.
11953 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
11954 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
11956 (grub_probefs_SOURCES): New variable.
11958 * util/i386/pc/grub-probefs.c: New file.
11960 * util/i386/pc/grub-setup.c (main): Call
11961 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
11962 grub_hfs_init and grub_jfs_init to initialize the system. Call
11963 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
11964 grub_pc_partition_map_fini to finish the system.
11966 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
11968 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
11970 (grub_multiboot_load_elf32): Likewise.
11971 (grub_multiboot_is_elf64): Likewise.
11972 (grub_multiboot_load_elf64): Likewise.
11973 (grub_multiboot_load_elf): Likewise.
11974 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
11975 an ELF32 or ELF64 file.
11976 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
11978 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
11979 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
11980 NULL before calling FS->LABEL.
11981 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
11982 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
11983 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
11984 before calling FS->LABEL.
11986 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
11988 * util/i386/pc/grub-install.in (datadir): New variable.
11990 (pkgdatadir): New variable.
11991 (pkglibdir): Removed.
11993 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
11995 * DISTLIST: Added util/i386/pc/grub-install.in.
11997 * util/i386/pc/grub-install.in: New file.
11999 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
12000 (grub_install_SOURCES): Likewise.
12002 * genmk.rb: Added support for scripts.
12003 (Script): New class.
12004 (scripts): New variable.
12006 * Makefile.in (install-local): Install sbin_SCRIPTS by
12008 (uninstall): Remove sbin_SCRIPTS.
12010 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
12011 device, try to get a GRUB device by
12012 grub_util_biosdisk_get_grub_dev.
12015 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
12016 description for --device-map.
12018 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12020 Change the semantics of variable hooks. They now return strings
12021 instead of error values.
12023 * util/i386/pc/grub-setup.c: Include grub/env.h.
12024 (setup): Use grub_device_set_root instead of grub_env_set.
12026 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
12027 grub_env_get instead of grub_device_set_root and
12028 grub_device_get_root, respectively.
12030 * kern/main.c (grub_env_write_root): New function.
12031 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
12032 grub_env_set instead of grub_device_set_root.
12034 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
12036 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
12037 rather than calling ENV->WRITE_HOOK afterwards.
12038 (grub_env_get): Return the result of ENV->READ_HOOK rather than
12039 passing a pointer of a pointer.
12040 (grub_register_variable_hook): Change the types of "read_hook" and
12041 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
12043 Allocate the default empty string on the heap, because this string
12044 may be freed later.
12046 * kern/device.c: Include grub/env.h.
12047 (grub_device_set_root): Removed.
12048 (grub_device_get_root): Likewise.
12049 (grub_device_open): Use grub_env_get instead of
12050 grub_device_get_root.
12052 * include/grub/env.h (grub_env_read_hook_t): New type.
12053 (grub_env_write_hook_t): Likewise.
12054 (grub_env_var): Change the types of "read_hook" and "write_hook"
12055 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
12056 (grub_register_variable_hook): Likewise.
12058 * include/grub/device.h (grub_device_set_root): Removed.
12059 (grub_device_set_root): Likewise.
12061 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
12062 make sure that DIRNAME terminates with '/', so that
12063 grub_fat_find_dir will fail if PATH is not a directory.
12065 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
12067 Use the qualifier auto for print_files and print_files_long.
12068 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
12070 Put a newline only if there is no error.
12071 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
12074 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12076 * kern/partition.c (grub_partition_probe): Initialize PART to
12077 NULL. Otherwise, when no partition map is registered, this returns
12080 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
12082 * partmap/apple.c (apple_partition_map_iterate): Check if POS
12083 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
12086 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
12088 * commands/ls.c (grub_ls_list_disks): Print the filesystem
12089 information on each device, if it does not have partitions. Print
12090 "Device" instead of "Disk", because this function is not specific
12093 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
12094 static to ensure that it is put on the memory rather than a
12097 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
12099 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
12100 (grub_cat_init): Likewise.
12101 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
12102 (options): Likewise.
12103 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
12104 (grub_configfile_init): Likewise.
12105 * font/manager.c (GRUB_MOD_INIT): Likewise.
12106 * commands/help.c (GRUB_MOD_INIT): Likewise.
12107 (grub_help_init): Likewise.
12108 * normal/command.c (grub_command_init): Likewise.
12109 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
12110 * disk/loopback.c (grub_loop_init): Likewise.
12111 (GRUB_MOD_INIT): Likewise.
12112 * commands/ls.c (grub_ls_init): Likewise.
12113 (GRUB_MOD_INIT): Likewise.
12114 (options): Likewise.
12115 * commands/boot.c (grub_boot_init): Likewise.
12116 (GRUB_MOD_INIT): Likewise.
12117 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
12118 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
12119 (GRUB_MOD_INIT): Likewise.
12120 * commands/cmp.c (grub_cmp_init): Likewise.
12121 (GRUB_MOD_INIT): Likewise.
12123 * normal/arg.c: Use <> instead of "" to include header files.
12124 (SHORT_ARG_HELP): New macro.
12125 (SHORT_ARG_USAGE): Likewise.
12126 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
12127 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
12129 (find_short): Check if C is 'h' or 'u' explicitly.
12130 (grub_arg_show_help): Use space characters instead of tabs. Treat
12131 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
12132 are shown with --help and --usage only if they are not used for
12133 the command itself.
12134 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
12137 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
12138 const into "longarg". Change the type of "shortarg" to int.
12140 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
12142 * boot/i386/pc/boot.S (boot_drive_check): New label.
12144 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
12147 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
12148 which do not pass a boot drive correctly. Copied from GRUB Legacy.
12150 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
12152 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
12153 When turning off Gate A20, skip the check and return immediately,
12154 because this is not fatal usually.
12156 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
12158 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
12159 be 0x7C00 instead of 0x8000.
12161 * boot/i386/pc/pxeboot.S: Rewritten.
12163 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
12165 (gate_a20_check_state): Read a byte from 0x108000. Invert the
12168 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
12170 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
12171 robustness. This routine now supports a BIOS call and System
12172 Control Port A to modify the gate A20.
12174 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12175 Increased to 0x440.
12177 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
12179 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
12180 device path and resulting ihandle.
12181 (grub_ofdisk_close): dprintf the ihandle being closed.
12182 (grub_ofdisk_read): dprintf function parameters.
12183 * kern/mm.c (grub_mm_init_region): Likewise.
12184 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
12185 (grub_linux_boot): dprintf the Linux entry point, initrd address and
12186 size, and boot arguments.
12187 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
12188 before loading into memory.
12189 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
12190 before loading into memory.
12192 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
12194 * kern/mm.c: Added much documentation.
12195 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
12196 8, set to 5 instead of 8.
12198 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
12200 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
12202 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
12203 (grub_mkdevicemap_SOURCES): New variable.
12205 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
12206 lib/device.c of GRUB Legacy.
12208 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
12210 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
12211 instead of PATH is NULL.
12213 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
12215 * commands/cmp.c (BUFFER_SIZE): New macro.
12216 (grub_cmd_cmp): Close the right file at the right time. Compare
12217 only data just read. Don't report files of different size as
12218 identical. Dynamically allocate buffers. Move variable
12219 declarations at the beginning of function.
12221 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
12223 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
12226 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
12228 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
12229 when backspace is pressed at beginning of line.
12231 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
12233 * DISTLIST: Added genfslist.sh.
12235 * normal/main.c (fs_module_list): New variable.
12236 (autoload_fs_module): New function.
12237 (read_fs_list): Likewise.
12238 (grub_normal_execute): Call read_fs_list.
12240 * kern/fs.c (grub_fs_autoload_hook): New variable.
12241 (grub_fs_probe): Added support for auto-loading.
12243 * include/grub/normal.h (struct grub_fs_module_list): New struct.
12244 (grub_fs_module_list_t): New type.
12246 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
12247 (grub_fs_autoload_hook): New prototype.
12249 * genfslist.sh: New file.
12251 * genmk.rb: Added a rule to generate a filesystem list.
12253 2005-06-30 Marco Gerards <metgerards@student.han.nl>
12255 * configure.ac: Fix the test for cross-compiling.
12257 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
12258 define GRUB_UTIL anymore.
12260 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
12261 so this function works on other systems than just big endian.
12262 (load_modules): Likewise.
12263 (add_segments): Likewise.
12265 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
12267 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
12268 contains `l' modifier, get a long from va_arg().
12270 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
12272 * kern/mm.c (grub_free): If the next free block which is being
12273 merged is the first free block, set the first block to the block
12275 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
12277 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
12279 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
12280 `grub_ieee1275_chosen'.
12282 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
12284 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
12285 (grub_ieee1275_chosen): New variable.
12286 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
12288 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
12289 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12290 Rename first argument to `phandle' for consistency.
12291 (grub_ieee1275_get_property_length): Likewise.
12292 (grub_ieee1275_next_property): Likewise. Change type of first argument
12293 to grub_ieee1275_phandle_t.
12294 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
12295 Move export next to declaration.
12296 (grub_ieee1275_chosen): New variable.
12297 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
12298 Correct cosmetic typo.
12299 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
12300 `grub_ieee1275_chosen'.
12301 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
12302 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
12303 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
12304 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
12305 `grub_ieee1275_chosen'.
12307 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
12309 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
12311 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
12312 /chosen/bootargs as "variable=value" pairs.
12314 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
12316 * include/grub/misc.h (grub_dprintf): New macro.
12317 (grub_real_dprintf): New prototype.
12318 (grub_strword): Likewise.
12319 (grub_iswordseparator): Likewise.
12320 * kern/misc.c (grub_real_dprintf): New function.
12321 (grub_strword): Likewise.
12322 (grub_iswordseparator): Likewise.
12324 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
12326 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
12327 (roundup): Remove macro.
12328 (grub_ieee1275_flags): Make static.
12329 (grub_ieee1275_realmode): Remove.
12330 (grub_ieee1275_test_flag): New function.
12331 (grub_ieee1275_set_flag): Likewise.
12332 (find_options): Rename to `grub_ieee1275_find_options'; update
12333 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
12334 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
12335 (cmain): New prototype.
12336 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
12337 `grub_ieee1275_flags' directly.
12338 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
12339 machine/biosdisk.h.
12340 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
12341 Don't include grub/machine/init.h.
12342 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
12343 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12345 (grub_ieee1275_realmode): Likewise.
12346 (grub_ieee1275_flag): New enum.
12347 (grub_ieee1275_test_flag): New prototype.
12348 (grub_ieee1275_set_flag): New prototype.
12349 * include/grub/powerpc/ieee1275/init.h: Remove file.
12350 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
12351 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
12352 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
12353 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
12355 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
12356 `grub_ieee1275_test_flag'.
12357 (grub_ieee1275_encode_devname): Likewise.
12359 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
12361 * include/grub/powerpc/ieee1275/ieee1275.h
12362 (grub_ieee1275_encode_devname): New prototype.
12363 (grub_ieee1275_get_filename): Likewise.
12364 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
12366 (grub_set_prefix): Likewise.
12367 (grub_machine_init): Call grub_set_prefix.
12368 * kern/powerpc/ieee1275/openfw.c: Fix typos.
12369 (grub_parse_type): New enum.
12370 (grub_ieee1275_get_devargs): New function.
12371 (grub_ieee1275_get_devname): Likewise.
12372 (grub_ieee1275_parse_args): Likewise.
12373 (grub_ieee1275_get_filename): Likewise.
12374 (grub_ieee1275_encode_devname): Likewise.
12376 2005-03-30 Marco Gerards <metgerards@student.han.nl>
12378 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
12379 `grub_loader_unset'.
12381 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
12383 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
12384 instead of grub_ieee1275_interpret.
12385 (grub_halt_init): New function.
12386 (grub_halt_fini): Likewise.
12387 (GRUB_MOD_INIT): Correct message grammar.
12388 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
12389 instead of grub_ieee1275_interpret.
12390 (grub_reboot_init): New function.
12391 (grub_reboot_fini): Likewise.
12392 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
12393 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
12394 util/i386/pc/misc.c with commands/ieee1275/halt.c,
12395 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
12396 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
12398 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
12400 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
12402 (grub_halt): Likewise.
12403 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
12404 (cmain): Remove __attribute__((unused)).
12405 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
12406 (grub_heap_len): Likewise.
12407 (grub_machine_fini): New function.
12408 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
12409 (grub_halt): Likewise.
12410 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
12412 * util/powerpc/ieee1275/misc.c: New file.
12414 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
12416 * DISTLIST: New file.
12417 * gendistlist.sh: Likewise.
12419 * Makefile.in (COMMON_DISTFILES): Removed.
12420 (BOOT_DISTFILES): Likewise.
12421 (CONF_DISTFILES): Likewise.
12422 (DISK_DISTFILES): Likewise.
12423 (FS_DISTFILES): Likewise.
12424 (INCLUDE_DISTFILES): Likewise.
12425 (KERN_DISTFILES): Likewise.
12426 (LOADER_DISTFILES): Likewise.
12427 (TERM_DISTFILES): Likewise.
12428 (UTIL_DISTFILES): Likewise.
12429 (DISTFILES): Likewise.
12430 (uninstall): Uninstall files in $(pkgdata_DATA).
12431 (DISTLIST): New target.
12432 (distdir): Use the contents of the file DISTLIST to get a list of
12435 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
12437 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
12438 descriptor. This is ported from GRUB Legacy.
12440 * gencmdlist.sh: Added an extra semicolon to make it work with
12441 old sed versions. Reported by Robert Bihlmeyer
12442 <robbe@orcus.priv.at>.
12444 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
12446 Automatic loading of commands is supported.
12448 * normal/main.c (read_command_list): New function.
12449 (grub_normal_execute): Call read_command_list.
12451 * normal/command.c (grub_register_command): Return zero or CMD.
12452 Allocate CMD->NAME from the heap.
12453 Initialize CMD->MODULE_NAME to zero.
12454 Find the same name as well. If the same command is found and it is
12455 a dummy command, overwrite members. If it is not a dummy command,
12457 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
12458 (grub_command_find): If a dummy command is found, load a module
12459 and retry to find a command only once.
12461 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
12462 make sure that each command is loaded.
12464 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
12466 (struct grub_command): Remove const from the member `name'.
12467 Add a new member `module_name'.
12468 (grub_register_command): Return grub_command_t.
12470 * commands/help.c (grub_cmd_help): Call grub_command_find to make
12471 sure that each command is loaded.
12473 * genmk.rb (PModule::rule): Specify a module name without the
12474 suffix ".mod" to gencmdlist.sh.
12476 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
12478 * gencmdlist.sh: New file.
12480 * genmk.rb (PModule::rule): Generate a rule for a command list.
12482 Generate command.lst from $(COMMANDFILES).
12484 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
12485 (DATA): Added $(pkgdata_DATA).
12486 (install-local): Install files in $(pkgdata_DATA).
12488 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
12490 * term/i386/pc/vga.c (debug_command): Removed.
12491 (GRUB_MOD_INIT): Do not register the command "debug".
12493 From Hollis Blanchard:
12494 * commands/configfile.c: New file.
12495 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12496 commands/configfile.c.
12497 (pkgdata_MODULES): Added configfile.mod.
12498 (configfile_mod_SOURCES): New variable.
12499 (configfile_mod_CFLAGS): Likewise.
12500 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12501 commands/configfile.c.
12502 (pkgdata_MODULES): Added configfile.mod.
12503 (configfile_mod_SOURCES): New variable.
12504 (configfile_mod_CFLAGS): Likewise.
12505 * util/grub-emu.c (main): Call grub_configfile_init and
12506 grub_configfile_fini.
12507 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
12509 [GRUB_UTIL] (grub_configfile_fini): Likewise.
12511 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
12513 * normal/arg.c (grub_arg_show_help): Do not show the bug report
12516 * commands/help.c (grub_cmd_help): Do not print newlines after
12517 the last command in print_command_help.
12519 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
12521 * commands/default.h: New file.
12522 * commands/timeout.h: Likewise.
12523 * normal/context.c: Likewise.
12525 * util/misc.c: Do not include sys/times.h.
12526 Include sys/time.h and grub/machine/time.h.
12527 (grub_get_rtc): Rewritten with gettimeofday.
12529 * util/grub-emu.c (main): Call grub_default_init and
12530 grub_timeout_init before grub_normal_init, and call
12531 grub_timeout_fini and grub_default_fini after grub_main.
12533 * util/console.c (grub_ncurses_checkkey): Return the read
12536 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
12539 * normal/main.c (read_config_file): Push MENU. If this fails,
12540 print an error and wait for a user input.
12541 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
12542 If a menu is empty or an error occurs, pop MENU.
12543 (grub_normal_execute): Pop and free MENU after grub_menu_run
12546 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
12548 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
12550 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12552 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
12554 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12557 * include/grub/normal.h (struct grub_menu_list): New struct.
12558 (grub_menu_list_t): New type.
12559 (struct grub_context): New struct.
12560 (grub_context_t): New type.
12561 (grub_register_command): Got rid of EXPORT_FUNC.
12562 (grub_unregister_command): Likewise.
12563 (grub_context_get): New prototype.
12564 (grub_context_get_current_menu): Likewise.
12565 (grub_context_push_menu): Likewise.
12566 (grub_context_pop_menu): Likewise.
12567 [GRUB_UTIL] (grub_default_init): Likewise.
12568 [GRUB_UTIL] (grub_default_fini): Likewise.
12569 [GRUB_UTIL] (grub_timeout_init): Likewise.
12570 [GRUB_UTIL] (grub_timeout_fini): Likewise.
12572 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
12573 commands/timeout.c and normal/context.c.
12574 (pkgdata_MODULES): Added default.mod and timeout.mod.
12575 (normal_mod_SOURCES): Added normal/context.c.
12576 (default_mod_SOURCES): New variable.
12577 (default_mod_CFLAGS): Likewise.
12578 (timeout_mod_SOURCES): Likewise.
12579 (timeout_mod_CFLAGS): Likewise.
12580 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
12582 (pkgdata_MODULES): Added default.mod and timeout.mod.
12583 (normal_mod_SOURCES): Added normal/context.c.
12584 (default_mod_SOURCES): New variable.
12585 (default_mod_CFLAGS): Likewise.
12586 (timeout_mod_SOURCES): Likewise.
12587 (timeout_mod_CFLAGS): Likewise.
12589 * Makefile.in (all-local): Added $(MKFILES).
12591 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
12593 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
12594 (grub_emu_SOURCES): Likewise.
12595 (pkgdata_MODULES): Add `sun.mod'.
12596 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12597 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12599 (pkgdata_MODULES): Add `sun.mod'.
12600 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12601 * include/grub/partition.h (grub_sun_partition_map_init): New
12603 (grub_sun_partition_map_fini): Likewise.
12604 * partmap/sun.c: New file.
12605 * util/grub-emu.c (main): Initialize and de-initialize the sun
12606 partitionmap support.
12608 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
12610 This implements an Emacs-like menu entry editor.
12612 * normal/menu_entry.c: New file.
12614 * util/console.c (grub_ncurses_putchar): Translate some Unicode
12615 characters to ASCII.
12616 (saved_char): New variable.
12617 (grub_ncurses_checkkey): Rewritten completely.
12618 (grub_ncurses_getkey): Likewise.
12619 (grub_ncurses_init): Call raw instead of cbreak.
12621 * normal/menu.c (print_entry): Do not put a space.
12622 (init_page): Renamed to ...
12623 (grub_menu_init_page): ... this. All callers changed.
12624 (edit_menu_entry): Removed.
12625 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
12627 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
12629 * kern/misc.c (grub_vprintf): Call grub_refresh.
12631 * normal/menu.c (DISP_LEFT): Renamed to ...
12632 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
12633 * normal/menu.c (DISP_UP): Renamed to ...
12634 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
12635 * normal/menu.c (DISP_RIGHT): Renamed to ...
12636 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
12637 * normal/menu.c (DISP_DOWN): Renamed to ...
12638 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
12639 * normal/menu.c (DISP_HLINE): Renamed to ...
12640 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
12641 * normal/menu.c (DISP_VLINE): Renamed to ...
12642 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
12643 * normal/menu.c (DISP_UL): Renamed to ...
12644 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
12645 * normal/menu.c (DISP_UR): Renamed to ...
12646 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
12647 * normal/menu.c (DISP_LL): Renamed to ...
12648 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
12649 * normal/menu.c (DISP_LR): Renamed to ...
12650 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
12651 * normal/menu.c (TERM_WIDTH): Renamed to ...
12652 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
12653 * normal/menu.c (TERM_HEIGHT): Renamed to ...
12654 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
12655 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
12656 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
12657 * normal/menu.c (TERM_MARGIN): Renamed to ...
12658 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
12659 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
12660 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
12661 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
12662 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
12663 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
12664 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
12665 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
12666 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
12667 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
12668 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
12669 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
12670 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
12671 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
12672 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
12673 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
12674 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
12675 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
12676 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
12677 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
12678 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
12679 All callers changed.
12681 * include/grub/normal.h: New prototype.
12683 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12684 normal/menu_entry.c.
12685 (normal_mod_SOURCES): Likewise.
12686 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12687 (normal_mod_SOURCES): Likewise.
12689 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
12691 * include/grub/normal.h (grub_halt_init): New prototype.
12692 (grub_halt_fini): Likewise.
12693 (grub_reboot_init): Likewise.
12694 (grub_reboot_fini): Likewise.
12696 * util/grub-emu.c: Include signal.h.
12697 (main_env): New global variable.
12698 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
12700 (grub_machine_fini): New function.
12701 (main): Call grub_halt_init and grub_reboot_init before
12702 grub_main, and grub_reboot_fini and grub_halt_fini after it.
12703 Call setjmp with MAIN_ENV to go back afterwards.
12704 Call grub_machine_fini right before return.
12706 * include/grub/util/misc.h: Include setjmp.h.
12707 (main_env): New prototype.
12709 * include/grub/kernel.h (grub_machine_fini): New prototype.
12710 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
12711 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
12713 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
12714 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
12715 * term/i386/pc/console.c (grub_console_fini): Likewise.
12717 * util/i386/pc/misc.c: New file.
12719 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12720 util/i386/pc/misc.c, commands/i386/pc/halt.c and
12721 commands/i386/pc/reboot.c.
12723 2005-02-14 Guillem Jover <guillem@hadrons.org>
12725 * include/grub/dl.h (grub_dl_check_header): New prototype.
12726 (grub_arch_dl_check_header): Change return type to grub_err_t,
12727 remove size parameter and export function. Update all callers.
12728 * kern/dl.c (grub_dl_check_header): New function.
12729 (grub_dl_load_core): Use `grub_dl_check_header' instead of
12730 `grub_arch_dl_check_header'. Check ELF type. Check if sections
12731 are inside the core.
12732 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
12733 independent ELF header checks.
12734 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12735 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
12736 `grub_dl_check_header' instead of explicit checks. Check for the
12738 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
12739 `grub_dl_check_header' instead of explicit checks. Remove arch
12740 specific ELF header checks.
12742 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
12745 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
12747 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
12748 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
12750 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
12752 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
12753 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
12754 (part_map_iterate): Clear `grub_errno' and return 0 if
12755 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
12756 * partmap/amiga.c (amiga_partition_map_iterate): Return
12757 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
12758 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12760 2005-02-01 Guillem Jover <guillem@hadrons.org>
12762 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
12765 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12767 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
12769 (grub_rescue_cmd_linux): New prototype.
12770 (grub_rescue_cmd_initrd): Likewise.
12771 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
12773 (grub_linux_release_mem): Release the memory for the initrd.
12774 (grub_load_linux): Renamed from this...
12775 (grub_rescue_cmd_linux): ...To this. Changed all callers.
12776 Changed `entry' not to be static. Loop over memory regions to
12777 find another one when the default fails.
12778 (grub_rescue_cmd_initrd): New function.
12779 (grub_linux_init): Remove function.
12780 (grub_linux_fini): Likewise.
12781 (GRUB_MOD_INIT): Register `initrd'.
12782 (GRUB_MOD_FINI): Unregister `initrd'.
12783 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
12785 (grub_linux_normal_fini): Likewise.
12786 (GRUB_MOD_INIT): Register `initrd'.
12787 (GRUB_MOD_FINI): Unregister `initrd'.
12789 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12791 * commands/help.c: New file.
12792 * normal/arg.c (show_help): Renamed to...
12793 (grub_arg_show_help): ... this.
12794 * commands/i386/pc/halt.c: New file.
12795 * commands/i386/pc/reboot.c: Likewise.
12796 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
12797 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
12798 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
12799 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
12801 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12803 (pkgdata_MODULES): Add `help.mod'.
12804 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
12805 * grub/i386/pc/init.h (grub_reboot): New prototype.
12806 (grub_halt): Likewise.
12807 * include/grub/normal.h (grub_arg_show_help): New prototype.
12808 (grub_help_init): Likewise.
12809 (grub_help_fini): Likewise.
12810 * util/grub-emu.c (main): Initialize and deinitialize the help
12813 * normal/cmdline.c (grub_cmdline_get): Doc fix.
12815 * normal/command.c (grub_command_init): Fixed the description of
12816 the `set' and `unset' commands.
12818 2005-01-31 Marco Gerards <metgerards@student.han.nl>
12820 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
12822 * commands/ieee1275/halt.c: New file.
12823 * commands/ieee1275/reboot.c: Likewise.
12824 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
12825 `__attribute__ ((unused))'. Some GCS related fixed.
12826 (grub_suspend_init) [GRUB_UTIL]: Function removed.
12827 (grub_suspend_fini): Likewise.
12828 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
12830 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
12831 (halt_mod_CFLAGS): New variables.
12832 * include/grub/powerpc/ieee1275/ieee1275.h
12833 (grub_ieee1275_interpret): New prototype.
12835 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
12837 * include/grub/misc.h (memmove): New prototype.
12838 (memcpy): Likewise.
12840 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
12842 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
12843 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
12845 2005-01-22 Marco Gerards <metgerards@student.han.nl>
12847 * kern/misc.c (grub_strndup): Function rewritten.
12849 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
12851 * normal/menu.c (TERM_WIDTH): Macro redefined.
12852 (TERM_TOP_BORDER_Y): Likewise.
12853 (draw_border): Replaced while-loop by a for-loop. Make the number
12854 of lines consistent with the number of lines displayed in
12855 print_entries. Added a margin below the rectangle.
12856 (print_entry): Make the entry fit in the rectangle.
12857 (print_entries): Display the scroll arrows next to the right
12860 2005-01-21 Marco Gerards <metgerards@student.han.nl>
12862 * fs/minix.c (grub_minix_find_file): Reserve more space for
12863 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
12864 `grub_strncpy' to copy `path' into it.
12866 2005-01-21 Marco Gerards <metgerards@student.han.nl>
12868 Add the loopback device, a device via which files can be accessed
12871 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
12872 (pkgdata_MODULES): Add loopback.mod.
12873 (loopback_mod_SOURCES): New variable.
12874 (loopback_mod_CFLAGS): Likewise.
12875 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12877 (pkgdata_MODULES): Add loopback.mod.
12878 (loopback_mod_SOURCES): New variable.
12879 (loopback_mod_CFLAGS): Likewise.
12880 * disk/loopback.c: new file.
12881 * include/grub/normal.h (grub_loop_init): New prototype.
12882 (grub_loop_fini): New prototype.
12883 * util/grub-emu.c (main): Initialize and de-initialize loopback
12885 * include/grub/disk.h (grub_disk_dev_id): Add
12886 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
12888 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
12890 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
12892 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
12893 (suspend_mod_SOURCES): New variable.
12894 (suspend_mod_CFLAGS): Likewise.
12895 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
12897 * commands/ieee1275/suspend.c: New file.
12899 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12901 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
12902 ((unused))' to `__attribute__ ((used))'.
12903 (GRUB_MOD_FINI): Likewise.
12904 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
12905 * genmk.rb (PModule): Assign space to common symbols when linking
12908 2005-01-20 Marco Gerards <metgerards@student.han.nl>
12910 * include/grub/mm.h (grub_mm_init_region): Change the type of the
12911 `unsigned' arguments to `grub_size_t'.
12912 (grub_malloc): Likewise.
12913 (grub_realloc): Likewise.
12914 (grub_memalign): Likewise.
12915 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
12916 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12917 * util/misc.c (grub_malloc): Likewise.
12918 (grub_realloc): Likewise.
12919 * kern/mm.c (get_header_from_pointer): Change the casts to
12920 `unsigned' into a cast to `grub_size_t'.
12922 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
12923 point to `currnode' when `currnode' is changed.
12925 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
12926 Schottelius <nico-linux@schottelius.org>.
12928 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
12930 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
12931 (note_path): Remove variable.
12932 (GRUB_IEEE1275_NOTE_NAME): New macro.
12933 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
12934 (grub_ieee1275_note_hdr): New structure.
12935 (grub_ieee1275_note_desc): Likewise.
12936 (grub_ieee1275_note): Likewise.
12937 (load_note): Remove `dir' argument. All callers updated. Remove
12938 `note_img' and `path'. Do not load a file from `note_path'.
12939 Initialize a struct grub_ieee1275_note and write that to `out'.
12940 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
12942 2005-01-05 Marco Gerards <metgerards@student.han.nl>
12944 * util/misc.c (grub_util_read_image): Revert last change. It
12945 called `grub_util_read_at', which seeks from the beginning of the
12948 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
12950 * TODO: Add note about endianness in grub-mkimage.
12951 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
12953 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
12954 (grub_mkimage_SOURCES): New target.
12955 * include/grub/kernel.h (grub_start_addr): Remove variable.
12956 (grub_end_addr): Likewise.
12957 (grub_total_module_size): Likewise.
12958 (grub_kernel_image_size): Likewise.
12959 (GRUB_MODULE_MAGIC): New constant.
12960 (grub_module_info): New structure.
12961 (grub_arch_modules_addr): New prototype.
12962 (grub_get_end_addr): Remove prototype.
12963 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
12964 * include/grub/powerpc/ieee1275/kernel.h: New file.
12965 * include/grub/util/misc.h (grub_util_get_fp_size): New
12967 (grub_util_read_at): Likewise.
12968 (grub_util_write_image_at): Likewise.
12969 * kern/main.c (grub_get_end_addr): Remove function.
12970 (grub_load_modules): Call grub_arch_modules_addr instead of using
12971 grub_end_addr. Look for a grub_module_info struct in memory. Use
12972 the grub_module_info fields instead of calling grub_get_end_addr
12973 as loop conditions. Move grub_add_unused_region code here.
12974 (grub_add_unused_region): Remove function.
12975 * kern/i386/pc/init.c: Include grub/cache.h.
12976 (grub_machine_init): Remove call to grub_get_end_addr. Remove
12977 one call to add_mem_region.
12978 (grub_arch_modules_addr): New function.
12979 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
12980 (grub_total_module_size): Likewise.
12981 Include grub/machine/kernel.h.
12982 (grub_arch_modules_addr): New function.
12983 * util/grub-emu.c (grub_end_addr): Remove variable.
12984 (grub_total_module_size): Likewise.
12985 (grub_arch_modules_addr): New function.
12986 * util/misc.c: Include unistd.h.
12987 (grub_util_get_fp_size): New function.
12988 (grub_util_read_at): Likewise.
12989 (grub_util_write_image_at): Likewise.
12990 (grub_util_read_image): Call grub_util_read_at.
12991 (grub_util_write_image): Call grub_util_write_image_at.
12992 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
12993 additional memory in kernel_img for a struct grub_module_info.
12994 Fill in that grub_module_info.
12995 * util/powerpc/ieee1275/grub-mkimage.c: New file.
12997 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12999 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
13001 * include/grub/powerpc/ieee1275/ieee1275.h
13002 (grub_ieee1275_milliseconds): New prototype.
13003 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
13005 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
13006 grub_ieee1275_milliseconds.
13008 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13010 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
13012 (find_options): New function.
13013 (cmain): Call find_options.
13014 * include/grub/powerpc/ieee1275/ieee1275.h
13015 (grub_ieee1275_realmode): New extern variable.
13016 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
13017 grub_map if grub_ieee1275_realmode is false.
13019 2004-12-29 Marco Gerards <metgerards@student.han.nl>
13021 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
13022 lines are inserted and make it work like readline. Reported by
13023 Vincent Pelletier <subdino2004@yahoo.fr>.
13025 2004-12-28 Marco Gerards <metgerards@student.han.nl>
13027 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
13029 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
13030 `kern/powerpc/cache.S'.
13032 2004-12-27 Marco Gerards <metgerards@student.han.nl>
13034 * genmk.rb: Handle the `Program' class in the main loop. Written
13035 by Johan Rydberg <jrydberg@gnu.org>.
13036 (Program): New class.
13037 (programs): New variable.
13038 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
13039 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
13040 instead of "grub/kernel.h". Include <grub/machine/init.h>.
13041 (help_arch): Function removed.
13042 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
13043 `powerpc/libgcc.h' and `loader.h'.
13044 (pkgdata_PROGRAMS): New variable.
13045 (sbin_UTILITIES): Variable removed.
13046 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
13047 (grubof_SOURCES): Variable re-defined so it only includes the
13048 core functionality.
13049 (grubof_CFLAGS): Remove `-DGRUBOF'.
13050 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
13051 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
13052 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
13053 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
13054 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
13055 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
13056 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
13057 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
13058 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
13059 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
13060 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13061 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
13062 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
13063 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
13064 (pc_mod_CFLAGS): New variables.
13065 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
13066 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
13067 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
13068 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
13070 * include/grub/i386/pc/init.h (grub_os_area_addr)
13071 (rub_os_area_size): ... to here.
13072 * include/grub/powerpc/ieee1275/ieee1275.h
13073 (grub_ieee1275_entry_fn): Export symbol.
13074 * include/grub/powerpc/ieee1275/init.h: New file.
13075 * include/grub/powerpc/libgcc.h: Likewise.
13076 * include/grub/cache.h: Likewise.
13077 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
13078 <hollis@penguinppc.org>.
13079 * kern/dl.c: Include <grub/cache.h>.
13080 (grub_dl_flush_cache): New function.
13081 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
13083 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
13084 (grub_console_init): Removed prototypes.
13085 (grub_machine_init): Don't initialize the modules anymore.
13086 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
13088 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
13089 Macro undef removed.
13090 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
13091 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
13092 relocation `R_PPC_REL32'. Return an error when the relocation is
13094 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
13095 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
13096 * util/misc.c (grub_arch_sync_caches): Likewise.
13098 2004-12-19 Marco Gerards <metgerards@student.han.nl>
13100 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
13101 `symlist.c', add `grubof_symlist.c'.
13102 (symlist.c): Variable removed.
13103 (grubof_HEADERS): Variable added.
13104 (grubof_symlist.c): New target.
13105 (kernel_syms.lst): Use `grubof_HEADERS' instead of
13106 `kernel_img_HEADERS'.
13107 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
13108 * kern/powerpc/dl.c: New file.
13109 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
13111 (grub_arch_dl_relocate_symbols): Likewise.
13112 (grub_register_exported_symbols): Likewise.
13114 2004-12-13 Marco Gerards <metgerards@student.han.nl>
13116 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
13117 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
13118 to fail instead. Reported by Vincent Pelletier
13119 <subdino2004@yahoo.fr>.
13121 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
13122 it is not allocated. Reported by Vincent Pelletier
13123 <subdino2004@yahoo.fr>.
13125 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
13126 output so the output looks better.
13128 2004-12-04 Marco Gerards <metgerards@student.han.nl>
13130 Modulize the partition map support and add support for the amiga
13133 * commands/ls.c: Include <grub/partition.h> instead of
13134 <grub/machine/partition.h>.
13135 * kern/disk.c: Likewise.
13136 * kern/rescue.c: Likewise.
13137 * loader/i386/pc/chainloader.c: Likewise.
13138 * normal/cmdline.c: Likewise.
13139 * kern/powerpc/ieee1275/init.c: Likewise.
13140 (grub_machine_init): Call `grub_pc_partition_map_init',
13141 `grub_amiga_partition_map_init' and
13142 `grub_apple_partition_map_init'.
13143 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
13144 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
13145 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
13146 `partition.h' and `pc_partition.h'.
13147 (grub_setup_SOURCES): Remove
13148 `disk/i386/pc/partition.c'. Add `kern/partition.c',
13149 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13150 (grub_emu_SOURCES): Likewise.
13151 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
13152 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
13153 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
13154 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13155 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
13156 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13157 (grubof_SOURCES): Likewise.
13158 * disk/i386/pc/partition.c: File removed.
13159 * disk/powerpc/ieee1275/partition.c: Likewise.
13160 * include/grub/powerpc/ieee1275/partition.h: Likewise.
13161 * include/grub/i386/pc/partition.h: Likewise.
13162 * kern/partition.c: New file.
13163 * partmap/amiga.c: Likewise.
13164 * partmap/apple.c: Likewise.
13165 * partmap/pc.c: Likewise.
13166 * include/grub/partition.h: Likewise..
13167 * include/grub/pc_partition.h: Likewise.
13168 * util/grub-emu.c: Include <grub/partition.h> instead of
13169 <grub/machine/partition.h>.
13170 (main): Call `grub_pc_partition_map_init',
13171 `grub_amiga_partition_map_init' and
13172 `grub_apple_partition_map_init' and deinitialize afterwards.
13173 * util/i386/pc/biosdisk.c: Include `#include
13174 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13175 `<grub/machine/partition.h>'.
13176 * util/i386/pc/grub-setup.c: Likewise.
13177 * util/i386/pc/biosdisk.c: Likewise.
13178 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
13179 partition information in case of a PC partition.
13180 * util/i386/pc/grub-setup.c: Include `#include
13181 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13182 `<grub/machine/partition.h>'.
13183 (setup): Only access the PC specific partition information in case
13186 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
13188 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
13189 (grub_longjmp): Likewise.
13190 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
13192 * normal/powerpc/setjmp.S: New file.
13193 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13194 `normal/powerpc/setjmp.S'.
13195 (grubof_CFLAGS): Add `-DGRUBOF'.
13196 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
13197 [GRUB_UTIL && !GRUBOF].
13199 2004-11-16 Marco Gerards <metgerards@student.han.nl>
13201 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
13202 property named `name'. Correctly handle the error returned by
13203 `grub_ieee1275_finddevice' if a device can not be opened.
13205 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
13207 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
13208 `actual' for negativity.
13209 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13212 2004-11-01 Marco Gerards <metgerards@student.han.nl>
13214 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
13215 (PAGE_OFFSET): New macro.
13216 (CRTC_ADDR_PORT): Likewise.
13217 (CRTC_DATA_PORT): Likewise.
13218 (START_ADDR_HIGH_REGISTER): Likewise.
13219 (START_ADDR_LOW_REGISTER): Likewise.
13220 (GRAPHICS_ADDR_PORT): Likewise.
13221 (GRAPHICS_DATA_PORT): Likewise.
13222 (READ_MAP_REGISTER): Likewise.
13223 (INPUT_STATUS1_REGISTER): Likewise.
13224 (INPUT_STATUS1_VERTR_BIT): Likewise.
13225 (page): New variable.
13226 (wait_vretrace): New function.
13227 (set_read_map): Likewise.
13228 (set_start_address): Likewise.
13229 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
13231 (check_vga_mem): Take the page into account.
13232 (write_char): Likewise.
13233 (write_cursor): Likewise.
13234 (scroll_up): Likewise. Copy the page to the page that is not
13235 shown and switch between both pages.
13236 (grub_vga_putchar): Fix off by one error.
13237 (grub_vga_cls): Wait for the vertical retrace. Take the page into
13240 2004-11-01 Marco Gerards <metgerards@student.han.nl>
13242 Add support for iso9660 (including rockridge).
13244 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13245 (iso9660_mod_SOURCES): New variable.
13246 (iso9660_mod_CFLAGS): Likewise.
13247 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13248 * include/grub/fs.h (grub_iso9660_init): New prototype.
13249 * util/grub-emu.c (main): Call `grub_iso9660_init'.
13250 * fs/iso9660.c: New file.
13252 * include/grub/misc.h (grub_strncat): New prototype.
13253 * kern/misc.c (grub_strncat): New function.
13255 * fs/hfs.c (grub_hfs_mount): Translate the error
13256 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
13257 * fs/jfs.c (grub_jfs_mount): Likewise.
13258 * fs/ufs.c (grub_ufs_mount): Likewise.
13260 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
13262 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
13263 which initialized BAT registers.
13264 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
13265 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13267 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
13268 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13270 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
13271 (grub_mapclaim): Likewise.
13272 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
13273 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
13276 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
13278 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
13279 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
13280 -ffreestanding and -msoft-float.
13282 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
13284 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
13285 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
13286 set in grub_ieee1275_flags.
13288 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
13290 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
13292 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
13293 grub_console_init first.
13294 Change the memory range used for grub_ieee1275_claim and
13295 grub_mm_init_region.
13296 Print an error message if the claim fails.
13297 Include <grub/misc.h>.
13299 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
13301 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
13302 Call grub_children_iterate for device nodes of type `scsi',
13304 (grub_ofdisk_open): Remove manual device alias resolution.
13305 Fix memory leak when device cannot be opened.
13306 * include/grub/powerpc/ieee1275/ieee1275.h
13307 (grub_children_iterate): New prototype.
13308 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
13310 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13311 Return -1 if args.size was -1.
13313 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
13315 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
13316 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
13317 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
13318 Open Firmware's memory for it; claim memory from _start to _end.
13319 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
13320 (_end): New extern.
13321 (_start): Zero BSS from __bss_start to _end.
13322 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13324 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
13326 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
13328 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
13329 -1 if args.base was -1.
13331 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
13333 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
13334 escape sequence instead of a literal ^L. Also call
13335 grub_ofconsole_gotoxy.
13337 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
13339 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
13340 void * arguments to grub_addr_t. All callers updated. Also make
13341 the `result' argument optional.
13342 (grub_ieee1275_release): change void * arguments to grub_addr_t.
13343 All callers updated.
13345 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
13347 * commands/ls.c (grub_ls_list_files): Use the string following the
13348 initial ')', if present, as the filesystem path.
13349 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
13351 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
13353 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
13355 Make the source code of the menu interface more readable.
13357 * normal/menu.c: Include grub/mm.h.
13358 (TERM_WIDTH): New macro.
13359 (TERM_HEIGHT): Likewise.
13360 (TERM_INFO_HEIGHT): Likewise.
13361 (TERM_MARGIN): Likewise.
13362 (TERM_SCROLL_WIDTH): Likewise.
13363 (TERM_TOP_BORDER_Y): Likewise.
13364 (TERM_LEFT_BORDER_X): Likewise.
13365 (TERM_BORDER_WIDTH): Likewise.
13366 (TERM_MESSAGE_HEIGHT): Likewise.
13367 (TERM_BORDER_HEIGHT): Likewise.
13368 (TERM_NUM_ENTRIES): Likewise.
13369 (TERM_FIRST_ENTRY_Y): Likewise.
13370 (TERM_ENTRY_WIDTH): Likewise.
13371 (TERM_CURSOR_X): Likewise.
13372 (draw_border): Use macros instead of magic numbers.
13373 (print_entry): Likewise.
13374 (print_entries): Likewise.
13375 (run_menu): Likewise. Also, handle the key 'e'.
13376 (run_menu_entry): Ignore empty command lines.
13377 (print_message): Added a new argument EDIT. If EDIT is true,
13378 print a different message.
13379 (init_page): Likewise.
13380 (edit_menu_entry): New function. Not implemented yet.
13382 2004-09-17 Marco Gerards <metgerards@student.han.nl>
13384 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
13385 can be loaded from normal mode.
13387 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
13389 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
13390 (multiboot_mod_CFLAGS): New variables.
13391 * loader/i386/pc/linux_normal.c: New file.
13392 * loader/i386/pc/multiboot_normal.c: Likewise.
13394 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
13395 attribute `unused'.
13397 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
13398 `fdiro' to read the mode information from instead of `diro'.
13400 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
13401 looking up a symlink.
13403 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
13405 * normal/command.c (grub_command_execute): Don't parse the
13406 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
13407 flags of the command.
13409 * normal/menu.c (grub_menu_run): Fix typo.
13411 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
13413 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
13415 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
13416 `y + 1' instead of `y - 1'.
13418 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
13420 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
13422 From Hollis Blanchard <hollis@penguinppc.org>:
13423 * kern/misc.c (memmove): New alias for grub_memmove.
13424 (memcmp): New alias for grub_memcmp.
13425 (memset): New alias for grub_memset.
13426 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13427 Change "int handle" to "grub_ieee1275_phandle_t handle".
13428 * include/grub/powerpc/ieee1275/ieee1275.h
13429 (grub_ieee1275_get_property): Likewise.
13431 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
13433 Added normal mode command `chainloader' as module chain.mod, which
13434 depends on normal.mod and _chain.mod.
13436 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
13437 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
13438 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
13440 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
13441 but arguments parsing moved to ...
13442 (grub_chainloader_cmd): ... here. New function.
13443 * include/grub/i386/pc/chainloader.h: New file.
13444 * loader/i386/pc/chainloader_normal.c: Likewise.
13446 2004-09-11 Marco Gerards <metgerards@student.han.nl>
13448 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
13449 (grub_mkimage_LDFLAGS): Likewise.
13450 (grub_emu_SOURCES): Likewise.
13451 (kernel_img_HEADERS): Added fshelp.h.
13452 * fs/ext2.c: Include <grub/fshelp.h>.
13453 (FILETYPE_REG): New macro.
13454 (FILETYPE_INO_REG): Likewise.
13455 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
13457 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
13459 (grub_fshelp_node): New struct.
13460 (grub_ext2_data): Added member `diropen'. Changed member `inode'
13462 (grub_ext2_get_file_block): Removed function.
13463 (grub_ext2_read_block): New function.
13464 (grub_ext2_read_file): Replaced parameter `data' by `node'.
13465 This function was written.
13466 (grub_ext2_mount): Read the root inode. Create a diropen struct.
13467 (grub_ext2_find_file): Removed function.
13468 (grub_ext2_read_symlink): New function.
13469 (grub_ext2_iterate_dir): Likewise.
13470 (grub_ext2_open): Rewritten.
13471 (grub_ext2_dir): Rewritten.
13472 * include/grub/fshelp.h: New file.
13473 * fs/fshelp.c: Likewise.
13475 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
13477 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
13478 (print_message): Add a missing newline.
13479 (run_menu): Added timeout support.
13480 (run_menu_entry): New local function.
13481 (grub_menu_run): Added support for booting.
13483 * kern/loader.c (grub_loader_is_loaded): New function.
13485 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
13486 (grub_get_rtc): Exported.
13488 * include/grub/i386/pc/time.h: Include grub/symbol.h.
13489 (grub_get_rtc): Exported.
13491 * include/grub/normal.h (struct grub_command_list): Remove
13492 constant from the member `command'.
13494 * include/grub/loader.h (grub_loader_is_loaded): Declared.
13496 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
13498 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
13500 2004-08-28 Marco Gerards <metgerards@student.han.nl>
13502 Add support for the JFS filesystem.
13504 * fs/jfs.c: New file.
13505 * include/grub/fs.h (grub_jfs_init): New prototype.
13506 (grub_jfs_fini): New prototype.
13507 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
13508 (grub_emu_SOURCES): Likewise.
13509 (pkgdata_MODULES): Add jfs.mod.
13510 (jfs_mod_SOURCES): New variable.
13511 (jfs_mod_CFLAGS): Likewise.
13512 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
13513 (grubof_SOURCES): Likewise.
13514 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
13516 * fs/fat.c (grub_fat_find_dir): Convert the filename little
13517 endian to the host endian.
13518 (grub_fat_utf16_to_utf8): Move function from there...
13519 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
13520 the endianness of the source string anymore.
13521 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
13523 2004-08-24 Marco Gerards <metgerards@student.han.nl>
13525 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
13526 (grub_boot_fini) [GRUB_UTIL]: Likewise.
13527 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
13528 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
13530 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
13531 (grub_hfs_iterate_dir): Make the function static. Add prototypes
13532 for `node_found' and `it_dir'.
13533 (grub_hfs_dir): Add prototype for `dir_hook'.
13535 * fs/minix.c (grub_minix_get_file_block): Add prototype for
13536 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
13537 and `indir32' to silence a gcc warning.
13539 * include/grub/fs.h (grub_hfs_init): New prototype.
13540 (grub_hfs_fini): Likewise.
13543 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13545 Each disk device has its own id now. This is useful to make use
13546 of multiple disk devices.
13548 * include/grub/disk.h (grub_disk_dev_id): New enum.
13549 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
13550 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
13552 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
13553 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13555 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
13556 GRUB_DISK_DEVICE_OFDISK_ID as an id.
13558 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
13559 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13561 * include/grub/disk.h (struct grub_disk_dev): Added a new member
13562 "id" which is used by the cache manager.
13564 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
13567 2004-08-18 Marco Gerards <metgerards@student.han.nl>
13569 * fs/hfs.c: New file.
13570 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
13571 (grub_emu_SOURCES): Likewise.
13572 (pkgdata_MODULES): Add hfs.mod.
13573 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
13574 (grubof_SOURCES): Likewise.
13575 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
13577 * include/grub/misc.h (grub_strncasecmp): Add prototype.
13578 * kern/misc.c (grub_strncasecmp): Add function.
13580 2004-08-14 Marco Gerards <metgerards@student.han.nl>
13582 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
13585 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
13586 (grub_ext2_dir): In case the directory entry type is unknown, read
13589 2004-08-02 Peter Bruin <pjbruin@dds.nl>
13591 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
13592 grub_load_linux instead of grub_rescue_cmd_linux as second
13593 argument of grub_rescue_register_command.
13595 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
13597 2004-07-27 Marco Gerards <metgerards@student.han.nl>
13599 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
13601 * commands/boot.c: Remove the check for `GRUB_UTIL'.
13602 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13603 `loader/powerpc/ieee1275/linux.c',
13604 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
13605 * include/grub/powerpc/ieee1275/ieee1275.h
13606 (grub_ieee1275_release): New prototype.
13607 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
13608 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
13609 normal, boot, linux and linux_normal.
13610 * loader/powerpc/ieee1275/linux.c: New file.
13611 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13613 2004-07-12 Marco Gerards <metgerards@student.han.nl>
13615 * normal/arg.c (grub_arg_parse): Correct error handling after
13616 reallocating the argumentlist (check if `argl' is not null instead
13617 of checking if `args' is not null).
13618 * kern/mm.c (grub_realloc): Return the same pointer when using the
13619 same region, instead of returning the header address.
13621 2004-07-11 Marco Gerards <metgerards@student.han.nl>
13623 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
13624 one block instead of two when looking for the initial partition.
13625 (grub_partition_probe): Initialize the local variable `p' with 0.
13626 Use base 10 for the grub_strtoul call.
13627 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
13628 need for one local variable.
13629 (grub_strtoul): Don't add the new value to `num', instead of that
13632 2004-07-11 Marco Gerards <metgerards@student.han.nl>
13634 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
13635 (pxeboot_img_SOURCES): New variable.
13636 (pxeboot_img_ASFLAGS): Likewise.
13637 (pxeboot_img_LDFLAGS): Likewise.
13638 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
13639 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
13640 <lode_leroy@hotmail.com>.
13642 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13644 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
13645 there was no input.
13647 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13649 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
13650 the history buffer logic.
13652 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13654 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
13655 (FILETYPE_INO_SYMLINK): New macros.
13656 (grub_ext2_find_file): Check if the node is a directory using the
13657 inode stat information instead of using the filetype in the
13658 dirent. Exclude the first character of an absolute symlink.
13659 (grub_ext2_dir): Mask out the filetype part of the mode member of
13662 2004-05-24 Marco Gerards <metgerards@student.han.nl>
13664 Add support for UFS version 1 and 2. Add support for the minix
13665 filesystem version 1 and 2, both the variants with 14 and 30 long
13668 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
13670 (grub_emu_SOURCES): Likewise.
13671 (pkgdata_MODULES): Add ufs.mod and minix.mod.
13672 (ufs_mod_SOURCES): New variable.
13673 (ufs_mod_CFLAGS): Likewise.
13674 (minix_mod_SOURCES): Likewise.
13675 (minix_mod_CFLAGS): Likewise.
13676 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
13678 (grubof_SOURCES): Likewise.
13679 * fs/ufs.c: New file.
13680 * fs/minix.c: New file.
13681 * include/grub/fs.h (grub_ufs_init): New prototype.
13682 (grub_ufs_fini): Likewise.
13683 (grub_minix_init): Likewise.
13684 (grub_minix_fini): Likewise.
13685 * util/grub-emu.c (main): Initialize and deinitialize UFS and
13688 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
13690 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
13691 commands/ls.c, commands/terminal.c, commands/boot.c,
13692 commands/cmp.c and commands/cat.c.
13693 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
13695 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
13698 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13700 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
13701 and grub_, respectively. Because the conversion is trivial and
13702 mechanical, I omit the details here. Please refer to the CVS
13703 if you need more information.
13705 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13707 * include/pupa: Renamed to ...
13708 * include/grub: ... this.
13709 * util/i386/pc/pupa-mkimage.c: Renamed to ...
13710 * util/i386/pc/grub-mkimage.c: ... this.
13711 * util/i386/pc/pupa-setup.c: Renamed to ...
13712 * util/i386/pc/grub-setup.c: ... this.
13713 * util/pupa-emu.c: Renamed to ...
13714 * util/grub-emu.c: ... this.
13716 2004-03-29 Marco Gerards <metgerards@student.han.nl>
13718 Add support for the newworld apple macintosh (PPC). This has been
13719 tested on the powerbook 2000 only. It only adds support for
13720 generic ieee1275 functions, console and disk support. This should
13721 be easy to port to other architectures with support for Open
13724 * configure.ac: Accept the powerpc as host_cpu. In the case of
13725 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
13726 specific tests are only executed while building for the i386.
13727 Inverse test for crosscompile.
13728 * genmk.rb (Utility): Allow assembler files.
13729 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
13730 * conf/powerpc-ieee1275.rmk: New file.
13731 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
13732 * disk/powerpc/ieee1275/partition.c: Likewise.
13733 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
13734 * include/pupa/powerpc/ieee1275/console.h: Likewise.
13735 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
13736 * include/pupa/powerpc/ieee1275/time.h: Likewise.
13737 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
13738 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
13739 * include/pupa/powerpc/ieee1275/loader.h
13740 * include/pupa/powerpc/setjmp.h: Likewise.
13741 * include/pupa/powerpc/types.h: Likewise.
13742 * kern/powerpc/ieee1275/init.c: Likewise.
13743 * kern/powerpc/ieee1275/openfw.c: Likewise.
13744 * term/powerpc/ieee1275/ofconsole.c: Likewise.
13746 These files were written by Johan Rydberg
13747 (jrydberg@night.trouble.net) and I only modified them slightly.
13749 * boot/powerpc/ieee1275/cmain.c: New file.
13750 * boot/powerpc/ieee1275/crt0.S: Likewise.
13751 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
13752 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
13754 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
13756 * Makefile.in: Update copyright.
13757 * genmodsrc.sh: Likewise.
13758 * gensymlist.sh: Likewise.
13759 * term/i386/pc/vga.c: Indent correctly.
13761 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
13762 bugreporting address.
13763 * util/i386/pc/pupa-setup.c (usage): Likewise,
13764 (main): Call pupa_ext2_init and pupa_ext2_fini.
13766 * fs/fat.c (log2): Renamed to ...
13767 (fat_log2): ... this.
13768 All callers changed.
13769 * kern/misc.c (memcpy): Alias to pupa_memmove.
13770 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
13772 * util/console.c (pupa_ncurses_fini): Return 0.
13774 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
13775 Move fail label here.
13776 [__GNU__]: Don't warn when using stat.
13777 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
13778 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
13779 long int. Use strtol instead of strtoul.
13781 2004-03-14 Marco Gerards <metgerards@student.han.nl>
13783 * commands/boot.c: New file.
13784 * commands/cat.c: Likewise.
13785 * commands/cmp.c: Likewise.
13786 * commands/ls.c: Likewise.
13787 * commands/terminal.c: Likewise.
13788 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
13789 (pupa_register_command): Changed interface to match the new
13791 (pupa_command_execute): Changed (almost rewritten) so it uses
13792 pupa_split_command. Added support for setting variables using the
13794 (rescue_command): Changed to work with the new argument parser.
13795 (terminal_command): Moved from here to commands/terminal.c.
13796 (set_command): New function.
13797 (unset_command): New function.
13798 (insmod_command): New function.
13799 (rmmod_command): New function.
13800 (lsmod_command): New function.
13801 (pupa_command_init): Don't initialize the command terminal
13802 anymore. Initialize the commands set, unset, insmod, rmmod and
13804 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
13805 (kernel_img_HEADERS): Add arg.h and env.h.
13806 (pupa_mkimage_LDFLAGS): Add kern/env.c.
13807 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
13808 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
13810 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
13812 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
13813 (boot_mod_SOURCES): New variable.
13814 (terminal_mod_SOURCES): Likewise.
13815 (ls_mod_SOURCES): Likewise.
13816 (cmp_mod_SOURCES): Likewise.
13817 (cat_mod_SOURCES): Likewise.
13819 * normal/arg.c: New file.
13820 * kern/env.c: Likewise.
13821 * include/pupa/arg.h: Likewise.
13822 * include/pupa/env.h: Likewise.
13823 * font/manager.c (font_command): Changed to match argument parsing
13825 (PUPA_MOD_INIT): Likewise.
13826 * hello/hello.c (pupa_cmd_hello): Likewise.
13827 (PUPA_MOD_INIT): Likewise.
13828 * include/pupa/disk.h: Include <pupa/device.h>.
13829 (pupa_print_partinfo): New prototype.
13830 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
13831 (pupa_dl_get_prefix): Likewise.
13832 * include/pupa/misc.h: Include <pupa/err.h>.
13833 (pupa_isgraph): New prototype.
13834 (pupa_isdigit): Likewise.
13835 (pupa_split_cmdline): Likewise.
13836 * include/pupa/normal.h: Include <pupa/arg.h>.
13837 (pupa_command): Changed the prototype of the member `func' to
13838 match the argument parsing interface. Added member `options'.
13839 (pupa_register_command): Updated to match function.
13840 (pupa_arg_parse): New prototype.
13841 (pupa_hello_init) [PUPA_UTIL]: New prototype.
13842 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
13843 (pupa_ls_init) [PUPA_UTIL]: Likewise.
13844 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
13845 (pupa_cat_init) [PUPA_UTIL]: Likewise.
13846 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
13847 (pupa_boot_init) [PUPA_UTIL]: Likewise.
13848 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
13849 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
13850 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
13851 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
13852 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
13853 * kern/disk.c: Include <pupa/file.h>.
13854 (pupa_print_partinfo): New function.
13855 * kern/dl.c: Include <pupa/env.h>.
13856 (pupa_dl_dir): Variable removed.
13857 (pupa_dl_load): Use the environment variable `prefix' instead of
13858 the variable pupa_dl_dir.
13859 (pupa_dl_set_prefix): Function removed.
13860 (pupa_dl_get_prefix): Likewise.
13861 * kern/i386/pc/init.c: Include <pupa/env.h>.
13862 (pupa_machine_init): Use the environment variable `prefix' instead of
13863 using pupa_dl_set_prefix to set the prefix.
13864 * kern/main.c: Include <pupa/env.h>.
13865 (pupa_set_root_dev): Use the environment variable `prefix' instead of
13866 using pupa_dl_get_prefix to get the prefix.
13867 * kern/misc.c: Include <pupa/env.h>.
13868 (pupa_isdigit): New function.
13869 (pupa_isgraph): Likewise.
13870 (pupa_ftoa): Likewise.
13871 (pupa_vsprintf): Added support for printing values of the type
13872 `double'. Make it possible to format variable output when using
13873 formatting like `%1.2%f'.
13874 (pupa_split_cmdline): New function.
13875 * kern/rescue.c: Include <pupa/env.h>.
13876 (next_word): Removed function.
13877 (pupa_rescue_cmd_prefix): Likewise.
13878 (pupa_rescue_cmd_set): New function.
13879 (pupa_rescue_cmd_unset): New function.
13880 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
13881 split the command line instead of splitting it here. Added
13882 support for setting variables using the syntax `foo=bar'. Don't
13883 initialize the prefix command anymore. Initialized the set and
13885 * normal/cmdline.c: Include <pupa/env.h>.
13886 (pupa_tab_complete): Added prototypes for print_simple_completion,
13887 print_partition_completion, add_completion, iterate_commands,
13888 iterate_dev, iterate_part and iterate_dir. Moved code to print
13889 partition information from here to kern/disk.c.
13890 (pupa_cmdline_run): Don't check if the function exists anymore.
13891 * normal/main.c: Include <pupa/env.h>.
13892 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
13893 instead of using pupa_dl_get_prefix to get the prefix.
13894 * term/i386/pc/vga.c: Include <pupa/arg.h>.
13895 (check_vga_mem): Cast pointers to `void *' to silence a gcc
13897 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
13898 (pupa_vga_setcolor): Declare unused variables with `__attribute__
13899 ((unused))' to silence a gcc warning.
13900 (pupa_vga_setcolor): Likewise.
13901 (debug_command): Changed to match argument parsing
13903 * util/pupa-emu.c: Include <pupa/env.h>.
13904 (options): Added 0's for unused fields to silence a gcc warning.
13906 (main): Use the environment variable `prefix' instead of using
13907 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
13908 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
13911 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
13912 * util/misc.c: Include <malloc.h>.
13913 (pupa_malloc): Rewritten so errors are correctly reported.
13914 (pupa_realloc): Likewise.
13915 (pupa_memalign): Likewise.
13916 (pupa_mm_init_region): Declare unused variables with
13917 `__attribute__ ((unused))' to silence a gcc warning.
13918 * normal/i386/setjmp.S: Remove tab at the end of the file to
13919 silence a gcc warning.
13920 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
13921 variables with `__attribute__ ((unused))' to silence a gcc
13923 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
13924 local variable i unsigned to silence a gcc warning.
13926 * kern/term.c: Include <pupa/misc.h>.
13927 (pupa_more_lines): New variable.
13928 (pupa_more): Likewise.
13929 (pupa_putcode): When the pager is active pause at the end of every
13931 (pupa_set_more): New function.
13932 * include/pupa/term.h (pupa_set_more): New prototype.
13935 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
13937 Now this project is GRUB 2 rather than PUPA. The location of
13938 the CVS repository was moved to GRUB's.
13940 * configure.ac: Use bug-grub as the reporting address.
13941 Use GRUB instead of PUPA.
13942 Change the version number to 1.90.
13944 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
13946 * genkernsyms.sh: Updated copyright information.
13947 * genmk.rb: Likewise.
13948 * genmodsrc.sh: Likewise.
13949 * gensymlist.sh: Likewise.
13950 * boot/i386/pc/boot.S: Likewise.
13951 * boot/i386/pc/diskboot.S: Likewise.
13952 * disk/i386/pc/biosdisk.c: Likewise.
13953 * disk/i386/pc/partition.c: Likewise.
13954 * font/manager.c: Likewise.
13955 * fs/ext2.c: Likewise.
13956 * fs/fat.c: Likewise.
13957 * include/pupa/boot.h: Likewise.
13958 * include/pupa/device.h: Likewise.
13959 * include/pupa/disk.h: Likewise.
13960 * include/pupa/dl.h: Likewise.
13961 * include/pupa/elf.h: Likewise.
13962 * include/pupa/err.h: Likewise.
13963 * include/pupa/file.h: Likewise.
13964 * include/pupa/font.h: Likewise.
13965 * include/pupa/fs.h: Likewise.
13966 * include/pupa/kernel.h: Likewise.
13967 * include/pupa/loader.h: Likewise.
13968 * include/pupa/misc.h: Likewise.
13969 * include/pupa/mm.h: Likewise.
13970 * include/pupa/net.h: Likewise.
13971 * include/pupa/normal.h: Likewise.
13972 * include/pupa/rescue.h: Likewise.
13973 * include/pupa/setjmp.h: Likewise.
13974 * include/pupa/symbol.h: Likewise.
13975 * include/pupa/term.h: Likewise.
13976 * include/pupa/types.h: Likewise.
13977 * include/pupa/i386/setjmp.h: Likewise.
13978 * include/pupa/i386/types.h: Likewise.
13979 * include/pupa/i386/pc/biosdisk.h: Likewise.
13980 * include/pupa/i386/pc/boot.h: Likewise.
13981 * include/pupa/i386/pc/console.h: Likewise.
13982 * include/pupa/i386/pc/init.h: Likewise.
13983 * include/pupa/i386/pc/kernel.h: Likewise.
13984 * include/pupa/i386/pc/linux.h: Likewise.
13985 * include/pupa/i386/pc/loader.h: Likewise.
13986 * include/pupa/i386/pc/memory.h: Likewise.
13987 * include/pupa/i386/pc/multiboot.h: Likewise.
13988 * include/pupa/i386/pc/partition.h: Likewise.
13989 * include/pupa/i386/pc/time.h: Likewise.
13990 * include/pupa/i386/pc/vga.h: Likewise.
13991 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
13992 * include/pupa/util/getroot.h: Likewise.
13993 * include/pupa/util/misc.h: Likewise.
13994 * include/pupa/util/resolve.h: Likewise.
13995 * kern/device.c: Likewise.
13996 * kern/disk.c: Likewise.
13997 * kern/dl.c: Likewise.
13998 * kern/err.c: Likewise.
13999 * kern/file.c: Likewise.
14000 * kern/fs.c: Likewise.
14001 * kern/loader.c: Likewise.
14002 * kern/main.c: Likewise.
14003 * kern/misc.c: Likewise.
14004 * kern/mm.c: Likewise.
14005 * kern/rescue.c: Likewise.
14006 * kern/term.c: Likewise.
14007 * kern/i386/dl.c: Likewise.
14008 * kern/i386/pc/init.c: Likewise.
14009 * kern/i386/pc/lzo1x.S: Likewise.
14010 * kern/i386/pc/startup.S: Likewise.
14011 * loader/i386/pc/chainloader.c: Likewise.
14012 * loader/i386/pc/linux.c: Likewise.
14013 * loader/i386/pc/multiboot.c: Likewise.
14014 * normal/cmdline.c: Likewise.
14015 * normal/command.c: Likewise.
14016 * normal/main.c: Likewise.
14017 * normal/menu.c: Likewise.
14018 * normal/i386/setjmp.S: Likewise.
14019 * term/i386/pc/console.c: Likewise.
14020 * term/i386/pc/vga.c: Likewise.
14021 * util/console.c: Likewise.
14022 * util/genmoddep.c: Likewise.
14023 * util/misc.c: Likewise.
14024 * util/pupa-emu.c: Likewise.
14025 * util/resolve.c: Likewise.
14026 * util/unifont2pff.rb: Likewise.
14027 * util/i386/pc/biosdisk.c: Likewise.
14028 * util/i386/pc/getroot.c: Likewise.
14029 * util/i386/pc/pupa-mkimage.c: Likewise.
14030 * util/i386/pc/pupa-setup.c: Likewise.
14032 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
14034 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
14035 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
14036 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
14037 reading and reset it after reading.
14038 (pupa_ext2_close): Return PUPA_ERR_NONE.
14040 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
14042 (struct linux_kernel_header): Add kernel_version and
14044 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
14045 pupa_file_read succeeds.
14046 (pupa_rescue_cmd_initrd): Implement.
14048 2003-12-03 Marco Gerards <metgerards@student.han.nl>
14050 * fs/ext2.c (pupa_ext2_label): New function.
14051 (pupa_ext2_fs): Added label.
14052 * fs/fat.c (pupa_fat_label): New function.
14053 (pupa_fat_fs): Added label.
14054 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
14056 * kern/misc.c (pupa_strndup): New function.
14057 * include/pupa/misc.h (pupa_strndup): New prototype.
14059 * include/pupa/normal.h: Include <pupa/err.h>.
14060 (pupa_set_history): New prototype.
14061 (pupa_iterate_commands): New prototype.
14062 * normal/cmdline.c: Include <pupa/machine/partition.h>,
14063 <pupa/disk.h>, <pupa/file.h>.
14064 (hist_size): New variable.
14065 (hist_lines): Likewise.
14066 (hist_end): Likewise.
14067 (hist_used): Likewise.
14068 (pupa_set_history): New function.
14069 (pupa_history_get): Likewise.
14070 (pupa_history_add): Likewise.
14071 (pupa_history_replace): Likewise.
14072 (pupa_tab_complete): Likewise.
14073 (pupa_cmdline_run): Added tab completion and history buffer. Tab
14074 completion shows partitionnames while completing partitions, this
14075 feature was suggested by Jeff Bailey.
14076 * normal/command.c (pupa_iterate_commands): New function.
14077 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
14078 (pupa_normal_init): Initialize history buffer.
14079 (PUPA_MOD_INIT): Likewise.
14080 (pupa_normal_fini): Free the history buffer.
14081 (PUPA_MOD_FINI): Likewise.
14083 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
14086 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
14087 * configure.ac [i386]: Check for regparam bug.
14088 (NESTED_FUNC_ATTR) [! i386]: Defined.
14090 2003-11-17 Marco Gerards <metgerards@student.han.nl>
14092 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
14093 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
14094 (pupa_emu_SOURCES): New variable.
14095 (pupa_emu_LDFLAGS): Likewise.
14096 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
14097 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
14098 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
14099 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14100 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
14101 (pupa_jmp_buf): New typedef.
14102 (pupa_setjmp) [PUPA_UTIL]: New macro.
14103 (pupa_longjmp) [PUPA_UTIL]: Likewise.
14104 * include/pupa/term.h (struct pupa_term): New member `refresh'.
14105 (pupa_refresh): New prototype.
14106 * include/pupa/util/getroot.h: New file.
14107 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
14109 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
14110 (pupa_rescue_cmd_cat): Likewise.
14111 (pupa_rescue_cmd_ls): Likewise.
14112 (pupa_rescue_cmd_testload): Likewise.
14113 (pupa_rescue_cmd_lsmod): Likewise.
14114 * normal/cmdline.c (pupa_cmdline_get): Likewise.
14115 * normal/menu.c (run_menu): Likewise.
14116 * kern/term.c (pupa_cls): Likewise.
14117 (pupa_refresh): New function.
14118 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
14119 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14120 * util/console.c: New file.
14122 * util/i386/pc/getroot.c: New file.
14123 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
14124 (pupa_putchar): New function.
14125 (pupa_refresh): Likewise.
14126 (xgetcwd): Function moved to ...
14127 (strip_extra_slashes): Likewise.
14128 (get_prefix): Likewise.
14129 * util/i386/pc/getroot.c: ... here.
14130 (find_root_device): Function moved and renamed to...
14131 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
14132 Changed all callers.
14133 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
14135 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
14136 Changed all callers.
14137 * util/misc.c (pupa_memalign): New function.
14138 (pupa_mm_init_region): Likewise.
14139 (pupa_register_exported_symbols): Likewise.
14140 (pupa_putchar): Function removed.
14141 * util/pupa-emu.c: New file.
14143 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
14145 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
14146 (_multiboot_mod_SOURCES): New variable.
14147 (_multiboot_mod_CFLAGS): Likewise.
14148 * loader/i386/pc/multiboot.c: New file.
14149 * include/pupa/i386/pc/multiboot.h: Likewise.
14150 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
14151 (pupa_multiboot_real_boot): New function.
14152 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
14153 (pupa_multiboot_real_boot): New prototype.
14154 (pupa_rescue_cmd_multiboot): Likewise
14155 (pupa_rescue_cmd_module): Likewise.
14157 * kern/loader.c (pupa_loader_set): Continue when
14158 pupa_loader_unload_func() fails.
14159 (pupa_loader_unset): New function.
14160 * include/pupa/loader.h (pupa_loader_unset): New prototype.
14162 * kern/misc.c (pupa_stpcpy): New function.
14163 * include/pupa/misc.h (pupa_stpcpy): New prototype.
14165 2003-11-12 Marco Gerards <metgerards@student.han.nl>
14167 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
14168 for available extensions.
14170 * include/pupa/i386/pc/time.h: New file.
14171 * kern/disk.c: Include <pupa/machine/time.h>.
14172 (PUPA_CACHE_TIMEOUT): New macro.
14173 (pupa_last_time): New variable.
14174 (pupa_disk_open): Flush the cache when there was a timeout.
14175 (pupa_disk_close): Reset the timer.
14176 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
14178 * util/misc.c: Include <sys/times.h>
14179 (pupa_get_rtc): New function.
14181 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
14183 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
14185 (pupa_ext2_get_file_block): Use blocks member.
14187 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
14188 first block. Return -1 instead of pupa_errno on error.
14190 2003-10-27 Marco Gerards <metgerards@student.han.nl>
14192 * README: In the pupa-mkimage example use _chain instead of chain
14193 and ext2 instead of fat.
14194 * TODO: Replace ext2fs with jfs as an example. Add an item for
14195 adding journal playback for ext2fs.
14196 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
14197 (pkgdata_MODULES): Added ext2.mod.
14198 (ext2_mod_SOURCES): New variable.
14199 (ext2_mod_CFLAGS): Likewise.
14200 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
14201 * include/pupa/misc.h (pupa_strncpy): New prototype.
14202 (pupa_strcat): Likewise.
14203 (pupa_strncmp): Likewise.
14204 * kern/misc.c (pupa_strcat): Enable function.
14205 (pupa_strncpy): New function.
14206 (pupa_strncmp): Likewise.
14207 * fs/ext2.c: New file.
14209 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
14210 when the read failed before retrying.
14211 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
14212 (_FILE_OFFSET_BITS): Likewise.
14213 * configure.ac: Added AC_SYS_LARGEFILE.
14215 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
14217 * genmk.rb (PModule#rule): Make sure to get only symbol names
14218 from the output of nm.
14219 Reported by Robert Millan <zeratul2@wanadoo.es>.
14221 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
14223 I forgot to check in these changes for a long time. This adds
14224 incomplete support for VGA console, and this is still very
14225 buggy. Also, a lot of consideration is required for I18N,
14226 UNICODE, and VGA font issues. Therefore, assume that this is
14227 such that "better than nothing".
14229 * font/manager.c: New file.
14230 * include/pupa/font.h: Likewise.
14231 * include/pupa/i386/pc/vga.h: Likewise.
14232 * term/i386/pc/vga.c: Likewise.
14233 * util/unifont2pff.rb: Likewise.
14235 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
14236 (pkgdata_MODULES): Added vga.mod and font.mod.
14237 (vga_mod_SOURCES): New variables.
14238 (vga_mod_CFLAGS): Likewise.
14239 (font_mod_SOURCES): Likewise.
14240 (font_mod_CFLAGS): Likewise.
14242 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
14244 * include/pupa/term.h: Include pupa/err.h.
14245 (struct pupa_term): Added init and fini.
14246 Changed the argument of putchar to pupa_uint32_t.
14248 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
14249 (pupa_console_real_putchar): New prototype.
14250 (pupa_console_putchar): Removed.
14251 (pupa_console_checkkey): Exported.
14252 (pupa_console_getkey): Likewise.
14254 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
14257 * kern/term.c (pupa_term_set_current): Rewritten.
14258 (pupa_putchar): Likewise.
14259 (pupa_putcode): New function.
14261 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
14262 (pupa_console_real_putchar): ... this.
14263 (pupa_vga_set_mode): New function.
14264 (pupa_vga_get_font): Likewise.
14266 * normal/command.c: Include pupa/term.h.
14267 (terminal_command): New function.
14268 (pupa_command_init): Register the command "terminal".
14270 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
14271 (DISP_UP): Likewise.
14272 (DISP_RIGHT): Likewise.
14273 (DISP_DOWN): Likewise.
14274 (DISP_HLINE): Likewise.
14275 (DISP_VLINE): Likewise.
14276 (DISP_UL): Likewise.
14277 (DISP_UR): Likewise.
14278 (DISP_LL): Likewise.
14279 (DISP_LR): Likewise.
14281 * term/i386/pc/console.c (pupa_console_putchar): New function.
14283 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
14285 * util/resolve.c (pupa_util_resolve_dependencies): BUG
14286 FIX. Reverse the path_list.
14288 * include/pupa/normal.h: Export pupa_register_command and
14289 pupa_unregister_command.
14291 * hello/hello.c (pupa_cmd_hello): New module.
14292 * conf/i386-pc.rmk: Added hello.mod.
14294 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
14296 * kern/i386/pc/lzo1x.S: New file.
14298 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
14299 (compress_kernel): New variable.
14300 (generate_image): Heavily modified to support compressing a
14301 large part of the core image.
14303 * util/misc.c (pupa_util_read_image): Fix a file descriptor
14305 (pupa_util_load_image): New function.
14307 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
14308 (pupa_compressed_size): New variable.
14309 (codestart): Enable Gate A20 here.
14310 Decompress the compressed part of the core image.
14311 Rearrange the code to put functions and variables which are
14312 required for initialization in the non-compressed part.
14315 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
14318 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
14320 * include/pupa/i386/pc/kernel.h
14321 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
14322 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
14323 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14324 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14325 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
14327 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
14329 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
14330 (Utility#rule): Likewise.
14332 * configure.ac: Check if LZO is available.
14334 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
14336 * include/pupa/normal.h: New file.
14337 * include/pupa/setjmp.h: Likewise.
14338 * include/pupa/i386/setjmp.h: Likewise.
14339 * normal/cmdline.c: Likewise.
14340 * normal/command.c: Likewise.
14341 * normal/main.c: Likewise.
14342 * normal/menu.c: Likewise.
14343 * normal/i386/setjmp.S: Likewise.
14345 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
14346 (pupa_rescue_cmd_initrd): Likewise.
14348 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
14351 * kern/i386/pc/startup.S (translation_table): New variable.
14352 (translate_keycode): New function.
14353 (pupa_console_getkey): Call translate_keycode.
14355 * kern/rescue.c (attempt_normal_mode): New function.
14356 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
14357 it failed, print a message.
14359 * kern/mm.c (pupa_real_malloc): Print more information when a
14360 free magic is broken.
14361 (pupa_free): If the first free header is not free actually, set
14364 * kern/main.c (pupa_load_normal_mode): Just load the module
14366 (pupa_main): Don't print the message
14367 "Entering into rescue mode..." here.
14369 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
14371 (pupa_rescue_cmd_initrd): Likewise.
14372 (pupa_rescue_cmd_initrd): Likewise.
14374 * include/pupa/symbol.h (FUNCTION): Specify the type.
14375 (VARIABLE): Likewise.
14377 * include/pupa/err.h (pupa_err_t): Added
14378 PUPA_ERR_UNKNOWN_COMMAND.
14380 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
14381 (pupa_dl_get_prefix): Likewise.
14383 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
14384 Added _chain.mod and _linux.mod instead of chain.mod and
14386 (chain_mod_SOURCES): Renamed to ...
14387 (_chain_mod_SOURCES): ... this.
14388 (chain_mod_CFLAGS): Renamed to ...
14389 (_chain_mod_CFLAGS): ... this.
14390 (linux_mod_SOURCES): Renamed to ...
14391 (_linux_mod_SOURCES): ... this.
14392 (linux_mod_CFLAGS): Renamed to ...
14393 (_linux_mod_CFLAGS): ... this.
14394 (normal_mod_SOURCES): New variable.
14395 (normal_mod_CFLAGS): Likewise.
14396 (normal_mod_ASFLAGS): Likewise.
14398 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
14400 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
14403 * kern/dl.c (pupa_dl_ref): Refer depending modules
14405 (pupa_dl_unref): Unrefer depending modules recursively.
14406 Don't call pupa_dl_unload implicitly, because PUPA can crash if
14407 a module is unloaded before one depending on that module is
14409 (pupa_dl_unload): Unload depending modules explicitly,
14412 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
14414 * include/pupa/i386/pc/linux.h: New file.
14415 * loader/i386/pc/linux.c: Likewise.
14417 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
14419 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
14420 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
14421 of PUPA_CHAINLOADER_BOOT_SECTOR.
14423 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
14424 (pupa_linux_prot_size): New variable.
14425 (pupa_linux_tmp_addr): Likewise.
14426 (pupa_linux_real_addr): Likewise.
14427 (pupa_linux_boot_zimage): New function.
14428 (pupa_linux_boot_bzimage): Likewise.
14430 * kern/i386/pc/init.c (struct mem_region): New structure.
14431 (MAX_REGIONS): New macro.
14432 (mem_regions): New variable.
14433 (num_regions): Likewise.
14434 (pupa_os_area_addr): Likewise.
14435 (pupa_os_area_size): Likewise.
14436 (pupa_lower_mem): Likewise.
14437 (pupa_upper_mem): Likewise.
14438 (add_mem_region): New function.
14439 (compact_mem_regions): Likewise.
14440 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
14441 the size of the conventional memory and that of so-called upper
14442 memory (before the first memory hole).
14443 Instead of adding each found region to free memory, use
14444 add_mem_region and add them after removing overlaps.
14445 Also, add only 1/4 of the upper memory to free memory. The rest
14446 is used for loading OS images. Maybe this is ad hoc, but this
14447 makes it much easier to relocate OS images when booting.
14449 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
14450 (pupa_enter_rescue_mode): Don't register initrd and module.
14452 * kern/mm.c: Include pupa/dl.h.
14454 * kern/main.c: Include pupa/file.h and pupa/device.h.
14456 * kern/loader.c (pupa_loader_load_module_func): Removed.
14457 (pupa_loader_load_module): Likewise.
14459 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
14462 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
14463 (pupa_linux_tmp_addr): Likewise.
14464 (pupa_linux_real_addr): Likewise.
14465 (pupa_linux_boot_zimage): Likewise.
14466 (pupa_linux_boot_bzimage): Likewise.
14468 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
14469 (pupa_upper_mem): Likewise.
14470 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
14471 module is too dangerous.
14473 * include/pupa/loader.h (pupa_os_area_addr): Declared.
14474 (pupa_os_area_size): Likewise.
14475 (pupa_loader_set): Remove the first argument. Loader doesn't
14476 manage modules or initrd any longer.
14477 (pupa_loader_load_module): Removed.
14479 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
14480 (linux_mod_SOURCES): New variable.
14481 (linux_mod_CFLAGS): Likewise.
14483 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
14485 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
14486 the length of a blocklist correctly.
14488 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
14489 Use ioctl only if the OS file is a block device.
14490 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
14491 not very useful for normal files.
14493 * kern/main.c (pupa_set_root_dev): New function.
14494 (pupa_load_normal_mode): Likewise.
14495 (pupa_main): Call those above.
14497 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
14500 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
14502 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
14504 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
14505 (setup): Configure the installed partition information and the
14508 * loader/i386/pc/chainloader.c (my_mod): New variable.
14509 (pupa_chainloader_unload): New function.
14510 (pupa_rescue_cmd_chainloader): Refer itself.
14511 (PUPA_MOD_INIT): Save its own module in MY_MOD.
14513 * kern/i386/pc/startup.S (install_partition): Removed.
14514 (version_string): Likewise.
14515 (config_file): Likewise.
14516 (pupa_install_dos_part): New variable.
14517 (pupa_install_bsd_part): Likewise.
14518 (pupa_prefix): Likewise.
14519 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
14521 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
14523 (make_install_device): New function.
14524 (pupa_machine_init): Set the dl prefix.
14526 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
14527 (buf): Renamed to ...
14528 (linebuf): ... this.
14529 (pupa_rescue_cmd_prefix): New function.
14530 (pupa_rescue_cmd_insmod): Likewise.
14531 (pupa_rescue_cmd_rmmod): Likewise.
14532 (pupa_rescue_cmd_lsmod): Likewise.
14533 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
14536 * kern/mm.c (pupa_memalign): If failed even after invalidating
14537 disk caches, unload unneeded modules and retry.
14539 * kern/misc.c (pupa_memmove): New function.
14540 (pupa_memcpy): Removed.
14541 (pupa_strcpy): New function.
14542 (pupa_itoa): Made static.
14544 * kern/dl.c (pupa_dl_iterate): New function.
14545 (pupa_dl_ref): Likewise.
14546 (pupa_dl_unref): Likewise.
14547 (pupa_dl_unload): Return if succeeded or not.
14548 (pupa_dl_unload_unneeded): New function.
14549 (pupa_dl_unload_all): Likewise.
14550 (pupa_dl_init): Renamed to ...
14551 (pupa_dl_set_prefix): ... this.
14552 (pupa_dl_get_prefix): New function.
14554 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
14555 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
14556 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14557 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14558 (pupa_install_dos_part): Declared.
14559 (pupa_install_bsd_part): Likewise.
14560 (pupa_prefix): Likewise.
14561 (pupa_boot_drive): Likewise.
14563 * include/pupa/types.h: Fix a typo.
14565 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
14567 (pupa_memmove): Declared.
14568 (pupa_strcpy): Likewise.
14570 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
14571 pupa_mod_init takes one argument, its own module.
14572 (pupa_dl_unload_unneeded): Declared.
14573 (pupa_dl_unload_all): Likewise.
14574 (pupa_dl_ref): Likewise.
14575 (pupa_dl_unref): Likewise.
14576 (pupa_dl_iterate): Likewise.
14577 (pupa_dl_init): Renamed to ...
14578 (pupa_dl_set_prefix): ... this.
14579 (pupa_dl_get_prefix): Declared.
14581 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
14582 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
14584 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
14585 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
14587 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
14588 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
14590 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14592 * util/i386/pc/pupa-setup.c (setup): Define the internal
14593 function find_first_partition_start at the top level, because GCC
14594 3.0.x cannot compile internal functions in deeper scopes
14596 (find_root_device): Use lstat instead of stat.
14597 Don't follow symbolic links.
14598 Fix the path-constructing code.
14600 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
14601 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
14602 by a BLKGETSIZE ioctl first, because block devices don't fill
14603 the member st_mode of the structure stat on Linux.
14604 [__linux__] (linux_find_partition): Use a temporary buffer
14605 REAL_DEV for the working space. Copy it to DEV before returning.
14606 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
14607 buffer cache consistent.
14608 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
14609 strncmp. The previous value was merely wrong.
14610 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
14612 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
14613 FAT size is 12. The previous value was merely wrong.
14615 * kern/main.c (pupa_main): Don't split the starting message from
14618 * kern/term.c (pupa_putchar): Put CR after LF instead of before
14619 LF, because BIOS goes crazy about character attributes in this
14622 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14624 * include/i386/pc/util/biosdisk.h: New file.
14625 * util/i386/pc/biosdisk.c: Likewise.
14626 * util/i386/pc/pupa-setup.c: Likewise.
14628 * Makefile.in (INCLUDE_DISTFILES): Added
14629 include/pupa/i386/pc/util/biosdisk.h.
14630 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
14631 directory util/i386/pc.
14632 (install-local): Added a rule for sbin_UTILITIES.
14633 (uninstall): Likewise.
14635 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
14637 * util/misc.c (xrealloc): New function.
14638 (pupa_malloc): Likewise.
14639 (pupa_free): Likewise.
14640 (pupa_realloc): Likewise.
14641 (pupa_stop): Likewise.
14642 (pupa_putchar): Likewise.
14644 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
14646 * include/pupa/util/misc.h (xrealloc): Declared.
14648 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
14650 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
14651 (PUPA_BOOT_MACHINE_BPB_END): ... this.
14653 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
14654 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14656 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
14657 way should be implemented.
14658 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14660 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
14661 the size of NAME for safety.
14662 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
14665 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
14666 (pupa_setup_SOURCES): Likewise.
14668 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
14670 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14672 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
14673 bunch of pushl's from pusha, because this destroys the return
14676 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14678 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
14679 This means that any missing prototypes could be fatal. Also, you
14680 must take care when writing assembly code. See the comments at
14681 the beginning of startup.S, for more details.
14683 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
14684 compilation mechanism.
14685 (pupa_chainloader_real_boot): Likewise.
14686 (pupa_biosdisk_rw_int13_extensions): Likewise.
14687 (pupa_biosdisk_rw_standard): Likewise.
14688 (pupa_biosdisk_check_int13_extensions): Likewise.
14689 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
14690 (pupa_biosdisk_get_diskinfo_standard): Likewise.
14691 (pupa_get_memsize): Likewise.
14692 (pupa_get_mmap_entry): Likewise.
14693 (pupa_console_putchar): Likewise.
14694 (pupa_console_setcursor): Likewise.
14695 (pupa_getrtsecs): Use pushl instead of push.
14697 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
14698 memory instead of the stack for a mmap entry, because some
14699 BIOSes may ignore the maximum size and overflow.
14701 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
14703 * genmk.rb (PModule#rule): Compile automatically generated
14704 sources with module-specific CFLAGS as well as other sources.
14706 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14708 * configure.ac: Check ld.
14709 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
14710 respectively, before checking endianness and sizes.
14712 * Makefile.in (LD): New variable.
14714 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14716 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
14718 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14720 * Changelog: New file.