2009-03-18 Robert Millan <rmh@aybabtu.com>
[grub2/phcoder/solaris.git] / ChangeLog
blob6c94b93a2449b7e155d611f80261af68985e2f24
1 2009-03-18  Robert Millan  <rmh@aybabtu.com>
3         * loader/i386/linux.c: Include `<grub/video.h>' and
4         `<grub/i386/pc/vbe.h>'..
5         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
6         (grub_linux32_boot): Attempt to configure video settings with
7         grub_linux_setup_video().
8         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
9         to avoid grub_console_fini() which would step out of graphical mode
10         unconditionally.
12 2009-03-14  Robert Millan  <rmh@aybabtu.com>
14         Fix build on powerpc.
15         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
17 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
19         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
20         background image command.
22 2009-03-12  Colin D Bennett  <colin@gibibit.com>
24         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
25         (grub_gfxterm_putchar): Extract pairs of identical calls to
26         draw_cursor out of conditional blocks.
28 2009-03-11  Pavel Roskin  <proski@gnu.org>
30         * fs/hfs.c (grub_hfs_strncasecmp): New function.
31         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
33 2009-03-11  Robert Millan  <rmh@aybabtu.com>
35         * loader/i386/multiboot_elfxx.c
36         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
38 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
40         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
41         `kern/handler.c'.
43 2009-03-11  Robert Millan  <rmh@aybabtu.com>
45         * loader/i386/multiboot.c (code_size): New variable.
46         (grub_multiboot): Define offsets by adding to `code_size' rather
47         than substracting from `grub_multiboot_payload_size'.  Provide
48         4-byte alignment to MBI and others by increasing
49         `boot_loader_name_length' appropiately.
51         * loader/i386/multiboot_elfxx.c
52         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
54 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
56         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
57         `fs/ext2.c'.
59 2009-03-08  Robert Millan  <rmh@aybabtu.com>
61         Make loader/i386/linux.c usable on i386-pc again.
63         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
64         memory to heap.
65         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
66         `#error' stanza.
68 2009-03-07  Bean  <bean123ch@gmail.com>
70         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
71         allocation.
73 2009-03-06  Robert Millan  <rmh@aybabtu.com>
75         Fix display issue on terminals with screen size other than 80x25
76         (e.g. gfxterm with resolution higher than 640x480).
78         * normal/main.c (grub_normal_init_page): Display title text in a
79         position relative to the center of the terminal instead of reliing
80         on a hardcoded offset.
82 2009-03-04  Robert Millan  <rmh@aybabtu.com>
84         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
85         installed.
87         * Makefile.in (host_kernel): New variable.
88         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
89         scripts instead of just the windows one.
90         * configure.ac: Initialize and AC_SUBST `host_kernel'.
92 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
94         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
95         `kern/handler.c'.
96         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
97         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
98         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
99         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
100         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
101         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
103 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
105         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
106         or if there's no space for the disk label and print the partition number on a
107         invalid magic.
109 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
111         * util/misc.c: Include <time.h>.
112         (grub_millisleep): New function.
114 2009-03-04  Bean  <bean123ch@gmail.com>
116         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
117         another option -mno-red-zone.
119         * commands/handler.c: Change module description.
121         * kern/handler.c: Add missing space at the end of description line.
123         * kern/list.c: Likewise.
125 2009-03-03  Robert Millan  <rmh@aybabtu.com>
127         Move more components to the relocation area, and fix mbi pointer
128         handling to use the destination rather than the origin (thanks to
129         Vladimir Serbinenko for spotting).
131         * loader/i386/multiboot.c (mbi_dest): New variable.
132         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
133         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
134         relocation area.
136 2009-03-01  Bean  <bean123ch@gmail.com>
138         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
139         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
140         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
141         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
143         * loader/i386/efi/linux.c (acpi_guid): New variable.
144         (acpi_guid): Likewise.
145         (EBDA_SEG_ADDR): New constant.
146         (LOW_MEM_ADDR): Likewise.
147         (FAKE_EBDA_SEG): Likewise.
148         (fake_bios_data): New function.
149         (grub_linux_boot): Call fake_bios_data.
151 2009-03-01  Bean  <bean123ch@gmail.com>
153         * commands/terminal.c: Removed.
155         * commands/handler.c: New file.
157         * include/grub/list.h: Likewise.
159         * include/grub/handler.h: Likewise.
161         * kern/list.c: Likewise.
163         * kern/handler.c: Likewise.
165         * kern/term.h: Include header file <grub/handler.h>.
166         (grub_term_input): Move next field to the beginning.
167         (grub_term_output): Likewise.
168         (grub_term_input_class): New variable.
169         (grub_term_output_class): Likewise.
170         (grub_term_register_input): Changed to inline function.
171         (grub_term_register_output): Likewise.
172         (grub_term_unregister_input): Likewise.
173         (grub_term_unregister_output): Likewise.
174         (grub_term_set_current_input): Likewise.
175         (grub_term_set_current_output): Likewise.
176         (grub_term_get_current_input): Likewise.
177         (grub_term_get_current_output): Likewise.
178         (grub_term_iterate_input): Removed.
179         (grub_term_iterate_output): Likewise.
181         * kern/term.c (grub_term_list_input): Removed.
182         (grub_term_list_output): Likewise.
183         (grub_term_input_class): New variable.
184         (grub_term_output_class): Likewise.
185         (grub_cur_term_input): Change variable as macro.
186         (grub_cur_term_output): Likewise.
187         (grub_term_register_input): Removed.
188         (grub_term_register_output): Likewise.
189         (grub_term_unregister_input): Likewise.
190         (grub_term_unregister_output): Likewise.
191         (grub_term_set_current_input): Likewise.
192         (grub_term_set_current_output): Likewise.
193         (grub_term_iterate_input): Likewise.
194         (grub_term_iterate_output): Likewise.
195         (grub_term_get_current_input): Likewise.
196         (grub_term_get_current_output): Likewise.
198         * util/grub-editenv.c: Include header file <grub/handler.h>.
199         (grub_term_get_current_input): Removed.
200         (grub_term_get_current_output): Likewise.
201         (grub_term_input_class): New variable.
202         (grub_term_output_class): Likewise.
204         * util/grub-fstest.c (grub_term_get_current_input): Removed.
205         (grub_term_get_current_output): Likewise.
206         (grub_term_input_class): New variable.
207         (grub_term_output_class): Likewise.
209         * util/grub-probe.c (grub_term_get_current_input): Removed.
210         (grub_term_get_current_output): Likewise.
211         (grub_term_input_class): New variable.
212         (grub_term_output_class): Likewise.
214         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
215         (grub_term_get_current_output): Likewise.
216         (grub_term_input_class): New variable.
217         (grub_term_output_class): Likewise.
219         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
220         (terminal_mod_SOURCES): Likewise.
221         (terminal_mod_CFLAGS): Likewise.
222         (terminal_mod_LDFLAGS): Likewise.
224         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
225         handler.c.
226         (kernel_img_SOURCES): Add list.c and handler.c.
227         (kernel_img_HEADERS): Add list.h and handler.h.
229         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
230         handler.c.
231         (kernel_mod_SOURCES): Add list.c and handler.c.
232         (kernel_mod_HEADERS): Add list.h and handler.h.
234         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
235         handler.c.
236         (kernel_elf_SOURCES): Add list.c and handler.c.
237         (kernel_elf_HEADERS): Add list.h and handler.h.
239         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
240         handler.c.
241         (kernel_elf_SOURCES): Add list.c and handler.c.
242         (kernel_elf_HEADERS): Add list.h and handler.h.
244         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
245         handler.c.
246         (kernel_mod_SOURCES): Add list.c and handler.c.
247         (kernel_mod_HEADERS): Add list.h and handler.h.
249         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
250         handler.c.
251         (kernel_elf_SOURCES): Add list.c and handler.c.
252         (kernel_elf_HEADERS): Add list.h and handler.h.
254 2009-02-27  Robert Millan  <rmh@aybabtu.com>
256         Factorize elf32 / elf64 code in Multiboot loader.  This will
257         prevent it from getting out of sync again.
259         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
260         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
261         grub_multiboot_load_elf64): Move from here ...
262         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
263         grub_multiboot_load_elf): ... to here (new file).
265 2009-02-27  Robert Millan  <rmh@aybabtu.com>
267         * util/grub.d/10_linux.in: Rename "single-user mode" to
268         "recovery mode".
270 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
272         Don't leak in SCSI code.
273         * disk/scsi.c (grub_scsi_close): free `scsi'.
275 2009-02-27  Robert Millan  <rmh@aybabtu.com>
277         * loader/i386/pc/multiboot.c: Move from here ...
278         * loader/i386/multiboot.c: ... to here.  Update all users.
280 2009-02-27  Robert Millan  <rmh@aybabtu.com>
282         Patch from Alexandre Bique <bique.alexandre@gmail.com>
283         * util/i386/pc/grub-setup.c (setup): Fix directory path.
285 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
287         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
288         b-tree.
290 2009-02-27  Robert Millan  <rmh@aybabtu.com>
292         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
293         `0x' qualifier as 0 when base is specified as parameter).
295 2009-02-24  Bean  <bean123ch@gmail.com>
297         * configure.ac: Check for -mcmodel=large in x86_64 target.
299         * include/grub/efi/api.h (efi_call_10): New macro.
300         (efi_wrap_10): New function.
302         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
303         (GRUB_PE32_REL_BASED_HIGH): Likewise.
304         (GRUB_PE32_REL_BASED_LOW): Likewise.
305         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
306         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
307         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
308         (GRUB_PE32_REL_BASED_SECTION): Likewise.
309         (GRUB_PE32_REL_BASED_REL): Likewise.
310         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
311         (GRUB_PE32_REL_BASED_DIR64): Likewise.
312         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
314         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
315         issue.
317         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
318         (efi_wrap_10): New function.
320         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
322         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
323         MB/MBP model (NV chipset).
324         (devdata_devs): Add devpath_5 to the list.
326         * load/i386/efi/linux.c (video_base): Remove variable.
327         (RGB_MASK): New macro.
328         (RGB_MAGIC): Likewise.
329         (LINE_MIN): Likewise.
330         (LINE_MAX): Likewise.
331         (FBTEST_STEP): Likewise.
332         (FBTEST_COUNT): Likewise.
333         (fb_list): New variable.
334         (grub_find_video_card): Remove function.
335         (find_framebuf): New function.
336         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
337         line length.
339         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
340         problem for x86_64.
342 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
344         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
346         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
347         coding tool name.
349 2009-02-22  Robert Millan  <rmh@aybabtu.com>
351         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
352         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
353         in our relocation, instead of using it directly from heap.  Also
354         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
356 2009-02-21  Robert Millan  <rmh@aybabtu.com>
358         Implement USB keyboard support (based on patch by Marco Gerards)
360         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
361         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
362         (usb_keyboard_mod_LDFLAGS): New variables.
364         * term/usb_keyboard.c: New file.
366 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
368         Corrected wrong declaration
370         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
372 2009-02-14  Christian Franke  <franke@computer.org>
374         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
375         (grub_lspci_iter): Print class code and programming interface byte.
377 2009-02-14  Christian Franke  <franke@computer.org>
379         * gendistlist.sh: Ignore `.svn' directories.
381 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
383         * fs/fat.c: Add 2009 to Copyright line.
385 2009-02-14  Christian Franke  <franke@computer.org>
387         * commands/hdparm.c: New file.  Provides `hdparm' command
388         which sends ATA commands via grub_disk_ata_pass_through ().
390         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
392         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
393         and <grub/cpu/io.h> to include/grub/ata.h.
394         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
395         (GRUB_CDROM_SECTOR_SIZE): Remove.
396         (GRUB_ATA_*): Move to include/grub/ata.h.
397         (GRUB_ATAPI_*): Likewise.
398         (enum grub_ata_commands): Likewise.
399         (enum grub_ata_timeout_milliseconds): Likewise.
400         (struct grub_ata_device): Likewise.
401         (grub_ata_regset): Likewise.
402         (grub_ata_regget): Likewise.
403         (grub_ata_regset2): Likewise.
404         (grub_ata_regget2): Likewise.
405         (grub_ata_check_ready): Likewise.
406         (grub_ata_wait_not_busy): Remove static, exported in
407         include/grub/ata.h.
408         (grub_ata_wait_drq): Likewise.
409         (grub_ata_pio_read): Likewise.
411         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
412         function for hdparm.mod.
414         * include/grub/ata.h: New file, contains declarations from
415         disk/ata.c.
416         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
418         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
419         (grub_disk_ata_pass_through): New exported variable.
421         * kern/disk.c (grub_disk_ata_pass_through): New variable.
423 2009-02-13  Colin D Bennett  <colin@gibibit.com>
425         Support multiple fallback entries, and provide an API to support
426         executing default+fallback menu entries.  Renamed the `terminal' menu
427         viewer to `text'.
429         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
430         variable declaration.
431         (grub_menu_execute_callback): New structure declaration.
432         (grub_menu_execute_callback_t): New typedef.
433         (grub_menu_execute_with_fallback): New function declaration.
434         (grub_menu_get_entry): Likewise.
435         (grub_menu_get_timeout): Likewise.
436         (grub_menu_set_timeout): Likewise.
438         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
440         * normal/menu.c (grub_wait_after_message): Moved to
441         `normal/menu_text.c'.
442         (draw_border): Likewise.
443         (print_message): Likewise.
444         (print_entry): Likewise.
445         (print_entries): Likewise.
446         (grub_menu_init_page): Likewise.
447         (get_entry_number): Likewise.
448         (print_timeout): Likewise.
449         (run_menu): Likewise.
450         (grub_menu_execute_entry): Likewise.
451         (show_text_menu): Likewise.
452         (get_and_remove_first_entry_number): New function.
453         (grub_menu_execute_with_fallback): Likewise.
454         (get_entry): Renamed to ...
455         (grub_menu_get_entry): .. this and made it global.
456         (get_timeout): Renamed to ...
457         (grub_menu_get_timeout): ... this and made it global.
458         (set_timeout): Renamed to ...
459         (grub_menu_set_timeout): ... this and made it global.
460         (grub_normal_terminal_menu_viewer): Renamed to ...
461         (grub_normal_text_menu_viewer): ... this.
463         * normal/menu_text.c: New file.  Extracted text-menu-specific code
464         from normal/menu.c.
466         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
467         (normal_mod_SOURCES): Likewise.
469         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
470         (normal_mod_SOURCES): Likewise.
472         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
473         (normal_mod_SOURCES): Likewise.
475         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
476         (normal_mod_SOURCES): Likewise.
478         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
479         (normal_mod_SOURCES): Likewise.
481         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
482         (normal_mod_SOURCES): Likewise.
484         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
485         (normal_mod_SOURCES): Likewise.
487 2009-02-11  Robert Millan  <rmh@aybabtu.com>
489         * util/grub.d/00_header.in: Update old reference to `font' command.
491 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
493         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
495         Based on patch from Javier Martín.
497 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
499         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
500         to avoid false positives with FAT.
501         (grub_fstest_SOURCES): Likewise.
502         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
503         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
504         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
505         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
506         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
507         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
509 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
511         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
512         bpb.version_specific.fat12_or_fat16.fstype and
513         bpb.version_specific.fat32.fstype.
515 2009-02-08  Robert Millan  <rmh@aybabtu.com>
517         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
519 2009-02-08  Robert Millan  <rmh@aybabtu.com>
521         * Makefile.in (host_os, host_cpu): New variables.
522         (target_os): Remove.  Update all users.
524 2009-02-08  Marco Gerards  <marco@gnu.org>
526         * Makefile.in (enable_grub_emu_usb): New variable.
527         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
528         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
529         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
530         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
531         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
532         `usbtest.mod' and `usbms.mod'.
533         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
534         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
535         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
536         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
537         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
538         variables.
540         * disk/usbms.c: New file.
542         * include/grub/usb.h: Likewise.
544         * include/grub/usbtrans.h: Likewise.
546         * include/grub/usbdesc.h: Likewise.
548         * bus/usb/usbtrans.c: Likewise.
550         * bus/usb/ohci.c: Likewise.
552         * bus/usb/uhci.c: Likewise.
554         * bus/usb/usbhub.c: Likewise.
556         * bus/usb/usb.c: Likewise.
558         * commands/usbtest.c: Likewise.
560         * util/usb.c: Likewise.
562         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
564         * configure.ac: Test for libusb presence.
566         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
568 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
570         * kern/mm.c: Add more comments.
572 2009-02-08  Robert Millan  <rmh@aybabtu.com>
574         Patch from Javier Martín.
575         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
576         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
578 2009-02-08  Robert Millan  <rmh@aybabtu.com>
580         * fs/cpio.c: Split tar functionality to ...
581         * fs/tar.c: ... here (new file).  Update all users.
583 2009-02-07  Robert Millan  <rmh@aybabtu.com>
585         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
586         backward-incompatible features.
588         Based on patch from Javier Martín, with some adjustments.
590 2009-02-07  Michael Scherer  <misc@mandriva.org>
592         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
594 2009-02-07  Robert Millan  <rmh@aybabtu.com>
596         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
597         position of `disk/lvm.c' to ensure grub_init_all() always picks it
598         after the RAID stuff.
600 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
602         Fixes problem when running vbetest command as reported by
603         Vladimir Serbinenko <phcoder@gmail.com>.
605         * (grub_vbe_set_video_mode): Fixed problem with text modes.
607 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
609         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
610         /dev/md/NpN style mdraid devices.
612 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
614         * util/unifont2pff.rb: Remove.
616 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
618         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
619         `#'.
621 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
623         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
624         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
625         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
626         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
627         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
628         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
629         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
631 2009-02-02  Christian Franke  <franke@computer.org>
633         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
635 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
637         * INSTALL: Note that we now require at least autoconf 2.59 and
638         that LZO is optional.
640 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
642         Base on patch on bug #24154 created by Tomas Tintera
643         <trosos@seznam.cz>.
645         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
647 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
649         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
650         <bero@arklinux.org>.
652         * normal/parser.y (script_init): Add missing semicolon.
654 2009-01-31  Colin D Bennett  <colin@gibibit.com>
656         * normal/main.c: Add include to grub/menu_viewer.h.
657         (free_menu_entry_classes): Added.
658         (grub_normal_menu_addentry): Added class property handling.
659         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
660         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
662         * normal/menu_viewer.c: New file.
664         * normal/menu.c (run_menu_entry): Renamed to ...
665         (grub_menu_execute_entry): ... this and made it as global.
666         (grub_menu_run): Renamed to ...
667         (show_text_menu): ... this and made it local.
668         (show_text_menu): Adapt to new function names.
669         (grub_normal_terminal_menu_viewer): New global variable.
671         * include/grub/menu.h: New file.
673         * include/grub/menu_viewer.h: New file.
675         * include/grub/normal.h: Added include to grub/menu.h.
676         (grub_menu_entry): Moved to include/grub/menu.h.
677         (grub_menu_entry_t): Likewise.
678         (grub_menu): Likewise.
679         (grub_menu_t): Likewise.
680         (grub_normal_terminal_menu_viewer): Added.
681         (grub_menu_execute_entry): Likewise.
682         (grub_menu_run): Removed.
684         * DISTLIST: Added include/grub/menu.h.
685         Added include/grub/menu_viewer.h.
686         Added normal/menu_viewer.c.
688 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
690         * normal/execute.c (grub_script_execute_menuentry): Changed to use
691         arglist for menutitle arguments.
693         * normal/main.c (grub_normal_menu_addentry): Likewise.
695         * normal/parser.y (menuentry): Likewise.
697         * normal/script.c (grub_script_create_cmdmenu): Likewise.
699         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
700         (grub_script_create_cmdmenu): Likewise.
702         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
704         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
705         changes.
707         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
709         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
711         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
713         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
715         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
717         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
719 2009-01-30  Christian Franke  <franke@computer.org>
721         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
722         in option help text.
724 2009-01-27  Pavel Roskin  <proski@gnu.org>
726         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
728 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
730         * commands/lsmmap.c: Add include to grub/machine/memory.h.
732         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
734         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
735         unregister function.
737 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
739         * disk/scsi.c (grub_scsi_read): Fix sign problem.
741         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
743         * util/grub-mkfont.c (usage): Fix typo.
745         * util/elf/grub-mkimage.c (load_modules): Fix warning.
747 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
749         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
751         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
753         * kern/misc.c (grub_strcasecmp): New function.
754         (grub_strcasecmp): Use grub_size_t instead of int for length.
755         Fix return value.
756         * include/grub/misc.h: Update function prototypes.
758 2009-01-26  Robert Millan  <rmh@aybabtu.com>
760         * configure.ac: Fix cross-compilation check.
762 2009-01-22  Christian Franke  <franke@computer.org>
764         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
765         (precision) digit string.  Allow `.format2' without `format1' (width).
766         Limit input chars for `%s' output to `format2' if specified.  This is
767         compatible with standard printf ().
769 2009-01-22  Christian Franke  <franke@computer.org>
771         * disk/ata.c (grub_ata_wait_status): Replace by ...
772         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
773         other status bits may be invalid while BSY is asserted.
774         (grub_ata_check_ready): New function.
775         (grub_ata_cmd): Removed.
776         (grub_ata_wait_drq): New function.
777         (grub_ata_strncpy): Remove inline.
778         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
779         and error check now done by grub_ata_wait_drq ().
780         (grub_ata_pio_write): Likewise.
781         (grub_atapi_identify): Set DEV before check for !BSY.  Use
782         grub_ata_wait_drq () to wait for data.
783         (grub_ata_device_initialize): Add status register check to
784         detect missing SATA slave devices.  Add debug messages.
785         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
786         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
787         transfer loop by grub_ata_pio_write ().
788         (grub_ata_identify): Set DEV before check for !BSY. Use
789         grub_ata_wait_drq () to wait for data.
790         (grub_ata_setaddress): Set DEV before check for !BSY.
791         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
792         read/write in one loop.  Fix invalid command on write.  Fix incomplete
793         command on (size % batch) == 0.  Add missing error check after write of
794         last block.  Add debug messages.
795         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
797 2009-01-19  Christian Franke  <franke@computer.org>
799         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
800         (GRUB_ATAPI_IREASON_*): Likewise.
801         (grub_ata_pio_write): Fix timeout error return.
802         (grub_atapi_identify): Add grub_ata_wait () after cmd.
803         (grub_atapi_wait_drq): New function.
804         (grub_atapi_packet): New parameter `size'.
805         Use grub_atapi_wait_drq () and direct write instead of
806         grub_ata_pio_write ().
807         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
808         reads the number of bytes requested by the device for each DRQ
809         assertion.
810         (grub_atapi_write): Remove old implementation, return not
811         implemented instead.
813 2009-01-19  Christian Franke  <franke@computer.org>
815         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
816         of 512 to calculate data size.
817         (grub_scsi_read12): Likewise.
818         (grub_scsi_write10): Likewise.
819         (grub_scsi_write12): Likewise.
820         (grub_scsi_read): Adjust size according to blocksize.
821         Add checks for invalid blocksize and unaligned transfer.
823 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
825         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
827         * term/gfxterm.c (write_char): Fix background rendering for wide
828         width glyphs.
830 2009-01-19  Robert Millan  <rmh@aybabtu.com>
832         * config.guess: Update to latest version from config git.
833         * config.sub: Likewise.
835 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
837         * Makefile.in: Change font compilation to use new grub-mkfont instead
838         of java version.
840         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
841         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
842         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
843         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
844         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
845         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
846         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
847         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
848         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
850 2009-01-16  Christian Franke  <franke@computer.org>
852         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
853         (enum grub_ata_timeout_milliseconds): New enum.
854         (grub_ata_wait_status): Add parameter milliseconds.
855         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
856         recovery from timed-out commands.
857         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
858         return grub_errno instead of REG_ERROR.
859         (grub_ata_pio_write): Add parameter milliseconds.
860         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
861         Pass milliseconds to grub_ata_wait_status () and
862         grub_ata_pio_read ().
863         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
864         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
865         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
866         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
867         It is not suitable for device detection, because DEV bit is ignored,
868         the command may run too long, and not all devices set the signature
869         properly.
870         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
871         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
872         Fix device selection, DEV bit must be set first to address the registers
873         of the correct device.
874         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
875         grub_ata_pio_read/write ().
876         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
877         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
879 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
881         * util/grub-editenv.c (main): Use fseeko(), not fseek().
883 2009-01-13  Bean  <bean123ch@gmail.com>
885         * util/grub-mkfont.c (write_font): forget to remove some debug code.
887 2009-01-13  Bean  <bean123ch@gmail.com>
889         * Makefile.in: (enable_grub_mkfont): New variable.
890         (freetype_cflags): Likewise.
891         (freetype_libs): Likewise.
893         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
894         (grub_mkfont_SOURCES): New variable.
895         (grub_mkfont_CFLAGS): Likewise.
896         (grub_mkfont_LDFLAGS): Likewise.
898         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
899         library if `--enable-grub-mkfont' is requested.
900         (enable_grub_mkfont): New variable.
901         (freetype_cflags): Likewise.
902         (freetype_libs): Likewise.
904         * util/grub-mkfont.c: New file.
906 2009-01-12  Christian Franke  <franke@computer.org>
908         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
909         mode check.  Fix setting of compat_use[].
911 2009-01-10  Robert Millan  <rmh@aybabtu.com>
913         Update a few copyright years which we forgot to do in 2008 (only for
914         files whose changes made in 2008 were copyright-significant)
916         * Makefile.in: Add 2008 to Copyright line.
917         * disk/ieee1275/ofdisk.c: Likewise.
918         * disk/efi/efidisk.c: Likewise.
919         * kern/dl.c: Likewise.
920         * kern/sparc64/ieee1275/init.c: Likewise.
921         * kern/mm.c: Likewise.
922         * kern/efi/mm.c: Likewise.
923         * boot/i386/pc/boot.S: Likewise.
924         * genfslist.sh: Likewise.
925         * fs/iso9660.c: Likewise.
926         * fs/hfs.c: Likewise.
927         * fs/jfs.c: Likewise.
928         * fs/minix.c: Likewise.
929         * fs/ufs.c: Likewise.
930         * gensymlist.sh.in: Likewise.
931         * genkernsyms.sh.in: Likewise.
932         * include/grub/misc.h: Likewise.
933         * include/grub/types.h: Likewise.
934         * include/grub/symbol.h: Likewise.
935         * include/grub/elf.h: Likewise.
936         * include/grub/kernel.h: Likewise.
937         * include/grub/disk.h: Likewise.
938         * include/grub/dl.h: Likewise.
939         * include/grub/i386/linux.h: Likewise.
940         * include/grub/i386/pc/biosdisk.h: Likewise.
941         * include/grub/efi/api.h: Likewise.
942         * include/grub/efi/pe32.h: Likewise.
943         * include/grub/util/misc.h: Likewise.
944         * normal/execute.c: Likewise.
945         * normal/arg.c: Likewise.
946         * normal/completion.c: Likewise.
947         * normal/lexer.c: Likewise.
948         * normal/parser.y: Likewise.
949         * normal/misc.c: Likewise.
950         * commands/i386/pc/vbeinfo.c: Likewise.
951         * commands/hexdump.c: Likewise.
952         * commands/terminal.c: Likewise.
953         * commands/ls.c: Likewise.
954         * commands/help.c: Likewise.
955         * partmap/pc.c: Likewise.
956         * loader/efi/chainloader.c: Likewise.
957         * loader/multiboot_loader.c: Likewise.
958         * loader/i386/pc/multiboot2.c: Likewise.
959         * term/efi/console.c: Likewise.
960         * term/i386/pc/serial.c: Likewise.
961         * util/lvm.c: Likewise.
962         * util/console.c: Likewise.
963         * util/i386/efi/grub-mkimage.c: Likewise.
964         * util/raid.c: Likewise.
966 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
968         * commands/videotest.c: Removed include to grub/machine/memory.h.
970         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
971         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
972         (video_mod_SOURCES): Removed.
973         (video_mod_CFLAGS): Likewise.
974         (video_mod_LDFLAGS): Likewise.
975         (gfxterm_mod_SOURCES): Likewise.
976         (gfxterm_mod_CFLAGS): Likewise.
977         (gfxterm_mod_LDFLAGS): Likewise.
978         (videotest_mod_SOURCES): Likewise.
979         (videotest_mod_CFLAGS): Likewise.
980         (videotest_mod_LDFLAGS): Likewise.
981         (bitmap_mod_SOURCES): Likewise.
982         (bitmap_mod_CFLAGS): Likewise.
983         (bitmap_mod_LDFLAGS): Likewise.
984         (tga_mod_SOURCES): Likewise.
985         (tga_mod_CFLAGS): Likewise.
986         (tga_mod_LDFLAGS): Likewise.
987         (jpeg_mod_SOURCES): Likewise.
988         (jpeg_mod_CFLAGS): Likewise.
989         (jpeg_mod_LDFLAGS): Likewise.
990         (png_mod_SOURCES): Likewise.
991         (png_mod_CFLAGS): Likewise.
992         (png_mod_LDFLAGS): Likewise.
994         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
995         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
996         (video_mod_SOURCES): Added.
997         (video_mod_CFLAGS): Likewise.
998         (video_mod_LDFLAGS): Likewise.
999         (videotest_mod_SOURCES): Likewise.
1000         (videotest_mod_CFLAGS): Likewise.
1001         (videotest_mod_LDFLAGS): Likewise.
1002         (bitmap_mod_SOURCES): Likewise.
1003         (bitmap_mod_CFLAGS): Likewise.
1004         (bitmap_mod_LDFLAGS): Likewise.
1005         (tga_mod_SOURCES): Likewise.
1006         (tga_mod_CFLAGS): Likewise.
1007         (tga_mod_LDFLAGS): Likewise.
1008         (jpeg_mod_SOURCES): Likewise.
1009         (jpeg_mod_CFLAGS): Likewise.
1010         (jpeg_mod_LDFLAGS): Likewise.
1011         (png_mod_SOURCES): Likewise.
1012         (png_mod_CFLAGS): Likewise.
1013         (png_mod_LDFLAGS): Likewise.
1014         (gfxterm_mod_SOURCES): Likewise.
1015         (gfxterm_mod_CFLAGS): Likewise.
1016         (gfxterm_mod_LDFLAGS): Likewise.
1018         * term/gfxterm.c: Removed include to grub/machine/memory.h,
1019         grub/machine/console.h.
1021 2009-01-04  Jerone Young  <jerone@gmail.com>
1023         Make on screen instructions clearer
1025         Based on patch created by Jidanni <jidanni@jidanni.org>
1027         * normal/menu.c: print clearer instructions on the screen
1029 2009-01-02  Colin D Bennett  <colin@gibibit.com>
1031         New font engine.
1033         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
1034         build system and fixed gfxterm.c to work with different sized fonts.
1036         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
1038         * configure: Re-generated.
1040         * DISTLIST: Removed font/manager.c.
1041         Added font/font.c.
1042         Added font/font_cmd.c.
1044         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
1045         compilation.
1047         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
1049         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1051         * kern/term.c: Changed users of grub_utf8_to_ucs4.
1053         * normal/menu.c: Likewise.
1055         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
1056         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
1058         * include/grub/font.h: Replaced with new file.
1060         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
1061         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
1062         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
1063         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
1064         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
1065         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1066         fg_red, fg_green, fg_blue, fg_alpha.
1067         (grub_video_adapter): Removed blit_glyph.
1068         (grub_video_blit_glyph): Removed.
1070         * font/manager.c: Removed file.
1072         * font/font.c: New file.
1074         * font/font_cmd.c: Likewise.
1076         * video/video.c (grub_video_blit_glyph): Removed.
1078         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
1079         (grub_video_vbe_map_rgba): Likewise.
1080         (grub_video_vbe_unmap_color_int): Likewise.
1081         (grub_video_vbe_blit_glyph): Removed.
1082         (grub_video_vbe_adapter): Removed blit_glyph.
1084         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
1085         (get_pixel): Likewise.
1086         (set_pixel): Likewise.
1088         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
1090         * term/gfxterm.c: Adapted to new font engine.
1092         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
1094         * term/i386/pc/vga.c: Likewise.
1096         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
1098         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
1100         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1102         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1104         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
1106         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
1108         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
1110         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
1112         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1114         * util/grub.d/00_header.in: Changed to use new loadfont command.
1116         * util/grub-mkconfig_lib.in: Changed font extension.
1118 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
1120         * util/getroot.c (grub_util_get_grub_dev): Add support for
1121         /dev/md/dNNpNN style partitionable mdraid devices.
1123 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
1125         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
1126         at a time limit of the PXE TFTP API correctly.
1127         (grub_pxefs_close): Likewise.
1129 2008-11-29  Robert Millan  <rmh@aybabtu.com>
1131         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
1132         grub_ata_device_initialize() calls.
1134 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
1136         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
1137         iteration failed.
1138         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
1140 2008-11-28  Robert Millan  <rmh@aybabtu.com>
1142         Fix build on powerpc-ieee1275.  Based on patch created by
1143         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
1144         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1145         `kern/ieee1275/mmap.c'.
1146         * include/grub/powerpc/ieee1275/memory.h: New file.
1148         Provide grub-install on coreboot.
1149         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
1150         (grub_install_SOURCES): New variable.
1151         * util/i386/pc/grub-install.in: Add a few condition checks to make it
1152         usable on coreboot.
1154 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
1156         * util/grub-fstest.c (grub_term_get_current_input): Change return type
1157         to `grub_term_input_t'.
1158         (grub_term_get_current_output): Change return type to
1159         `grub_term_output_t'.
1161 2008-11-22  Robert Millan  <rmh@aybabtu.com>
1163         Fix breakage on coreboot due to declaration mismatch.
1164         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
1165         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
1166         grub_vga_text_cls().
1168         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
1169         comments.  Avoid copying one more byte than necessary (just in case).
1171         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
1172         to 0x200000 (avoids trouble with some OFW implementations, and matches
1173         with the one in Yaboot).
1174         Reported by Manoel Abranches
1176 2008-11-20  Robert Millan  <rmh@aybabtu.com>
1178         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
1179         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
1181         * util/grub-mkconfig_lib.in (grub_warn): New function.
1182         (convert_system_path_to_grub_path): Use grub_warn() when issuing
1183         warnings, to obtain consistent formatting.
1184         * util/grub.d/00_header.in: Likewise.
1185         * util/update-grub_lib.in: Likewise.
1187         * loader/i386/linux.c (allocate_pages): Fix a warning.
1188         Move comment text to `#error' stanza.
1190         Harmonize ieee1275's grub_available_iterate() with the generic
1191         grub_machine_mmap_iterate() interface (fixes a recently-introduced
1192         build problem on i386-ieee1275):
1193         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
1194         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
1195         parameter `type'.  Update all users of this function.
1196         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1197         `kern/ieee1275/mmap.c'.
1198         * kern/ieee1275/init.c
1199         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
1200         with ...
1201         (grub_machine_mmap_iterate): ... this.
1202         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
1203         return type to `grub_err_t'.  Update all implementations of this
1204         function prototype.
1205         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
1206         Likewise.
1208         Add `lsmmap' command (lists firmware-provided memory map):
1209         * commands/lsmmap.c: New file.
1210         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
1211         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
1212         variables.
1213         * conf/powerpc-ieee1275.rmk: Likewise.
1214         * conf/i386-coreboot.rmk: Likewise.
1215         * conf/i386-ieee1275.rmk: Likewise.
1217 2008-11-19  Robert Millan  <rmh@aybabtu.com>
1219         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
1220         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
1221         constraints to initrd allocation (based on code from
1222         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
1223         for Linux to find it.
1225 2008-11-14  Robert Millan  <rmh@aybabtu.com>
1227         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
1228         order to cope with duplicate slashes.
1230 2008-11-14  Robert Millan  <rmh@aybabtu.com>
1232         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
1233         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
1234         don't want to mess with lower memory, because it is used in the Linux
1235         loader.
1237         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
1238         an appropriate place in lower memory, between 0x10000 and 0x90000,
1239         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
1240         is in our heap (probably as a result of it being corrupted during
1241         decompression).  Add #error instance with comment to explain why this
1242         loader isn't currently usable on PC/BIOS.
1244 2008-11-14  Robert Millan  <rmh@aybabtu.com>
1246         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
1247         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
1249 2008-11-12  Robert Millan  <rmh@aybabtu.com>
1251         Make loader/i386/linux.c buildable on i386-pc (although disabled).
1253         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
1254         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
1255         from here ...
1256         * include/grub/i386/pc/memory.h: ... to here.
1258 2008-11-12  Robert Millan  <rmh@aybabtu.com>
1260         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
1261         split).
1263         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
1264         (grub_console_cur_color, grub_console_real_putchar)
1265         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1266         (grub_console_setcolorstate, grub_console_setcolor)
1267         (grub_console_getcolor): Move from here ...
1268         * include/grub/i386/vga_common.h: ... to here (new file).
1270         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
1271         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
1272         `<grub/i386/io.h>'.
1273         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
1274         `<grub/i386/vga_common.h>'.
1276 2008-11-12  Robert Millan  <rmh@aybabtu.com>
1278         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
1279         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
1280         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
1281         variables.
1282         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1283         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
1285         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
1286         grub_console_init() with call to grub_vga_text_init().
1287         (grub_machine_fini): Replace call to
1288         grub_console_fini() with call to grub_vga_text_fini() and
1289         grub_at_keyboard_fini().
1291         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
1292         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1293         (grub_console_setcolorstate, grub_console_setcolor)
1294         (grub_console_getcolor): New function prototypes.
1296         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
1297         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
1298         (grub_vga_text_setcursor): Static-ize.
1299         (grub_vga_text_term): New structure.
1300         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
1302         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
1303         (grub_console_cur_color, grub_console_standard_color)
1304         (grub_console_normal_color, grub_console_highlight_color)
1305         (map_char, grub_console_putchar, grub_console_getcharwidth)
1306         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
1307         (grub_console_getcolor): Move from here ...
1308         * term/i386/vga_common.c: ... to here (same function names).
1310 2008-11-12  Robert Millan  <rmh@aybabtu.com>
1312         Use newly-added Multiboot support in coreboot.
1314         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1315         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
1317         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
1318         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
1319         (codestart): Store the MBI in `startup_multiboot_info' when we're
1320         being loaded using Multiboot.
1322         * kern/i386/coreboot/init.c (grub_machine_init): Move
1323         grub_at_keyboard_init() call to beginning of function (useful for
1324         debugging).  Call grub_machine_mmap_init() before attempting to use
1325         grub_machine_mmap_iterate().
1326         (grub_lower_mem, grub_upper_mem): Move from here ...
1327         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
1328         here (new file).
1330         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
1331         function prototype.
1333 2008-11-12  Robert Millan  <rmh@aybabtu.com>
1335         Fix a regression introduced by the at_keyboard.mod split.  Because
1336         some terminals are default on some platforms and non-default on
1337         others, the first terminal being registered determines which is
1338         going to be default.
1340         * kern/term.c (grub_term_register_input): If this is the first
1341         terminal being registered, set it as the current one.
1342         (grub_term_register_output): Likewise.
1344         * term/efi/console.c (grub_console_init): Do not call
1345         grub_term_set_current_output() or grub_term_set_current_input().
1346         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
1347         * term/i386/pc/console.c (grub_console_init): Likewise.
1348         (grub_console_fini): Do not call grub_term_set_current_input()
1349         (but leave grub_term_set_current_output() to restore text mode).
1351 2008-11-10  Robert Millan  <rmh@aybabtu.com>
1353         * util/grub.d/00_header.in: Add backward compatibility check for
1354         versions of terminal.mod that don't understand `terminal_input' or
1355         `terminal_output'.
1357 2008-11-09  Robert Millan  <rmh@aybabtu.com>
1359         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
1360         `terminal_input' / `terminal_output', not `terminal'.
1362 2008-11-08  Robert Millan  <rmh@aybabtu.com>
1364         * Makefile.in (include_DATA): Fix srcdir=. assumption.
1365         (DISTCLEANFILES): Add `build_env.mk'.
1367 2008-11-08  Robert Millan  <rmh@aybabtu.com>
1369         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
1370         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
1371         members.  Update all users.
1372         * util/console.c (grub_ncurses_term): Split in ...
1373         (grub_ncurses_term_input): ... this, and ...
1374         (grub_ncurses_term_output): ... this.  Update all users.
1375         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
1377 2008-11-08  Robert Millan  <rmh@aybabtu.com>
1379         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
1380         (PKGDATA): Add $(pkgdata_SRCDIR).
1381         (pkglib_BUILDDIR): New variable.
1382         (pkgdata_SRCDIR): New variable.
1383         (build_env.mk): New target.
1384         (include_DATA): New variable.
1385         (install-local): Install $(include_DATA) files in $(includedir).
1387 2008-11-07  Pavel Roskin  <proski@gnu.org>
1389         * gendistlist.sh: Use C locale for sorting to ensure consistent
1390         output on all systems.
1392         * util/grub.d/00_header.in: Remove incorrect space before
1393         "serial".
1395 2008-11-07  Robert Millan  <rmh@aybabtu.com>
1397         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
1398         per specification.
1399         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
1400         * loader/multiboot_loader.c (find_multi_boot2_header): New function
1401         (based on find_multi_boot1_header).
1402         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
1403         using find_multi_boot2_header(), and abort if neither Multiboot or
1404         Multiboot headers were found.
1406 2008-11-07  Robert Millan  <rmh@aybabtu.com>
1408         Modularize at_keyboard.mod:
1410         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
1411         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
1412         (at_keyboard_mod_LDFLAGS): New variables.
1414         Actual terminal split:
1416         * include/grub/term.h (struct grub_term): Split in ...
1417         (struct grub_term_input): ... this, and ...
1418         (struct grub_term_output): ... this.  Update all users.
1419         (grub_term_set_current): Split in ...
1420         (grub_term_set_current_input): ... this, and ...
1421         (grub_term_set_current_output): ... this.
1422         (grub_term_get_current): Split in ...
1423         (grub_term_get_current_input): ... this, and ...
1424         (grub_term_get_current_output): ... this.
1425         (grub_term_register): Split in ...
1426         (grub_term_register_input): ... this, and ...
1427         (grub_term_register_output): ... this.
1428         (grub_term_unregister): Split in ...
1429         (grub_term_unregister_input): ... this, and ...
1430         (grub_term_unregister_output): ... this.
1431         (grub_term_iterate): Split in ...
1432         (grub_term_iterate_input): ... this, and ...
1433         (grub_term_iterate_output): ... this.
1435         * kern/term.c (grub_term_list): Split in ...
1436         (grub_term_list_input): ... this, and ...
1437         (grub_term_list_output): ... this.  Update all users.
1438         (grub_cur_term): Split in ...
1439         (grub_cur_term_input): ... this, and ...
1440         (grub_cur_term_output): ... this.  Update all users.
1441         (grub_term_set_current): Split in ...
1442         (grub_term_set_current_input): ... this, and ...
1443         (grub_term_set_current_output): ... this.
1444         (grub_term_get_current): Split in ...
1445         (grub_term_get_current_input): ... this, and ...
1446         (grub_term_get_current_output): ... this.
1447         (grub_term_register): Split in ...
1448         (grub_term_register_input): ... this, and ...
1449         (grub_term_register_output): ... this.
1450         (grub_term_unregister): Split in ...
1451         (grub_term_unregister_input): ... this, and ...
1452         (grub_term_unregister_output): ... this.
1453         (grub_term_iterate): Split in ...
1454         (grub_term_iterate_input): ... this, and ...
1455         (grub_term_iterate_output): ... this.
1457         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
1458         a check for input and one for output (and only attempt to get keys
1459         from user when input works).
1461         * util/grub-probe.c (grub_term_get_current): Split in ...
1462         (grub_term_get_current_input): ... this, and ...
1463         (grub_term_get_current_output): ... this.
1464         * util/grub-fstest.c: Likewise.
1465         * util/i386/pc/grub-setup.c: Likewise.
1466         * util/grub-editenv.c: Likewise.
1468         Portability adjustments:
1470         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
1471         `term/i386/pc/at_keyboard.c'.
1472         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
1473         grub_keyboard_controller_init() (now handled by terminal .init).
1474         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
1475         grub_at_keyboard_init().
1476         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
1477         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
1478         at_keyboard.mod via input terminal interface).
1479         * include/grub/i386/coreboot/console.h: Convert into a stub for
1480         `<grub/i386/pc/console.h>'.
1482         Migrate full terminals to new API:
1484         * term/efi/console.c (grub_console_term): Split into ...
1485         (grub_console_term_input): ... this, and ...
1486         (grub_console_term_output): ... this.  Update all users.
1487         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
1488         (grub_ofconsole_init): Split into ...
1489         (grub_ofconsole_init_input): ... this, and ...
1490         (grub_ofconsole_init_output): ... this.
1491         (grub_ofconsole_term): Split into ...
1492         (grub_ofconsole_term_input): ... this, and ...
1493         (grub_ofconsole_term_output): ... this.  Update all users.
1494         * term/i386/pc/serial.c (grub_serial_term): Split into ...
1495         (grub_serial_term_input): ... this, and ...
1496         (grub_serial_term_output): ... this.  Update all users.
1497         * term/i386/pc/console.c (grub_console_term): Split into ...
1498         (grub_console_term_input): ... this, and ...
1499         (grub_console_term_output): ... this.  Update all users.
1500         (grub_console_term_input): Only enable it on PC/BIOS platform.
1501         (grub_console_init): Remove grub_keyboard_controller_init() call.
1503         Migrate input terminals to new API:
1505         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
1506         `i386' and `i386/pc' to enable build on x86_64 (this driver is
1507         i386-specific anyway).
1508         (grub_console_checkkey): Rename to ...
1509         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
1510         users.
1511         (grub_keyboard_controller_orig): New variable.
1512         (grub_console_getkey): Rename to ...
1513         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
1514         users.
1515         (grub_keyboard_controller_init): Static-ize.  Save original
1516         controller value so that it can be restored ...
1517         (grub_keyboard_controller_fini): ... here (new function).
1518         (grub_at_keyboard_term): New structure.
1519         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
1520         functions.
1522         Migrate output terminals to new API:
1524         * term/i386/pc/vga.c (grub_vga_term): Change type to
1525         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
1526         members.  Update all users.
1527         * term/gfxterm.c (grub_video_term): Change type to
1528         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
1529         members.  Update all users.
1530         * include/grub/i386/pc/console.h (grub_console_checkkey)
1531         (grub_console_getkey): Do not export (no longer needed by gfxterm,
1532         etc).
1534         Migrate `terminal' command and userland tools to new API:
1536         * commands/terminal.c (grub_cmd_terminal): Split into ...
1537         (grub_cmd_terminal_input): ... this, and ...
1538         (grub_cmd_terminal_output): ... this.
1539         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
1540         `terminal_input' and `terminal_output'.
1541         * util/grub.d/00_header.in: Adjust `terminal' calls to new
1542         `terminal_input' / `terminal_output' API.
1543         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
1544         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
1545         provided ${GRUB_TERMINAL}, convert it).
1547 2008-11-04  Robert Millan  <rmh@aybabtu.com>
1549         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
1550         for FreeBSD.
1551         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
1553 2008-11-03  Bean  <bean123ch@gmail.com>
1555         * kern/elf.c (grub_elf32_load): Revert to previous code.
1556         (grub_elf64_load): Likewise.
1558         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
1560 2008-11-01  Robert Millan  <rmh@aybabtu.com>
1562         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
1563         (TARGET_CPPFLAGS): Likewise.
1564         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
1566 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
1568         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
1570 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
1572         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
1573         addition of objects until the code is not going to be able to fail.
1575 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
1577         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
1578         (add a missing NULL check, and correct them by moving the pointer
1579         operations after the actual check).
1581 2008-10-29  Robert Millan  <rmh@aybabtu.com>
1583         * util/i386/pc/grub-install.in: Handle empty string as output from
1584         make_system_path_relative_to_its_root().
1586 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
1588         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
1589         circular metadata worst case scenario. If the metadata is circular
1590         then copy the wrap in place.
1591         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
1592         project lib/format_text/layout.h
1593         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
1595 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
1597         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
1599 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
1601         * util/update-grub_lib.in: Mention filename in warning message.
1603 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
1605         * NEWS: Update for rename of update-grub to grub-mkconfig.
1607 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
1609         * util/update-grub_lib.in: Copy to ...
1610         * util/grub-mkconfig_lib.in: ... this.  Update all users.
1611         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
1612         * util/update-grub.in: Rename to ...
1613         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
1614         option. Add `--output' option to allow users to specify the generated
1615         configuration file.  Default to stdout.
1616         (update_grub_dir): Rename to ...
1617         (grub_mkconfig_dir): ... this.
1618         (grub_cfg): Default to an empty string.
1619         * conf/common.rmk (update-grub): Rename to ...
1620         (grub-mkconfig): ... this.
1621         (update-grub_lib): Copy to ...
1622         (grub-mkconfig_lib): ... this.
1623         (update-grub_SCRIPTS): Copy to ...
1624         (grub-mkconfig_SCRIPTS): ... this. Update all users.
1625         (update-grub_DATA): Rename to ...
1626         (grub-mkconfig_DATA): ... this.
1628 2008-09-28  Robert Millan  <rmh@aybabtu.com>
1630         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
1631         to `modified'.  Add the real `created' field.
1632         (grub_iso9660_uuid): Use `modified' rather than `created' for
1633         constructing the UUID.
1635 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
1637         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
1638         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
1640 2008-09-28  Bean  <bean123ch@gmail.com>
1642         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
1643         Thanks to Christian Franke for finding this bug.
1645 2008-09-25  Robert Millan  <rmh@aybabtu.com>
1647         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
1648         instances of grub_util_get_disk_name() (see previous commit).
1650 2008-09-25  Robert Millan  <rmh@aybabtu.com>
1652         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
1653         `util/i386/get_disk_name.c'.
1654         * conf/i386-efi.rmk: Likewise.
1655         * conf/x86_64-efi.rmk: Likewise.
1656         * conf/i386-coreboot.rmk: Likewise.
1657         * conf/i386-ieee1275.rmk: Likewise.
1658         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
1659         `util/ieee1275/get_disk_name.c'.
1660         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
1661         * util/ieee1275/get_disk_name.c: Remove file.
1662         * util/i386/get_disk_name.c: Remove file.
1663         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
1664         "hd%d" for device.map entries, rather than using
1665         grub_util_get_disk_name().
1667 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
1669         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
1670         warning.
1671         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
1673 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
1675         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
1676         Changed to 0x5100.
1677         (GRUB_TERM_PPAGE): Changed to 0x4900.
1679 2008-09-24  Robert Millan  <rmh@aybabtu.com>
1681         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
1682         macros (they were i386-pc specific).
1683         * include/grub/sparc64/ieee1275/console.h: Likewise.
1684         * include/grub/efi/console.h: Likewise.
1686 2008-09-22  Bean  <bean123ch@gmail.com>
1688         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
1689         resident and in attribute list.
1691         * include/grub/ntfs.h (BMP_LEN): Removed.
1693 2008-09-22  Bean  <bean123ch@gmail.com>
1695         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
1696         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
1698         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
1699         error occurs, as grub_disk_open will call grub_disk_close, which will
1700         call p->close (scsi).
1702 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
1704         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
1705         (AC_PREREQ): Bumped to 2.59.
1706         (AC_TRY_COMPILE): Replace obsolete macro with ...
1707         (AC_COMPILE_IFELSE): ... this.
1708         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
1709         (AC_LINK_IFELSE): ... this.
1711 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
1713         * autogen.sh: Add a call to `gendistlist.sh'.
1715 2008-09-19  Christian Franke  <franke@computer.org>
1717         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
1718         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
1719         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
1720         Export __enable_execute_stack() to modules.
1721         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
1722         New function.
1724 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
1726         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
1727         Sort the list.
1729 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
1731         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
1732         #include <grub/util/hostdisk.h>.
1734 2008-09-08  Robert Millan  <rmh@aybabtu.com>
1736         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
1737         segments when their filesz is zero (grub_file_read() interprets
1738         zero-size as "read until EOF", which results in memory corruption).
1739         Use `lowest_segment' rather than 0 for calculating the current
1740         segment load address.
1742 2008-09-08  Robert Millan  <rmh@aybabtu.com>
1744         * util/hostdisk.c (open_device): Replace a grub_util_info() call
1745         with grub_dprintf("hostdisk", ...), as it was so verbose that it
1746         clobbered useful information.
1748 2008-09-08  Robert Millan  <rmh@aybabtu.com>
1750         * include/grub/util/biosdisk.h: Move to ...
1751         * include/grub/util/hostdisk.h: ... here.  Update all users.
1752         * util/biosdisk.c: Move to ...
1753         * util/hostdisk.c: ... here.  Update all users.
1755 2008-09-07  Robert Millan  <rmh@aybabtu.com>
1757         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
1758         variables.
1759         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
1760         and length can be stored directly in the `mbi->mmap_addr' and
1761         `mbi->mmap_length' struct fields.
1763 2008-09-07  Robert Millan  <rmh@aybabtu.com>
1765         * conf/i386.rmk: New file.  Provides declaration for building
1766         `cpuid.mod'.
1767         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
1768         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
1769         variables.
1770         Include `conf/i386.mk'.
1771         * conf/i386-efi.rmk: Likewise.
1772         * conf/x86_64-efi.rmk: Likewise.
1773         * conf/i386-coreboot.rmk: Likewise.
1774         * conf/i386-ieee1275.rmk: Likewise.
1776 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
1778         Based on patch created by Colin D Bennett <colin@gibibit.com>.
1779         Adds optimization support for BGR based modes.
1781         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
1782         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1783         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1784         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1785         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1786         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1787         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1788         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1789         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1790         (grub_video_i386_vbeblit_index_index): Likewise.
1791         (grub_video_i386_vbeblit_replace_directN): Added.
1792         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1793         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1794         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1795         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1796         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1797         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1798         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1799         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1800         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1801         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1802         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1803         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1804         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1806         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
1807         (grub_video_i386_vbefill_R8G8B8): Likewise.
1808         (grub_video_i386_vbefill_index): Likewise.
1809         (grub_video_i386_vbefill_direct32): Added.
1810         (grub_video_i386_vbefill_direct24): Likewise.
1811         (grub_video_i386_vbefill_direct16): Likewise.
1812         (grub_video_i386_vbefill_direct8): Likewise.
1814         * include/grub/video.h (grub_video_blit_format): Removed
1815         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
1816         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
1817         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
1818         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
1819         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
1821         * video/video.c (grub_video_get_blit_format): Updated to use new
1822         blit formats.  Added handling for 16 bit color modes.
1824         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
1825         fillers.
1826         (common_blitter): Updated to use new blitters.
1828         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
1829         Removed.
1830         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1831         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1832         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1833         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1834         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1835         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1836         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1837         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1838         (grub_video_i386_vbeblit_index_index): Likewise.
1839         (grub_video_i386_vbeblit_replace_directN): Added.
1840         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1841         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1842         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1843         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1844         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1845         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1846         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1847         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1848         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1849         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1850         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1851         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1852         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1854         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
1855         (grub_video_i386_vbefill_R8G8B8): Likewise.
1856         (grub_video_i386_vbefill_index): Likewise.
1857         (grub_video_i386_vbefill_direct32): Added.
1858         (grub_video_i386_vbefill_direct24): Likewise.
1859         (grub_video_i386_vbefill_direct16): Likewise.
1860         (grub_video_i386_vbefill_direct8): Likewise.
1862         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
1863         types.
1865         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
1866         types.
1868         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
1869         blitter types.
1871         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
1872         types.
1874 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
1876         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
1877         RAID level 1.
1879 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
1881         * fs/iso9660.c (grub_iso9660_date): New structure.
1882         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
1883         (grub_iso9660_uuid): New function.
1885 2008-09-05  Bean  <bean123ch@gmail.com>
1887         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
1889         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
1890         insensitive bit for names in Win32 and Win32 & DOS namespace.
1892         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
1894         * include/grub/types.h (LONG_MAX): Likewise.
1896 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
1898         * util/getroot.c: Include <config.h>.
1899         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
1900         add support for /dev/md/N devices and handle LVM double dash escaping.
1902 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
1904         * config.guess: Update to latest version from config git.
1905         * config.sub: Likewise.
1907 2008-09-03  Robert Millan  <rmh@aybabtu.com>
1909         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
1910         `disk->total_sectors'.
1912 2008-09-01  Colin D Bennett  <colin@gibibit.com>
1914         * include/grub/normal.h: Fixed incorrect comment for
1915         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
1917 2008-09-01  Colin D Bennett  <colin@gibibit.com>
1919         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
1920         values with defines.
1922         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
1923         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
1924         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
1925         (GRUB_VBE_MODEATTR_COLOR): Likewise.
1926         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
1927         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
1928         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
1929         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
1930         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
1931         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
1932         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
1933         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
1934         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
1935         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
1936         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
1937         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
1938         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
1939         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
1940         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
1942 2008-08-31  Robert Millan  <rmh@aybabtu.com>
1944         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
1945         declaration.
1946         (grub_multiboot): Fix a few warnings.
1948 2008-08-31  Robert Millan  <rmh@aybabtu.com>
1950         * loader/i386/pc/multiboot.c: Update comment not to say that
1951         boot_device support is unimplemented.
1953 2008-08-31  Robert Millan  <rmh@aybabtu.com>
1955         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
1956         or memory map support are unimplemented.
1958 2008-08-31  Colin D Bennett  <colin@gibibit.com>
1960         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
1962 2008-08-31  Colin D Bennett  <colin@gibibit.com>
1964         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
1965         total video memory in 'vbeinfo' output; show color format details for
1966         each video mode.
1968 2008-08-30  Pavel Roskin  <proski@gnu.org>
1970         * util/genmoddep.c: Remove for real this time.
1971         * DISTLIST: Remove util/genmoddep.c.
1973 2008-08-30  Robert Millan  <rmh@aybabtu.com>
1975         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
1976         as required by Multiboot spec (it was already 4-byte aligned, but
1977         only by chance).
1979 2008-08-29  Pavel Roskin  <proski@gnu.org>
1981         * kern/powerpc/ieee1275/crt0.S: Rename to ...
1982         * kern/powerpc/ieee1275/startup.S: ... this.
1983         * conf/powerpc-ieee1275.rmk: Adjust for the above.
1984         * DISTLIST: Likewise.
1986         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
1987         grub/cpu/kernel.h.  Add start label for consistency with other
1988         platforms.  Add grub_prefix immediately after start.  Add jump
1989         to the code after grub_prefix.
1990         * include/grub/powerpc/kernel.h: Provide valid values for
1991         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
1993 2008-08-29  Bean  <bean123ch@gmail.com>
1995         * configure.ac: Change host_os to cygwin for mingw.
1996         (asprintf): New check for function.
1998         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
1999         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
2001         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
2002         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
2003         sync, sleep and grub_util_get_disk_size for mingw.
2005         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
2006         to get size in mingw.
2007         (open_device): Use flag O_BINARY if it's defined.
2008         (find_root_device): Add dummy code for mingw.
2010         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
2011         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
2012         (get_scsi_disk_name): Return 0 for mingw.
2014         * util/hostfs.c: #include <grub/util/misc.h>.
2015         (grub_hostfs_open): Use "rb" flag to open file, use
2016         grub_util_get_disk_size to get disk size for mingw.
2018         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
2019         (asprintf): New function if HAVE_ASPRINTF is not set.
2020         (sync): New function for mingw.
2021         (sleep): Likewise.
2022         (grub_util_get_disk_size): Likewise.
2024 2008-08-28  Pavel Roskin  <proski@gnu.org>
2026         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2027         kern/time.c.
2029 2008-08-28  Robert Millan  <rmh@aybabtu.com>
2031         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
2033 2008-08-28  Robert Millan  <rmh@aybabtu.com>
2035         Change find_grub_drive() syntax so it doesn't prevent it from
2036         detecting NULL names as errors.
2038         * util/biosdisk.c (find_grub_drive): Move free slot search code
2039         from here ...
2040         (find_free_slot): ... to here.
2041         (read_device_map): Use find_free_slot() to search for free slots.
2043 2008-08-27  Marco Gerards  <marco@gnu.org>
2045         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
2046         (scsi_mod_SOURCES): New variable.
2047         (scsi_mod_CFLAGS): Likewise
2048         (scsi_mod_LDFLAGS): Likewise.
2050         * disk/scsi.c: New file.
2052         * include/grub/scsi.h: Likewise.
2054         * include/grub/scsicmd.h: Likewise.
2056         * disk/ata.c: Include <grub/scsi.h>.
2057         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
2058         instead.
2059         (grub_ata_iterate): Skip ATAPI devices.
2060         (grub_ata_open): Only handle ATAPI devices.
2061         (struct grub_atapi_read): Removed.
2062         (grub_atapi_readsector): Likewise.
2063         (grub_ata_read): No longer handle ATAPI devices.
2064         (grub_ata_write): Likewise.
2065         (grub_atapi_iterate): New function.
2066         (grub_atapi_read): Likewise.
2067         (grub_atapi_write): Likewise.
2068         (grub_atapi_open): Likewise.
2069         (grub_atapi_close): Likewise.
2070         (grub_atapi_dev): New variable.
2071         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
2072         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
2074         * include/grub/disk.h (enum grub_disk_dev_id): Add
2075         `GRUB_DISK_DEVICE_SCSI_ID'.
2077 2008-08-26  Robert Millan  <rmh@aybabtu.com>
2079         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
2080         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
2081         descriptive.
2083 2008-08-23  Bean  <bean123ch@gmail.com>
2085         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
2086         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2087         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
2088         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
2089         dm_nv.mod.
2090         (raid5rec_mod_SOURCES): New macro.
2091         (raid5rec_mod_CFLAGS): Likewise.
2092         (raid5rec_mod_LDFLAGS): Likewise.
2093         (raid6rec_mod_SOURCES): Likewise.
2094         (raid6rec_mod_CFLAGS): Likewise.
2095         (raid6rec_mod_LDFLAGS): Likewise.
2096         (mdraid_mod_SOURCES): Likewise.
2097         (mdraid_mod_CFLAGS): Likewise.
2098         (mdraid_mod_LDFLAGS): Likewise.
2099         (dm_nv_mod_SOURCES): Likewise.
2100         (dm_nv_mod_CFLAGS): Likewise.
2101         (dm_nv_mod_LDFLAGS): Likewise.
2103         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
2104         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
2105         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2107         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
2108         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2110         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2112         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2114         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2116         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2118         * disk/raid5_recover.c: New file.
2120         * disk/raid6_recover.c: Likewise.
2122         * disk/mdraid_linux.c: Likewise.
2124         * disk/dmraid_nvidia.c: Likewise.
2126         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
2127         ULONG_MAX.
2129         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
2130         calculate the size of raid device.
2131         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
2132         different layout of raid5.
2133         (grub_raid_scan_device): Remove code specific to mdraid.
2134         (grub_raid_list): New variable.
2135         (free_array): New function.
2136         (grub_raid_register): Likewise.
2137         (grub_raid_unregister): Likewise.
2138         (grub_raid_rescan): Likewise.
2139         (GRUB_MOD_INIT): Don't iterate device here.
2140         (GRUB_MOD_FINI): Use free_array to release resource.
2142         * include/grub/raid.h: Remove macro and structure specific to mdraid.
2143         (grub_raid5_recover_func_t): New function variable type.
2144         (grub_raid6_recover_func_t): Likewise.
2145         (grub_raid5_recover_func): New variable.
2146         (grub_raid6_recover_func): Likewise.
2147         (grub_raid_register): New function.
2148         (grub_raid_unregister): Likewise.
2149         (grub_raid_rescan): Likewise.
2150         (grub_raid_block_xor): Likewise.
2152         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
2153         (CMD_CRC): New macro.
2154         (part): Removed.
2155         (read_file): Handle device as well as file.
2156         (cmd_crc): New function.
2157         (fstest): Handle multiple disks.
2158         (options): Remove part, raw and long, add root and diskcount.
2159         (usage): Add crc, remove -p, -r, -l, add -r and -c.
2160         (main): Find the first non option entry and ignore subsequent options,
2161         add handling for the new options, support multiple disks.
2163         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
2165 2008-08-23  Bean  <bean123ch@gmail.com>
2167         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
2169         * genfslist.sh: Ignore kernel.mod.
2171         * genpartmaplist.sh: Likewise.
2173 2008-08-23  Robert Millan  <rmh@aybabtu.com>
2175         * util/getroot.c (find_root_device): Skip anything that starts with
2176         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
2178 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
2180         * util/update-grub.in (GRUB_GFXMODE): Export variable.
2181         * util/grub.d/00_header.in: Allow the administrator to change default
2182         gfxmode via ${GRUB_GFXMODE}.
2184 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
2186         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
2188 2008-08-21  Robert Millan  <rmh@aybabtu.com>
2190         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
2191         loader.
2192         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
2193         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
2195 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
2197         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
2198         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
2200 2008-08-19  Robert Millan  <rmh@aybabtu.com>
2202         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
2203         (struct grub_virtual_screen): Remove `cursor_color'.
2204         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
2205         initialization.
2206         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
2208 2008-08-18  Robert Millan  <rmh@aybabtu.com>
2210         Unify (identical) linux_normal.c files.
2211         * loader/i386/efi/linux_normal.c: Move from here ...
2212         * loader/linux_normal.c: ... to here.  Update all users.
2213         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
2214         * loader/i386/ieee1275/linux_normal.c: Likewise.
2216 2008-08-18  Robert Millan  <rmh@aybabtu.com>
2218         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
2219         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
2220         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
2221         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
2222         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
2223         New macros.
2224         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
2225         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
2226         (GRUB_LINUX_CL_END_OFFSET): ... to here.
2227         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
2228         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
2229         (GRUB_EFI_CL_END_OFFSET): Rename to ...
2230         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
2231         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
2232         Initialize `params->video_cursor_x' and `params->video_cursor_y'
2233         portably using grub_getxy().
2234         Replace `-EFI' with `-bzImage' in boot message.
2236 2008-08-17  Robert Millan  <rmh@aybabtu.com>
2238         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
2240 2008-08-17  Robert Millan  <rmh@aybabtu.com>
2242         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
2244         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
2245         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
2246         (grub_machine_mmap_iterate): New function declaration.
2247         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
2248         structure.
2249         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
2250         macros.
2252         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
2253         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
2254         Move e820 parsing from here ...
2255         * kern/i386/pc/mmap.c: New file.
2256         (grub_machine_mmap_iterate): ... to here.
2258         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
2259         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
2260         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
2261         (grub_available_iterate): Redeclare to return `void', and redeclare
2262         its hook to use grub_uint64_t as addr and size parameters, and rename
2263         to ...
2264         (grub_machine_mmap_iterate): ... this.  Update all users.
2266         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
2267         to make it more readable.  Rename to ...
2268         (grub_machine_mmap_iterate): ... this.
2270         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
2271         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
2272         (grub_multiboot): Allocate an extra region after the payload, and fill
2273         it with a Multiboot memory map.  Adjust a.out loader to calculate size
2274         with the extra space.
2275         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
2276         with the extra space.
2278 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
2280         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
2282 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
2284         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
2285         mdate-sh to the list `find' searches for.
2286         * DISTLIST: Regenerated.
2288 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
2290         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
2291         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
2292         genmoddep.awk, gensymlist.sh.in.
2293         (DISTDIRS): Add bus, docs, hook, lib.
2294         * DISTLIST: Regenerated.
2295         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
2297 2008-08-16  Robert Millan  <rmh@aybabtu.com>
2299         * disk/raid.c (grub_raid_init): Handle/report errors set by
2300         grub_device_iterate().
2301         * disk/lvm.c (grub_lvm_init): Likewise.
2303 2008-08-15  Bean  <bean123ch@gmail.com>
2305         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2306         and datehook.mod.
2307         (datetime_mod_SOURCES): New macro.
2308         (datetime_mod_CFLAGS): Likewise.
2309         (datetime_mod_LDFLAGS): Likewise.
2310         (date_mod_SOURCES): Likewise.
2311         (date_mod_CFLAGS): Likewise.
2312         (date_mod_LDFLAGS): Likewise.
2313         (datehook_mod_SOURCES): Likewise.
2314         (datehook_mod_CFLAGS): Likewise.
2315         (datehook_mod_LDFLAGS): Likewise.
2317         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2318         and datehook.mod.
2319         (datetime_mod_SOURCES): New macro.
2320         (datetime_mod_CFLAGS): Likewise.
2321         (datetime_mod_LDFLAGS): Likewise.
2322         (date_mod_SOURCES): Likewise.
2323         (date_mod_CFLAGS): Likewise.
2324         (date_mod_LDFLAGS): Likewise.
2325         (datehook_mod_SOURCES): Likewise.
2326         (datehook_mod_CFLAGS): Likewise.
2327         (datehook_mod_LDFLAGS): Likewise.
2329         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2330         and datehook.mod.
2331         (datetime_mod_SOURCES): New macro.
2332         (datetime_mod_CFLAGS): Likewise.
2333         (datetime_mod_LDFLAGS): Likewise.
2334         (date_mod_SOURCES): Likewise.
2335         (date_mod_CFLAGS): Likewise.
2336         (date_mod_LDFLAGS): Likewise.
2337         (datehook_mod_SOURCES): Likewise.
2338         (datehook_mod_CFLAGS): Likewise.
2339         (datehook_mod_LDFLAGS): Likewise.
2341         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2342         and datehook.mod.
2343         (datetime_mod_SOURCES): New macro.
2344         (datetime_mod_CFLAGS): Likewise.
2345         (datetime_mod_LDFLAGS): Likewise.
2346         (date_mod_SOURCES): Likewise.
2347         (date_mod_CFLAGS): Likewise.
2348         (date_mod_LDFLAGS): Likewise.
2349         (datehook_mod_SOURCES): Likewise.
2350         (datehook_mod_CFLAGS): Likewise.
2351         (datehook_mod_LDFLAGS): Likewise.
2353         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2354         and datehook.mod.
2355         (datetime_mod_SOURCES): New macro.
2356         (datetime_mod_CFLAGS): Likewise.
2357         (datetime_mod_LDFLAGS): Likewise.
2358         (date_mod_SOURCES): Likewise.
2359         (date_mod_CFLAGS): Likewise.
2360         (date_mod_LDFLAGS): Likewise.
2361         (datehook_mod_SOURCES): Likewise.
2362         (datehook_mod_CFLAGS): Likewise.
2363         (datehook_mod_LDFLAGS): Likewise.
2365         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
2367         * commands/date.c: New file.
2369         * hook/datehook.c: Likewise.
2371         * include/grub/lib/datetime.h: Likewise.
2373         * include/grub/i386/cmos.h: Likewise.
2375         * lib/datetime.c: Likewise.
2377         * lib/i386/datetime.c: Likewise.
2379         * lib/efi/datetime.c: Likewise.
2381 2008-08-14  Robert Millan  <rmh@aybabtu.com>
2383         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
2384         (grub_mkelfimage_SOURCES): New variable.
2385         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
2387         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
2388         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
2389         * conf/powerpc-ieee1275.rmk: Likewise.
2390         * conf/i386-ieee1275.rmk: Likewise.
2392         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
2393         * kern/i386/coreboot/init.c: Likewise.
2395         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
2396         with `<grub/cpu/kernel.h>'.
2397         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
2398         to ...
2399         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
2400         * kern/i386/coreboot/startup.S: Likewise.
2402         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
2403         (GRUB_MOD_GAP): Remove.
2404         * include/grub/powerpc/kernel.h: New file.
2405         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
2406         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2407         * include/grub/i386/kernel.h: New file.
2408         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
2409         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
2410         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2412         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
2413         `grub-mkelfimage'.
2414         Use --directory when invoking grub_mkimage.
2416         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
2417         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
2418         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
2419         and GRUB_KERNEL_CPU_PREFIX.
2421 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
2423         * include/grub/err.h (grub_err_printf): New function prototype.
2424         * util/misc.c (grub_err_printf): New function.
2425         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
2426         grub_printf.
2427         * kern/err.c (grub_print_error): Use grub_err_printf.
2429 2008-08-13  Robert Millan  <rmh@aybabtu.com>
2431         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
2433 2008-08-13  Robert Millan  <rmh@aybabtu.com>
2435         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
2436         boot entry.
2438 2008-08-12  Robert Millan  <rmh@aybabtu.com>
2440         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
2441         of the relocation code from here ...
2442         (grub_multiboot): ... to here.
2443         (forward_relocator, backward_relocator): Move from here ...
2444         * kern/i386/loader.S (grub_multiboot_forward_relocator)
2445         (grub_multiboot_backward_relocator): ... to here.
2446         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
2447         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
2448         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
2449         (grub_multiboot_forward_relocator_end)
2450         (grub_multiboot_backward_relocator)
2451         (grub_multiboot_backward_relocator_end): New variables.
2453 2008-08-12  Bean  <bean123ch@gmail.com>
2455         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
2457 2008-08-11  Robert Millan  <rmh@aybabtu.com>
2459         * kern/i386/linuxbios/startup.S: Move from here ...
2460         * kern/i386/coreboot/startup.S: ... to here.
2462         * kern/i386/linuxbios/init.c: Move from here ...
2463         * kern/i386/coreboot/init.c: ... to here.
2465         * kern/i386/linuxbios/table.c: Move from here ...
2466         * kern/i386/coreboot/mmap.c: ... to here.
2468         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
2470 2008-08-11  Robert Millan  <rmh@aybabtu.com>
2472         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
2473         errors.  Leave it to the upper layer to handle them.
2475 2008-08-09  Christian Franke  <franke@computer.org>
2477         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
2478         * conf/common.rmk: Install `grub-pe2elf' only if requested.
2479         Install `grub.d/10_windows' only on Cygwin.
2480         * configure.ac: Add subst of `target_os'.
2481         Check `target_os' also before setting TARGET_OBJ2ELF.
2482         Add `--enable-grub-pe2elf'.
2484 2008-08-08  Robert Millan  <rmh@aybabtu.com>
2486         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2487         (grub_last_time): Change type to grub_uint64_t.
2488         (grub_disk_open): Migrate code from to using grub_get_time_ms().
2489         (grub_disk_close): Likewise.
2491         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2492         (run_menu): Migrate code from to using grub_get_time_ms().
2494         * util/misc.c (grub_get_time_ms): New function.
2496 2008-08-08  Marco Gerards  <marco@gnu.org>
2498         * disk/ata.c (grub_ata_regget): Change return type to
2499         `grub_uint8_t'.
2500         (grub_ata_regget2): Likewise.
2501         (grub_ata_wait_status): New function.
2502         (grub_ata_wait_busy): Removed function, updated all users to use
2503         `grub_ata_wait_status'.
2504         (grub_ata_wait_drq): Likewise.
2505         (grub_ata_cmd): New function.
2506         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
2507         error handling.
2508         (grub_ata_pio_write): Add error handling.
2509         (grub_atapi_identify): Likewise.
2510         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
2511         handling.
2512         (grub_ata_identify): Use `grub_ata_cmd' and improve error
2513         handling.  Actually use the detected registers.  Reorder the
2514         detection logic such that it is easier to read.
2515         (grub_ata_pciinit): Do not assign the same ID to each controller.
2516         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
2517         handling.
2518         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
2520         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
2522 2008-08-08  Marco Gerards  <marco@gnu.org>
2524         * NEWS: Update.
2526 2008-08-07  Bean  <bean123ch@gmail.com>
2528         * include/grub/x86_64/pci.h: New file.
2530 2008-08-07  Christian Franke  <franke@computer.org>
2532         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
2533         (TIMER2_GATE): Likewise.
2534         (grub_pit_wait): Add enable/disable of the timer2 gate
2535         bit of port 0x61.  This fixes a possible infinite loop.
2537 2008-08-07  Bean  <bean123ch@gmail.com>
2539         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
2540         kern/i386/tsc.c and kern/i386/pit.c.
2542         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
2543         x86_64 platform.
2545         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
2546         <grub/i386/tsc.h>.
2548         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
2550 2008-08-07  Bean  <bean123ch@gmail.com>
2552         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
2554         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
2556         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
2557         multiple inclusion. Add #include <grub/types.h>.
2559 2008-08-06  Christian Franke  <franke@computer.org>
2561         * conf/common.rmk: Build and install `10_windows'.
2562         * util/grub.d/10_windows.in: New script.
2564 2008-08-06  Pavel Roskin  <proski@gnu.org>
2566         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
2568 2008-08-06  Robert Millan  <rmh@aybabtu.com>
2570         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
2571         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
2573 2008-08-06  Bean  <bean123ch@gmail.com>
2575         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
2576         (grub_pxefs_fs_int): Remove dummy definition.
2577         (grub_pxefs_open): Use data->block_size to store the current block
2578         size setting.
2579         (grub_pxefs_read): Use block size stored in data->block_size. As the
2580         value of grub_pxe_blksize can be changed after the file is opened.
2582 2008-08-06  Bean  <bean123ch@gmail.com>
2584         * fs/i386/pc/pxe.c (curr_file): new variable.
2585         (grub_pxefs_open): Simply the handling of pxe file system. Don't
2586         require the dummy internal file system anymore.
2587         (grub_pxefs_read): Removed.
2588         (grub_pxefs_close): Likewise.
2589         (grub_pxefs_fs_int): Likewise.
2590         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
2591         connection when we switch file.
2592         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
2594 2008-08-06  Robert Millan  <rmh@aybabtu.com>
2596         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
2597         `halt.mod'.
2598         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
2599         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
2601         * kern/i386/halt.c: New file.
2602         * kern/i386/reboot.c: Likewise.
2603         * include/grub/i386/reboot.h: Likewise.
2604         * include/grub/i386/halt.h: Likewise.
2606         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
2607         Include `<grub/cpu/halt.h>'.
2608         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
2609         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
2611         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
2612         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
2613         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
2614         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
2615         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
2616         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
2617         from here ...
2618         * include/grub/i386/at_keyboard.h: ... to here.
2620 2008-08-05  Robert Millan  <rmh@aybabtu.com>
2622         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
2623         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
2624         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
2625         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2626         `kern/generic/millisleep.c'.
2628         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
2629         instead of grub_get_rtc().
2630         (grub_tsc_init): Initialize `tsc_boot_time'.
2632         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
2633         (grub_machine_init): Use grub_tsc_init() rather than
2634         installing an RTC-based handler via grub_install_get_time_ms().
2636         * kern/i386/pit.c: New file.
2637         * include/grub/i386/pit.h: Likewise.
2639 2008-08-05  Bean  <bean123ch@gmail.com>
2641         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
2643         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
2644         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
2645         (pxe_mod_SOURCES): New macro.
2646         (pxe_mod_CFLAGS): Likewise.
2647         (pxe_mod_LDFLAGS): Likewise.
2648         (pxecmd_mod_SOURCES): Likewise.
2649         (pxecmd_mod_CFLAGS): Likewise.
2650         (pxecmd_mod_LDFLAGS): Likewise.
2652         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
2653         (grub_pxe_call): Likewise.
2655         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
2657         * commands/i386/pc/pxecmd.c: New file.
2659         * fs/i386/pc/pxe.c: Likewise.
2661         * include/grub/i386/pc/pxe.h: Likewise.
2663 2008-08-05  Bean  <bean123ch@gmail.com>
2665         * util/console.c (grub_console_cur_color): New variable.
2666         (grub_console_standard_color): Likewise.
2667         (grub_console_normal_color): Likewise.
2668         (grub_console_highlight_color): Likewise.
2669         (color_map): Likewise.
2670         (use_color): Likewise.
2671         (NUM_COLORS): New macro.
2672         (grub_ncurses_setcolorstate): Handle color properly.
2673         (grub_ncurses_setcolor): Don't change color here, just remember the
2674         settings, color will be set in grub_ncurses_setcolorstate.
2675         (grub_ncurses_getcolor): New function.
2676         (grub_ncurses_init): Initialize color pairs.
2677         (grub_ncurses_term): New member grub_ncurses_getcolor.
2679 2008-08-05  Colin D Bennett  <colin@gibibit.com>
2681         High resolution timer support.  Implemented for x86 CPUs using TSC.
2682         Extracted generic grub_millisleep() so it's linked in only as needed.
2683         This requires a Pentium compatible CPU; if the RDTSC instruction is
2684         not supported, then it falls back on the generic grub_get_time_ms()
2685         implementation that uses the machine's RTC.
2687         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
2688         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2689         `kern/generic/millisleep.c'.
2691         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
2692         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
2694         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
2695         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
2697         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2699         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2700         `kern/generic/millisleep.c'.
2702         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2704         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
2706         * kern/generic/rtc_get_time_ms.c: New file.
2708         * kern/generic/millisleep.c: New file.
2710         * kern/misc.c: Don't include
2711         <kern/time.h> anymore.
2712         (grub_millisleep_generic): Removed.
2714         * commands/sleep.c (grub_interruptible_millisleep): Uses
2715         grub_get_time_ms() instead of grub_get_rtc().
2717         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
2718         function.
2719         (grub_cpu_is_cpuid_supported): New inline function.
2720         (grub_cpu_is_tsc_supported): New inline function.
2721         (grub_tsc_init): New function prototype.
2722         (grub_tsc_get_time_ms): New function prototype.
2724         * kern/i386/tsc.c (grub_get_time_ms): New file.
2726         * include/grub/time.h: Include <grub/types.h.
2727         (grub_millisleep_generic): Removed.
2728         (grub_get_time_ms): New prototype.
2729         (grub_install_get_time_ms): New prototype.
2730         (grub_rtc_get_time_ms): New prototype.
2732         * kern/time.c (grub_get_time_ms): New function.
2733         (grub_install_get_time_ms): New function.
2735         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
2736         <grub/time.h> anymore.
2737         (grub_millisleep): Removed.
2738         (grub_machine_init): Call grub_tsc_init.
2740         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
2741         get_time_ms() implementation.
2743         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
2744         (ieee1275_get_time_ms): New function.
2745         (grub_machine_init): Install get_time_ms() implementation.
2747         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
2748         (grub_machine_init): Call grub_tsc_init().
2749         (grub_millisleep): Removed.
2751         * kern/ieee1275/init.c (grub_millisleep): Removed.
2752         (grub_machine_init): Install ieee1275_get_time_ms()
2753         implementation.
2754         (ieee1275_get_time_ms): New function.
2755         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
2756         real work.
2758 2008-08-05  Marco Gerards  <marco@gnu.org>
2760         * disk/ata.c: Include <grub/pci.h>.
2761         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
2762         (grub_ata_initialize): Rewritten.
2763         (grub_ata_device_initialize): New function.
2765 2008-08-04  Pavel Roskin  <proski@gnu.org>
2767         * kern/main.c: Include grub/mm.h.
2769 2008-08-04  Robert Millan  <rmh@aybabtu.com>
2771         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
2772         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
2773         corruption problem).
2775 2008-08-04  Robert Millan  <rmh@aybabtu.com>
2777         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
2778         warnings introduced in my last commit.
2780 2008-08-03  Robert Millan  <rmh@aybabtu.com>
2782         Make PCI available on all i386 architectures.
2784         * include/grub/i386/pc/pci.h: Move from here ...
2785         * include/grub/i386/pci.h: ... to here.
2787         * include/grub/i386/pc/pci.h: Remove.
2788         * include/grub/i386/efi/pci.h: Remove.
2789         * include/grub/x86_64/efi/pci.h: Remove.
2791         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
2792         `<grub/cpu/pci.h>'.
2794         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
2795         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
2796         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
2798         * conf/i386-ieee1275.rmk: Likewise.
2800 2008-08-03  Robert Millan  <rmh@aybabtu.com>
2802         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
2803         (grub_console_setcursor): Make it possible to set cursor off.
2805 2008-08-03  Robert Millan  <rmh@aybabtu.com>
2807         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
2808         of modules instead of assuming which platform provides what.
2809         * util/update-grub.in: Likewise.
2811 2008-08-03  Robert Millan  <rmh@aybabtu.com>
2813         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
2814         instead of `grub_install_dos_part' to determine whether a drive needs
2815         to be prepended to prefix (`grub_install_dos_part' is not reliable,
2816         because it can be overridden when loading GRUB via Multiboot).
2818 2008-08-02  Robert Millan  <rmh@aybabtu.com>
2820         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
2822 2008-08-02  Robert Millan  <rmh@aybabtu.com>
2824         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
2825         of informational grub_dprintf() calls.
2827 2008-08-02  Robert Millan  <rmh@aybabtu.com>
2829         * disk/memdisk.c (memdisk_size): Don't initialize.
2830         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
2832         * include/grub/i386/pc/kernel.h
2833         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
2834         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
2835         (grub_memdisk_image_size, grub_arch_memdisk_addr)
2836         (grub_arch_memdisk_size): Remove.
2838         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
2839         field (was only used to transfer a constant).  Add `type' field to
2840         support multiple module types.
2841         (grub_module_iterate): New function.
2843         * kern/device.c (grub_device_open): Do not hide error messages
2844         when grub_disk_open() fails.  Use grub_print_error() instead.
2846         * kern/i386/pc/init.c (grub_arch_modules_addr)
2847         (grub_arch_memdisk_size): Remove functions.
2848         (grub_arch_modules_addr): Return the module address in high memory
2849         (now that it isn't copied anymore).
2851         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
2852         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
2853         decompression routine (grub_total_module_size already includes that
2854         now).  Don't copy modules back to low memory.
2856         * kern/main.c: Include `<grub/mm.h>'.
2857         (grub_load_modules): Split out (and use) ...
2858         (grub_module_iterate): ... this function, which iterates through
2859         module objects and runs a hook.
2860         Comment out grub_mm_init_region() call, as it would cause non-ELF
2861         modules to be overwritten.
2863         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
2864         the memdisk image in its own region, make it part of the module list.
2865         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
2866         (main): Parse --memdisk|-m option, and pass user-provided path as
2867         parameter to generate_image().
2868         (add_segments): Pass `memdisk_path' down to load_modules().
2869         (load_modules): Embed memdisk image in module section when requested.
2870         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
2871         `header.type' instead of `header.offset'.
2873         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
2874         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
2875         (memdisk_mod_LDFLAGS): New variables.
2876         * conf/i386-coreboot.rmk: Likewise.
2877         * conf/i386-ieee1275.rmk: Likewise.
2879 2008-08-02  Robert Millan  <rmh@aybabtu.com>
2881         * loader/i386/pc/multiboot.c (playground, forward_relocator)
2882         (backward_relocator): New variables.  Used to allocate and relocate
2883         the payload, respectively.
2884         (grub_multiboot_load_elf32): Load into heap instead of requested
2885         address, install the appropriate relocator code in each bound of
2886         the payload, and set the entry point such that
2887         grub_multiboot_real_boot() will jump to one of them.
2889         * kern/i386/loader.S (grub_multiboot_payload_size)
2890         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2891         (grub_multiboot_payload_entry_offset): New variables.
2892         (grub_multiboot_real_boot): Set cpu context to what the relocator
2893         expects, and jump to the relocator instead of the payload.
2895         * include/grub/i386/loader.h (grub_multiboot_payload_size)
2896         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2897         (grub_multiboot_payload_entry_offset): Export.
2899 2008-08-01  Bean  <bean123ch@gmail.com>
2901         * normal/menu_entry.c (editor_getline): Don't return the original
2902         string as result, as it will be released by lexer once it has done
2903         using it.
2905 2008-08-01  Robert Millan  <rmh@aybabtu.com>
2907         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
2908         within menuentries, not before them.
2909         util/grub.d/10_hurd.in: Likewise.
2911 2008-08-01  Bean  <bean123ch@gmail.com>
2913         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
2914         (bufio_mod_SOURCES): New macro.
2915         (bufio_mod_CFLAGS): Likewise.
2916         (bufio_mod_LDFLAGS): Likewise.
2918         * include/grub/bufio.h: New file.
2920         * io/bufio.c: Likewise.
2922         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
2923         (grub_video_reader_png): Use grub_buffile_open to open file.
2925         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
2926         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
2928         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
2929         (grub_video_reader_tga): Use grub_buffile_open to open file.
2931         * font/manager.c: Include <grub/bufio.h>.
2932         (add_font): Use grub_buffile_open to open file.
2934 2008-07-31  Robert Millan  <rmh@aybabtu.com>
2936         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
2937         ELF segments, use a macro for arbitrarily accessing any of them instead
2938         of preparing a pointer that allows access to one at a time.
2939         (grub_multiboot_load_elf64): Likewise.
2941 2008-07-31  Bean  <bean123ch@gmail.com>
2943         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
2944         GRUB_KERNEL_MACHINE_DATA_END.
2946 2008-07-30  Robert Millan  <rmh@aybabtu.com>
2948         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
2949         Increase from 0x50 to 0x60.
2950         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
2951         use UUIDs to identify the root drive for them.  If that's not
2952         possible, abort.
2953         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
2954         check, for cross-disk installs.
2956 2008-07-30  Robert Millan  <rmh@aybabtu.com>
2958         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
2959         is non-empty, use it to set the `prefix' environment variable instead
2960         of the usual approach.
2961         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
2962         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
2963         environment variable instead of dummy make_install_device().
2965         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
2966         (start): Insert a data section, with `grub_prefix' variable.
2967         * kern/i386/linuxbios/startup.S: Likewise.
2969         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
2970         New variable reference.
2971         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
2972         New macro.  Defines offset of `grub_prefix' within startup.S (relative
2973         to `start').
2974         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
2975         section within startup.S (relative to `start').
2976         * include/grub/i386/coreboot/kernel.h: Likewise.
2978         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
2979         Overwrite grub_prefix with its contents, at the beginning of the
2980         first segment.
2981         (main): Understand -p|--prefix.
2983 2008-07-30  Robert Millan  <rmh@aybabtu.com>
2985         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
2987 2008-07-30  Robert Millan  <rmh@aybabtu.com>
2989         * term/i386/pc/vga_text.c (grub_console_cls): Use
2990         grub_console_gotoxy() to go back to beginning of the screen.
2991         Found by Patrick Georgi <patrick.georgi@coresystems.de>
2993 2008-07-29  Christian Franke  <franke@computer.org>
2995         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2996         Add conversion of emulated mount points on Cygwin.
2998 2008-07-29  Christian Franke  <franke@computer.org>
3000         * util/update-grub.in: Add a check for admin
3001         group on Cygwin.
3002         Remove old `grub.cfg.new' before creation.
3003         Add `-f' to `mv' to handle the different filesystem
3004         semantics of Windows.
3006 2008-07-29  Bean  <bean123ch@gmail.com>
3008         * normal/main.c (get_line): Fix buffer overflow bug.
3010 2008-07-28  Robert Millan  <rmh@aybabtu.com>
3012         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
3013         (struct grub_apple_header): New struct.  Describes the layout of
3014         the partmap header.
3015         (apple_partition_map_iterate): Check the header magic as well as the
3016         partition magic (which was already being checked).
3018 2008-07-28  Pavel Roskin  <proski@gnu.org>
3020         * genmk.rb: Add a warning to the beginning of the output that
3021         it's a generated file and should not be edited.
3023 2008-07-28  Robert Millan  <rmh@aybabtu.com>
3025         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3026         with the same number are found, just use issue a warning with
3027         grub_dprintf(), as this error has been reported to be non-fatal.
3029 2008-07-27  Robert Millan  <rmh@aybabtu.com>
3031         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
3032         information.
3034 2008-07-27  Bean  <bean123ch@gmail.com>
3036         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
3037         (grub_fat_find_dir): Ignore case when comparing filename.
3039 2008-07-27  Bean  <bean123ch@gmail.com>
3041         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
3042         smallino, as it's more descriptive, and i8count can be confused with
3043         the other field count.
3044         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
3045         inode type.
3047 2008-07-27  Bean  <bean123ch@gmail.com>
3049         * commands/crc.c: New file.
3051         * lib/crc.c: Likewise.
3053         * include/grub/lib/crc.h: Likewise.
3055         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
3057         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
3058         (hexdump): Move this function to ...
3060         * lib/hexdump.c: ... here.
3062         * include/grub/hexdump.h: Renamed to ...
3064         * include/grub/lib/hexdump.h: ... this.
3066         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
3068         * util/grub-editenv.c: Likewise.
3070         * include/envblk.h: Renamed to ...
3072         * include/lib/envblk.h: ... this.
3074         * util/envblk.c: Renamed to ...
3076         * lib/envblk.c: ... this.
3078         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
3079         lib/hexdump.c.
3080         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
3081         (pkglib_MODULES): Add crc.mod.
3082         (hexdump_mod_SOURCES): Add lib/hexdump.c.
3083         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
3084         (crc_mod_SOURCES): New macro.
3085         (crc_mod_CFLAGS): Likewise.
3086         (crc_mod_LDFLAGS): Likewise.
3088         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
3090         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3092         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3094         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3096         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3098 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
3100         * commands/help.c: Include <grub/term.h>.
3101         (TERM_WIDTH): Removed.  Updated all users.
3103 2008-07-27  Pavel Roskin  <proski@gnu.org>
3105         * util/getroot.c (find_root_device): Rephrase a comment to avoid
3106         spurious warnings about a comment within a comment.
3108 2008-07-25  Robert Millan  <rmh@aybabtu.com>
3110         * util/getroot.c (find_root_device): Skip devices that match
3111         /dev/dm-[0-9].  This lets the real device be found for any type of
3112         abstraction (LVM, EVMS, RAID..).
3113         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
3114         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
3115         device is found first, find_root_device() will now skip it.
3117 2008-07-24  Pavel Roskin  <proski@gnu.org>
3119         * include/grub/types.h: Use __builtin_bswap32() and
3120         __builtin_bswap64() with gcc 4.3 and newer.
3122 2008-07-24  Christian Franke  <franke@computer.org>
3124         * util/i386/pc/grub-install.in: If `--debug' is specified,
3125         pass `--verbose' to grub-setup.
3126         Abort script if make_system_path_relative_to_its_root() fails.
3128 2008-07-24  Bean  <bean123ch@gmail.com>
3130         * configure.ac: Fixed a bug caused by the previous cygwin patch,
3131         variable `target_platform' should be `platform'.
3133 2008-07-24  Bean  <bean123ch@gmail.com>
3135         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
3136         (grub_png_init_fixed_block): New function.
3137         (grub_png_decode_image_data): Handle fixed huffman code compression.
3139 2008-07-24  Bean  <bean123ch@gmail.com>
3141         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
3142         (grub_pe2elf_SOURCES): New macro.
3143         (CLEANFILES): Add grub-pe2elf.
3145         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
3146         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
3147         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
3148         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
3149         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
3150         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
3151         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
3152         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
3153         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
3154         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
3155         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
3156         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
3157         (GRUB_PE32_DT_FUNCTION): Likewise.
3158         (GRUB_PE32_REL_I386_DIR32): Likewise.
3159         (GRUB_PE32_REL_I386_REL32): Likewise.
3160         (grub_pe32_symbol): New structure.
3161         (grub_pe32_reloc): Likewise.
3163         * util/grub-pe2elf.c: New file.
3165         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
3166         start symbol in non pc platform.
3168         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
3170         The following patches are from Christian Franke.
3172         * include/grub/dl.h: Remove .previous, gas supports this only
3173         for ELF format.
3175         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
3176         Remove .type, gas supports this only for ELF format.
3178         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
3179         nullbytes in symbol table. This fixes an infinite loop if table is
3180         zero filled.
3182         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
3183         TARGET_IMG_LDFLAGS and EXEEXT.
3185         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
3186         TARGET_IMG_LDFLAGS_AC.
3187         (grub_CHECK_STACK_ARG_PROBE): New function.
3189         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
3191         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
3193         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
3194         to set TARGET_IMG_LD* accordingly.
3195         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
3196         Add call to grub_CHECK_STACK_ARG_PROBE.
3197         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
3199         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
3201         * genmk.rb: Add EXEEXT to CLEANFILES.
3203 2008-07-23  Robert Millan  <rmh@aybabtu.com>
3205         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
3206         define the codes for arrows and lines used for the menu).
3207         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
3208         as well.
3210         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
3211         fonts, because the latter are too slow.
3213 2008-07-21  Bean  <bean123ch@gmail.com>
3215         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
3216         a20. Run keyboard test last, as it will cause macbook to halt.
3218 2008-07-18  Pavel Roskin  <proski@gnu.org>
3220         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
3221         load foreign architecture modules correctly anyway.  Keep
3222         support for loading host architecture modules, whether we
3223         compile them or not.
3225 2008-07-17  Pavel Roskin  <proski@gnu.org>
3227         * configure.ac: Use -m32 or -m64 regardless of whether we had to
3228         change target_cpu.  The compiler default can mismatch target_cpu
3229         in any case.
3231         * disk/efi/efidisk.c: Fix format warnings on x86_64.
3232         * kern/efi/efi.c: Likewise.
3234         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
3235         target compiler is functional.
3236         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
3237         are set up.
3239         * configure.ac: Default to efi platform for x86_64-apple.  Allow
3240         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
3241         adjustments from the rest, only do them if target is not
3242         explicitly given.  Merge other adjustments with the final sanity
3243         check.  Remove an extraneous check for supported CPU.  Be
3244         specific which CPU and which platform is not supported.
3246         * configure.ac: Default to pc platform for x86_64.
3248 2008-07-17  Robert Millan  <rmh@aybabtu.com>
3250         Partial LinuxBIOS -> Coreboot rename.
3252         * conf/i386-linuxbios.rmk: Renamed to ...
3253         * conf/i386-coreboot.rmk: ... this.
3254         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
3255         * configure.ac: Accept "coreboot" as input platform (but maintain
3256         compatibility with "linuxbios").
3257         * include/grub/i386/linuxbios: Renamed to ...
3258         * include/grub/i386/coreboot: ... this.
3260 2008-07-17  Bean  <bean123ch@gmail.com>
3262         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
3263         (appleldr_mod_SOURCE): New variable.
3264         (appleldr_mod_CFLAGS): Likewise.
3265         (appleldr_mod_LDFLAGS): Likewise.
3266         (pci_mod_SOURCES): Likewise.
3267         (pci_mod_CFLAGS): Likewise.
3268         (pci_mod_LDFLAGS): Likewise.
3269         (lspci_mod_SOURCES): Likewise.
3270         (lspci_mod_CFLAGS): Likewise.
3271         (lspci_mod_LDFLAGS): Likewise.
3273         * conf/x86_64-efi.rmk: New file.
3275         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
3276         macro.
3277         (grub_efidisk_write): Likewise.
3279         * include/efi/api.h (efi_call_0): New macro.
3280         (efi_call_1): Likewise.
3281         (efi_call_2): Likewise.
3282         (efi_call_3): Likewise.
3283         (efi_call_4): Likewise.
3284         (efi_call_5): Likewise.
3285         (efi_call_6): Likewise.
3287         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
3288         grub_rescue_cmd_chainloader.
3290         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
3291         (grub_pe32_optional_header): Change some fields based on i386 or
3292         x86_64 platform.
3293         (GRUB_PE32_PE32_MAGIC): Likewise.
3295         * include/grub/efi/uga_draw.h: New file.
3297         * include/grub/elf.h (STN_ABS): New constant.
3298         (R_X86_64_NONE): Relocation constant for x86_64.
3299         (R_X86_64_64): Likewise.
3300         (R_X86_64_PC32): Likewise.
3301         (R_X86_64_GOT32): Likewise.
3302         (R_X86_64_PLT32): Likewise.
3303         (R_X86_64_COPY): Likewise.
3304         (R_X86_64_GLOB_DAT): Likewise.
3305         (R_X86_64_JUMP_SLOT): Likewise.
3306         (R_X86_64_RELATIVE): Likewise.
3307         (R_X86_64_GOTPCREL): Likewise.
3308         (R_X86_64_32): Likewise.
3309         (R_X86_64_32S): Likewise.
3310         (R_X86_64_16): Likewise.
3311         (R_X86_64_PC16): Likewise.
3312         (R_X86_64_8): Likewise.
3313         (R_X86_64_PC8): Likewise.
3315         * include/grub/i386/efi/pci.h: New file.
3317         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
3318         Change it value based on platform.
3319         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
3320         (GRUB_E820_RAM): Likewise.
3321         (GRUB_E820_RESERVED): Likewise.
3322         (GRUB_E820_ACPI): Likewise.
3323         (GRUB_E820_NVS): Likewise.
3324         (GRUB_E820_EXEC_CODE): Likewise.
3325         (GRUB_E820_MAX_ENTRY): Likewise.
3326         (grub_e820_mmap): New structure.
3327         (linux_kernel_header): Change the efi field according to different
3328         kernel version, also field from linux_kernel_header.
3330         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
3332         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
3333         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
3334         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
3335         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
3336         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
3337         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
3338         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
3339         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
3340         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
3341         (GRUB_PCI_ADDR_IO_MASK): Likewise.
3343         * include/grub/x86_64/efi/kernel.h: New file.
3345         * include/grub/x86_64/efi/loader.h: Likewise.
3347         * include/grub/x86_64/efi/machine.h: Likewise.
3349         * include/grub/x86_64/efi/pci.h: Likewise.
3351         * include/grub/x86_64/efi/time.h: Likewise.
3353         * include/grub/x86_64/linux.h: Likewise.
3355         * include/grub/x86_64/setjmp.h: Likewise.
3357         * include/grub/x86_64/time.h: Likewise.
3359         * include/grub/x86_64/types.h: Likewise.
3361         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
3362          GRUB_TARGET_SIZEOF_VOID_P.
3364         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
3365         (grub_efi_locate_handle): Likewise.
3366         (grub_efi_open_protocol): Likewise.
3367         (grub_efi_set_text_mode): Likewise.
3368         (grub_efi_stall): Likewise.
3369         (grub_exit): Likewise.
3370         (grub_reboot): Likewise.
3371         (grub_halt): Likewise.
3372         (grub_efi_exit_boot_services): Likewise.
3373         (grub_get_rtc): Likewise.
3375         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
3376         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
3377         (grub_efi_allocate_pages): Wrap efi calls.
3378         (grub_efi_free_pages): Wrap efi calls.
3379         (grub_efi_get_memory_map): Wrap efi calls.
3381         * kern/x86_64/dl.c: New file.
3383         * kern/x86_64/efi/callwrap.S: Likewise.
3385         * kern/x86_64/efi/startup.S: Likewise.
3387         * loader/efi/appleloader.c: Likewise.
3389         * loader/efi/chainloader.c (cmdline): New variable.
3390         (grub_chainloader_unload): Wrap efi calls.
3391         (grub_chainloader_boot): Likewise.
3392         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
3393         command line.
3395         * loader/efi/chainloader_normal.c (chainloader_command):
3396         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
3397         command line.
3399         * loader/i386/efi/linux.c (allocate_pages): Change allocation
3400         method.
3401         (grub_e820_add_region): New function.
3402         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
3403         booting.
3404         (grub_find_video_card): New function.
3405         (grub_linux_setup_video): New function.
3406         (grub_rescue_cmd_linux): Probe for video information.
3408         * normal/x86_64/setjmp.S: New file.
3410         * term/efi/console.c (map_char): New function.
3411         (grub_console_putchar): Map unicode char.
3412         (grub_console_checkkey): Wrap efi calls.
3413         (grub_console_getkey): Likewise.
3414         (grub_console_getwh): Likewise.
3415         (grub_console_gotoxy): Likewise.
3416         (grub_console_cls): Likewise.
3417         (grub_console_setcolorstate): Likewise.
3418         (grub_console_setcursor): Likewise.
3420         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
3422 2008-07-16  Pavel Roskin  <proski@gnu.org>
3424         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
3425         format strings.
3427         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
3428         pointer, not an integer.  This fixes a warning and prevents
3429         precision loss on 64-bit systems.
3430         (relocate_addresses): Remove unneeded cast.
3432 2008-07-15  Pavel Roskin  <proski@gnu.org>
3434         * kern/i386/ieee1275/init.c: Include grub/cache.h.
3436         * term/ieee1275/ofconsole.c: Disable code unused on i386.
3438         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
3439         Fix comparison between signed and unsigned.
3441         * include/grub/i386/ieee1275/console.h: Declare
3442         grub_console_init() and grub_console_fini().
3444         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
3445         It's empty and unused.
3447         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
3448         beginning to avoid warnings with some compilers.
3450         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
3451         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
3453 2008-07-14  Pavel Roskin  <proski@gnu.org>
3455         * kern/env.c (grub_register_variable_hook): Don't copy empty
3456         string, it leaks memory.  Pass "" to grub_env_set(), it should
3457         handle constant strings.
3459         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
3460         * commands/cmp.c (grub_cmd_cmp): Likewise.
3461         * kern/dl.c (grub_dl_flush_cache): Likewise.
3462         (grub_dl_load_core): Likewise.
3463         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
3464         (grub_elf64_load_phdrs): Likewise.
3466 2008-07-13  Pavel Roskin  <proski@gnu.org>
3468         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
3469         between signed and unsigned.
3470         (LzmaEnc_Finish): Fix warning about an unused parameter.
3472 2008-07-13  Bean  <bean123ch@gmail.com>
3474         * Makefile.in (enable_lzo): New rule.
3476         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
3478         * configure.ac (ENABLE_LZO): New option --enable-lzo.
3480         * boot/i386/pc/lnxboot.S: #include <config.h>.
3482         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
3483         its value according to the compression algorithm used, lzo or lzma.
3485         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
3486         compression algorithm according to configure macro.
3488         * kern/i386/pc/startup.S (codestart): Likewise.
3490         * kern/i386/pc/lzma_decode.S: New file.
3492         * include/grub/lib/LzFind.h: Likewise.
3494         * include/grub/lib/LzHash.h: Likewise.
3496         * include/grub/lib/LzmaDec.h: Likewise.
3498         * include/grub/lib/LzmaEnc.h: Likewise.
3500         * include/grub/lib/LzmaTypes.h: Likewise.
3502         * lib/LzFind.c: Likewise.
3504         * lib/LzmaDec.c: Likewise.
3506         * lib/LzmaEnc.c: Likewise.
3508 2008-07-13  Bean  <bean123ch@gmail.com>
3510         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
3511         (grub_ext4_extent_header): New structure.
3512         (grub_ext4_extent): Likewise.
3513         (grub_ext4_extent_idx): Likewise.
3514         (grub_ext4_find_leaf): New function.
3515         (grub_ext2_read_block): Handle extents.
3517 2008-07-12  Robert Millan  <rmh@aybabtu.com>
3519         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
3521 2008-07-11  Robert Millan  <rmh@aybabtu.com>
3523         * util/grub.d/40_custom.in: New file. Example on how to add custom
3524         entries to /etc/grub.d.
3525         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
3526         40_custom (implicitly, by merging all the grub.d rules).
3528 2008-07-11  Pavel Roskin  <proski@gnu.org>
3530         * commands/read.c (grub_getline): Fix invalid memory access.
3531         Don't add newline to the variable value.
3533         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
3534         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
3535         (serial_hw_get_port): Check validity of the port number.
3536         (grub_cmd_serial): Check return value of serial_hw_get_port().
3538 2008-07-07  Pavel Roskin  <proski@gnu.org>
3540         * boot/i386/pc/diskboot.S (notification_string): Replace
3541         "Loading kernel" with just "loading".  This is shorter, less
3542         confusing and saves a few bytes for possible future changes.
3544 2008-07-05  Pavel Roskin  <proski@gnu.org>
3546         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
3547         size for ATAPI devices, they are undefined.  Output sector
3548         number in decimal form.
3550         * disk/ata.c: Use named constants for status bits.
3552 2008-07-04  Pavel Roskin  <proski@gnu.org>
3554         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
3555         grub_addr_t before casting it to the void pointer to fix a
3556         warning.  Non-addressable regions are discarded earlier.
3557         (grub_arch_modules_addr): Cast _end to grub_addr_t.
3558         * kern/i386/linuxbios/table.c: Include grub/misc.h.
3559         (check_signature): Don't shadow table_header.
3560         (grub_linuxbios_table_iterate): Cast numeric constants to
3561         grub_linuxbios_table_header_t.
3562         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
3563         grub_stop().
3565         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
3566         prevent warnings.
3568         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
3569         pointer, which can cause warnings.  Support 64-bit addresses.
3571         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
3572         of sizeof(long).  This fixes PowerPC image generation on x86_64.
3574 2008-07-04  Robert Millan  <rmh@aybabtu.com>
3576         This fixes a performance issue when pc & gpt partmap iterators
3577         didn't abort iteration even after our hook found what it was
3578         looking for (often causing expensive probes of non-existent drives).
3580         Some callers relied on previous buggy behaviour, since they would
3581         raise an error when their own hooks caused early abortion of its
3582         iteration.
3584         * kern/device.c (grub_device_open): Improve error message.
3585         * disk/lvm.c (grub_lvm_open): Likewise.
3586         * disk/raid.c (grub_raid_open): Likewise.
3588         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
3589         when hook requests it, independently of grub_errno.
3590         (pc_partition_map_probe): Do not fail when find_func() caused
3591         early abortion of pc_partition_map_iterate().
3593         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
3594         when hook requests it, independently of grub_errno.
3595         (gpt_partition_map_probe): Do not fail when find_func() caused
3596         early abortion of gpt_partition_map_iterate().
3598         * kern/partition.c (grub_partition_iterate): Abort parent iteration
3599         when hook requests it, independently of grub_errno.  Do not fail when
3600         part_map_iterate_hook() caused early abortion of p->iterate().
3602         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
3603         when grub_partition_iterate() returned with non-zero.
3605 2008-07-03  Pavel Roskin  <proski@gnu.org>
3607         * disk/ata.c (grub_ata_pio_write): Check status before writing,
3608         like we do in grub_ata_pio_read().
3609         (grub_ata_readwrite): Always write individual sectors.  Fix the
3610         sector count for the remainder.
3611         (grub_ata_write): Enable writing to ATA devices.  Correctly
3612         report error for ATAPI devices.
3614 2008-07-02  Pavel Roskin  <proski@gnu.org>
3616         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
3617         warning.
3619         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
3620         for every read sector, we already increment it for the whole
3621         batch.  This fixes reading more than 256 sectors at once.
3623         * util/grub-editenv.c (cmd_info): Cast argument to long
3624         explicitly.  ptrdiff_t reduces to int on i386.
3626         * util/grub-editenv.c (main): Be specific which parameter is
3627         missing.
3629         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
3630         (memdisk): Make memdisk_orig_addr a pointer.
3632         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
3633         for file offsets, use grub_off_t instead.  Fix printf format
3634         warnings.
3636         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
3637         there.  Real unexpected warnings should not drown in the noise
3638         about known problems.
3640         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
3641         grub_disk_addr_t for memory addresses.
3643         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
3644         explicitly to fix a warning.
3646         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
3648         * Makefile.in (MODULE_LDFLAGS): New variable.
3649         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
3650         the linker accepts --build-id=none.
3651         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
3652         MODULE_LDFLAGS.
3653         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
3655         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
3656         those in Linux XFS code.  Provide a way to access 64-bit parent
3657         inode.
3658         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
3659         the end of struct grub_xfs_dir_header.
3661 2008-07-02  Bean  <bean123ch@gmail.com>
3663         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
3664         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3665         and GRUB_IEEE1275_FLAG_NO_ANSI.
3667         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
3668         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3669         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
3671         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
3672         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
3674         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
3675         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
3677         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
3678         esc sequence on non ANSI terminal.
3679         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
3681         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
3682         beginning of file.
3684 2008-07-02  Bean  <bean123ch@gmail.com>
3686         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
3687         (grub_editenv_SOURCES): New variable.
3688         (pkglib_MODULES): Add loadenv.mod.
3689         (loadenv_mod_SOURCES): New variable.
3690         (loadenv_mod_CFLAGS): Likewise.
3691         (loadenv_mod_LDFLAGS): Likewise.
3693         * include/grub/envblk.h: New file.
3695         * util/envblk.c: New file.
3697         * util/grub-editenv.c: New file.
3699         * commands/loadenv.c: New file.
3701 2008-07-01  Pavel Roskin  <proski@gnu.org>
3703         * include/multiboot2.h (struct multiboot_tag_module): Use char,
3704         not unsigned char.  This fixes warnings and is consistent with
3705         other tags.
3707         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
3709         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
3711         * term/tparm.c (analyze): Always set *popcount.
3713         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
3714         cast to fix a warning.
3716         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
3717         cast to suppress a warning.
3719         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
3720         grub_fshelp_read_file() expects.
3722         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
3723         write uuid as a 32-bit value in CPU byte order, so declare and
3724         use it as such.
3726         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
3727         long if the format specifier expects it.
3728         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
3729         * partmap/pc.c (pc_partition_map_iterate): Likewise.
3730         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
3731         long to fix a warning.
3732         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
3733         grub_dprintf() arguments to fix warnings.
3735 2008-06-30  Pavel Roskin  <proski@gnu.org>
3737         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
3738         install_bsd_part immediately before core.img is embedded or
3739         modified on disk.  This fixes core.img verification if core.img
3740         cannot be embedded.
3742         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
3743         core_path to calculate the blocklist.
3744         Patch from Javier Martín <lordhabbit@gmail.com>
3746 2008-06-29  Robert Millan  <rmh@aybabtu.com>
3748         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
3749         block to disk block.
3750         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
3751         Patch from Niels Böhm <bitbucket@arcor.de>
3753 2008-06-29  Robert Millan  <rmh@aybabtu.com>
3755         * util/update-grub_lib.in (font_path): Search for fonts in
3756         /boot/grub first, which is more likely to be readable (we aren't
3757         deciding where fonts live, just looking for them).
3759 2008-06-26  Pavel Roskin  <proski@gnu.org>
3761         * util/biosdisk.c (read_device_map): Don't leave dead map
3762         entries for devices failing stat() check.
3764         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
3765         core_path_dev for the core.img path on the target device.
3767 2008-06-26  Robert Millan  <rmh@aybabtu.com>
3769         * disk/fs_uuid.c: New file.
3770         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
3771         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
3772         (fs_uuid_mod_LDFLAGS): New variables.
3773         * include/grub/disk.h (grub_disk_dev_id): Add
3774         `GRUB_DISK_DEVICE_UUID_ID'.
3775         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
3776         implement iterate().
3778 2008-06-26  Robert Millan  <rmh@aybabtu.com>
3780         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
3781         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
3782         Linux image includes no initrd.
3784 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
3786         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
3787         call to resolve the core image location that effectively appended the
3788         name twice.
3790 2008-06-21  Robert Millan  <rmh@aybabtu.com>
3792         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
3793         call from here ...
3795         * util/grub.d/10_hurd.in: ... to here ...
3796         * util/grub.d/10_linux.in: ... and here.
3798 2008-06-19  Robert Millan  <rmh@aybabtu.com>
3800         * kern/main.c (grub_main): Export `prefix' variable immediately
3801         after it has been set by grub_machine_set_prefix().
3803 2008-06-19  Robert Millan  <rmh@aybabtu.com>
3805         * commands/search.c (search_label, search_fs_uuid, search_file): Print
3806         search result when not saving to variable, not the other way around.
3807         When saving to variable, abort iteration as soon as a match is found.
3809 2008-06-19  Robert Millan  <rmh@aybabtu.com>
3811         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
3812         check for partition that provides /boot/grub.  Its logic is flawed,
3813         as it prevents prepare_grub_to_access_device() from being called
3814         multiple times.
3816 2008-06-19  Robert Millan  <rmh@aybabtu.com>
3818         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
3819         "insmod" command directly when abstraction modules are needed,
3820         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3821         since it had already been processed).
3823 2008-06-19  Pavel Roskin  <proski@gnu.org>
3825         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
3826         changed.  This is needed in case GRUB_LIBDIR changes.
3827         * conf/i386-ieee1275.rmk: Likewise.
3828         * conf/i386-linuxbios.rmk: Likewise.
3829         * conf/i386-pc.rmk: Likewise.
3830         * conf/powerpc-ieee1275.rmk: Likewise.
3832 2008-06-18  Pavel Roskin  <proski@gnu.org>
3834         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
3835         kernel_elf_symlist.c to symlist.c for consistency with other
3836         architectures.  Update all users.
3837         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3839 2008-06-18  Robert Millan  <rmh@aybabtu.com>
3841         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
3842         it in prefix.
3844         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
3845         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
3846         a RAID device, run setup() for all members independently on whether
3847         LVM abstraction is being used.
3848         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
3849         If grub-mkimage has set `*install_dos_part == -2', don't override this
3850         value.
3851         Perform *install_dos_part adjustments independently on whether
3852         we're embedding or not.
3853         Clarify error message when image is too big for embedding.
3854         Remove duplicate *install_dos_part stanza.
3856 2008-06-17  Robert Millan  <rmh@aybabtu.com>
3858         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
3859         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
3860         variables.
3861         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
3862         values in grub_ofconsole_normal_color and
3863         grub_ofconsole_highlight_color (they're not directly related to
3864         background and foreground).
3865         (grub_ofconsole_setcolorstate): Extract background and foreground
3866         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
3868 2008-06-17  Robert Millan  <rmh@aybabtu.com>
3870         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
3871         /boot/grub for the check in last commit, not /boot (they could be
3872         different partitions).
3874 2008-06-16  Robert Millan  <rmh@aybabtu.com>
3876         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
3877         asked to setup access for the same partition that provides /boot,
3878         don't bother using UUIDs since our root already has the value we
3879         want.
3881 2008-06-16  Robert Millan  <rmh@aybabtu.com>
3883         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
3884         I2O devices.
3885         Patch from Sven Mueller <sven@debian.org>.
3887 2008-06-16  Robert Millan  <rmh@aybabtu.com>
3889         * util/update-grub.in: Check for $EUID instead of $UID.
3890         Reported by Vincent Zweije.
3892 2008-06-16  Bean  <bean123ch@gmail.com>
3894         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
3895         (grub_ext2_read_block): Likewise.
3896         (grub_ext2_read_inode): Likewise.
3897         (grub_ext2_mount): Likewise.
3898         (grub_ext2_close): Likewise.
3899         (grub_ext3_get_journal): Removed.
3901         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
3902         (grub_reiserfs_read_symlink): Likewise.
3903         (grub_reiserfs_mount): Likewise.
3904         (grub_reiserfs_open): Likewise.
3905         (grub_reiserfs_read): Likewise.
3906         (grub_reiserfs_close): Likewise.
3907         (grub_reiserfs_get_journal): Removed.
3909         * fs/fshelp.c (grub_fshelp_read): Removed.
3910         (grub_fshelp_map_block): Likewise.
3912         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
3913         (grub_fshelp_journal): Likewise.
3914         (grub_fshelp_read): Likewise.
3915         (grub_fshelp_map_block): Likewise.
3917 2008-06-16  Pavel Roskin  <proski@gnu.org>
3919         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
3920         floating point anymore.
3921         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
3923 2008-06-15  Pavel Roskin  <proski@gnu.org>
3925         * commands/ls.c (grub_ls_list_files): Use integer calculations
3926         for human readable format, avoid floating point use.
3927         * kern/misc.c (grub_ftoa): Remove.
3928         (grub_vsprintf): Remove floating point support.
3930 2008-06-15  Robert Millan  <rmh@aybabtu.com>
3932         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
3933         devices.
3934         Reported by Max Vozeler.
3936 2008-06-15  Robert Millan  <rmh@aybabtu.com>
3938         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
3939         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
3940         skipped later.
3941         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
3942         the beginning of the prefix.
3944         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
3945         It is assumed that if we have a memdisk, grub-mkimage has set
3946         grub_prefix to include the "(memdisk)" drive in it.
3948 2008-06-15  Robert Millan  <rmh@aybabtu.com>
3950         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
3951         Initialize keyboard controller after registering the terminal, so that
3952         grub_printf() can be called from grub_keyboard_controller_init().
3954 2008-06-15  Robert Millan  <rmh@aybabtu.com>
3956         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
3957         extent-btree which is written as big endian on disk.
3958         Reported by Alain Greppin  <al@chilibi.org>.
3960 2008-06-14  Robert Millan  <rmh@aybabtu.com>
3962         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
3963         * util/i386/pc/grub-install.in (modules): Likewise.
3965 2008-06-13  Pavel Roskin  <proski@gnu.org>
3967         * commands/ls.c (grub_ls_list_files): Fix format warnings.
3969 2008-06-13  Bean  <bean123ch@gmail.com>
3971         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
3973         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
3975         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
3976         to indicate sparse block.
3978 2008-06-12  Pavel Roskin  <proski@gnu.org>
3980         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
3981         number, grub_fshelp_read() does it for us.
3983         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
3984         linear disk read with journal translation.
3985         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
3986         * include/grub/fshelp.h: Declare grub_fshelp_read().
3988 2008-06-09  Pavel Roskin  <proski@gnu.org>
3990         * fs/minix.c (grub_minix_mount): Handle error reading
3991         superblock.
3993 2008-06-08  Robert Millan  <rmh@aybabtu.com>
3995         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
3996         don't append the RAID prefix afterwards.
3997         Reported by Clint Adams.
3999 2008-06-08  Robert Millan  <rmh@aybabtu.com>
4001         Based on description from Pavel:
4002         * kern/disk.c (grub_disk_check_range): Rename to ...
4003         (grub_disk_adjust_range): ... this.  Add a comment explaining the
4004         tasks performed by this function.
4006 2008-06-08  Robert Millan  <rmh@aybabtu.com>
4008         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
4009         `num_serial' (for consistency with other variables).
4010         (struct grub_ntfs_data): Add `uuid' member.
4011         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
4012         (grub_ntfs_uuid): New function.
4013         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
4015 2008-06-07  Pavel Roskin  <proski@gnu.org>
4017         * util/biosdisk.c (open_device): Revert last change to the
4018         function, it broke installation.  The sector needs to be
4019         different dependent on which device is opened.
4021 2008-06-06  Robert Millan  <rmh@aybabtu.com>
4023         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
4024         rest of GRUB, and breakage doesn't happen if its value were modified.
4026         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
4027         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
4028         a constant (same value).
4029         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
4030         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
4032 2008-06-06  Robert Millan  <rmh@aybabtu.com>
4034         * util/biosdisk.c (open_device): Do not modify sector offset when
4035         accessing a partition.  kern/disk.c already handles this for us.
4037 2008-06-06  Robert Millan  <rmh@aybabtu.com>
4039         * util/grub-emu.c (grub_machine_init): Move code in this function from
4040         here ...
4041         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
4042         segfault in case grub_printf() is called).
4044         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
4045         grub_probe.  Update all users not to explicitly add it again.
4046         (grub_device): New variable; contains corresponding device for grubdir.
4047         (fs_module, partmap_module, devabstraction_module): Pass
4048         `--device ${grub_device}' to grub_probe to avoid traversing /dev
4049         every time.
4051 2008-06-05  Robert Millan  <rmh@aybabtu.com>
4053         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
4054         is found, print it (same layout as with labels).
4056 2008-06-04  Robert Millan  <rmh@aybabtu.com>
4058         * util/biosdisk.c (get_drive): Rename to ...
4059         (find_grub_drive): ... this.  Update all users.
4061         (get_os_disk): Rename to ...
4062         (convert_system_partition_to_system_disk): ... this.  Update all users.
4064         (find_drive): Rename to ...
4065         (find_system_device): ... this.  Update all users.
4067 2008-06-04  Robert Millan  <rmh@aybabtu.com>
4069         * util/biosdisk.c (get_os_disk): Handle IDA devices.
4070         * util/grub-mkdevicemap.c (get_mmc_disk_name)
4071         (make_device_map): Likewise.
4073 2008-06-01  Robert Millan  <rmh@aybabtu.com>
4075         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
4076         before dereferencing it.
4078         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
4079         union with fat12/fat16-specific ones.  Add some new fields, including
4080         `num_serial' for both versions.
4081         (struct grub_fat_data): Add `uuid' member.
4082         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
4083         names.  Initialize `data->uuid' using `num_serial'.
4084         (grub_fat_uuid): New function.
4085         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
4087         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
4088         (grub_reiserfs_uuid): New function.
4089         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
4090         member.
4092         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
4093         (grub_xfs_uuid): New function.
4094         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
4096 2008-06-01  Robert Millan  <rmh@aybabtu.com>
4098         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
4099         code that is backward compatible with pre-uuid search command.
4101 2008-05-31  Robert Millan  <rmh@aybabtu.com>
4103         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
4104         floppies after everything else, to ensure floppy drive isn't accessed
4105         unnecessarily (patch from Bean).
4107 2008-05-31  Robert Millan  <rmh@aybabtu.com>
4109         * commands/search.c (search_label, search_fs_uuid, search_file): Do
4110         not print device names when we were asked to set a variable.
4112 2008-05-31  Robert Millan  <rmh@aybabtu.com>
4114         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
4115         using "cursor-on" and "cursor-off" commands (understood at least by
4116         the Open Firmware flavour on OLPC).
4118 2008-05-31  Michael Gorven  <michael@gorven.za.net>
4120         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
4121         on and off sequences.
4123 2008-05-31  Robert Millan  <rmh@aybabtu.com>
4125         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
4126         * util/update-grub.in: Likewise.
4128 2008-05-30  Pavel Roskin  <proski@gnu.org>
4130         * util/biosdisk.c (linux_find_partition): Simplify logic and
4131         make the code more universal.  Keep special processing for
4132         devfs, but use a simple rule for all other devices.  If the
4133         device ends with a number, append 'p' and the partition number.
4134         Otherwise, append only the partition number.
4136 2008-05-30  Robert Millan  <rmh@aybabtu.com>
4138         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
4139         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
4140         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
4141         the `root' parameter to Linux.
4143 2008-05-30  Robert Millan  <rmh@aybabtu.com>
4145         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
4146         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
4147         --fs_uuid with --fs-uuid.
4148         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
4149         all filesystems support them).
4151 2008-05-30  Robert Millan  <rmh@aybabtu.com>
4153         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
4154         grub_printf() flags, since we're printing in units of 2 bytes.
4156 2008-05-30  Robert Millan  <rmh@aybabtu.com>
4158         * util/grub.d/00_header.in: Remove obsolete comment referencing
4159         convert_system_path_to_grub_path().
4160         * util/update-grub.in: Likewise.
4161         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
4162         (convert_system_path_to_grub_path): Add a warning message explaining
4163         that this function is deprecated.  Rely on is_path_readable_by_grub()
4164         for the readability checks.
4165         (font_path): Use is_path_readable_by_grub() for the readability
4166         check rather than convert_system_path_to_grub_path().
4168 2008-05-30  Robert Millan  <rmh@aybabtu.com>
4170         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
4171         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
4172         converting it first.
4173         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
4174         grub.cfg for access to font file, and afterwards call it again to set
4175         the root device.
4177 2008-05-30  Robert Millan  <rmh@aybabtu.com>
4179         * commands/search.c (options): Add --fs_uuid option.
4180         (search_fs_uuid): New function.
4181         (grub_cmd_search): Fix --set argument passing.
4182         Use search_fs_uuid() when requested via --fs_uuid.
4183         (grub_search_init): Update help message.
4184         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
4185         and redeclare it as an array of 16-bit words.
4186         (grub_ext2_uuid): New function.
4187         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
4188         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
4189         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
4190         (GRUB_DEVICE_BOOT_UUID): New variables.
4191         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
4192         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
4193         whenever possible.
4194         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
4195         just assume `root' variable has the right value.
4196         * util/grub.d/10_linux.in: Likewise.
4197         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
4198         via PRINT_FS_UUID.
4199         (main): Recognise `-t fs_uuid' argument.
4201 2008-05-30  Robert Millan  <rmh@aybabtu.com>
4203         * util/biosdisk.c (map): Redefine structure to hold information
4204         about GRUB drive name.
4205         (get_drive): Reimplement without assuming (and verifying) BIOS-like
4206         drive names.
4207         (call_hook): Remove.
4208         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
4209         member.  Assume drive has partitions.
4210         (grub_util_biosdisk_open): Access device names via `.device' struct
4211         member.
4212         (open_device): Likewise.
4213         (find_drive): Likewise.
4214         (read_device_map): Adjust map[] usage to match the new struct
4215         definition.  Don't check for duplicates (still possible, but not cheap
4216         anymore).
4217         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
4218         (make_device_name): Remove assumption of BIOS-like drive names.
4220 2008-05-30  Pavel Roskin  <proski@gnu.org>
4222         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
4223         compiling execute.c doesn't need grub_script.tab.h anymore.
4224         (normal/command.c_DEPENDENCIES): Likewise.
4225         (normal/function.c_DEPENDENCIES): Likewise.
4226         * conf/i386-ieee1275.rmk: Likewise.
4227         * conf/i386-linuxbios.rmk: Likewise.
4228         * conf/i386-pc.rmk: Likewise.
4229         * conf/powerpc-ieee1275.rmk: Likewise.
4230         * conf/sparc64-ieee1275.rmk: Likewise.
4232 2008-05-29  Pavel Roskin  <proski@gnu.org>
4234         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
4235         when scanning metadata for volume group name.
4237         * include/grub/script.h: Don't include grub_script.tab.h.  It's
4238         a generated file, which may only be included from the files with
4239         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
4240         use union YYSTYPE, as the later allows forward declaration.
4241         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
4243 2008-05-29  Robert Millan  <rmh@aybabtu.com>
4245         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
4246         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
4247         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
4248         (grub_console_checkkey): Add grub_dprintf() call to report unknown
4249         scan codes.
4251 2008-05-29  Robert Millan  <rmh@aybabtu.com>
4253         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
4254         control key combinations.
4256 2008-05-29  Robert Millan  <rmh@aybabtu.com>
4258         * util/powerpc/ieee1275/grub-install.in: Move from here ...
4259         * util/ieee1275/grub-install.in: ... to here.
4260         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
4261         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
4262         (grub_install_SOURCES): Likewise.
4264 2008-05-29  Robert Millan  <rmh@aybabtu.com>
4266         * fs/affs.c: Update copyright year.
4267         * fs/ext2.c: Likewise.
4268         * fs/fshelp.c: Likewise.
4269         * fs/hfsplus.c: Likewise.
4270         * fs/ntfs.c: Likewise.
4271         * fs/xfs.c: Likewise.
4272         * include/grub/fshelp.h: Likewise.
4273         * util/grub-mkdevicemap.c: Likewise.
4275 2008-05-28  Robert Millan  <rmh@aybabtu.com>
4277         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
4278         might need to be fatfs to support some firmware implementations
4279         (e.g. OFW or EFI).
4281 2008-05-28  Robert Millan  <rmh@aybabtu.com>
4283         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
4284         devices.
4285         * util/grub-mkdevicemap.c (get_mmc_disk_name)
4286         (make_device_map): Likewise.
4288 2008-05-20  Bean  <bean123ch@gmail.com>
4290         * fs/fshelp.c (grub_fshelp_map_block): New function.
4291         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
4292         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
4294         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
4295         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
4296         (grub_fshelp_journal): New structure.
4297         (grub_fshelp_map_block): New function prototype.
4298         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
4299         (grub_fshelp_map_block): Likewise.
4301         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
4302         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
4303         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
4304         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
4305         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
4306         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
4307         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
4308         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
4309         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
4310         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
4311         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
4312         (grub_ext2_sblock): New members for journal support.
4313         (grub_ext3_journal_header): New structure.
4314         (grub_ext3_journal_revoke_header): Likewise.
4315         (grub_ext3_journal_block_tag): Likewise.
4316         (grub_ext3_journal_sblock): Likewise.
4317         (grub_fshelp_node): New members logfile and journal.
4318         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
4319         grub_fshelp_map_block to get real block number.
4320         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
4321         number.
4322         (grub_ext2_read_inode): Likewise.
4323         (grub_ext3_get_journal): New function.
4324         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
4325         (grub_ext2_close): Release memory used by journal.
4327         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
4328         (REISERFS_MAGIC_DESC_BLOCK): New macro.
4329         (grub_reiserfs_transaction_header): Renamed to
4330         grub_reiserfs_description_block, replace field data with real_blocks.
4331         (grub_reiserfs_commit_block): New structure.
4332         (grub_reiserfs_data): New member journal.
4333         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
4334         number.
4335         (grub_reiserfs_read_symlink): Likewise.
4336         (grub_reiserfs_iterate_dir): Likewise.
4337         (grub_reiserfs_open): Likewise.
4338         (grub_reiserfs_read): Likewise.
4339         (grub_reiserfs_get_journal): New function.
4340         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
4341         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
4342         using grub_reiserfs_get_journal.
4343         (grub_reiserfs_close): Release memory used by journal.
4345         * fs/affs.c (grub_affs_read_block): Change block type to
4346         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
4348         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
4350         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
4352         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
4354         * fs/udf.c (grub_udf_read_block): Change block type to
4355         grub_disk_addr_t. Use type cast to avoid warning.
4357         * fs/xfs.c (grub_xfs_read_block): Likewise.
4359 2008-05-16  Christian Franke  <franke@computer.org>
4361         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
4362         to ensure that break with ESC will always work.
4363         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
4364         Remove ESC from keyboard queue.
4366 2008-05-16  Christian Franke  <franke@computer.org>
4368         * util/biosdisk.c: [__CYGWIN__] Add includes.
4369         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
4370         (get_os_disk): Move variable declarations to OS specific
4371         parts to avoid warning.
4372         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
4373         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
4374         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
4375         Cygwin.
4376         * util/getroot.c: [__CYGWIN__] Add includes.
4377         (strip_extra_slashes): Fix "/" case.
4378         [__CYGWIN__] (get_win32_path): New function.
4379         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
4380         [__CYGWIN__] (find_root_device): Disable.
4381         [__CYGWIN__] (get_bootsec_serial): New function.
4382         [__CYGWIN__] (find_cygwin_root_device): Likewise.
4383         [__linux__] (grub_guess_root_device): Add early returns to simplify
4384         structure.
4385         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
4386         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
4387         check for Linux only.
4389 2008-05-15  Bean  <bean123ch@gmail.com>
4391         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
4392         keyboard hang problem in apple's intel mac.
4394 2008-05-09  Robert Millan  <rmh@aybabtu.com>
4396         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
4397         devices.
4398         * util/grub-mkdevicemap.c (get_virtio_disk_name)
4399         (make_device_map): Likewise.
4400         Reported by Aurelien Jarno <aurel32@debian.org>
4402 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
4404         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
4405         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
4406         (make_device_map): Output entries for xvd type disks.
4408 2008-05-07  Robert Millan  <rmh@aybabtu.com>
4410         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
4411         devices.
4412         * util/grub-mkdevicemap.c (get_cciss_disk_name)
4413         (make_device_map): Likewise.
4414         Reported by Roland Dreier <rdreier@cisco.com>
4416 2008-05-07  Robert Millan  <rmh@aybabtu.com>
4418         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
4419         grub_strstr() call.  Correct a few mistakes in failure path handling.
4421 2008-05-06  Robert Millan  <rmh@aybabtu.com>
4423         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4424         Do not print a trailing slash (therefore, the root directory is an
4425         empty string).
4426         (convert_system_path_to_grub_path): Do not remove trailing slash
4427         from make_system_path_relative_to_its_root() output.
4429         * util/i386/pc/grub-install.in: Add trailing slash to output from
4430         make_system_path_relative_to_its_root().
4432 2008-05-06  Robert Millan  <rmh@aybabtu.com>
4434         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
4435         ensures that output lines aren't intermangled with those sent to
4436         stderr (via grub_util_info()).
4437         * util/grub-probe.c (grub_refresh): Likewise.
4438         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
4440 2008-05-05  Christian Franke  <franke@computer.org>
4442         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
4443         Add Cygwin device names.
4444         (get_ide_disk_name) [__CYGWIN__]: Likewise.
4445         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
4446         (check_device): Return error instead of success on empty name.
4447         (make_device_map): Move label inside linux specific code to
4448         prevent compiler warning.
4450 2008-04-30  Robert Millan  <rmh@aybabtu.com>
4452         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
4453         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
4454         first boot option.
4455         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
4457 2008-04-29  Robert Millan  <rmh@aybabtu.com>
4459         * docs/grub.cfg: New file (example GRUB configuration).
4461 2008-04-26  Robert Millan  <rmh@aybabtu.com>
4463         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
4464         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
4465         and `disk/ieee1275/nand.c'.
4467 2008-04-25  Bean  <bean123ch@gmail.com>
4469         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
4470         i386-linuxbios.
4472         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
4473         change the buffer size to 4096 for cdrom device.
4475         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
4476         and nand.mod.
4477         (_linux_mod_SOURCES): New variable.
4478         (_linux_mod_CFLAGS): Likewise.
4479         (_linux_mod_LDFLAGS): Likewise.
4480         (linux_mod_SOURCES): Likewise.
4481         (linux_mod_CFLAGS): Likewise.
4482         (linux_mod_LDFLAGS): Likewise.
4483         (nand_mod_SOURCES): Likewise.
4484         (nand_mod_CFLAGS): Likewise.
4485         (nand_mod_LDFLAGS): Likewise.
4487         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
4488         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
4489         type property. (nand device in olpc don't have this property)
4491         * include/grub/disk.h (grub_disk_dev_id): New macro
4492         GRUB_DISK_DEVICE_NAND_ID.
4494         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
4495         function prototype.
4496         (grub_rescue_cmd_initrd): Likewise.
4498         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
4499         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
4500         ofw_cif_handler and ofw_idt, adjust padding number.
4502         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
4503         GRUB_MACHINE_IEEE1275 is defined.
4505         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
4506         Use NESTED_FUNC_ATTR attribute on the hook parameter.
4508         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
4509         on nested function heap_init.
4510         (grub_upper_mem): New variable for i386-ieee1275.
4511         (grub_get_extended_memory): New function for i386-ieee1275.
4512         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
4514         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
4515         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
4516         property.
4518         * loader/i386/ieee1275/linux.c: New file.
4520         * loader/i386/ieee1275/linux_normal.c: New file.
4522         * disk/ieee1275/nand.c: New file.
4524 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
4526         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
4527         value.
4528         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
4530 2008-04-18  Robert Millan  <rmh@aybabtu.com>
4532         Restructures early code path on ieee1275 to unify grub_main() as
4533         the first C function that is executed in every platform.
4535         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
4536         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
4537         cmain().
4538         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
4539         * kern/ieee1275/cmain.c (cmain): Rename to ...
4540         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
4541         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
4542         at the beginning.
4544 2008-04-18  Robert Millan  <rmh@aybabtu.com>
4546         * util/update-grub.in: Fix syntax error when setting
4547         `GRUB_PRELOAD_MODULES'.
4548         Reported by Stephane Chazelas <stephane@artesyncp.com>
4550 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
4552         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
4553         section into account, newer toolchains generate unique build ids
4554         * configure.ac: remove the test for --build-id=none acceptance,
4555         we want build ids to be preserved
4556         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
4557         far from other sections don't cause the raw binary images grow
4558         size
4560 2008-04-15  Robert Millan  <rmh@aybabtu.com>
4562         * disk/lvm.c: Update copyright year.
4563         * kern/misc.c: Likewise.
4565 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
4567         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
4568         there is no memory left for physical volume name.
4570 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
4572         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
4573         volume name mapping to support bigger than 9 character names properly.
4575 2008-04-13  Robert Millan  <rmh@aybabtu.com>
4577         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
4578         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
4580 2008-04-13  Christian Franke  <franke@computer.org>
4582         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
4583         to create a floppy emulation boot CD when non emulation mode
4584         does not work.
4585         Enable Joliet CD filesystem extension.
4587 2008-04-13  Robert Millan  <rmh@aybabtu.com>
4589         * kern/misc.c (grub_strncat): Fix off-by-one error.
4590         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
4592         * kern/env.c (grub_env_context_close): Clear current context, not
4593         previous one.
4594         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
4596         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
4598 2008-04-13  Robert Millan  <rmh@aybabtu.com>
4600         Improve robustness when handling LVM.
4602         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
4603         (and leave `*p' unmodified).
4604         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
4605         through it.
4606         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
4607         iterating through it.
4608         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
4609         through it.
4610         (grub_lvm_scan_device): Check the return value (and fail gracefully
4611         when due) on each grub_lvm_getvalue() or grub_strstr() call.
4612         Don't assume `vg->pvs != NULL' when iterating through it.
4614 2008-04-13  Robert Millan  <rmh@aybabtu.com>
4616         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
4617         * genmk.rb (partmap): New variable.
4618         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
4619         (#{partmap}): New target rule.
4620         * genpartmaplist.sh: New file.
4621         * Makefile.in (pkglib_DATA): Add partmap.lst.
4622         (partmap.lst): New target rule.
4623         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
4624         modules (including all partition maps), instead of preloading them.
4626 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
4628         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
4629         `linux-boot-prober' (if installed) to detect other operating
4630         systems which are installed on the computer and add them to
4631         the boot menu.
4632         * conf/common.rmk: Build and install 30_os-prober.
4634 2008-04-12  Robert Millan  <rmh@aybabtu.com>
4636         * kern/powerpc/ieee1275/init.c: Move from here ...
4637         * kern/ieee1275/init.c: ... to here.  Update all users.
4639         * kern/powerpc/ieee1275/cmain.c: Move from here ...
4640         * kern/ieee1275/cmain.c: ... to here.  Update all users.
4642         * kern/powerpc/ieee1275/openfw.c: Move from here ...
4643         * kern/ieee1275/openfw.c: ... to here.  Update all users.
4645         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
4646         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
4648 2008-04-10  Pavel Roskin  <proski@gnu.org>
4650         * configure.ac: Always use "_cv_" in cache variables for
4651         compatibility with Autoconf 2.62.
4653 2008-04-07  Robert Millan  <rmh@aybabtu.com>
4655         Revert grub/machine/init.h addition by Pavel (since it breaks on
4656         i386-ieee1275 and others):
4657         * util/i386/pc/misc.c: Remove grub/machine/init.h.
4658         * util/powerpc/ieee1275/misc.c: Likewise.
4660 2008-04-07  Robert Millan  <rmh@aybabtu.com>
4662         * util/grub-probe.c (probe): Improve error message.
4664 2008-04-07  Robert Millan  <rmh@aybabtu.com>
4666         * util/biosdisk.c (read_device_map): Skip devices that don't exist
4667         (this prevents the presence of a bogus entry from ruining the whole
4668         thing).
4670 2008-04-06  Pavel Roskin  <proski@gnu.org>
4672         * util/biosdisk.c: Include grub/util/biosdisk.h.
4673         * util/grub-fstest.c (execute_command): Make static.
4674         * util/grub-mkdevicemap.c (check_device): Likewise.
4675         * util/i386/pc/misc.c: Include grub/machine/init.h.
4676         * util/powerpc/ieee1275/misc.c: Likewise.
4677         * util/lvm.c: Include grub/util/lvm.h.
4678         * util/misc.c: Include grub/kernel.h, grub/misc.h and
4679         grub/cache.h.
4680         * util/raid.c: Include grub/util/raid.h.
4681         (grub_util_getdiskname): Make static.
4683         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
4684         grub_hostfs_fini(), as they are called from grub_init_all() and
4685         grub_fini_all() respectively.  This fixes an infinite loop in
4686         grub-fstest due to double registration of hostfs.
4687         Reported by Christian Franke <Christian.Franke@t-online.de>
4689 2008-04-05  Pavel Roskin  <proski@gnu.org>
4691         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
4692         all 8 functions.  Otherwise, probe function 0 only.
4694 2008-04-04  Pavel Roskin  <proski@gnu.org>
4696         * commands/lspci.c (grub_lspci_iter): Print the bus number
4697         correctly.
4699         * commands/lspci.c (grub_pci_classes): Fix typos.
4700         (grub_lspci_iter): Don't print func twice.  Print vendor ID
4701         before device ID, as it's normally done.
4703         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
4704         Fix signedness warnings.
4705         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
4706         Likewise.
4707         * util/ieee1275/get_disk_name.c: Include config.h so that
4708         _GNU_SOURCE is defined and getline() is declared.  Mark an
4709         unused argument as such.  Fix a signedness warning.
4711 2008-04-02  Pavel Roskin  <proski@gnu.org>
4713         * genkernsyms.sh.in: Use more robust assignments for CC and
4714         srcdir.  Quote srcdir.
4715         * gensymlist.sh.in: Likewise.  Assert at the compile time that
4716         the symbol table is not empty.
4718         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
4719         * fs/cpio.c (grub_cpio_read): Likewise.
4721 2008-04-01  Pavel Roskin  <proski@gnu.org>
4723         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
4724         * disk/host.c (grub_host_open): Likewise.
4725         * disk/loopback.c (grub_loopback_open): Likewise.
4726         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
4727         disk->id as in disk/host.c, not a multi-character constant.
4729         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
4730         later is obsolete, potentially dangerous and sets a bad example.
4731         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
4732         * util/misc.c (grub_util_get_image_size): Likewise.
4734         * disk/loopback.c (options): Improve help for "--partitions".
4736         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
4737         options to align them with the short options, e.g. "echo -e".
4739 2008-03-31  Bean  <bean123ch@gmail.com>
4741         * video/reader/png.c (grub_png_data): New member is_16bit and
4742         image_data.
4743         (grub_png_decode_image_header): Detect 16 bit png image.
4744         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
4745         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
4746         (grub_video_reader_png): Release memory occupied by image_data.
4748         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
4749         4096 bytes.
4750         (grub_nfs_mount): Skip the test for sector per cluster.
4752         * include/grub/ntfs.h (MAX_SPC): Removed.
4754 2008-03-31  Bean  <bean123ch@gmail.com>
4756         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
4757         (grub_probe_SOURCES): Add fs/afs.c.
4758         (grub_fstest_SOURCES): Likewise.
4759         (afs_mod_SOURCES): New variable.
4760         (afs_mod_CFLAGS): Likewise.
4761         (afs_mod_LDFLAGS): Likewise.
4763         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
4764         (grub_emu_SOURCES): Likewise.
4766         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4768         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4770         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4772         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4774         * fs/afs.c: New file.
4776 2008-03-30  Pavel Roskin  <proski@gnu.org>
4778         * disk/host.c: Include grub/misc.h to fix a warning.
4779         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
4780         warnings about implicit declarations.
4782         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
4783         variable.
4784         * include/grub/i386/loader.h: Change declaration of
4785         grub_linux_boot() to match what grub_loader_set() expects.
4786         * util/getroot.c (grub_guess_root_device): Return const char* to
4787         fix a warning.
4788         * util/grub-probe.c (probe): Fix a warning about uninitialized
4789         abstraction_name variable.
4790         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
4791         second argument as unused to fix a warning.
4793         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
4794         missing grub_error() call.
4796         * util/update-grub_lib.in: Define datarootdir, since Autoconf
4797         2.60 and newer uses it to define datadir.
4799         * commands/sleep.c: Fix warning about implicit declaration.
4800         * disk/memdisk.c: Likewise.
4801         * loader/aout.c: Likewise.
4802         * loader/i386/bsd_normal.c: Likewise.
4803         * util/grub-probe.c: Likewise.
4805         * commands/i386/cpuid.c (has_longmode): Make static.
4806         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
4807         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
4809         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
4810         GDT.  This is more robust, as %ds can change.
4811         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
4812         calling real_to_prot().
4813         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
4815 2008-03-28  Pavel Roskin  <proski@gnu.org>
4817         * kern/i386/pc/startup.S: Assert that uncompressed functions
4818         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
4819         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
4820         code, as they push parts of the code (error handlers) beyond
4821         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
4822         code as correctness and size.
4824 2008-03-28  Pavel Roskin  <proski@gnu.org>
4826         * kern/i386/pc/startup.S
4827         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
4828         data block address to the real mode, keep offset minimal.  This
4829         works around a bug in AWARD BIOS on old Athlon systems, which
4830         makes CD detection hang.
4832 2008-03-26  Pavel Roskin  <proski@gnu.org>
4834         * normal/color.c (grub_parse_color_name_pair): Make `name' a
4835         const.
4836         * include/grub/normal.h: Add grub_parse_color_name_pair()
4837         declaration.
4839 2008-03-24  Bean  <bean123ch@gmail.com>
4841         * disk/i386/pc/biosdisk.c (cd_start): Removed.
4842         (cd_count): Removed.
4843         (cd_drive): New variable.
4844         (grub_biosdisk_get_drive): Don't check for (cdN) device.
4845         (grub_biosdisk_call_hook): Likewise.
4846         (grub_biosdisk_iterate): Change cdrom detection method.
4847         (grub_biosdisk_open): Replace cd_start with cd_drive.
4848         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
4849         detect cdrom device.
4851         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
4852         Removed.
4853         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
4854         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
4855         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
4856         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
4857         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
4858         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
4859         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
4860         (grub_biosdisk_cdrp): New structure.
4861         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
4863         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
4865         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
4866         device.
4868         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
4869         New function.
4871 2008-03-20  Robert Millan  <rmh@aybabtu.com>
4873         Remove 2 TiB limit in ata.mod.
4874         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
4875         (grub_ata_dumpinfo): Print sector count with 0x%llx.
4876         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
4877         grub_uint64_t instead of grub_uint32_t.
4879 2008-03-05  Bean  <bean123ch@gmail.com>
4881         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
4882         (grub_multiboot): Set boot device.
4884         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
4886 2008-03-02  Bean  <bean123ch@gmail.com>
4888         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
4889         symlink_buffer.
4891 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
4893         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
4894         texinfo.tex.
4896         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
4897         modified.
4899         * docs/fdl.texi: New file.
4901         * docs/mdate-sh: New file. Copied from gnulib.
4902         * docs/texinfo.tex: Likewise.
4904         * config.guess: Updated from gnulib.
4905         * install-sh: Likewise.
4907 2008-02-28  Robert Millan  <rmh@aybabtu.com>
4909         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
4910         (aout_mod_SOURCES): New variable.
4911         (aout_mod_CFLAGS): Likewise.
4912         (aout_mod_LDFLAGS): Likewise.
4914         * conf/i386-ieee1275.rmk: Likewise.
4916 2008-02-28  Robert Millan  <rmh@aybabtu.com>
4918         * util/update-grub.in: Reorganise terminal validity check.  Accept
4919         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
4920         Based on suggestion by Franklin PIAT.
4922 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
4924         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
4925         function.
4926         * util/getroot.c (grub_util_check_block_device): New function that
4927         returns the given argument if it is a block device and returns NULL else.
4928         * util/grub-probe.c (argument_is_device): New variable.
4929         (probe): Promote device_name from a variable to an argument. Receive
4930         device_name from grub_util_check_block_device() if path is NULL and from
4931         grub_guess_root_device() else. Do not free() device_name anymore.
4932         (options): Introduce new parameter '-d, --device'.
4933         (main): Add description of the new parameter to the help screen.
4934         Rename path variable to argument. Set argument_is_device if the '-d'
4935         option is given. Pass argument to probe() depending on
4936         argument_is_device.
4938 2008-02-24  Bean  <bean123ch@gmail.com>
4940         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
4941         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
4942         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
4943         (GRUB_ISO9660_VOLDESC_PART): Likewise.
4944         (GRUB_ISO9660_VOLDESC_END): Likewise.
4945         (grub_iso9660_primary_voldesc): New member escape.
4946         (grub_iso9660_data): New member joliet.
4947         (grub_iso9660_convert_string): New function.
4948         (grub_iso9660_mount): Detect joliet extension.
4949         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
4950         (grub_iso9660_iso9660_label): Likewise.
4952         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
4953         (grub_setup_SOURCES): Add fs/udf.c.
4954         (grub_fstest_SOURCES): Likewise.
4955         (udf_mod_SOURCES): New variable.
4956         (udf_mod_CFLAGS): Likewise.
4957         (udf_mod_LDFLAGS): Likewise.
4959         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
4960         (grub_emu_SOURCES): Likewise.
4962         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4964         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4966         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4968         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4970         * fs/udf.c: New file.
4972 2008-02-24  Robert Millan  <rmh@aybabtu.com>
4974         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
4975         (normal/lexer.c_DEPENDENCIES): New variables.
4976         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4977         (normal/lexer.c_DEPENDENCIES): Likewise.
4978         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
4979         (normal/lexer.c_DEPENDENCIES): Likewise.
4980         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
4981         (normal/lexer.c_DEPENDENCIES): Likewise.
4982         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4983         (normal/lexer.c_DEPENDENCIES): Likewise.
4984         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4985         (normal/lexer.c_DEPENDENCIES): Likewise.
4987 2008-02-23  Robert Millan  <rmh@aybabtu.com>
4989         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
4990         since they were intended to be in hex.  This didn't break previously
4991         because of a bug in gpt_partition_map_iterate() (see below).
4993         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
4994         when checking the validity of GPT header.
4995         Remove `partno', since it always provides the same information as `i'.
4997 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
4999         * include/grub/efi/time.h: Fix a wrong comment.
5001 2008-02-19  Pavel Roskin  <proski@gnu.org>
5003         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
5004         message.
5006 2008-02-19  Bean  <bean123ch@gmail.com>
5008         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
5009         (aout_mod_SOURCES): New variable.
5010         (aout_mod_CFLAGS): Likewise.
5011         (aout_mod_LDFLAGS): Likewise.
5012         (_bsd_mod_SOURCES): New variable.
5013         (_bsd_mod_CFLAGS): Likewise.
5014         (_bsd_mod_LDFLAGS): Likewise.
5015         (bsd_mod_SOURCES): New variable.
5016         (bsd_mod_CFLAGS): Likewise.
5017         (bsd_mod_LDFLAGS): Likewise.
5019         * include/grub/aout.h: New file.
5021         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
5023         * include/grub/i386/bsd.h: New file.
5025         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
5026         to make it public.
5028         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
5029         function is called, so that it's possible to change it inside the hook.
5030         (grub_elf64_load): Likewise.
5031         (grub_elf_file): Don't close the file if elf header is not found.
5032         (grub_elf_close): Close the file if grub_elf_file fails (The new
5033         grub_elf_file won't close it).
5034         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
5035         (grub_elf64_size): Likewise.
5037         * kern/i386/loader.S (grub_unix_real_boot): New function.
5039         * loader/aout.c: New file.
5041         * loader/i386/bsd.c: New file.
5043         * loader/i386/bsd_normal.c: New file.
5045         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
5047         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
5048         can test other formats.
5050 2008-02-19  Robert Millan  <rmh@aybabtu.com>
5052         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
5053         (grub_gpt_partition_type_empty): Redefine with macro from
5054         `<grub/gpt_partition.h>'.
5055         (gpt_partition_map_iterate): Adjust partition type comparison.
5057         Export `entry' as partmap-specific `part.data' struct.
5058         (grub_gpt_header, grub_gpt_partentry): Move from here ...
5060         * include/grub/gpt_partition.h (grub_gpt_header)
5061         (grub_gpt_partentry): ... to here (new file).
5063         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
5065         (grub_gpt_partition_type_bios_boot): New const variable, defined
5066         with macro from `<grub/gpt_partition.h>'.
5068         (setup): Replace `first_start' with `embed_region', which keeps
5069         track of the embed region (and is partmap-agnostic).
5071         Replace find_first_partition_start() with find_usable_region(),
5072         which finds a usable region for embedding using partmap-specific
5073         knowledge (supports PC/MSDOS and GPT).
5075         Fix all assumptions that the embed region start at sector 1, using
5076         `embed_region.start' from now on.  Similarly, use `embed_region.end'
5077         rather than `first_start' to calculate available size.
5079         In grub_util_info() message, replace "into after the MBR" with an
5080         indication of the specific sector our embed region starts at.
5082 2008-02-19  Robert Millan  <rmh@aybabtu.com>
5084         * DISTLIST: Replace `commands/ieee1275/halt.c' and
5085         `commands/ieee1275/reboot.c' with `commands/halt.c' and
5086         `commands/reboot.c'.
5087         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5088         (halt_mod_SOURCES): Likewise.
5089         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5090         (halt_mod_SOURCES): Likewise.
5092 2008-02-17  Christian Franke  <franke@computer.org>
5094         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
5096 2008-02-17  Robert Millan  <rmh@aybabtu.com>
5098         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5099         set `first_start' to 0 for non-PC/MSDOS partition maps.
5101 2008-02-16  Robert Millan  <rmh@aybabtu.com>
5103         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5104         do not assume partition map is PC/MSDOS before performing checks that
5105         are specific to that layout.
5107 2008-02-13  Robert Millan  <rmh@aybabtu.com>
5109         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
5110         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
5111         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
5113 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
5115         * configure.ac: Only a cosmetic change on the handling of
5116         -fno-stack-protector.
5118 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
5120         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
5121         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
5122         reboot.c.
5123         (grub_install_SOURCES): Add halt.mod and reboot.mod.
5124         (halt_mod_SOURCES): New variable.
5125         (halt_mod_CFLAGS): Likewise.
5126         (halt_mod_LDFLAGS): Likewise.
5127         (reboot_mod_SOURCES): Likewise.
5128         (reboot_mod_CFLAGS): Likewise.
5129         (reboot_mod_LDFLAGS): Likewise.
5131         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
5132         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
5133         reboot.c.
5134         (halt_mod_SOURCES): Likewise.
5135         (reboot_mod_SOURCES): Likewise.
5137         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
5138         commands/i386/pc/reboot.c by commands/reboot.c.
5139         (reboot_mod_SOURCES): Likewise.
5141         * commands/i386/pc/reboot.c: merge this file ...
5143         * commands/ieee1275/reboot.c: ... and this file ...
5145         * commands/reboot.c: ... to this file.
5146         Add some precompiler directive to include the correct header for
5147         each machine.
5149         * commands/ieee1275/halt.c: move this file ...
5151         * commands/halt.c: ... to here.
5152         Add some precompiler directive to include the correct header for
5153         each machine.
5155         * include/grub/efi/efi.h (grub_reboot): New function declaration.
5156         (grub_halt): Likewise.
5158         * kern/efi/efi.c (grub_reboot): New function.
5159         (grub_halt): Likewise.
5161 2008-02-12  Robert Millan  <rmh@aybabtu.com>
5163         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
5164         /dev (like it is done for /dev/mapper).  This doesn't provide support
5165         for EVMS, but at least it is now easy to identify the problem when it
5166         arises.
5168 2008-02-11  Robert Millan  <rmh@aybabtu.com>
5170         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
5171         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
5172         comparing it with -1, not 0.
5174 2008-02-10  Robert Millan  <rmh@aybabtu.com>
5176         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
5177         `disk/lvm.c'.
5178         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5179         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
5181         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
5182         `disk/lvm.c' to the end of the list.
5183         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5184         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5186 2008-02-10  Robert Millan  <rmh@aybabtu.com>
5188         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
5189         grub_print_error() instead.  This will let user know why we're entering
5190         rescue mode.
5191         Based on suggestions from Sam Morris.
5193 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
5195         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
5196         on remaining N args, instead of "--" arg N times.
5198 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
5200         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
5201         (fill_with_default_glyph): Changed to use unknown_glyph for fill
5202         pattern for unknown glyphs.
5204 2008-02-09  Robert Millan  <rmh@aybabtu.com>
5206         * configure.ac: Probe for `help2man'.
5207         * Makefile.in (builddir): New variable.
5208         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
5209         or otherwise add a few flags/options to it.
5210         (install-local): For every executable utility or script that is
5211         installed, invoke $(HELP2MAN) to install a manpage based on --help
5212         output.
5214         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
5215         that it doesn't prevent --help from working in build tree.
5217         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
5218         with `bug-grub@gnu.org'.
5219         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
5220         * util/update-grub.in (usage): New function.
5221         Implement proper argument check, with support for --help and --version
5222         (as well as existing -y).
5224 2008-02-09  Christian Franke  <franke@computer.org>
5226         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
5227         avoid overwriting previous output.
5228         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
5230 2008-02-09  Robert Millan  <rmh@aybabtu.com>
5232         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
5233         drawing the menu.
5235 2008-02-09  Robert Millan  <rmh@aybabtu.com>
5237         * commands/sleep.c: New file.
5238         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
5239         (sleep_mod_SOURCES): New variable.
5240         (sleep_mod_CFLAGS): Likewise.
5241         (sleep_mod_LDFLAGS): Likewise.
5243 2008-02-09  Robert Millan  <rmh@aybabtu.com>
5245         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
5246         situations in which we can deduce the RAID size and the superblock
5247         doesn't match it.
5249 2008-02-09  Robert Millan  <rmh@aybabtu.com>
5251         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
5252         and return a grub_diskmemberlist_t composed of LVM physical volumes.
5253         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
5255         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
5256         and return a grub_diskmemberlist_t composed of physical array members.
5257         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
5259         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
5260         prototype.
5261         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
5262         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
5263         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
5265         * util/grub-probe.c (probe): Move partmap probing code from here ...
5266         (probe_partmap): ... to here.
5267         (probe): Use probe_partmap() once for the disk we're probing, and
5268         additionally, when such disk contains a memberlist() struct member,
5269         once for each disk that is contained in the structure returned by
5270         memberlist().
5272 2008-02-09  Robert Millan  <rmh@aybabtu.com>
5274         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
5275         environment variable to 'all' in order to obtain debug output from
5276         non-util/ code.
5277         * util/i386/pc/grub-setup.c (main): Likewise.
5279 2008-02-08  Robert Millan  <rmh@aybabtu.com>
5281         * disk/raid.c (grub_raid_scan_device): Check for
5282         `array->device[sb.this_disk.number]' rather than for
5283         `array->device[sb.this_disk.number]->name', since the latter is not
5284         guaranteed to be accessible.
5286 2008-02-08  Robert Millan  <rmh@aybabtu.com>
5288         * disk/raid.c: Update copyright.
5289         * fs/cpio.c: Likewise.
5290         * include/grub/raid.h: Likewise.
5291         * loader/i386/pc/multiboot.c: Likewise.
5292         * util/hostfs.c: Likewise.
5294 2008-02-08  Robert Millan  <rmh@aybabtu.com>
5296         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
5297         to a grub_disk_t array.
5298         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
5299         `device[x]'.
5300         (grub_raid_scan_device): Replace `device[x].name' accesses with
5301         `device[x]->name'.  Simplify initialization of `array->device[x]'.
5303 2008-02-08  Robert Millan  <rmh@aybabtu.com>
5305         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
5306         grub_dprintf() calls.
5307         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
5308         error message.
5310 2008-02-07  Christian Franke  <franke@computer.org>
5312         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
5313         instead of fseek and ftell to support large files.
5314         (grub_hostfs_read): Likewise.
5316 2008-02-07  Robert Millan  <rmh@aybabtu.com>
5318         Patch from Jeroen Dekkers.
5319         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
5320         failure, since successfully reading all array members might not be
5321         required.
5323 2008-02-06  Robert Millan  <rmh@aybabtu.com>
5325         * util/grub-probe.c (probe): Simplify partmap probing (with the
5326         assumption that the first word up to the underscore equals to
5327         the module name).
5329 2008-02-06  Christian Franke  <franke@computer.org>
5331         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
5332         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
5333         last block of a cpio or tar stream.
5334         Check for "TRAILER!!!" instead of any empty data
5335         block to detect last block of a cpio stream.
5336         (grub_cpio_dir): Fix constness of variable np.
5337         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
5338         cpio or tar trailer is detected.  This fixes a crash
5339         on open of a non existing file.
5341 2008-02-05  Bean  <bean123ch@gmail.com>
5343         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
5344         address of entry.
5345         (grub_multiboot_load_elf64): Likewise.
5346         (grub_multiboot): Initialize mbi structure.
5348         * util/grub-fstest.c: Don't include unused header file script.h.
5350         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
5351         of file.
5352         (grub_fstest_SOURCES): Likewise.
5354 2008-02-05  Robert Millan  <rmh@aybabtu.com>
5356         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
5357         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
5358         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
5359         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
5361         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
5362         (translation_table): Replace hardcoded values with macros
5363         provided by `<grub/term.h>'.
5365         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
5366         (keyboard_map): Correct/add a few values, with macros provided
5367         by `<grub/term.h>'.
5368         (keyboard_map_shift): Zero values that don't differ from their
5369         `keyboard_map' equivalents.
5370         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
5371         Discard the second scan code that is always sent by Caps lock.
5372         Only use `keyboard_map_shift' when it provides a non-zero value,
5373         otherwise fallback to `keyboard_map'.
5375 2008-02-04  Bean  <bean123ch@gmail.com>
5377         * Makefile.in (enable_grub_fstest): New variable.
5379         * conf/common.rmk (grub_fstest_init.lst): New rule.
5380         (grub_fstest_init.h): Likewise.
5381         (grub_fstest_init.c): Likewise.
5382         (util/grub-fstest.c_DEPENDENCIES): New variable.
5383         (grub_fstest_SOURCES): Likewise.
5385         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
5387         * util/grub-fstest.c: New file.
5389 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
5391         Make grub-setup handle a separate root device.
5393         * util/i386/pc/grub-setup.c (setup): Always open the root device,
5394         so that the root device can be compared with the destination
5395         device.
5396         When embedding the core image, if the root and destination devices
5397         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
5398         0xFF.
5399         When not embedding, set ROOT_DRIVE to 0xFF.
5401 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
5403         Add support for having a grub directory in a different drive. This
5404         is still only the data handling part.
5406         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
5407         (codestart): Save %dh in GRUB_ROOT_DRIVE.
5408         (grub_root_drive): New variable.
5410         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
5411         instead of GRUB_BOOT_DRIVE to construct a device name. Set
5412         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
5413         as it was.
5415         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
5417         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
5418         macro.
5419         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
5421         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
5422         is bogus, because PXE booting does not specify any drive
5423         correctly.
5425         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
5426         am not sure if this is really correct.
5428         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
5429         is always identical to the boot drive when booting from a CD.
5431         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
5432         longer.
5433         (root_drive): New variable.
5434         (real_start): Unconditionally set %dh to ROOT_DRIVE.
5435         (setup_sectors): Push %dx right after popping it, because %dh will
5436         be modified later.
5437         (copy_buffer): Restore %dx.
5439 2008-02-03  Robert Millan  <rmh@aybabtu.com>
5441         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
5442         use `cdboot.img' for cdrom images.
5444 2008-02-03  Robert Millan  <rmh@aybabtu.com>
5446         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
5447         only setup gfxterm when `font' command has succeeded.
5449 2008-02-03  Robert Millan  <rmh@aybabtu.com>
5451         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
5452         (grub_rescue_cmd_multiboot_loader)
5453         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
5455 2008-02-03  Pavel Roskin  <proski@gnu.org>
5457         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
5458         %edx and %esi from stack only after grub_gate_a20() is called.
5459         grub_gate_a20() clobbers %edx.
5461 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
5463         * configure.ac (AC_INIT): Bumped to 1.96.
5465         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
5466         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
5467         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
5468         video/readers/png.c.
5470 2008-02-03  Bean  <bean123ch@gmail.com>
5472         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
5473         (cdboot_img_SOURCES): New variable.
5474         (cdboot_img_ASFLAGS): New variable.
5475         (cdboot_img_LDFLAGS): New variable.
5477         * boot/i386/pc/cdboot.S: New file.
5479         * disk/i386/pc/biosdisk.c (cd_start): New variable.
5480         (cd_count): Likewise.
5481         (grub_biosdisk_get_drive): Add support for cd device.
5482         (grub_biosdisk_call_hook): Likewise.
5483         (grub_biosdisk_iterate): Likewise.
5484         (grub_biosdisk_open): Likewise.
5485         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
5486         (grub_biosdisk_rw): Support reading from cd device.
5487         (GRUB_MOD_INIT): Iterate cd devices.
5489         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
5490         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
5491         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
5493         * kern/i386/pc/init.c (make_install_device): Check for cd device.
5495 2008-02-02  Robert Millan  <rmh@aybabtu.com>
5497         * commands/read.c: New file.
5498         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
5499         (read_mod_SOURCES): New variable.
5500         (read_mod_CFLAGS): Likewise.
5501         (read_mod_LDFLAGS): Likewise.
5503 2008-02-02  Robert Millan  <rmh@aybabtu.com>
5505         * normal/main.c (grub_normal_execute): Check for `menu->size' when
5506         determining whether menu has to be displayed.
5508 2008-02-02  Marco Gerards  <marco@gnu.org>
5510         * bus/pci.c: New file.
5512         * include/grub/pci.h: Likewise.
5514         * include/grub/i386/pc/pci.h: Likewise.
5516         * commands/lspci.c: Likewise.
5518         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
5519         `lspci.mod'.
5520         (pci_mod_SOURCES): New variable.
5521         (pci_mod_CFLAGS): Likewise.
5522         (pci_mod_LDFLAGS): Likewise.
5523         (lspci_mod_SOURCES): Likewise.
5524         (lspci_mod_CFLAGS): Likewise.
5525         (lspci_mod_LDFLAGS): Likewise.
5527 2008-02-02  Bean  <bean123ch@gmail.com>
5529         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
5530         (grub_ufs_get_file_block): Fix indirect block calculation problem.
5532         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
5533         (grub_xfs_btree_node): New structure.
5534         (grub_xfs_btree_root): New structure.
5535         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
5536         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
5537         (GRUB_XFS_EXTENT_BLOCK): Likewise.
5538         (GRUB_XFS_EXTENT_SIZE): Likewise.
5539         (grub_xfs_read_block): Support btree format type.
5540         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
5541         Use directory block as basic unit.
5543         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
5545         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
5546         __attribute__ ((__regparm__ (1))).
5548 2008-02-01  Robert Millan  <rmh@aybabtu.com>
5550         Correct a mistake in previous commit.
5552         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
5553         top.
5554         (normal/command.c_DEPENDENCIES): New variable.
5556 2008-02-01  Robert Millan  <rmh@aybabtu.com>
5558         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
5559         top.
5560         (normal/command.c_DEPENDENCIES): New variable.
5561         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
5562         * conf/i386-ieee1275.rmk: Likewise.
5563         * conf/i386-linuxbios.rmk: Likewise.
5564         * conf/i386-pc.rmk: Likewise.
5565         * conf/sparc64-ieee1275.rmk: Likewise.
5566         * conf/powerpc-ieee1275.rmk: Likewise.
5567         (grub_emu_SOURCES): Add `fs/fshelp.c'.
5569         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
5571 2008-02-01  Robert Millan  <rmh@aybabtu.com>
5573         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
5574         call at beginning of function.
5576 2008-01-31  Pavel Roskin  <proski@gnu.org>
5578         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
5579         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
5580         (grub_mkrescue_SOURCES): Likewise.
5581         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
5583 2008-01-30  Robert Millan  <rmh@aybabtu.com>
5585         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
5586         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
5587         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
5588         (grub_probe_SOURCES): ... to here.
5590         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
5591         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
5592         * conf/i386-ieee1275.rmk: Likewise.
5593         * conf/i386-linuxbios.rmk: Likewise.
5594         * conf/powerpc-ieee1275.rmk: Likewise.
5596 2008-01-30  Tristan Gingold  <gingold@free.fr>
5598         * kern/rescue.c: Silently accept empty lines.
5600 2008-01-29  Bean  <bean123ch@gmail.com>
5602         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
5603         (real_code_2): Code cleanup and change comment style.
5604         (move_memory): Avoid using 32-bit address mode.
5606 2008-01-29  Bean  <bean123ch@gmail.com>
5608         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
5609         (png_mod_SOURCES): New variable.
5610         (png_mod_CFLAGS): Likewise.
5611         (png_mod_LDFLAGS): Likewise.
5613         * video/readers/png.c: New file.
5615 2008-01-28  Robert Millan  <rmh@aybabtu.com>
5617         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
5618         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
5619         `ifndef GRUB_MOD_GAP' hack.
5620         * util/elf/grub-mkimage.c (add_segments): Likewise.
5622 2008-01-27  Robert Millan  <rmh@aybabtu.com>
5624         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
5625         `GRUB_MOD_GAP' for platforms in which it's not defined.
5626         * util/elf/grub-mkimage.c (add_segments): Likewise.
5628 2008-01-27  Robert Millan  <rmh@aybabtu.com>
5630         Get grub-emu to build again (including parallel builds).
5632         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
5633         Split into ...
5634         (util/grub-emu.c_DEPENDENCIES): ... this, ...
5635         (normal/execute.c_DEPENDENCIES): ... this, ...
5636         (grub-emu_DEPENDENCIES): ... and this.
5638         * conf/i386-efi.rmk: Likewise.
5639         * conf/i386-linuxbios.rmk: Likewise.
5640         * conf/i386-ieee1275.rmk: Likewise.
5641         * conf/powerpc-ieee1275.rmk: Likewise.
5642         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
5644 2008-01-27  Robert Millan  <rmh@aybabtu.com>
5646         * NEWS: Add a few items.
5648 2008-01-27  Robert Millan  <rmh@aybabtu.com>
5650         Fix parallel builds with grub-emu.  Based on earlier commit for
5651         grub-probe and grub-setup.
5653         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5654         (util/grub-emu.c_DEPENDENCIES): ... this.
5655         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5656         (util/grub-emu.c_DEPENDENCIES): ... this.
5657         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5658         (util/grub-emu.c_DEPENDENCIES): ... this.
5659         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5660         (util/grub-emu.c_DEPENDENCIES): ... this.
5661         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5662         (util/grub-emu.c_DEPENDENCIES): ... this.
5664 2008-01-27  Pavel Roskin  <proski@gnu.org>
5666         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
5667         to create a gap between _end and the modules added to the image
5668         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
5669         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
5670         * util/elf/grub-mkimage.c (add_segments): Likewise.
5672 2008-01-26  Pavel Roskin  <proski@gnu.org>
5674         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
5675         just return an error.
5677 2008-01-26  Bean  <bean123ch@gmail.com>
5679         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
5680         (grub_reiserfs_get_item): Save offset of the next item.
5681         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
5683 2008-01-25  Robert Millan  <rmh@aybabtu.com>
5685         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
5686         make all filesystem sources appear together (possibly fixing omissions
5687         while at it).
5688         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5689         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5690         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5691         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5693         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
5694         add `kern/file.c'.
5695         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
5696         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5697         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
5698         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5700         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
5701         (probe): Add a sanity check to make sure of our ability to read
5702         requested files when probing for filesystem type.
5704         * genmk.rb: Update copyright year (2007).
5706         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
5707         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
5708         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
5709         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
5710         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
5711         : Remove function prototypes.
5713 2008-01-25  Robert Millan  <rmh@aybabtu.com>
5715         Revert my previous commits (based on wrong assumption of how grub_errno
5716         works).
5718         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
5719         * kern/file.c (grub_file_open): Likewise.
5721 2008-01-24  Pavel Roskin  <proski@gnu.org>
5723         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
5724         that hang if GRUB tries to setup colors.
5725         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
5726         colors for firmwares that don't support it.
5727         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
5728         Recognize Open Hack'Ware, set flags to work around its
5729         limitations.
5731 2008-01-24  Robert Millan  <rmh@aybabtu.com>
5733         * kern/file.c (grub_file_open): Do not account previous failures of
5734         unrelated functions when grub_errno is checked for.
5735         Reported by Oleg Strikov.
5737 2008-01-24  Bean  <bean123ch@gmail.com>
5739         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
5740         (grub_ufs_sblock): New member volume name.
5741         (grub_ufs_find_file): Fix string copy bug.
5742         (grub_ufs_label): Implement this function properly.
5744         * fs/hfs.c (grub_hfs_cnid_type): New enum.
5745         (grub_hfs_iterate_records): Use the correct file number for extents
5746         and catalog file. Fix problem in next index calculation.
5747         (grub_hfs_find_node): Replace recursive function call with loop.
5748         (grub_hfs_iterate_dir): Replace recursive function call with loop.
5750 2008-01-23  Robert Millan  <rmh@aybabtu.com>
5752         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
5753         `<grub/symbol.h>' and `<grub/multiboot.h>'.
5754         (grub_multiboot2_real_boot): New function prototype.
5756         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
5757         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
5759         * kern/i386/ieee1275/init.c (grub_os_area_addr)
5760         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
5762 2008-01-23  Robert Millan  <rmh@aybabtu.com>
5764         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
5765         #ifdef'ed out grub_printf().
5767 2008-01-23  Robert Millan  <rmh@aybabtu.com>
5769         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
5770         grub_dprintf calls, since they make "debug=all" mode unusable.
5771         (grub_console_checkkey): Likewise.
5773 2008-01-23  Robert Millan  <rmh@aybabtu.com>
5775         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5776         `term/i386/pc/at_keyboard.c'.
5777         (pkglib_MODULES): Add `serial.mod'.
5778         (serial_mod_SOURCES): New variable.
5779         (serial_mod_CFLAGS): Likewise.
5780         (serial_mod_LDFLAGS): Likewise.
5782         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
5783         `<grub/powerpc/ieee1275/console.h>'.
5784         (grub_keyboard_controller_init): New function prototype.
5785         (grub_console_checkkey): Likewise.
5786         (grub_console_getkey): Likewise.
5788         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
5789         keyboard on i386.
5791         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
5792         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
5794 2008-01-23  Robert Millan  <rmh@aybabtu.com>
5796         * kern/i386/pc/init.c (make_install_device): When memdisk image is
5797         present, "(memdisk)/boot/grub" becomes the default prefix.
5799         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
5800         a memdisk tarball with all the modules.  Add --overlay=DIR option that
5801         allows users to overlay additional files into the image.
5803 2008-01-23  Robert Millan  <rmh@aybabtu.com>
5805         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
5806         and `machine/memory.h'.
5807         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
5808         (_multiboot_mod_SOURCES): New variable.
5809         (_multiboot_mod_CFLAGS): Likewise.
5810         (_multiboot_mod_LDFLAGS): Likewise.
5811         (multiboot_mod_SOURCES): Likewise.
5812         (multiboot_mod_CFLAGS): Likewise.
5813         (multiboot_mod_LDFLAGS): Likewise.
5815         * include/grub/i386/ieee1275/loader.h: New file.
5817         * include/grub/i386/ieee1275/machine.h: Likewise.
5819         * include/grub/i386/ieee1275/memory.h: Likewise.
5821         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
5822         variable declaration.
5823         (grub_os_area_size): Likewise.
5825         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
5826         (grub_lower_mem, grub_upper_mem): New variables.
5827         (grub_stop_floppy): New function (just to make
5828         grub_multiboot2_real_boot() happy).
5830         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
5831         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
5832         (grub_stop): New function.
5833         Include `"../realmode.S"' and `"../loader.S"'.
5835         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
5836         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
5838         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
5839         rely on grub_multiboot2_real_boot() for final boot.
5841 2008-01-22  Robert Millan  <rmh@aybabtu.com>
5843         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
5844         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
5845         device that doesn't look like an SD card.
5846         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5847         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
5848         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
5849         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
5850         found.
5852 2008-01-22  Robert Millan  <rmh@aybabtu.com>
5854         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
5855         avoid claiming over our own code.
5857 2008-01-22  Bean  <bean123ch@gmail.com>
5859         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
5860         (jpeg_mod_SOURCES): New variable.
5861         (jpeg_mod_CFLAGS): Likewise.
5862         (jpeg_mod_LDFLAGS): Likewise.
5864         * video/readers/jpeg.c : New file.
5866 2008-01-22  Bean  <bean123ch@gmail.com>
5868         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
5869         there are no more items.
5871 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5873         * kern/mm.c (grub_mm_init_region): Improve debug message.
5875 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5877         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
5878         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
5879         address.
5880         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
5881         a C macro.
5882         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
5883         Indicates start of upper memory.
5884         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
5885         (generate_image): Abort when image size is big enough to corrupt
5886         upper memory.
5888         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
5889         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
5890         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5891         instead of hardcoding 0xA0000.
5892         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
5893         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5894         instead of hardcoding 0xA0000.
5896 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5898         * disk/memdisk.c (memdisk_size): New variable.
5899         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
5900         `memdisk_size'.
5901         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
5902         image to dynamic memory.
5903         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
5904         `memdisk_size'.  Free memdisk block.
5906 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5908         Fix detection of very small filesystems (like tar).
5910         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
5911         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
5912         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
5913         a problem with this disk).
5915 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5917         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
5918         on grub_biosdisk_rw_standard() error.
5920 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5922         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
5923         recent changes.
5924         * kern/elf.c: Likewise.
5925         * kern/ieee1275/ieee1275.c: Likewise.
5926         * kern/powerpc/ieee1275/openfw.c: Likewise.
5927         * term/ieee1275/ofconsole.c: Likewise.
5929 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5931         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
5933         * include/grub/kernel.h (grub_arch_memdisk_addr)
5934         (grub_arch_memdisk_size): Moved from here ...
5936         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
5937         (grub_arch_memdisk_size): ... to here.
5939 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5941         Mostly based on bugfix from Bean.
5943         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
5944         attribute with hook() parameter.
5945         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
5946         declaration.
5947         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
5948         attribute with hook() parameter.
5949         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
5950         declaration.
5952 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5954         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
5955         (pkglib_MODULES): Add `memdisk.mod'.
5956         (memdisk_mod_SOURCES): New variable.
5957         (memdisk_mod_CFLAGS): Likewise.
5958         (memdisk_mod_LDFLAGS): Likewise.
5960         * disk/memdisk.c: New file.
5962         * include/grub/disk.h (grub_disk_dev_id): Add
5963         `GRUB_DISK_DEVICE_MEMDISK_ID'.
5965         * include/grub/i386/pc/kernel.h
5966         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
5967         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
5968         (grub_kernel_image_size): New variable declaration.
5969         (grub_total_module_size): Likewise.
5970         (grub_memdisk_image_size): Likewise.
5972         * include/grub/i386/pc/memory.h
5973         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
5975         * include/grub/kernel.h: Include `<grub/symbol.h>'.
5976         (grub_arch_memdisk_addr): New variable declaration.
5977         (grub_arch_memdisk_size): Likewise.
5979         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
5980         (grub_arch_memdisk_size): Likewise.
5982         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
5983         (codestart): Replace hardcoded `0x100000' with
5984         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
5986         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
5987         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
5988         not NULL, append the contents of the file it refers to, at the end of
5989         the compressed kernel image.  Initialize `grub_memdisk_image_size'
5990         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
5991         (options): Add "memdisk"|'m' option.
5992         (main): Parse --memdisk|-m option, and pass user-provided path as
5993         parameter to generate_image().
5995 2008-01-20  Robert Millan  <rmh@aybabtu.com>
5997         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
5998         grub_dprintf() calls from here ...
5999         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
6001 2008-01-20  Robert Millan  <rmh@aybabtu.com>
6003         Fix detection of "real mode" when /options/real-mode? doesn't exist.
6005         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
6006         declaration.
6007         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
6008         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
6009         `GRUB_IEEE1275_FLAG_REAL_MODE'.
6010         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
6011         property).
6012         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
6013         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
6015 2008-01-19  Robert Millan  <rmh@aybabtu.com>
6017         Get rid of confusing function (superseded by
6018         `grub_ieee1275_get_integer_property')
6019         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
6020         prototype.
6021         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
6022         function.
6023         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
6024         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
6025         in native endianness from grub_ieee1275_get_integer_property().
6027 2008-01-19  Robert Millan  <rmh@aybabtu.com>
6029         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
6030         command after "shut-down", since implementations differ on which
6031         the command for halt is.
6033 2008-01-19  Robert Millan  <rmh@aybabtu.com>
6035         * include/grub/i386/linuxbios/console.h: Add header protection.
6036         (grub_keyboard_controller_init): New function prototype.
6037         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
6038         (KEYBOARD_COMMAND_READ): Likewise.
6039         (KEYBOARD_COMMAND_WRITE): Likewise.
6040         (KEYBOARD_SCANCODE_SET1): Likewise.
6041         (grub_keyboard_controller_write): New function.
6042         (grub_keyboard_controller_read): Likewise.
6043         (grub_keyboard_controller_init): Likewise.
6045         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
6046         (grub_console_init): On coreboot/LinuxBIOS, call
6047         grub_keyboard_controller_init().
6049 2008-01-19  Robert Millan  <rmh@aybabtu.com>
6051         PowerPC changes provided by Pavel Roskin.
6053         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
6054         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
6055         don't rely on cmain() doing it.
6056         * kern/i386/ieee1275/startup.S (_start): Store %eax in
6057         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
6059 2008-01-16  Robert Millan  <rmh@aybabtu.com>
6061         * include/grub/i386/linuxbios/memory.h
6062         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
6063         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
6064         receive `table_header' as argument.  Instead, probe for it in the
6065         known memory ranges where it can be present.
6066         (grub_available_iterate): Do not pass a fixed `table_header' address
6067         to grub_linuxbios_table_iterate().
6069 2008-01-15  Robert Millan  <rmh@aybabtu.com>
6071         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
6072         * conf/i386-ieee1275.rmk: New file.
6073         * include/grub/i386/ieee1275/console.h: Likewise.
6074         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
6075         * include/grub/i386/ieee1275/kernel.h: Likewise.
6076         * include/grub/i386/ieee1275/time.h: Likewise.
6077         * kern/i386/ieee1275/init.c: Likewise.
6078         * kern/i386/ieee1275/startup.S: Likewise.
6080 2008-01-15  Robert Millan  <rmh@aybabtu.com>
6082         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
6083         when pointers are 32-bit (but still do set it to one when they are
6084         64-bit).
6086 2008-01-15  Robert Millan  <rmh@aybabtu.com>
6088         * include/grub/ieee1275/ieee1275.h
6089         (grub_ieee1275_get_integer_property): New function prototype.
6091         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
6092         (grub_ieee1275_get_integer_property): New function.  Wraps around
6093         grub_ieee1275_get_property() to handle endianness.
6095         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
6096         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
6097         where appropriate.
6098         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
6099         (grub_map): Likewise.
6100         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
6102 2008-01-15  Bean  <bean123ch@gmail.com>
6104         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
6105         (grub_script_execute_cmdline): Reset grub_errno.
6107         * normal/main.c (read_config_file): Reset grub_errno.
6109         * normal/parse.y (script_init): New.
6110         (script): Move function and menuentry here.
6111         (delimiter): New.
6112         (command): Add delimiter at the end of command.
6113         (commands): Adjust to match the new command.
6114         (commandblock): Remove grub_script_lexer_record_start.
6115         (menuentry): Add grub_script_lexer_record_start, use the new commands.
6116         (if): Use the new commands.
6118         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
6120 2008-01-15  Robert Millan  <rmh@aybabtu.com>
6122         * normal/menu.c (run_menu): Move timeout message from here ...
6123         (print_timeout): ... to here.
6124         (run_menu): Use print_timeout() once during initial draw to print
6125         the whole message, and again in every clock tick to update only
6126         the number of seconds.
6128 2008-01-15  Robert Millan  <rmh@aybabtu.com>
6130         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
6131         actual size of `available' from grub_ieee1275_get_property(), and
6132         restrict parsing to that bound.
6134 2008-01-15  Christian Franke  <franke@computer.org>
6136         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
6137         (argp_program_version): Remove variable.
6138         (argp_program_bug_address): Likewise.
6139         (options): Convert from struct argp_option to struct option.
6140         (struct arguments): Remove.
6141         (parse_opt): Remove.
6142         (usage): New function.
6143         (main): Replace struct args members by simple variables.
6144         Replace argp_parse() by getopt_long().
6145         Add switch to evaluate options.
6146         Add missing "(...)" around root_dev in prefix string.
6148 2008-01-14  Robert Millan  <rmh@aybabtu.com>
6150         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
6151         for grub_ieee1275_exit(), in order to improve portability.
6153 2008-01-14  Robert Millan  <rmh@aybabtu.com>
6155         * util/grub.d/10_linux.in (prefix): Define.
6156         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
6158 2008-01-13  Pavel Roskin  <proski@gnu.org>
6160         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
6161         grub_errno if no errors have been detected.
6163 2008-01-12  Robert Millan  <rmh@aybabtu.com>
6165         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
6166         (grub_util_get_dev_abstraction): New function prototype.
6168         * util/getroot.c: Include `<grub/util/getroot.h>'
6169         (grub_util_get_grub_dev): Move detection of abstraction type to ...
6170         (grub_util_get_dev_abstraction): ... here (new function).
6172         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
6173         `PRINT_ABSTRACTION'.
6174         (probe): Probe for abstraction type when requested.
6175         (main): Understand `--target=abstraction'.
6177         * util/i386/efi/grub-install.in: Add abstraction module to core
6178         image when it is found to be necessary.
6179         * util/i386/pc/grub-install.in: Likewise.
6180         * util/powerpc/ieee1275/grub-install.in: Likewise.
6182         * util/update-grub_lib.in (font_path): Return system path without
6183         converting to GRUB path.
6184         * util/update-grub.in: Convert system path returned by font_path()
6185         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
6186         abstraction module is needed for loading fonts (if any).  Export
6187         that as `GRUB_PRELOAD_MODULES'.
6188         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
6189         insmod commands).
6191 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
6193         Remove some unused code from reiserfs.
6195         * fs/reiserfs.c (struct grub_reiserfs_key)
6196         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
6197         (struct grub_reiserfs_node_body): Removed.
6198         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6199         Likewise.
6200         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6201         Likewise.
6202         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6203         Likewise.
6204         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6205         Likewise.
6206         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6207         Likewise.
6208         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
6209         Likewise.
6210         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6211         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6212         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6214 2008-01-10  Robert Millan  <rmh@aybabtu.com>
6216         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
6217         Determines if a file is garbage left by packaging systems, etc.
6218         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
6219         for processing /etc/grub.d scripts.
6220         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
6221         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
6222         as a condition for processing Linux images.
6224 2008-01-10  Pavel Roskin  <proski@gnu.org>
6226         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
6227         to compile reiserfs.c on PowerPC.
6229 2008-01-10  Robert Millan  <rmh@aybabtu.com>
6231         * kern/device.c (grub_device_iterate): Do not abort device iteration
6232         when one of the devices cannot be opened.
6233         * kern/disk.c (grub_disk_open): Do not account previous failures of
6234         unrelated functions when grub_errno is checked for.
6236 2008-01-08  Robert Millan  <rmh@aybabtu.com>
6238         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
6239         `! grub_linux_is_bzimage', change order of address comparison to make
6240         it more intuitive, and improve "too big zImage" error message.
6242 2008-01-08  Robert Millan  <rmh@aybabtu.com>
6244         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
6245         `$(update-grub_DATA)'.
6246         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
6247         targets.
6249 2008-01-07  Robert Millan  <rmh@aybabtu.com>
6251         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
6252         which instruction is modified by grub-setup during installation
6253         (since it wasn't obvious by only looking at this file).
6255 2008-01-07  Robert Millan  <rmh@aybabtu.com>
6257         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
6258         listing actual TODO items.
6260 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
6262         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
6263         correctly.
6264         (grub_reiserfs_get_key_offset): Likewise.
6265         (grub_reiserfs_set_key_offset): Likewise.
6266         (grub_reiserfs_set_key_type): Likewise.
6267         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
6269         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
6270         better to remove the bitfield version completely.
6272 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
6274         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
6275         allocated from the heap, due to the fshelp implementation.
6276         (grub_reiserfs_dir): Free NODE, due to the same reason.
6278 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
6280         Mostly from Vincent Pelletier:
6282         * fs/reiserfs.c: New file.
6284         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
6285         (reiserfs_mod_SOURCES): New variable.
6286         (reiserfs_mod_CFLAGS): Likewise.
6287         (reiserfs_mod_LDFLAGS): Likewise.
6289         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
6290         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
6291         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
6292         normal/color.c.
6294 2008-01-06  Robert Millan  <rmh@aybabtu.com>
6296         * normal/color.c: Remove `<grub/env.h>'.
6298 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
6300         * include/grub/normal.h: Include <grub/env.h>.
6302 2008-01-05  Robert Millan  <rmh@aybabtu.com>
6304         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
6305         usage example with `(hd0,1)'.
6306         Reported by Samuel Thibault.
6308 2008-01-05  Robert Millan  <rmh@aybabtu.com>
6310         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
6311         (grub_linux_boot_zimage): Rename to ...
6312         (grub_linux_boot): ... this.
6313         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
6314         (grub_linux_boot_zimage): Conditionalize zImage copy.
6316         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
6317         (grub_linux_boot_bzimage): Remove prototype.
6318         (grub_linux_boot_zimage): Rename to ...
6319         (grub_linux_boot): ... this.
6321         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
6322         (grub_linux_boot): Remove function.
6324 2008-01-05  Robert Millan  <rmh@aybabtu.com>
6326         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
6327         (grub_env_write_color_highlight): Likewise.
6328         (grub_wait_after_message): Likewise.
6330         * normal/color.c: New file.
6332         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6333         (normal_mod_DEPENDENCIES): Likewise.
6335         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6336         (normal_mod_DEPENDENCIES): Likewise.
6338         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6339         (normal_mod_DEPENDENCIES): Likewise.
6341         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6342         (normal_mod_DEPENDENCIES): Likewise.
6344         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
6345         for waiting after a message is printed.
6346         * normal/main.c (read_config_file): Likewise.
6347         (grub_normal_init): Register grub_env_write_color_normal() and
6348         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
6349         `color_highlight' variables as global.
6351         * normal/menu.c (grub_wait_after_message): New function.
6352         (grub_color_menu_normal): New variable.  Replaces ...
6353         (GRUB_COLOR_MENU_NORMAL): ... this macro.
6354         (grub_color_menu_highlight): New variable.  Replaces ...
6355         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
6356         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
6357         `GRUB_TERM_COLOR_STANDARD'.
6358         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
6359         `normal_code' and `highlight_code' to `old_color_normal' and
6360         `old_color_highlight', respectively.
6361         (grub_menu_init_page): Update colors when drawing the menu, based on
6362         `menu_color_normal' and `menu_color_highlight' variables.
6363         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
6364         a message is printed.
6366 2008-01-05  Robert Millan  <rmh@aybabtu.com>
6368         * kern/env.c (grub_env_context_open): Propagate hooks for global
6369         variables to new context.
6371         * kern/main.c (grub_set_root_dev): Export `root' variable.
6373 2008-01-05  Robert Millan  <rmh@aybabtu.com>
6375         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
6376         discs unconditionally, since udev and others have options to provide
6377         them.
6379 2008-01-05  Robert Millan  <rmh@aybabtu.com>
6381         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
6383 2008-01-04  Christian Franke  <franke@computer.org>
6385         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
6386         of eisa_mmap.
6388 2008-01-03  Pavel Roskin  <proski@gnu.org>
6390         * kern/i386/linuxbios/init.c: Put "void" to all function
6391         declarations with no arguments.
6392         * kern/powerpc/ieee1275/init.c: Likewise.
6393         * term/i386/pc/at_keyboard.c: Likewise.
6394         * term/i386/pc/vga_text.c: Likewise.
6395         * util/grub-mkdevicemap.c: Likewise.
6397 2008-01-02  Robert Millan  <rmh@aybabtu.com>
6399         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
6400         message when loaded image is out of bounds.
6401         (grub_multiboot_load_elf64): Likewise.
6403 2008-01-02  Pavel Roskin  <proski@gnu.org>
6405         * util/grub.d/10_linux.in: Try version without ".old" when
6406         looking for initrd.  It's better to use initrd from the newer
6407         kernel of the same version than no initrd at all.
6409 2008-01-01  Robert Millan  <rmh@aybabtu.com>
6411         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
6413 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
6415         * include/grub/video.h: Added grub_video_unmap_color and
6416         grub_video_get_active_render_target.
6417         (grub_video_adapter): Added unmap_color and get_active_render_target.
6419         * video/video.c: Added grub_video_unmap_color and
6420         grub_video_get_active_render_target.
6421         (grub_video_get_info): Changed method to accept NULL pointer as an
6422         argument to allow detection of active video adapter.
6424         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
6425         grub_video_vbe_unmap_color_int.
6426         Added grub_video_vbe_unmap_color and
6427         grub_video_vbe_get_active_render_target.
6428         (grub_video_vbe_adapter): Added unmap_color and
6429         get_active_render_target.
6431         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
6432         with grub_video_vbe_unmap_color_int.
6434         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
6435         (DEFAULT_NORMAL_COLOR): Likewise.
6436         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
6437         (DEFAULT_FG_COLOR): Removed.
6438         (DEFAULT_BG_COLOR): Likewise.
6439         (DEFAULT_CURSOR_COLOR): Changed value.
6440         (grub_virtual_screen): Added standard_color_setting,
6441         normal_color_setting, highlight_color_setting and term_color.
6442         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
6443         (bitmap_width): Added.
6444         (bitmap_height): Likewise.
6445         (bitmap): Likewise.
6446         (set_term_color): Likewise.
6447         (grub_virtual_screen_setup): Changed to use new terminal coloring
6448         settings.
6449         (grub_gfxterm_init): Added init for bitmap.
6450         (grub_gfxterm_fini): Added destroy for bitmap.
6451         (redraw_screen_rect): Updated to use background bitmap and new
6452         terminal coloring.
6453         (scroll_up): Added optimization for case when there is no bitmap.
6454         (grub_gfxterm_cls): Fixed to use correct background color.
6455         (grub_virtual_screen_setcolorstate): Changed to use new terminal
6456         coloring.
6457         (grub_virtual_screen_setcolor): Likewise.
6458         (grub_virtual_screen_getcolor): Added.
6459         (grub_gfxterm_background_image_cmd): Likewise.
6460         (grub_video_term): Added setcolor and getcolor.
6461         (MOD_INIT): Added registration of background_image command.
6462         (MOD_TERM): Added unregistration for background_image command.
6464 2007-12-30  Pavel Roskin  <proski@gnu.org>
6466         * loader/multiboot_loader.c: Fix multiboot command
6467         unregistration.  Fix all typos in the word "multiboot".
6469 2007-12-29  Pavel Roskin  <proski@gnu.org>
6471         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
6472         support for initrd names used in Fedora.
6474 2007-12-26  Bean  <bean123ch@gmail.com>
6476         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
6477         (cpio_mod_SOURCES): New variable.
6478         (cpio_mod_CFLAGS): Likewise.
6479         (cpio_mod_LDFLAGS): Likewise.
6481         * fs/cpio.c: New file.
6483         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
6485         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6487         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6489         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6491 2007-12-25  Robert Millan  <rmh@aybabtu.com>
6493         * include/grub/term.h (struct grub_term): Add `getcolor' function.
6494         (grub_getcolor): New function.
6496         * kern/term.c (grub_getcolor): New function.
6497         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
6498         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
6499         (print_entry): Set normal and highlight colors to
6500         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
6501         respectively, before printing and restore them to old
6502         values afterwards.
6503         (grub_menu_init_page): Likewise.  Fill an additional colored space
6504         that would otherwise be left blank.
6506         * term/efi/console.c (grub_console_getcolor): New function.
6507         (struct grub_console_term.getcolor): New variable.
6508         * term/i386/pc/console.c (grub_console_getcolor): New function.
6509         (struct grub_console_term.getcolor): New variable.
6510         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
6511         (struct grub_console_term.getcolor): New variable.
6513         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
6514         (struct grub_console_term.setcolor): Remove variable.
6515         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
6516         (struct grub_console_term.setcolor): Remove variable.
6517         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
6518         (struct grub_console_term.setcolor): Remove variable.
6519         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
6520         (struct grub_console_term.setcolor): Remove variable.
6522 2007-12-25  Robert Millan  <rmh@aybabtu.com>
6524         * configure.ac: Search for possible unifont.hex locations, and
6525         define UNIFONT_HEX if found.
6527         * Makefile.in (UNIFONT_HEX): Define variable.
6528         (DATA): Rename to ...
6529         (PKGLIB): ... this.  Update all users.
6530         (PKGDATA): New variable.
6531         (pkgdata_IMAGES): Rename to ...
6532         (pkglib_IMAGES): ... this. Update all users.
6533         (pkgdata_MODULES): Rename to ...
6534         (pkglib_MODULES): ... this. Update all users.
6535         (pkgdata_PROGRAMS): Rename to ...
6536         (pkglib_PROGRAMS): ... this. Update all users.
6537         (pkgdata_DATA): Rename to ...
6538         (pkglib_DATA): ... this. Update all users.
6539         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
6540         (unicode.pff, ascii.pff): New rules.
6541         (all-local): Add `$(PKGDATA)' dependency.
6542         (install-local): Process `$(PKGDATA)'.
6544         * util/update-grub_lib.in (font_path): Search for *.pff files in
6545         a few more locations, including `${pkgdata}'.
6547 2007-12-23  Robert Millan  <rmh@aybabtu.com>
6549         Patch from Bean  <bean123ch@gmail.com>:
6550         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
6551         `size'.
6553 2007-12-21  Bean  <bean123ch@gmail.com>
6555         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
6556         (ntfscomp_mod_SOURCES): New variable.
6557         (ntfscomp_mod_CFLAGS): Likewise.
6558         (ntfscomp_mod_LDFLAGS): Likewise.
6560         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
6561         (grub_probe_SOURCES): Likewise.
6562         (grub_emu_SOURCES): Likewise.
6564         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6565         (grub_emu_SOURCES): Likewise.
6567         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6568         (grub_emu_SOURCES): Likewise.
6570         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6571         (grub_emu_SOURCES): Likewise.
6573         * fs/ntfs.c (grub_ntfscomp_func): New variable.
6574         (read_run_list): Renamed to grub_ntfs_read_run_list.
6575         (decomp_nextvcn): Moved to ntfscomp.c.
6576         (decomp_getch): Likewise.
6577         (decomp_get16): Likewise.
6578         (decomp_block): Likewise.
6579         (read_block): Likewise.
6580         (read_data): Partially moved to ntfscomp.c.
6581         (fixup): Change unsigned to grub_uint16_t.
6582         (read_mft): Change unsigned long to grub_uint32_t.
6583         (read_attr): Likewise.
6584         (read_data): Likewise.
6585         (read_run_data): Likewise.
6586         (read_run_list): Likewise.
6587         (read_mft): Likewise.
6589         * fs/ntfscomp.c: New file.
6591         * include/grub/ntfs.h: New file.
6593 2007-12-16  Robert Millan  <rmh@aybabtu.com>
6595         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
6596         IDE disk check, since Linux is known to support 20 IDE disks.
6597         Reported by Colin Watson.
6599 2007-12-15  Bean  <bean123ch@gmail.com>
6601         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
6602         (lnxboot_img_SOURCES): New variable.
6603         (lnxboot_img_ASFLAGS): Likewise.
6604         (lnxboot_img_LDFLAGS): Likewise.
6606         * boot/i386/pc/lnxboot.S: New file.
6608 2007-11-24  Pavel Roskin  <proski@gnu.org>
6610         * configure.ac: Test if '--build-id=none' is supported by the
6611         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
6612         objcopy to generate incorrect binary files (binutils
6613         2.17.50.0.18-1 as shipped by Fedora 8).
6614         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
6615         linking, so that build ID doesn't break the test.
6617 2007-11-24  Pavel Roskin  <proski@gnu.org>
6619         * include/grub/i386/time.h: use "void" in the argument list
6620         of grub_cpu_idle().
6621         * include/grub/powerpc/time.h: Likewise.
6622         * include/grub/sparc64/time.h: Likewise.
6624 2007-11-18  Christian Franke  <franke@computer.org>
6626         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
6627         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
6628         This fixes the problem that function keys did not work in grub-emu.
6630 2007-11-18  Christian Franke  <franke@computer.org>
6632         * disk/host.c (grub_host_open): Remove attribute unused from
6633         name parameter. Add check for "host". This fixes the problem
6634         that grub-emu does not find partitions.
6636 2007-11-18  Christian Franke  <franke@computer.org>
6638         * util/hostfs.c (is_dir): New function.
6639         (grub_hostfs_dir):  Handle missing dirent.d_type case.
6640         (grub_hostfs_read): Add missing fseek().
6641         (grub_hostfs_label): Clear label pointer.  This fixes a crash
6642         of grub-emu on "ls (host)".
6644 2007-11-18  Christian Franke  <franke@computer.org>
6646         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
6647         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
6648         to 64 bit boundary by default.
6650 2007-11-18  Bean  <bean123ch@gmail.com>
6652         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
6653         (hexdump_mod_SOURCES): New variable.
6654         (hexdump_mod_CFLAGS): Likewise.
6655         (hexdump_mod_LDFLAGS): Likewise.
6657         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6659         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6661         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6663         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6665         * include/grub/hexdump.h: New file.
6667         * commands/hexdump.c: New file.
6669 2007-11-10  Robert Millan  <rmh@aybabtu.com>
6671         * commands/i386/pc/play.c (beep_off): Switch order of arguments
6672         in grub_outb() calls.
6673         (beep_on): Likewise.
6675 2007-11-10  Christian Franke  <franke@computer.org>
6677         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
6678         (grub_menu_run): Likewise.
6680 2007-11-10  Robert Millan  <rmh@aybabtu.com>
6682         * include/grub/i386/efi/machine.h: New file.
6683         * include/grub/i386/linuxbios/machine.h: Likewise.
6684         * include/grub/i386/pc/machine.h: Likewise.
6685         * include/grub/powerpc/ieee1275/machine.h: Likewise.
6686         * include/grub/sparc64/ieee1275/machine.h: Likewise.
6688         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
6689         (serial_hw_io_addr): New variable.
6690         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
6691         instead of `(unsigned short *) 0x400'.
6693 2007-11-10  Bean  <bean123ch@gmail.com>
6695         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
6697 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
6699         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
6700         (vga_mod_SOURCES): Added.
6701         (vga_mod_CFLAGS): Likewise.
6702         (vga_mod_LDFLAGS): Likewise.
6704         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
6705         grub_outb() calls.
6706         (set_map_mask): Likewise.
6707         (set_read_map): Likewise.
6708         (set_read_address): Likewise.
6709         (vga_font): Removed variable.
6710         (get_vga_glyph): Removed function.
6711         (invalidate_char): Likewise.
6712         (write_char): Changed to use grub_font_get_glyph() for font
6713         information.
6714         (grub_vga_putchar): Likewise.
6715         (grub_vga_getcharwidth): Likewise.
6717 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
6719         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
6720         flags.
6721         (pxeboot_img_LDFLAGS): Likewise.
6722         (diskboot_img_LDFLAGS): Likewise.
6723         (kernel_img_LDFLAGS): Likewise.
6725 2007-11-06  Robert Millan  <rmh@aybabtu.com>
6727         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
6728         in grub_outb() calls.
6729         (serial_hw_init): Likewise.
6731 2007-11-05  Robert Millan  <rmh@aybabtu.com>
6733         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
6734         spaces.  Skip non-regular files.
6736 2007-11-05  Robert Millan  <rmh@aybabtu.com>
6738         * kern/disk.c (grub_disk_firmware_fini)
6739         (grub_disk_firmware_is_tainted): New variables.
6741         * include/grub/disk.h (grub_disk_firmware_fini)
6742         (grub_disk_firmware_is_tainted): Likewise.
6744         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
6745         (grub_disk_biosdisk_fini): ... to here.
6746         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
6747         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
6748         is set.  Register grub_disk_biosdisk_fini() in
6749         `grub_disk_firmware_fini'.
6751         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
6752         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
6753         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
6754         to finish existing firmware disk interface.
6756         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
6757         (ata_mod_SOURCES): New variable.
6758         (ata_mod_CFLAGS): Likewise.
6759         (ata_mod_LDFLAGS): Likewise.
6761 2007-11-05  Robert Millan  <rmh@aybabtu.com>
6763         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
6764         (grub_ata_wait): Reimplement using grub_millisleep().
6766         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
6767         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
6769 2007-11-03  Marco Gerards  <marco@gnu.org>
6771         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
6772         (CRTC_ADDR_PORT): New macro.
6773         (CRTC_DATA_PORT): Likewise.
6774         (CRTC_CURSOR): Likewise.
6775         (CRTC_CURSOR_ADDR_HIGH): Likewise.
6776         (CRTC_CURSOR_ADDR_LOW): Likewise.
6777         (update_cursor): New function.
6778         (grub_console_real_putchar): Call `update_cursor'.
6779         (grub_console_gotoxy): Likewise.
6780         (grub_console_cls): Set the default color when clearing the
6781         screen.
6782         (grub_console_setcursor): Implemented.
6784 2007-11-03  Marco Gerards  <marco@gnu.org>
6786         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
6787         become activate.
6788         (grub_ata_pio_write): Likewise.
6790         (grub_atapi_identify): Wait after issuing an ATA command.
6791         (grub_atapi_packet): Likewise.
6792         (grub_ata_identify): Likewise.
6793         (grub_ata_readwrite): Likewise.
6795 2007-11-03  Marco Gerards  <marco@gnu.org>
6797         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
6798         (grub_ata_pio_write): Likewise.
6799         (grub_ata_readwrite): Use `grub_error', instead of
6800         returning `grub_errno'.
6802 2007-11-03  Marco Gerards  <marco@gnu.org>
6804         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
6805         grub_ata_pio_write once for every single sector, instead of for
6806         multiple sectors.
6808 2007-10-31  Robert Millan  <rmh@aybabtu.com>
6810         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
6812         * conf/i386-linuxbios.rmk: New file.
6814         * kern/i386/pc/hardware.c: Likewise.
6815         * term/i386/pc/at_keyboard.c: Likewise.
6816         * term/i386/pc/vga_text.c: Likewise.
6818         * include/grub/i386/linuxbios/boot.h: Likewise.
6819         * include/grub/i386/linuxbios/console.h: Likewise.
6820         * include/grub/i386/linuxbios/init.h: Likewise.
6821         * include/grub/i386/linuxbios/kernel.h: Likewise.
6822         * include/grub/i386/linuxbios/loader.h: Likewise.
6823         * include/grub/i386/linuxbios/memory.h: Likewise.
6824         * include/grub/i386/linuxbios/serial.h: Likewise.
6825         * include/grub/i386/linuxbios/time.h: Likewise.
6827         * kern/i386/linuxbios/init.c: Likewise.
6828         * kern/i386/linuxbios/startup.S: Likewise.
6829         * kern/i386/linuxbios/table.c: Likewise.
6831 2007-10-31  Marco Gerards  <marco@gnu.org>
6833         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
6834         (ata_mod_SOURCES): New variable.
6835         (ata_mod_CFLAGS): Likewise.
6836         (ata_mod_LDFLAGS): Likewise.
6838         * disk/ata.c: New file.
6840         * include/grub/disk.h (grub_disk_dev_id): Add
6841         `GRUB_DISK_DEV_ATA_ID'.
6843 2007-10-31  Robert Millan  <rmh@aybabtu.com>
6845         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
6846         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
6848         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
6849         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
6851         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
6852         `<grub/types.h>'.
6854         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
6856 2007-10-27  Robert Millan  <rmh@aybabtu.com>
6858         * include/grub/types.h (ULONG_MAX): Define macro.
6860 2007-10-22  Robert Millan  <rmh@aybabtu.com>
6862         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
6863         `"../realmode.S"'.
6864         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
6866 2007-10-22  Robert Millan  <rmh@aybabtu.com>
6868         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
6869         (pkgdata_MODULES): Add `biosdisk.mod'.
6870         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
6871         variables.
6873         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
6874         (grub_biosdisk_init): Replace with ...
6875         (GRUB_MOD_INIT(biosdisk)): ... this.
6876         (grub_biosdisk_fini): Replace with ...
6877         (GRUB_MOD_FINI(biosdisk)): ... this.
6879         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
6880         (grub_machine_init): Remove call to grub_biosdisk_init().
6881         (grub_machine_fini): Remove call to grub_machine_fini().
6883         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
6885 2007-10-22  Robert Millan  <rmh@aybabtu.com>
6887         * include/grub/time.h: New file.
6888         * include/grub/i386/time.h: Likewise.
6889         * include/grub/powerpc/time.h: Likewise.
6890         * include/grub/sparc64/time.h: Likewise.
6892         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
6893         instances to ...
6894         (KERNEL_MACHINE_TIME_HEADER): ... this.
6895         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6896         instances to ...
6897         (KERNEL_MACHINE_TIME_HEADER): ... this.
6898         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6899         instances to ...
6900         (KERNEL_MACHINE_TIME_HEADER): ... this.
6902         * kern/i386/efi/init.c: Include `<grub/time.h>'.
6903         (grub_millisleep): New function.
6904         * kern/i386/pc/init.c: Include `<grub/time.h>'.
6905         (grub_millisleep): New function.
6906         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
6907         Remove `grub/machine/time.h' include.
6908         (grub_millisleep): New function.
6909         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
6910         Remove `grub/machine/time.h' include.
6911         (grub_millisleep): New function.
6913         * include/grub/misc.h (grub_div_roundup): New function.
6915         * kern/misc.c: Include `<grub/time.h>'.
6916         (grub_millisleep_generic): New function.
6918         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
6919         Add `time.h'.
6920         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
6921         Add `time.h'.
6922         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
6923         `machine/time.h'.  Add `time.h'.
6924         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6926 2007-10-21  Robert Millan  <rmh@aybabtu.com>
6928         * include/grub/misc.h (grub_max): New function.
6930 2007-10-21  Robert Millan  <rmh@aybabtu.com>
6932         * util/misc.c (grub_util_info): Call fflush() before returning.
6934 2007-10-20  Robert Millan  <rmh@aybabtu.com>
6936         * genmk.rb (Image): Copy `extra_flags' from here ...
6937         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
6939         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
6940         to `argc' and `args' arguments.
6942 2007-10-17  Robert Millan  <rmh@aybabtu.com>
6944         * kern/i386/loader.S: New file.
6946         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
6947         * kern/i386/loader.S (grub_linux_prot_size)... to here.
6948         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
6949         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
6950         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
6951         * kern/i386/loader.S (grub_linux_real_addr)... to here.
6952         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
6953         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
6954         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
6955         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
6956         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
6957         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
6958         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
6959         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
6961         * kern/i386/realmode.S: New file.
6963         * kern/i386/pc/startup.S (protstack): Moved from here ...
6964         * kern/i386/realmode.S (protstack)... to here.
6965         * kern/i386/pc/startup.S (gdt): Moved from here ...
6966         * kern/i386/realmode.S (gdt)... to here.
6967         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
6968         * kern/i386/realmode.S (prot_to_real)... to here.
6970         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
6971         `kern/i386/realmode.S'.
6973 2007-10-17  Robert Millan  <rmh@aybabtu.com>
6975         * include/grub/i386/loader.h: New file.
6977         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
6978         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6979         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6980         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6981         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
6982         * include/grub/i386/loader.h (grub_linux_prot_size)
6983         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6984         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6985         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6986         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
6988         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
6990 2007-10-15  Robert Millan  <rmh@aybabtu.com>
6992         * normal/misc.c (grub_normal_print_device_info): Do not probe for
6993         filesystem when dev->disk is unset.
6994         Do probe for filesystem even when dev->disk->has_partitions is set.
6995         In case a filesystem is found, always report it.
6996         In case it isn't, if dev->disk->has_partitions is set, report that
6997         a partition table was found instead of reporting that no filesystem
6998         could be identified.
7000 2007-10-12  Robert Millan  <rmh@aybabtu.com>
7002         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
7003         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
7005         * include/grub/types.h (grub_host_to_target16): New macro.
7006         (grub_host_to_target32): Likewise.
7007         (grub_host_to_target64): Likewise.
7008         (grub_target_to_host16): Likewise.
7009         (grub_target_to_host32): Likewise.
7010         (grub_target_to_host64): Likewise.
7012         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7013         Renamed from to ...
7014         (GRUB_MOD_ALIGN): ...this.  Update all users.
7016         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
7017         grub_host_to_target32.
7018         Replace grub_be_to_cpu32 with grub_target_to_host32.
7019         (load_modules): Likewise.
7020         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
7021         Replace grub_be_to_cpu32 with grub_target_to_host32.
7022         Replace grub_cpu_to_be16 with grub_host_to_target16.
7023         Replace grub_cpu_to_be32 grub_host_to_target32.
7025 2007-10-12  Robert Millan  <rmh@aybabtu.com>
7027         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
7028         * util/elf/grub-mkimage.c: ... here.
7030         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
7031         `util/powerpc/ieee1275/grub-mkimage.c'.
7033 2007-10-07  Robert Millan  <rmh@aybabtu.com>
7035         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
7036         and make it easier to figure out.
7037         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
7038         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
7039         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
7040         leave us with less than HEAP_MIN_SIZE total heap.
7041         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
7043 2007-10-03  Robert Millan  <rmh@aybabtu.com>
7045         * include/grub/i386/io.h: New file.
7046         * commands/i386/pc/play.c (inb): Removed.
7047         (outb): Removed.
7048         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
7049         with grub_outb().
7050         * term/i386/pc/serial.c  (inb): Removed.
7051         (outb): Removed.
7052         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
7053         with grub_outb().
7054         * term/i386/pc/vga.c  (inb): Removed.
7055         (outb): Removed.
7056         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
7057         with grub_outb().
7059 2007-10-02  Robert Millan  <rmh@aybabtu.com>
7061         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
7062         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7063         Reported by Marcin Kurek.
7065 2007-09-07  Robert Millan  <rmh@aybabtu.com>
7067         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
7068         SmartFirmware version updates (as released by Sven Luther), and avoid
7069         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
7070         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
7071         known broken.
7073 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
7075         From Hitoshi Ozeki:
7076         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
7077         when merging two regions.
7079 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
7081         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
7082         * normal/completion.c (grub_normal_do_completion): Likewise.
7083         Reported by Hitoshi Ozeki.
7085 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
7087         Do not use devices at boot in chainloading.
7089         * loader/i386/pc/chainloader.c (boot_drive): New variable.
7090         (boot_part_addr): Likewise.
7091         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
7092         with BOOT_DRIVE and BOOT_PART_ADDR.
7093         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
7094         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
7096 2007-08-29  Robert Millan  <rmh@aybabtu.com>
7098         Patch from Simon Peter <dn.tlp@gmx.net>:
7099         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
7100         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
7101         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
7102         util/i386/pc/grub-setup.c_DEPENDENCIES.
7103         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
7104         util/grub-probe.c_DEPENDENCIES.
7105         * conf/powerpc-ieee1275.rmk: Likewise.
7107 2007-08-28  Robert Millan  <rmh@aybabtu.com>
7109         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
7110         to tell grub-mkdevicemap how to name devices.
7111         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
7112         feature).
7114         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
7115         util/i386/get_disk_name.c.
7116         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
7117         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
7118         util/ieee1275/get_disk_name.c.
7120         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
7122         * DISTLIST: Add util/i386/get_disk_name.c and
7123         util/ieee1275/get_disk_name.c.
7125         * util/grub-mkdevicemap.c: Replace device naming logic with
7126         grub_util_get_disk_name() calls.
7128 2007-08-20  Robert Millan  <rmh@aybabtu.com>
7130         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
7131         (so that it works for both plural and singular quantities).
7133 2007-08-05  Robert Millan  <rmh@aybabtu.com>
7135         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
7136         so that [xz] isn't taken into account when determining order.
7138 2007-08-02  Marco Gerards  <marco@gnu.org>
7140         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
7141         `include/multiboot2.h', `include/grub/elfload.h',
7142         `include/multiboot.h', `include/grub/multiboot.h',
7143         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
7144         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
7145         `kern/elf.c', `loader/multiboot_loader.c',
7146         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
7147         `loader/i386/pc/multiboot2.c',
7148         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
7149         `util/i386/pc/grub-mkrescue.in'.  Remove
7150         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
7151         `include/grub/i386/pc/util/biosdisk.h' and
7152         `include/grub/powerpc/ieee1275/multiboot.h'.
7154 2007-08-02  Bean  <bean123ch@gmail.com>
7156         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
7157         (ntfs_mod_SOURCES): New variable.
7158         (ntfs_mod_CFLAGS): Likewise.
7159         (ntfs_mod_LDFLAGS): Likewise.
7161         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
7162         (grub_probe_SOURCES): Likewise.
7163         (grub_emu_SOURCES): Likewise.
7165         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7166         (grub_emu_SOURCES): Likewise.
7168         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7169         (grub_emu_SOURCES): Likewise.
7171         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
7173         * fs/ntfs.c: New file.
7175 2007-08-02  Bean  <bean123ch@gmail.com>
7177         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
7179         * file.h (grub_file): Likewise.
7181         * fshelp.h (grub_fshelp_read_file): Likewise.
7183         * util/i386/pc/grub-setup.c (setup): Likewise.
7184         (save_first_sector): Likewise.
7185         (save_blocklists): Likewise.
7187         * fs/affs.c (grub_affs_read_file): Likewise.
7189         * fs/ext2.c (grub_ext2_read_file): Likewise.
7191         * fs/fat.c (grub_fat_read_data): Likewise.
7193         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
7195         * fs/hfs.c (grub_hfs_read_file): Likewise.
7197         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7199         * fs/jfs.c (grub_jfs_read_file): Likewise.
7201         * fs/minix.c (grub_minix_read_file): Likewise.
7203         * fs/sfs.c (grub_sfs_read_file): Likewise.
7205         * fs/ufs.c (grub_ufs_read_file): Likewise.
7207         * fs/xfs.c (grub_xfs_read_file): Likewise.
7209         * command/blocklist.c (read_blocklist): Likewise.
7210         (print_blocklist): Likewise.
7212 2007-08-02  Marco Gerards  <marco@gnu.org>
7214         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
7215         `util/hostfs.c'.
7217         * disk/host.c: New file.
7219         * util/hostfs.c: Likewise.
7221         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
7222         return `GRUB_ERR_BAD_FS'.
7223         * fs/sfs.c (grub_sfs_mount): Likewise.
7224         * fs/xfs.c (grub_xfs_mount): Likewise.
7226         * include/grub/disk.h (enum grub_disk_dev_id): Add
7227         `GRUB_DISK_DEVICE_HOST_ID'.
7229         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
7231 2007-07-24  Jerone Young  <jerone@gmail.com>
7233         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
7234         modules for compilation.
7235         * conf/powerpc-ieee1275.rmk: Likewise.
7237         * include/multiboot.h: Move multiboot definitions to one file. Rename
7238         many definitions to not get grub specific.
7239         * include/multiboot2.h: Create header with multiboot 2 definitions.
7240         * include/grub/multiboot.h: Header for grub specific function
7241         prototypes and definitions.
7242         * include/grub/multiboot2.h: Likewise.
7243         * include/grub/multiboot_loader.h: Likewise.
7244         * include/grub/i386/pc/multiboot.h: Removed.
7245         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
7247         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
7248         and 2 to allow for one multiboot and module commands.
7249         * loader/multiboot2.c: Add multiboot2 functionality.
7250         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
7251         and definition names.
7252         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
7253         2 functions.
7254         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
7255         ieee1275 specific multiboot2 code.
7257         * kern/i386/pc/startup.S: Change headers and definition names for
7258         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
7260 2007-07-22  Robert Millan  <rmh@aybabtu.com>
7262         * geninitheader.sh: Process file specified in first parameter rather
7263         than hardcoding grub_modules_init.lst.
7264         * geninit.sh: Likewise.  Also, construct header name dynamically rather
7265         than hardcoding grub_modules_init.h.
7267         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
7268         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
7269         grub_probe_init.[ch] and grub_setup_init.[ch].
7271         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
7272         grub_modules_init.h with grub_emu_init.h.
7273         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
7274         grub_probe_init.[ch] files.
7275         * conf/i386-efi.rmk: Likewise.
7276         * conf/i386-pc.rmk: Likewise.
7277         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
7278         grub_setup_init.[ch] files.
7280         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
7281         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
7282         to initialize modules rather than a list of hardcoded functions.
7283         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
7284         grub_init_all() to initialize modules rather than a list of hardcoded
7285         functions.
7287 2007-07-22  Robert Millan  <rmh@aybabtu.com>
7289         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
7290         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
7292 2007-07-22  Robert Millan  <rmh@aybabtu.com>
7294         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7295         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
7296         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
7297         flag when running on SmartFirmware.
7298         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
7299         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
7300         was set.
7302         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7303         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
7304         rather than decreasing it.
7306         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
7307         there's not enough space to do it, fail in the same way as when it
7308         can't be done because there are no partitions.
7310         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
7311         when nvsetenv failed.
7313 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
7315         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
7316         because this rule is automatically generated.
7317         (grub-mkrescue): Removed for the same reason as above.
7319 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
7321         Migrate to GNU General Public License Version 3.
7323         * COPYING: Replaced with the plain text version of GPLv3.
7325         * config.guess: Updated from gnulib.
7326         * config.sub: Likewise.
7328         * geninit.sh: Output a GPLv3 copyright notice.
7329         * geninitheader.sh: Likewise.
7330         * genmodsrc.sh: Likewise.
7331         * gensymlist.sh.in: Likewise.
7333         * boot/i386/pc/boot.S: Upgraded to GPLv3.
7334         * boot/i386/pc/diskboot.S: Likewise.
7335         * boot/i386/pc/pxeboot.S: Likewise.
7336         * commands/blocklist.c: Likewise.
7337         * commands/boot.c: Likewise.
7338         * commands/cat.c: Likewise.
7339         * commands/cmp.c: Likewise.
7340         * commands/configfile.c: Likewise.
7341         * commands/echo.c: Likewise.
7342         * commands/help.c: Likewise.
7343         * commands/ls.c: Likewise.
7344         * commands/search.c: Likewise.
7345         * commands/terminal.c: Likewise.
7346         * commands/test.c: Likewise.
7347         * commands/videotest.c: Likewise.
7348         * commands/i386/cpuid.c: Likewise.
7349         * commands/i386/pc/halt.c: Likewise.
7350         * commands/i386/pc/play.c: Likewise.
7351         * commands/i386/pc/reboot.c: Likewise.
7352         * commands/i386/pc/vbeinfo.c: Likewise.
7353         * commands/i386/pc/vbetest.c: Likewise.
7354         * commands/ieee1275/halt.c: Likewise.
7355         * commands/ieee1275/reboot.c: Likewise.
7356         * commands/ieee1275/suspend.c: Likewise.
7357         * disk/loopback.c: Likewise.
7358         * disk/lvm.c: Likewise.
7359         * disk/raid.c: Likewise.
7360         * disk/efi/efidisk.c: Likewise.
7361         * disk/i386/pc/biosdisk.c: Likewise.
7362         * disk/ieee1275/ofdisk.c: Likewise.
7363         * font/manager.c: Likewise.
7364         * fs/affs.c: Likewise.
7365         * fs/ext2.c: Likewise.
7366         * fs/fat.c: Likewise.
7367         * fs/fshelp.c: Likewise.
7368         * fs/hfs.c: Likewise.
7369         * fs/hfsplus.c: Likewise.
7370         * fs/iso9660.c: Likewise.
7371         * fs/jfs.c: Likewise.
7372         * fs/minix.c: Likewise.
7373         * fs/sfs.c: Likewise.
7374         * fs/ufs.c: Likewise.
7375         * fs/xfs.c: Likewise.
7376         * hello/hello.c: Likewise.
7377         * include/grub/acorn_filecore.h: Likewise.
7378         * include/grub/arg.h: Likewise.
7379         * include/grub/bitmap.h: Likewise.
7380         * include/grub/boot.h: Likewise.
7381         * include/grub/cache.h: Likewise.
7382         * include/grub/device.h: Likewise.
7383         * include/grub/disk.h: Likewise.
7384         * include/grub/dl.h: Likewise.
7385         * include/grub/elfload.h: Likewise.
7386         * include/grub/env.h: Likewise.
7387         * include/grub/err.h: Likewise.
7388         * include/grub/file.h: Likewise.
7389         * include/grub/font.h: Likewise.
7390         * include/grub/fs.h: Likewise.
7391         * include/grub/fshelp.h: Likewise.
7392         * include/grub/gzio.h: Likewise.
7393         * include/grub/hfs.h: Likewise.
7394         * include/grub/kernel.h: Likewise.
7395         * include/grub/loader.h: Likewise.
7396         * include/grub/lvm.h: Likewise.
7397         * include/grub/misc.h: Likewise.
7398         * include/grub/mm.h: Likewise.
7399         * include/grub/net.h: Likewise.
7400         * include/grub/normal.h: Likewise.
7401         * include/grub/parser.h: Likewise.
7402         * include/grub/partition.h: Likewise.
7403         * include/grub/pc_partition.h: Likewise.
7404         * include/grub/raid.h: Likewise.
7405         * include/grub/rescue.h: Likewise.
7406         * include/grub/script.h: Likewise.
7407         * include/grub/setjmp.h: Likewise.
7408         * include/grub/symbol.h: Likewise.
7409         * include/grub/term.h: Likewise.
7410         * include/grub/terminfo.h: Likewise.
7411         * include/grub/tparm.h: Likewise.
7412         * include/grub/types.h: Likewise.
7413         * include/grub/video.h: Likewise.
7414         * include/grub/efi/api.h: Likewise.
7415         * include/grub/efi/chainloader.h: Likewise.
7416         * include/grub/efi/console.h: Likewise.
7417         * include/grub/efi/console_control.h: Likewise.
7418         * include/grub/efi/disk.h: Likewise.
7419         * include/grub/efi/efi.h: Likewise.
7420         * include/grub/efi/pe32.h: Likewise.
7421         * include/grub/efi/time.h: Likewise.
7422         * include/grub/i386/linux.h: Likewise.
7423         * include/grub/i386/setjmp.h: Likewise.
7424         * include/grub/i386/types.h: Likewise.
7425         * include/grub/i386/efi/kernel.h: Likewise.
7426         * include/grub/i386/efi/loader.h: Likewise.
7427         * include/grub/i386/efi/time.h: Likewise.
7428         * include/grub/i386/pc/biosdisk.h: Likewise.
7429         * include/grub/i386/pc/boot.h: Likewise.
7430         * include/grub/i386/pc/chainloader.h: Likewise.
7431         * include/grub/i386/pc/console.h: Likewise.
7432         * include/grub/i386/pc/init.h: Likewise.
7433         * include/grub/i386/pc/kernel.h: Likewise.
7434         * include/grub/i386/pc/loader.h: Likewise.
7435         * include/grub/i386/pc/memory.h: Likewise.
7436         * include/grub/i386/pc/multiboot.h: Likewise.
7437         * include/grub/i386/pc/serial.h: Likewise.
7438         * include/grub/i386/pc/time.h: Likewise.
7439         * include/grub/i386/pc/vbe.h: Likewise.
7440         * include/grub/i386/pc/vbeblit.h: Likewise.
7441         * include/grub/i386/pc/vbefill.h: Likewise.
7442         * include/grub/i386/pc/vbeutil.h: Likewise.
7443         * include/grub/i386/pc/vga.h: Likewise.
7444         * include/grub/ieee1275/ieee1275.h: Likewise.
7445         * include/grub/ieee1275/ofdisk.h: Likewise.
7446         * include/grub/powerpc/libgcc.h: Likewise.
7447         * include/grub/powerpc/setjmp.h: Likewise.
7448         * include/grub/powerpc/types.h: Likewise.
7449         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
7450         * include/grub/powerpc/ieee1275/console.h: Likewise.
7451         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
7452         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
7453         * include/grub/powerpc/ieee1275/loader.h: Likewise.
7454         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
7455         * include/grub/powerpc/ieee1275/time.h: Likewise.
7456         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
7457         * include/grub/sparc64/libgcc.h: Likewise.
7458         * include/grub/sparc64/setjmp.h: Likewise.
7459         * include/grub/sparc64/types.h: Likewise.
7460         * include/grub/sparc64/ieee1275/console.h: Likewise.
7461         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
7462         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
7463         * include/grub/sparc64/ieee1275/time.h: Likewise.
7464         * include/grub/util/biosdisk.h: Likewise.
7465         * include/grub/util/getroot.h: Likewise.
7466         * include/grub/util/lvm.h: Likewise.
7467         * include/grub/util/misc.h: Likewise.
7468         * include/grub/util/raid.h: Likewise.
7469         * include/grub/util/resolve.h: Likewise.
7470         * io/gzio.c: Likewise.
7471         * kern/device.c: Likewise.
7472         * kern/disk.c: Likewise.
7473         * kern/dl.c: Likewise.
7474         * kern/elf.c: Likewise.
7475         * kern/env.c: Likewise.
7476         * kern/err.c: Likewise.
7477         * kern/file.c: Likewise.
7478         * kern/fs.c: Likewise.
7479         * kern/loader.c: Likewise.
7480         * kern/main.c: Likewise.
7481         * kern/misc.c: Likewise.
7482         * kern/mm.c: Likewise.
7483         * kern/parser.c: Likewise.
7484         * kern/partition.c: Likewise.
7485         * kern/rescue.c: Likewise.
7486         * kern/term.c: Likewise.
7487         * kern/efi/efi.c: Likewise.
7488         * kern/efi/init.c: Likewise.
7489         * kern/efi/mm.c: Likewise.
7490         * kern/i386/dl.c: Likewise.
7491         * kern/i386/efi/init.c: Likewise.
7492         * kern/i386/efi/startup.S: Likewise.
7493         * kern/i386/pc/init.c: Likewise.
7494         * kern/i386/pc/lzo1x.S: Likewise.
7495         * kern/i386/pc/startup.S: Likewise.
7496         * kern/ieee1275/ieee1275.c: Likewise.
7497         * kern/powerpc/cache.S: Likewise.
7498         * kern/powerpc/dl.c: Likewise.
7499         * kern/powerpc/ieee1275/cmain.c: Likewise.
7500         * kern/powerpc/ieee1275/crt0.S: Likewise.
7501         * kern/powerpc/ieee1275/init.c: Likewise.
7502         * kern/powerpc/ieee1275/openfw.c: Likewise.
7503         * kern/sparc64/cache.S: Likewise.
7504         * kern/sparc64/dl.c: Likewise.
7505         * kern/sparc64/ieee1275/init.c: Likewise.
7506         * kern/sparc64/ieee1275/openfw.c: Likewise.
7507         * loader/efi/chainloader.c: Likewise.
7508         * loader/efi/chainloader_normal.c: Likewise.
7509         * loader/i386/efi/linux.c: Likewise.
7510         * loader/i386/efi/linux_normal.c: Likewise.
7511         * loader/i386/pc/chainloader.c: Likewise.
7512         * loader/i386/pc/chainloader_normal.c: Likewise.
7513         * loader/i386/pc/linux.c: Likewise.
7514         * loader/i386/pc/linux_normal.c: Likewise.
7515         * loader/i386/pc/multiboot.c: Likewise.
7516         * loader/i386/pc/multiboot_normal.c: Likewise.
7517         * loader/powerpc/ieee1275/linux.c: Likewise.
7518         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
7519         * normal/arg.c: Likewise.
7520         * normal/cmdline.c: Likewise.
7521         * normal/command.c: Likewise.
7522         * normal/completion.c: Likewise.
7523         * normal/execute.c: Likewise.
7524         * normal/function.c: Likewise.
7525         * normal/lexer.c: Likewise.
7526         * normal/main.c: Likewise.
7527         * normal/menu.c: Likewise.
7528         * normal/menu_entry.c: Likewise.
7529         * normal/misc.c: Likewise.
7530         * normal/parser.y: Likewise.
7531         * normal/script.c: Likewise.
7532         * normal/i386/setjmp.S: Likewise.
7533         * normal/powerpc/setjmp.S: Likewise.
7534         * normal/sparc64/setjmp.S: Likewise.
7535         * partmap/acorn.c: Likewise.
7536         * partmap/amiga.c: Likewise.
7537         * partmap/apple.c: Likewise.
7538         * partmap/gpt.c: Likewise.
7539         * partmap/pc.c: Likewise.
7540         * partmap/sun.c: Likewise.
7541         * term/gfxterm.c: Likewise.
7542         * term/terminfo.c: Likewise.
7543         * term/efi/console.c: Likewise.
7544         * term/i386/pc/console.c: Likewise.
7545         * term/i386/pc/serial.c: Likewise.
7546         * term/i386/pc/vesafb.c: Likewise.
7547         * term/i386/pc/vga.c: Likewise.
7548         * term/ieee1275/ofconsole.c: Likewise.
7549         * util/biosdisk.c: Likewise.
7550         * util/console.c: Likewise.
7551         * util/genmoddep.c: Likewise.
7552         * util/getroot.c: Likewise.
7553         * util/grub-emu.c: Likewise.
7554         * util/grub-mkdevicemap.c: Likewise.
7555         * util/grub-probe.c: Likewise.
7556         * util/lvm.c: Likewise.
7557         * util/misc.c: Likewise.
7558         * util/raid.c: Likewise.
7559         * util/resolve.c: Likewise.
7560         * util/update-grub.in: Likewise.
7561         * util/update-grub_lib.in: Likewise.
7562         * util/grub.d/00_header.in: Likewise.
7563         * util/grub.d/10_hurd.in: Likewise.
7564         * util/grub.d/10_linux.in: Likewise.
7565         * util/i386/efi/grub-install.in: Likewise.
7566         * util/i386/efi/grub-mkimage.c: Likewise.
7567         * util/i386/pc/grub-install.in: Likewise.
7568         * util/i386/pc/grub-mkimage.c: Likewise.
7569         * util/i386/pc/grub-mkrescue.in: Likewise.
7570         * util/i386/pc/grub-setup.c: Likewise.
7571         * util/i386/pc/misc.c: Likewise.
7572         * util/powerpc/ieee1275/grub-install.in: Likewise.
7573         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
7574         * util/powerpc/ieee1275/misc.c: Likewise.
7575         * video/bitmap.c: Likewise.
7576         * video/video.c: Likewise.
7577         * video/i386/pc/vbe.c: Likewise.
7578         * video/i386/pc/vbeblit.c: Likewise.
7579         * video/i386/pc/vbefill.c: Likewise.
7580         * video/i386/pc/vbeutil.c: Likewise.
7581         * video/readers/tga.c: Likewise.
7583 2007-07-02  Robert Millan  <rmh@aybabtu.com>
7585         * conf/i386-efi.rmk: Replace obsolete reference to
7586         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
7587         with util/getroot.c.
7588         * conf/powerpc-ieee1275.rmk: Likewise.
7589         * conf/sparc64-ieee1275.rmk: Likewise.
7591         * util/grub-emu.c (main): Fix unchecked pointer handling.
7593 2007-07-02  Robert Millan  <rmh@aybabtu.com>
7595         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
7596         invocation to fail, in order to support partition-less media.
7598         * util/i386/pc/grub-install.in: Likewise.
7600         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
7601         which fs or partmap modules are needed (akin to its sister scripts).
7603         Also use grub-probe to get rid of unportable /proc/mounts check.
7605         Print the same informational message that the other scripts do, before
7606         exiting.
7608 2007-06-23  Robert Millan  <rmh@aybabtu.com>
7610         * util/update-grub_lib.in (font_path): New function.  Determine whether
7611         a font file can be found and, if so, echo the GRUB path to it.
7613         * util/update-grub.in: Handle multiple terminals depending on user
7614         input, platform availability and font file presence.  Propagate
7615         variables of our findings to /etc/grub.d/ children.
7617         * util/grub.d/00_header.in: Handle multiple terminals, based on
7618         environment setup by update-grub.
7620 2007-06-23  Robert Millan  <rmh@aybabtu.com>
7622         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
7624 2007-06-21  Robert Millan  <rmh@aybabtu.com>
7626         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
7627         indicate end of data section in kernel image.
7628         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
7629         GRUB_KERNEL_MACHINE_DATA_END.
7631         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
7632         space for it.
7633         * kern/i386/efi/startup.S: Likewise.
7635         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
7636         during image generation.  Implement --prefix option to override this
7637         patch.
7638         * util/i386/efi/grub-mkimage.c: Likewise.
7640         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
7641         code to make path relative to its root into a separate function.
7643         * util/i386/pc/grub-install.in: Use newly provided
7644         make_system_path_relative_to_its_root() to convert ${grubdir}, then
7645         pass the result to grub-install --prefix.
7647 2007-06-13  Robert Millan  <rmh@aybabtu.com>
7649         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
7650         DEFAULT_DEVICE_MAP.
7651         * util/grub-emu.c: Use above definitions from misc.h instead of
7652         defining them.
7653         * util/grub-mkdevicemap.c: Likewise.
7654         * util/i386/pc/grub-setup.c: Likewise.
7655         * util/grub-probe.c: Likewise.
7656         (probe): Abort with grub_util_error() when either
7657         grub_guess_root_device or grub_util_get_grub_dev fails.
7659 2007-06-12  Robert Millan  <rmh@aybabtu.com>
7661         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
7662         "pager" assignment.
7663         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
7664         "pcdata".
7665         * util/grub-probe.c (probe): Likewise for "drive_name".
7667 2007-06-11  Robert Millan  <rmh@aybabtu.com>
7669         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
7670         not just the cdrom one.
7672 2007-06-11  Robert Millan  <rmh@aybabtu.com>
7674         * util/i386/pc/grub-mkrescue.in: Add "set -e".
7675         Add --pkglibdir=DIR option to override pkglibdir.
7676         Mention --image-type=TYPE in help output.
7677         Fix --grub-mkimage (it was a no-op).
7678         Abort gracefully when no parameter is given.
7680 2007-06-11  Robert Millan  <rmh@aybabtu.com>
7682         * util/i386/pc/grub-mkrescue.in: New file.
7683         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
7684         * Makefile.in: Handle bin_SCRIPTS.
7686 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
7688         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
7689         list of video modes.
7691 2007-06-06  Robert Millan  <rmh@aybabtu.com>
7693         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
7694         file doesn't exist, or if it is in a filesystem grub can't read.
7696         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
7697         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
7698         header comment to fit in 80 columns when the variables are resolved.
7700         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
7701         could be identified by update-grub.  Remove redundant check for
7702         unifont.pff existence (since convert_system_path_to_grub_path now
7703         handles that).
7705 2007-06-04  Robert Millan  <rmh@aybabtu.com>
7707         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
7709         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
7711         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
7713 2007-06-04  Robert Millan  <rmh@aybabtu.com>
7715         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
7717         * include/grub/partition.h: Declare grub_apple_partition_map_init and
7718         grub_apple_partition_map_fini.
7720         * util/biosdisk.c
7721         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
7722         to access >2 TiB disks).
7724         Print disk->total_sectors with %llu instead of %lu, since this
7725         variable is always 64-bit (prevents wrong disk size from being displayed
7726         on either >2 TiB disk or big-endian CPU).
7728         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
7729         into a generic case that supports all (sane) partition maps.
7731         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
7732         breaks big-endian.
7734         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
7735         and grub_apple_partition_map_fini() after that.
7737 2007-06-01  Robert Millan  <rmh@aybabtu.com>
7739         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
7741         * util/grub.d/00_header.in: Only enable gfxterm when
7742         convert_system_path_to_grub_path() succeeds.
7744 2007-05-20  Robert Millan  <rmh@aybabtu.com>
7746         * util/update-grub_lib.in: New file.
7747         * DISTLIST: Add update-grub_lib.in.
7748         * conf/common.rmk: Generate update-grub_lib and install it in
7749         $(lib_DATA).
7750         * Makefile.in: Add install routine for $(lib_DATA).
7752         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
7753         function provided by update-grub_lib to support arbitrary paths of
7754         unifont.pff.
7755         * util/update-grub.in: Use convert_system_path_to_grub_path() to
7756         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
7758 2007-05-19  Robert Millan  <rmh@aybabtu.com>
7760         * commands/i386/cpuid.c: New module.
7761         * DISTLIST: Add it.
7762         * conf/i386-efi.rmk: Enable cpuid.mod.
7763         * conf/i386-pc.rmk: Likewise.
7765 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
7767         * kern/disk.c (grub_disk_read): Check return value of
7768         grub_realloc().
7770 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
7772         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
7773         arrays.
7774         * disk/raid.c (grub_raid_open): Likewise.
7776 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
7778         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
7779         stack instead of on the heap.
7781         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
7782         before doing a read on it.
7784         * configure.ac: Only use -fno-stack-protector for the target
7785         environment.
7787 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
7789         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
7790         __attribute_ ((unused)) to mode_type argument.
7792         * util/getroot.c (grub_guess_root_device): Fix #endif.
7794         * kern/misc.c (memcmp): Fix prototype.
7796         * include/grub/partition.h [GRUB_UTIL]
7797         (grub_gpt_partition_map_init): Add prototype.
7798         (grub_gpt_partition_map_fini): Likewise.
7800         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
7801         at the right place.
7803         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
7804         (grub_fat_read_data): Likewise.
7805         (grub_fat_find_dir): Likewise.
7807         * font/manager.c (find_glyph): Make table a const.
7808         (grub_font_get_glyph): Remove bitmap from if statement.
7810 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
7812         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
7813         code, first search for device in /dev/mapper, then in /dev.
7814         (grub_util_get_grub_dev): New function.
7815         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
7816         prototype.
7817         * util/grub-probe.c (probe): Remove check for RAID, call
7818         grub_util_get_grub_dev() instead of
7819         grub_util_biosdisk_get_grub_dev().
7820         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
7821         grub_util_biosdisk_get_grub_dev().
7822         * util/i386/pc/grub-setup.c (main): Likewise.
7824 2007-05-16  Robert Millan  <rmh@aybabtu.com>
7826         * DISTLIST: Update for the latest changes.
7827         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
7828         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
7829         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
7830         grub/util/biosdisk.h.
7831         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
7832         grub/util/biosdisk.h.
7834 2007-05-16  Robert Millan  <rmh@aybabtu.com>
7836         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
7838 2007-05-16  Robert Millan  <rmh@aybabtu.com>
7840         * util/i386/efi/grub-install.in: New.
7841         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
7842         newly added grub-install.
7843         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
7844         include.
7845         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
7846         grub/util/biosdisk.h.
7847         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
7848         grub/util/biosdisk.h.
7850 2007-05-16  Robert Millan  <rmh@aybabtu.com>
7852         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
7853         * include/grub/util/biosdisk.h: ... here.
7854         * util/i386/pc/biosdisk.c: Moved to ...
7855         * util/biosdisk.c: ... here.
7856         * util/i386/pc/getroot.c: Moved to ...
7857         * util/getroot.c: ... here.
7858         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
7859         * util/grub-mkdevicemap.c: ... here.
7860         * util/i386/pc/grub-probe.c: Moved to ...
7861         * util/grub-probe.c: ... here.
7863 2007-05-15  Robert Millan  <rmh@aybabtu.com>
7865         * util/update-grub.in: Remove duplicated line in grub.cfg header
7866         message.
7868 2007-05-13  Robert Millan  <rmh@aybabtu.com>
7870         * util/update-grub.in: Fix a few assumptions about the devices holding
7871         /, /boot and /boot/grub being the same.
7872         * util/grub.d/00_header.in: Likewise.
7873         * util/grub.d/10_hurd.in: Likewise.
7874         * util/grub.d/10_linux.in: Likewise.
7876         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
7877         patterns.  Use that to define the `.old' suffix as older than `'.
7879         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
7881         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
7882         the grub.cfg header message.
7884 2007-05-11  Robert Millan  <rmh@aybabtu.com>
7886         * util/update-grub.in: Create device.map if it doesn't already exist,
7887         before attempting to run grub-probe.
7888         Check for grub-probe and grub-mkdevicemap with the same code
7889         grub-install is using.
7890         Remove test mode.
7892 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
7894         * Makefile.in: Add the datarootdir autoconf variable.
7896 2007-05-09  Robert Millan  <rmh@aybabtu.com>
7898         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
7899         fail gracefully if dev->disk->partition == NULL.
7901 2007-05-07  Robert Millan  <rmh@aybabtu.com>
7903         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
7904         determine partition map module.
7905         * util/i386/pc/grub-install.in: Use this feature to decide which
7906         partition module to load, instead of hardcoding pc and gpt.
7908 2007-05-07  Robert Millan  <rmh@aybabtu.com>
7910         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
7911         source directory differs from build directory.
7913 2007-05-05  Robert Millan  <rmh@aybabtu.com>
7915         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
7916         initialisation.
7918 2007-05-05  Robert Millan  <rmh@aybabtu.com>
7920         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
7922 2007-05-05  Robert Millan  <rmh@aybabtu.com>
7924         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
7925         command-line arguments via ${GRUB_CMDLINE_LINUX}.
7927 2007-05-05  Robert Millan  <rmh@aybabtu.com>
7929         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
7930         (grub_probe_SOURCES): Likewise.
7931         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
7932         GPT and initialize dos_part and bsd_part accordingly.
7933         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
7934         install_bsd_part.
7935         (main): Activate gpt module for use during partition identification,
7936         and deactivate it afterwards.
7937         * util/i386/pc/grub-install.in: Add gpt module to core.img.
7938         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
7939         partition identification, and deactivate it afterwards.
7941 2007-05-05  Robert Millan  <rmh@aybabtu.com>
7943         * term/i386/pc/console.c (grub_console_fini): Call
7944         grub_term_set_current() before grub_term_unregister().
7946 2007-05-04  Robert Millan  <rmh@aybabtu.com>
7948         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
7949         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
7950         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
7951         and update-grub_DATA.
7952         * conf/common.rmk: Build and install update-grub components.
7953         * conf/common.mk: Regenerate.
7954         * util/update-grub.in: New.  Core of update-grub.
7955         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
7956         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
7957         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
7958         * util/grub.d/README: New.  Document grub.d directory layout.
7960 2007-05-01  Robert Millan  <rmh@aybabtu.com>
7962         * util/grub-emu.c: Move initialization functions
7963         grub_util_biosdisk_init() and grub_init_all() before
7964         grub_util_biosdisk_get_grub_dev(), which relies on them.
7966 2007-04-19  Robert Millan  <rmh@aybabtu.com>
7968         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
7969         it is used later.
7971 2007-04-18  Jerone Young  <jerone@gmail.com>
7973         * kernel/elf.c: Add missing parenthesis for conditional statement
7974         stanza.
7976 2007-04-10  Jerone Young  <jerone@gmail.com>
7978         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
7979         continue on and look for device node with real device name.
7981 2007-04-10  Jerone Young  <jerone@gmail.com>
7983         * configure.ac: Add argument for autoconf to use transformation
7984         ability.
7985         * Makefile.in: Add autoconf package transformation code.
7986         * util/i386/pc/grub-install.in: Likewise.
7987         * util/powerpc/ieee1275/grub-install.in: Likewise.
7989 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
7991         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
7992         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
7993         (EXT2_REVISION): Likewise.
7994         (EXT2_INODE_SIZE): Likewise.
7995         (struct grub_ext2_block_group): Added a missing member
7996         "used_dirs".
7997         (grub_ext2_read_inode): Divide by the inode size in a superblock
7998         instead of 128 to obtain INODES_PER_BLOCK.
7999         Use the macro EXT2_INODE_SIZE instead of directly using
8000         SBLOCK->INODE_SIZE.
8002 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
8004         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
8005         superblock instead of the structure size to compute an
8006         offset. This fixes the problem that GRUB could not read a
8007         filesystem when inode size is different from 128-byte.
8009 2007-03-05  Marco Gerards  <marco@gnu.org>
8011         * normal/main.c (read_config_file): When "menu" is not set, create
8012         an initial context.
8014 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
8016         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
8017         (HEAP_LIMIT): New macro.
8018         (grub_claim_heap): Claim memory up to `heaplimit'.
8020 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
8022         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
8023         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
8024         (_start): Likewise.
8025         (grub_arch_modules_addr): Return address after `_end'.
8026         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
8027         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
8028         (add_segments): Calculate `_end' from phdr size and location.
8029         (ALIGN_UP): Moved to ...
8030         * include/grub/misc.h: here.
8031         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8032         New macro.
8033         (GRUB_IEEE1275_MODULE_BASE): Removed.
8035 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
8037         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
8038         loop boundary.
8040 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
8042         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
8043         All users updated.
8044         (grub_elf64_load_hook_t): Likewise.
8045         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
8046         debug output.
8048 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
8050         * kern/mm.c: Update copyright.
8051         (grub_mm_debug): Correct syntax error.
8052         (grub_mm_dump_free): New function.
8053         (grub_debug_free): Call `grub_free'.
8054         * include/grub/mm.h: Update copyright.
8055         (grub_mm_dump_free): Add declaration.
8057 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
8059         * include/grub/ieee1275/ieee1275.h: Update copyright.
8060         * kern/powerpc/ieee1275/init.c: Likewise.
8061         * kern/powerpc/ieee1275/openfw.c: Likewise.
8063         * loader/powerpc/ieee1275/linux.c: Likewise.
8064         * include/grub/elfload.h: Likewise.
8065         * kern/elf.c: Likewise.
8066         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
8067         callers.
8068         (grub_elf64_load): Likewise.
8069         (grub_elf32_load_segment): Move to a nested function.
8070         (grub_elf64_load_segment): Likewise.
8072 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
8074         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
8075         prototype.
8076         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
8077         (grub_heap_len): Likewise.
8078         (HEAP_SIZE): New macro.
8079         (grub_claim_heap): New function.
8080         (grub_machine_init): Don't claim heap directly.  Call
8081         `grub_claim_heap'.
8082         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
8083         (grub_available_iterate): New function.
8085 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
8087         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
8088         * configure.ac: Use it for testing the HOST and TARGET compilers.
8090 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
8092         * Makefile.in (enable_grub_emu): New variable.
8093         * configure.ac (--enable-grub-emu): New option.
8094         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
8095         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
8096         * conf/i386-pc.rmk: Likewise.
8097         * conf/powerpc-ieee1275.rmk: Likewise.
8098         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
8100 2006-12-12  Marco Gerards  <marco@gnu.org>
8102         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
8104         * kern/env.c (grub_env_unset): Don't free the member `value' when
8105         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
8106         pointer.
8108         * normal/main.c (current_menu): Removed.
8109         (free_menu): Unset the `menu' environment variable.
8110         (grub_normal_menu_addentry): Make use of the environment variable
8111         `menu', instead of using the global `current_menu'.  Allocate
8112         memory for the sourcecode of this entry.
8113         (read_config_file): New argument `nested', changed all callers.
8114         Only in the case of a new context, initialize a new menu.  Set the
8115         `menu' environment variable.
8116         (grub_normal_execute): Don't set and unset the environment
8117         variable `menu' here anymore.  Only free the menu when leaving the
8118         context.
8120         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
8121         leak.
8123 2006-12-11  Marco Gerards  <marco@gnu.org>
8125         * normal/menu_entry.c (run): Fix off by one bug so the last line
8126         is executed.  Move the loader check to outside the loop.
8128 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
8130         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
8132 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
8134         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
8135         the number of sectors.  Reported by Andrey Shuvikov
8136         <mr_hyro@yahoo.com>.
8138 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
8140         * kern/disk.c (grub_disk_read): When there is a read error, always
8141         try to read only the necessary data.
8143         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
8144         disk/raid.c.
8145         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
8146         prototype.
8147         [GRUB_UTIL] (grub_raid_fini): Likewise.
8148         [GRUB_UTIL] (grub_lvm_init): Likewise.
8149         [GRUB_UTIL] (grub_lvm_fini): Likewise.
8150         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
8151         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
8152         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
8153         and grub_raid_fini().
8155 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
8157         * include/grub/types.h (__unused): Rename to UNUSED.
8158         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
8159         (grub_elf64_size): Likewise.
8161 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
8163         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
8164         grub_error_push and grub_error_pop in the error-handling path.
8165         (grub_elf32_load_segment): Only call grub_file_read with non-zero
8166         length.
8168 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
8170         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
8171         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8172         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8173         (kernel_elf_SOURCES): Likewise.
8174         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
8175         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
8176         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8177         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8178         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
8179         (elf_mod_SOURCES): New variable.
8180         (elf_mod_CFLAGS): Likewise.
8181         (elf_mod_LDFLAGS): Likewise.
8182         * include/grub/types.h (__unused): New macro.
8183         * include/grub/elfload.h: New file.
8184         * kern/elf.c: Likewise.
8185         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
8186         (ELF32_LOADMASK): New macro.
8187         (ELF64_LOADMASK): Likewise.
8188         (vmlinux): Removed.
8189         (grub_linux_load32): New function.
8190         (grub_linux_load64): Likewise.
8191         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
8192         Use grub_elf_t instead of grub_file_t.
8194 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
8196         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
8197         `catch_result' to struct set_color_args.
8199 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
8201         * normal/menu.c: Include grub/script.h.
8202         * normal/menu_entry.c: Likewise.
8203         * include/grub/normal.h: Do not include grub/script.h.
8205 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
8207         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
8209 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
8211         * kern/disk.c (grub_disk_open): Print debug messages when opening a
8212         disk.
8213         (grub_disk_close): Print debug messages when closing a disk.
8214         (grub_disk_read): Print debug messages when disk read fails.
8215         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
8216         filesystem type.
8217         * kern/partition.c: Include misc.h.
8218         (grub_partition_iterate): Print debug messages when detecting
8219         partition type.
8221 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
8223         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
8224         is negative.
8225         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
8227 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
8229         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8230         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
8232 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
8234         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
8235         instead of sizeof(lv). Patch by Michael Guntsche.
8237 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
8239         * disk/lvm.c: Rename VGS to VG_LIST.
8240         (grub_lvm_iterate): Change VGS->LV to VG-LV.
8241         (grub_lvm_open): Likewise.
8242         Thanks to Michael Guntsche for finding this bug.
8244 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
8246         * configure.ac (AC_INIT): Bumped to 1.95.
8248 2006-10-14  Robert Millan  <rmh@aybabtu.com>
8250         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
8251         with "/dev/.static/dev/md".
8253 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
8255         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
8256         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
8257         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
8258         DRIVE_NAME are always freed.
8260         * util/i386/pc/biosdisk.c (make_device_name): Add one into
8261         DOS_PART, as a DOS partition is counted from one instead of zero
8262         now. Reported by Robert Millan.
8264 2006-10-14  Robert Millan  <rmh@aybabtu.com>
8266         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
8267         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
8268         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
8269         string returned by grub_guess_root_device.
8270         * util/i386/pc/grub-setup.c: Likewise.
8271         * util/i386/pc/grub-probefs.c: Likewise.
8273         * util/i386/pc/grub-probefs.c: Rename to ...
8274         * util/i386/pc/grub-probe.c: ... this.
8275         * DISTLIST: Remove grub-probefs, add grub-probe.
8276         * conf/i386-efi.rmk: Likewise.
8277         * conf/i386-pc.rmk: Likewise.
8278         * util/i386/pc/grub-install.in: Likewise.
8280         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
8281         choose which information we want to print.
8283 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
8285         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
8286         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
8287         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
8288         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
8289         video/readers/tga.c and video/i386/pc/vbeutil.c.
8291 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
8293         Added support for RAID and LVM.
8295         * disk/lvm.c: New file.
8296         * disk/raid.c: Likewise.
8297         * include/grub/lvm.h: Likewise.
8298         * include/grub/raid.h: Likewise.
8299         * include/grub/util/lvm.h: Likewise.
8300         * include/grub/util/raid.h: Likewise.
8301         * util/lvm.c: Likewise.
8302         * util/raid.c: Likewise.
8304         * include/grub/disk.h (grub_disk_dev_id): Add
8305         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
8306         (grub_disk_get_size): New prototype.
8307         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
8308         returns a partition.
8309         (grub_disk_get_size): New function.
8311         * kern/i386/pc/init.c (make_install_device): Copy the prefix
8312         verbatim if grub_install_dos_part is -2.
8314         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
8315         and LVM devices.
8317         * util/i386/pc/grub-setup.c (setup): New argument
8318         MUST_EMBED. Force embedding of GRUB when the argument is
8319         true. Close FILE before returning.
8320         (main): Add support for RAID and LVM.
8322         * conf/common.rmk: Add RAID and LVM modules.
8323         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
8324         util/lvm.c.
8325         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
8327         * kern/misc.c (grub_strstr): New function.
8328         * include/grub/misc.h (grub_strstr): New prototype.
8330 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
8332         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
8334 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
8336         * kern/misc.c (grub_strtoull): Guess the base only if not
8337         specified.
8339 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
8341         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
8342         PowerMac support.
8344 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
8346         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
8348         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
8349         Remove `flags' argument.  All callers changed.
8350         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
8351         (IEEE1275_IHANDLE_INVALID): New variable.
8352         (IEEE1275_CELL_INVALID): New variable.
8353         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
8354         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
8355         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
8356         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
8357         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
8358         codes from Open Firmware.  All callers updated.
8359         (grub_ieee1275_next_property): Directly return Open Firmware return
8360         code.
8361         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8362         Standardize error checking from `grub_ieee1275_get_property'.
8363         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
8364         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
8366 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
8368         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
8369         `instance_to_package_args' to `instance_to_path_args'.
8371         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
8372         `grub_ieee1275_chosen'.
8374         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
8375         `grub_ieee1275_interpret'.
8377 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
8379         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
8381 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
8383         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
8384         (__cmpdi): Likewise.
8386         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
8387         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
8388         `grub_ssize_t'.
8390         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
8392         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
8393         to type `grub_ssize_t'.
8394         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
8396 2006-09-22  Marco Gerards  <marco@gnu.org>
8398         * normal/script.c (grub_script_create_cmdmenu): Skip leading
8399         newlines.
8401 2006-09-22  Marco Gerards  <marco@gnu.org>
8403         * commands/echo.c: New file.
8405         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
8407         * conf/common.rmk (echo_mod_SOURCES): New variable.
8408         (echo_mod_CFLAGS): Likewise.
8409         (echo_mod_LDFLAGS): Likewise.
8411 2006-09-22  Marco Gerards  <marco@gnu.org>
8413         * normal/main.c (get_line): Malloc memory instead of using
8414         preallocated memory.  Removed the arguments `cmdline' and
8415         `max_len'.  Updated all callers.
8417 2006-09-22  Marco Gerards  <marco@gnu.org>
8419         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
8420         (normal_mod_DEPENDENCIES): Likewise.
8422         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
8423         (normal_mod_DEPENDENCIES): Likewise.
8425         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
8427 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
8429         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
8430         programs.
8431         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
8432         (normal_mod_DEPENDENCIES): Likewise.
8433         * conf/i386-pc.mk: Regenerate.
8434         * conf/i386-efi.mk: Likewise
8435         * conf/common.mk: Likewise.
8436         * conf/powerpc-ieee1275.mk: Likewise.
8437         * conf/sparc64-ieee1275.mk: Likewise.
8439 2006-09-22  Robert Millan  <rmh@aybabtu.com>
8441         Sync with i386 version.
8442         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
8443         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
8445 2006-09-21  Robert Millan  <rmh@aybabtu.com>
8447         Import from GRUB Legacy (lib/device.c):
8448         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
8449         (init_device_map) [__linux__]: Add support for I2O devices.
8451 2006-09-14  Marco Gerards  <marco@gnu.org>
8453         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
8454         `-melf_i386'.
8456 2006-09-14  Robert Millan  <rmh@aybabtu.com>
8458         * util/i386/pc/grub-install.in: Skip menu.lst when removing
8459         /boot/grub/*.lst.
8461         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
8463         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
8464         before adding it to device.map.
8466 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
8468         * genmk.rb: Let GCC generate dependencies the first time it
8469         compiles a file; using the -MD option.
8470         * conf/common.mk: Regenerate.
8471         * conf/i386-pc.mk: Likewise.
8472         * conf/i386-efi.mk: Likewise.
8473         * conf/powerpc-ieee1275.mk: Likewise.
8474         * conf/sparc64-ieee1275.mk: Likewise.
8476 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
8478         Move the prototypes of grub_setjmp and grub_longjmp to
8479         cpu/setjmp.h, so that each architecture may specify different
8480         attributes.
8482         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
8483         (grub_longjmp): Likewise.
8484         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
8485         (grub_longjmp): Likewise.
8486         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
8487         (grub_longjmp): Likewise.
8489         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
8490         [!GRUB_UTIL] (grub_longjmp): Removed.
8492 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
8494         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
8495         "color!" method does not return any value.
8497 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
8499         * include/grub/bitmap.h: New file.
8501         * include/grub/i386/pc/vbeutil.h: Likewise.
8503         * video/bitmap.c: Likewise.
8505         * video/readers/tga.c: Likewise.
8507         * video/i386/pc/vbeutil.c: Likewise.
8509         * commands/videotest.c: Code cleanup and updated to reflect to new
8510         video API.
8512         * term/gfxterm.c: Likewise.
8514         * video/video.c: Likewise.
8516         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
8517         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
8518         (bitmap_mod_SOURCES): New entry.
8519         (bitmap_mod_CFLAGS): Likewise.
8520         (bitmap_mod_LDFLAGS): Likewise.
8521         (tga_mod_SOURCES): Likewise.
8522         (tga_mod_CFLAGS): Likewise.
8523         (tga_mod_LDFLAGS): Likewise.
8525         * include/grub/video.h (grub_video_blit_operators): New enum type.
8526         (grub_video_render_target): Changed as forward declaration and moved
8527         actual definition to be video driver specific.
8528         (grub_video_adapter.blit_bitmap): Added blitting operator.
8529         (grub_video_adapter.blit_render_target): Likewise.
8530         (grub_video_blit_bitmap): Likewise.
8531         (grub_video_blit_render_target): Likewise.
8533         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
8534         driver specific render target definition.
8535         (grub_video_vbe_map_rgba): Added driver internal helper.
8536         (grub_video_vbe_unmap_color): Updated to use
8537         grub_video_i386_vbeblit_info.
8538         (grub_video_vbe_get_video_ptr): Likewise.
8540         * include/grub/i386/pc/vbeblit.h
8541         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
8542         grub_video_i386_vbeblit_info.
8543         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
8544         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
8545         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
8546         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
8547         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
8548         (grub_video_i386_vbeblit_index_index): Likewise.
8549         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
8550         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
8551         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
8552         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
8553         operator.
8554         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
8555         operator.
8557         * video/i386/pc/vbeblit.c: Updated to reflect changes on
8558         include/grub/i386/pc/vbeblit.h.
8560         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
8561         Updated to use grub_video_i386_vbeblit_info.
8562         (grub_video_i386_vbefill_R8G8B8): Likewise.
8563         (grub_video_i386_vbefill_index): Likewise.
8564         (grub_video_i386_vbefill): Added generic filler.
8566         * video/i386/pc/vbefill.c: Updated to reflect changes on
8567         include/grub/i386/pc/vbefill.h.
8569         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
8570         grub_video_i386_vbeblit_info.
8571         (grub_video_vbe_unmap_color): Likewise.
8572         (grub_video_vbe_blit_glyph): Likewise.
8573         (grub_video_vbe_scroll): Likewise.
8574         (grub_video_vbe_draw_pixel): Removed function.
8575         (grub_video_vbe_get_pixel): Likewise.
8576         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
8577         updated code to use it.
8578         (common_blitter): Added common blitter for render target and bitmap.
8579         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
8580         (grub_video_vbe_blit_render_target): Likewise.
8582 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
8584         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
8585         is in text mode if there is no console control protocol instance
8586         available.
8588 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
8590         * include/grub/video.h: Code cleanup.
8592         * include/grub/i386/pc/vbe.h: Likewise.
8594         * video/i386/pc/vbe.c: Likewise.
8596         * video/i386/pc/vbeblit.c: Likewise.
8598         * video/i386/pc/vbefill.c: Likewise.
8600         * video/video.c: Likewise.  Also added more comments.
8602 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
8604         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
8605         (struct grub_biosdisk_dap): Likewise.
8607         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
8608         linkage settings for all functions.
8610 2006-07-12  Marco Gerards  <marco@gnu.org>
8612         * configure.ac (--enable-mm-debug): Fix typo.
8614         * genkernsyms.sh.in: Use proper quoting for `CC'.
8616 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
8618         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
8619         (normal_mod_ASFLAGS): Remove "-m32".
8621 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
8623         * util/misc.c: Include config.h.
8624         [!HAVE_MEMALIGN]: Do not include malloc.h.
8625         (grub_memalign): Use posix_memalign, if present. Then, use
8626         memalign, if present. Otherwise, emit an error.
8628         * util/grub-emu.c: Do not include malloc.h.
8630         * include/grub/util/misc.h: Include unistd.h. This is required for
8631         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
8632         D. Eades III <hde@foobar-qux.org>.
8634         * configure.ac (AC_GNU_SOURCE): Added.
8635         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
8636         type.
8638 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
8640         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
8641         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
8643 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
8645         * include/grub/types.h (grub_host_addr_t): Rename to
8646         grub_target_addr_t.
8647         (grub_host_off_t): Rename to grub_target_off_t.
8648         (grub_host_size_t): Rename to grub_target_size_t.
8649         (grub_host_ssize_t): Rename to grub_target_ssize_t.
8650         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
8652         * include/grub/kernel.h (struct grub_module_header): Change type
8653         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
8654         (grub_module_info): Likewise.
8656 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
8658         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
8659         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
8660         Velazquez <jesus.velazquez@gmail.com>.
8662 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
8664         Count partitions from 1 instead of 0 in the string representation
8665         of partitions. Still use 0-based internally.
8667         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
8668         (sun_partition_map_iterate): Use grub_partition_t instead of
8669         struct grub_partition *. Cast DESC->START_CYLINDER to
8670         grub_uint64_t after converting the endian.
8671         (sun_partition_map_probe): Subtract 1 for PARTNUM.
8672         (sun_partition_map_get_name): Add 1 to P->INDEX.
8674         * partmap/pc.c (grub_partition_parse): Subtract 1 for
8675         PCDATA->DOS_PART.
8676         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
8678         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
8679         zero instead of one.
8680         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
8681         (gpt_partition_map_get_name): Add 1 into P->INDEX.
8683         * partmap/apple.c (apple_partition_map_iterate): Change the type
8684         of POS to unsigned.
8685         (apple_partition_map_probe): Subtract 1 for PARTNUM.
8686         (apple_partition_map_get_name): Add 1 into P->INDEX.
8688         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
8689         of POS to unsigned.
8690         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
8691         calculate the offset of a partition.
8692         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
8693         (amiga_partition_map_get_name): Add 1 into P->INDEX.
8695         * partmap/acorn.c (acorn_partition_map_find): Change the type of
8696         SECTOR to grub_disk_addr_t.
8697         (acorn_partition_map_iterate): Likewise.
8698         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
8699         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
8700         top.
8701         (acorn_partition_map_get_name): Add 1 into P->INDEX.
8703         * kern/i386/pc/init.c (make_install_device): Add 1 into
8704         GRUB_INSTALL_DOS_PART.
8706         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
8707         conditional.
8709 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
8711         Clean up the code to support 64-bit addressing in disks and
8712         files. This change is not enough for filesystems yet.
8714         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
8715         type of "start" to grub_uint64_t.
8716         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
8717         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
8718         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
8719         convert addresses.
8721         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
8722         to grub_disk_addr_t.
8724         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
8725         string.
8727         * partmap/pc.c (pc_partition_map_iterate): Likewise.
8729         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
8730         to char *.
8732         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
8734         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
8736         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
8738         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
8739         to grub_off_t, to detect an error from grub_file_seek.
8740         (grub_multiboot_load_elf32): Likewise.
8742         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
8743         maximum unsigned long value when an overflow is detected.
8744         (grub_strtoull): New function.
8745         (grub_divmod64): Likewise.
8746         (grub_lltoa): use grub_divmod64.
8748         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
8749         grub_disk_addr_t.
8750         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
8751         the pointer to next character. Use grub_strtoull instead of
8752         grub_strtoul.
8753         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
8754         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
8755         respectively.
8757         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
8758         return value is signed.
8759         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
8760         test if OFFSET is less than zero, as OFFSET is unsigned now.
8762         * kern/disk.c (struct grub_disk_cache): Change the type of
8763         "sector" to grub_disk_addr_t.
8764         (grub_disk_cache_get_index): Change the type of SECTOR to
8765         grub_disk_addr_t. Calculate the hash with SECTOR casted to
8766         unsigned after shifting.
8767         (grub_disk_cache_invalidate): Change the type of SECTOR to
8768         grub_disk_addr_t.
8769         (grub_disk_cache_unlock): Likewise.
8770         (grub_disk_cache_store): Likewise.
8771         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
8772         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
8773         grub_disk_addr_t and grub_uint64_t, respectively.
8774         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
8775         body, as the value of OFFSET is tweaked by
8776         grub_disk_check_range. Change the types of START_SECTOR, LEN and
8777         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
8778         respectively.
8779         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
8780         body, as the value of OFFSET is tweaked by
8781         grub_disk_check_range. Change the types of LEN and N to
8782         grub_size_t.
8784         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
8785         and "saved_offset" to grub_off_t.
8786         (test_header): Cast BUF to char *.
8787         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
8788         to char *.
8789         (grub_gzio_read): Change the types of OFFSET and SIZE to
8790         grub_off_t and grub_size_t, respectively.
8792         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
8793         Removed.
8794         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
8795         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
8796         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
8797         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
8798         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
8800         * include/grub/types.h (grub_off_t): Unconditionally set to
8801         grub_uint64_t.
8802         (grub_disk_addr_t): Changed to grub_uint64_t.
8804         * include/grub/partition.h (struct grub_partition): Change the
8805         types of "start", "len" and "offset" to grub_disk_addr_t,
8806         grub_uint64_t and grub_disk_addr_t, respectively.
8807         (grub_partition_get_start): Return grub_disk_addr_t.
8808         (grub_partition_get_len): Return grub_uint64_t.
8810         * include/grub/misc.h (grub_strtoull): New prototype.
8811         (grub_divmod64): Likewise.
8813         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
8814         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
8815         grub_off_t, respectively.
8816         All callers and references changed.
8818         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
8819         grub_size_t in "read".
8820         All callers and references changed.
8822         * include/grub/file.h (struct grub_file): Change the types of
8823         "offset" and "size" to grub_off_t and grub_off_t,
8824         respectively. Change the type of SECTOR to grub_disk_addr_t in
8825         "read_hook".
8826         (grub_file_read): Change the type of LEN to grub_size_t.
8827         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
8828         grub_off_t.
8829         (grub_file_size): Return grub_off_t.
8830         (grub_file_tell): Likewise.
8831         All callers and references changed.
8833         * include/grub/disk.h (struct grub_disk_dev): Change the types of
8834         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
8835         "write".
8836         (struct grub_disk): Change the type of "total_sectors" to
8837         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
8838         "read_hook".
8839         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
8840         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
8841         (grub_disk_write): Likewise.
8842         All callers and references changed.
8844         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
8845         char * for grub_strncmp to silence gcc.
8846         (grub_iso9660_mount): Likewise.
8847         (grub_iso9660_mount): Likewise.
8848         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
8849         return statement.
8850         (grub_iso9660_iterate_dir): Likewise.
8851         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
8853         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
8854         LEN to grub_disk_addr_t and grub_size_t, respectively.
8856         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8858         * fs/jfs.c (grub_jfs_read_file): Likewise.
8860         * fs/minix.c (grub_jfs_read_file): Likewise.
8862         * fs/sfs.c (grub_jfs_read_file): Likewise.
8864         * fs/ufs.c (grub_jfs_read_file): Likewise.
8866         * fs/xfs.c (grub_jfs_read_file): Likewise.
8868         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
8869         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
8870         respectively.
8872         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
8873         BLKNR to -1 instead of returning GRUB_ERRNO.
8874         (grub_ext2_read_file): Change the types of SECTOR and
8875         LEN to grub_disk_addr_t and grub_size_t, respectively.
8877         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
8878         LEN to grub_disk_addr_t and grub_size_t, respectively.
8880         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
8881         grub_file_read.
8883         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
8884         string. Do not cast SECTOR explicitly.
8886         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
8887         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
8888         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
8889         grub_disk_addr_t and grub_size_t, respectively. If the sector is
8890         over 2TB and LBA mode is not supported, raise an error.
8891         (get_safe_sectors): New function.
8892         (grub_biosdisk_read): Use get_safe_sectors.
8893         (grub_biosdisk_write): Likewise.
8895         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
8896         (grub_efidisk_write): Likewise.
8898         * disk/loopback.c (delete_loopback): Cosmetic changes.
8899         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
8900         correctly.
8901         (grub_loopback_open): Likewise.
8902         (grub_loopback_read): Likewise. Also, change the type of POS to
8903         grub_off_t, and fix the usage of grub_memset.
8905         * commands/i386/pc/play.c: Include grub/machine/time.h.
8907         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
8908         print FILE->SIZE.
8910         * commands/configfile.c: Include grub/env.h.
8912         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
8913         GRUB_ERRNO directly instead. Change the type of POS to
8914         grub_off_t. Follow the coding standard.
8916         * commands/blocklist.c: Include grub/partition.h.
8917         (grub_cmd_blocklist): Return an error if the underlying device is
8918         not a disk. Take the starting sector of a partition into account,
8919         if a partition is used.
8921         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
8922         a length field.
8923         (lba_mode): Support 64-bit addresses.
8924         (chs_mode): Likewise.
8925         (copy_buffer): Adapted to the new offsets of a length field and a
8926         segment field.
8927         (blocklist_default_start): Allocate 64-bit space.
8929         * boot/i386/pc/boot.S (force_lba): Removed.
8930         (boot_drive): Moved to under KERNEL_SECTOR.
8931         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
8932         space.
8933         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
8934         is useless.
8935         (lba_mode): Refactored to support a 64-bit address. More size
8936         optimization.
8937         (setup_sectors): Likewise.
8939 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
8941         * DISTLIST: Added include/grub/i386/linux.h. Removed
8942         include/grub/i386/pc/linux.h
8944         * configure.ac (AC_INIT): Bumped to 1.94.
8946         * config.guess: Updated from gnulib.
8947         * config.sub: Likewise.
8948         * install-sh: Likewise.
8949         * mkinstalldirs: Likewise.
8951 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
8953         * conf/common.rmk (grub_modules_init.lst): Depended on
8954         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
8955         MODSRCFILES.
8957         * genmk.rb (PModule::rule): Reverted the previous change.
8959 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
8961         * conf/common.rmk (grub_modules_init.lst): Depends on
8962         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
8963         that the target does not exist before producing.
8964         (grub_modules_init.h): Remove the target before generating.
8965         (grub_emu_init.c): Likewise.
8967         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
8969 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
8971         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
8972         for the target-specific tests. Make sure that we also have the
8973         up-to-date target variables for those tests.
8975 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
8977         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
8978         (PModule::rule): Likewise.
8980 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
8982         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
8983         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
8984         target-specific flags should be prefixed.
8985         (PModule::rule): Likewise.
8987 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
8989         * configure.ac (CMP): Check if cmp is available explicitly.
8991 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
8993         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
8994         (target_cpu): New variable.
8995         (pkglibdir): Use target_cpu instead of host_cpu.
8997         * util/i386/pc/grub-install.in (host_cpu): Removed.
8998         (target_cpu): New variable.
8999         (pkglibdir): Use target_cpu instead of host_cpu.
9001         * util/genmoddep.c: Removed.
9003         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
9004         instead of GRUB_HOST_SIZEOF_VOID_P.
9005         * kern/dl.c: Likewise.
9007         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
9008         ...
9009         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9010         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9011         (GRUB_TARGET_SIZEOF_LONG): ... this.
9012         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9013         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9014         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9015         to ...
9016         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9017         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9018         (GRUB_TARGET_SIZEOF_LONG): ... this.
9019         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9020         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9021         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9022         to ...
9023         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9024         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9025         (GRUB_TARGET_SIZEOF_LONG): ... this.
9026         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9027         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9029         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
9030         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
9031         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
9032         instead of GRUB_HOST_SIZEOF_LONG.
9033         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
9034         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
9035         GRUB_CPU_WORDS_BIGENDIAN.
9036         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
9037         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
9038         grub_host_ssize_t.
9040         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
9041         (genmoddep_SOURCES): Likewise.
9042         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
9043         (genmoddep_SOURCES): Likewise.
9044         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
9045         (genmoddep_SOURCES): Likewise.
9046         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
9047         Likewise.
9048         (genmoddep_SOURCES): Likewise.
9050         * genmoddep.awk: New file.
9052         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
9053         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
9054         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
9055         (PModule::rule): Likewise.
9056         (Program::rule): Likewise.
9057         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
9058         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
9059         respectively.
9061         * configure.ac: Rewritten intensively to use host and target
9062         instead of build and host, respectively.
9064         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
9065         (host_cpu): Removed.
9066         (target_cpu): New variable.
9067         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
9068         (BUILD_CC): Removed.
9069         (BUILD_CFLAGS): Likewise.
9070         (BUILD_CPPFLAGS): Likewise.
9071         (TARGET_CC): New variable.
9072         (TARGET_CFLAGS): Likewise.
9073         (TARGET_CPPFLAGS): Likewise.
9074         (TARGET_LDFLAGS): Likewise.
9075         (AWK): Likewise.
9076         (include): Use target_cpu instead of host_cpu.
9077         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
9079         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
9081 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
9083         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
9084         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
9085         field 'false' to 'exec_on_false'.
9086         (grub_script_create_cmdif): Renamed argument names to reflect above
9087         changes.
9089         * normal/execute.c (grub_script_execute_cmdif): Likewise.
9091         * normal/script.c (grub_script_create_cmdif): Likewise.
9093 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
9095         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
9096         top.
9097         (grub_hfsplus_btree_recptr): Likewise.
9098         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
9099         FILEBLOCK both to pass a block number and store next block
9100         number.
9101         (grub_hfsplus_read_block): Rewritten heavily to support an extent
9102         overflow file correctly. Specify errors appropriately, because
9103         fshelp expects that GRUB_ERRNO is set when fails. Reuse
9104         grub_hfsplus_btree_recptr to get the pointer to a found key.
9105         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
9106         is found.
9108         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
9109         linux.mod.
9110         (_linux_mod_SOURCES): New variable.
9111         (_linux_mod_CFLAGS): Likewise.
9112         (_linux_mod_LDFLAGS): Likewise.
9113         (linux_mod_SOURCES): Likewise.
9114         (linux_mod_CFLAGS): Likewise.
9115         (linux_mod_LDFLAGS): Likewise.
9117         * DISTLIST: Added loader/i386/efi/linux.c,
9118         loader/i386/efi/linux_normal.c and
9119         include/grub/i386/efi/loader.h.
9121         * loader/i386/efi/linux.c: New file.
9122         * loader/i386/efi/linux_normal.c: Likewise.
9123         * include/grub/i386/efi/loader.h: Likewise.
9125 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
9127         * commands/blocklist.c: New file.
9129         * DISTLIST: Added commands/blocklist.c.
9131         * term/efi/console.c (grub_console_highlight_color): Use a lighter
9132         color for the background, and a darker color for the foreground.
9133         (grub_console_checkkey): Return READ_KEY.
9134         (grub_console_cls): Set the background to
9135         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
9137         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
9139         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
9140         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
9142         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
9143         prototype.
9145         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
9146         BG. The spec is wrong again.
9148         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
9149         prototype.
9150         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
9152         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9153         commands/blocklist.c.
9154         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9156         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
9157         (blocklist_mod_SOURCES): New variable.
9158         (blocklist_mod_CFLAGS): Likewise.
9159         (blocklist_mod_LDFLAGS): Likewise.
9161 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
9163         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
9164         duplication.
9165         (lba_mode): Use %eax more intensively to reduce the code size.
9167 2006-05-20  Marco Gerards  <marco@gnu.org>
9169         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
9171         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
9172         for `menuentry'.
9173         (script): Accept leading newlines.
9174         (newlines): New rule to describe 0 or more newlines.
9175         (commands): Accept `command' with trailing newline.  Fixed the
9176         order in which arguments were passed to `grub_script_add_cmd'.
9177         Accept commands separated by newlines.
9178         (function): Changed to accept newlines.
9179         (menuentry) Rewritten.
9181         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
9182         front of the list, instead of to the end.
9184 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
9186         * util/i386/pc/grub-install.in (bindir): New variable.
9187         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
9188         Shaver <lbgwjl@gmail.com>.
9190 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
9192         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
9193         grub/machine/linux.h
9194         * loader/i386/pc/linux.c: Likewise.
9196         * include/grub/i386/pc/linux.h: Moved to ...
9197         * include/grub/i386/linux.h: ... here.
9199         * include/grub/i386/linux.h (struct linux_kernel_params): New
9200         struct.
9202 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
9204         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
9205         checking.
9206         (grub_video_vbe_blit_glyph): Likewise.
9207         (grub_video_vbe_blit_bitmap): Likewise.
9208         (grub_video_vbe_blit_render_target): Likewise.
9210 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
9212         * configure.ac (--with-platform): Properly quote the square
9213         brackets.
9215 2006-05-08  Marco Gerards  <marco@gnu.org>
9217         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
9218         this...
9219         (kernel_elf_HEADERS): ...to this.  Updated all users.
9220         (grubof_symlist.c): Renamed from this...
9221         (kernel_elf_symlist.c): ...to this.  Updated all users.
9222         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9223         (grubof_SOURCES): Renamed from this...
9224         (kernel_elf_SOURCES): ...to this.
9225         (grubof_HEADERS): Renamed from this...
9226         (kernel_elf_HEADERS): ...to this.
9227         (grubof_CFLAGS): Renamed from this...
9228         (kernel_elf_CFLAGS): ...to this.
9229         (grubof_ASFLAGS): Renamed from this...
9230         (kernel_elf_ASFLAGS): ...to this.
9231         (grubof_LDFLAGS): Renamed from this...
9232         (kernel_elf_LDFLAGS): ...to this.
9234         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
9235         this...
9236         (kernel_elf_HEADERS): ...to this.  Updated all users.
9237         (grubof_symlist.c): Renamed from this...
9238         (kernel_elf_symlist.c): ...to this.  Updated all users.
9239         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9240         (grubof_SOURCES): Renamed from this...
9241         (kernel_elf_SOURCES): ...to this.
9242         (grubof_HEADERS): Renamed from this...
9243         (kernel_elf_HEADERS): ...to this.
9244         (grubof_CFLAGS): Renamed from this...
9245         (kernel_elf_CFLAGS): ...to this.
9246         (grubof_ASFLAGS): Renamed from this...
9247         (kernel_elf_ASFLAGS): ...to this.
9248         (grubof_LDFLAGS): Renamed from this...
9249         (kernel_elf_LDFLAGS): ...to this.
9251         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
9252         `kernel.elf' instead of `grubof'.
9254 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
9256         Add --with-platform to configure. Use pkglibdir instead of
9257         pkgdatadir. This is reported by Roger Leigh.
9259         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
9260         (host_vendor): Likewise.
9261         (host_os): Likewise.
9262         (pkgdatadir): Likewise.
9263         (platform): New variable.
9264         (pkglibdir): Likewise.
9265         Use PKGLIBDIR instead of PKGDATADIR.
9267         * util/i386/pc/grub-install.in (datadir): Removed.
9268         (host_vendor): Likewise.
9269         (host_os): Likewise.
9270         (pkgdatadir): Likewise.
9271         (platform): New variable.
9272         (pkglibdir): Likewise.
9273         Use PKGLIBDIR instead of PKGDATADIR.
9275         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
9276         instead of GRUB_DATADIR.
9277         (main): Likewise.
9278         * util/i386/pc/grub-mkimage.c (usage): Likewise.
9279         (main): Likewise.
9280         * util/i386/efi/grub-mkimage.c (usage): Likewise.
9281         (main): Likewise.
9283         * configure.ac (--with-platform): New option.
9284         Use PLATFORM instead of HOST_VENDOR to specify a platform.
9286         * Makefile.in: Include a makefile based on PLATFORM instead of
9287         HOST_VENDOR.
9288         (pkgdatadir): Not appended by the machine type.
9289         (pkglibdir): Appended by the machine type.
9290         (host_vendor): Removed.
9291         (platform): New variable.
9292         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
9293         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
9294         (uninstall): Likewise.
9296 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
9298         Use the environment context in the menu. Remove the commands
9299         "default" and "timeout", and use variables instead.
9301         * normal/menu.c: Include grub/env.h.
9302         (print_entry): Cast TITLE to silence gcc.
9303         (get_timeout): New function.
9304         (set_timeout): Likewise.
9305         (get_entry_number): Likewise.
9306         (run_menu): Use a default entry, a fallback entry and a timeout
9307         in the environment variables "default", "fallback" and
9308         "timeout". Also, tweak the default entry if it is not within the
9309         current menu entries.
9310         (grub_menu_run): Use a fallback entry in the environment variable
9311         "fallback".
9313         * normal/main.c (read_config_file): Do not initialize
9314         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
9315         NEWMENU->TIMEOUT.
9316         (grub_normal_execute): Use a data slot to store the menu.
9318         * include/grub/normal.h (struct grub_menu): Removed default_entry,
9319         fallback_entry and timeout.
9320         (struct grub_menu_list): Removed.
9321         (grub_menu_list_t): Likewise.
9322         (struct grub_context): Likewise.
9323         (grub_context_t): Likewise.
9324         (grub_context_get): Likewise.
9325         (grub_context_get_current_menu): Likewise.
9326         (grub_context_push_menu): Likewise.
9327         (grub_context_pop_menu): Likewise.
9328         (grub_default_init): Likewise.
9329         (grub_default_fini): Likewise.
9330         (grub_timeout_init): Likewise.
9331         (grub_timeout_fini): Likewise.
9333         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
9334         and timeout.mod.
9335         (normal_mod_SOURCES): Removed normal/context.c.
9337         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
9338         commands/default.c, commands/timeout.c and normal/context.c.
9339         (normal_mod_SOURCES): Removed normal/context.c.
9341         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
9342         commands/timeout.c and normal/context.c.
9343         (normal_mod_SOURCES): Removed normal/context.c.
9345         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
9346         commands/default.c, commands/timeout.c and normal/context.c.
9347         (normal_mod_SOURCES): Removed normal/context.c.
9349         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
9350         timeout.mod.
9351         (default_mod_SOURCES): Removed.
9352         (default_mod_CFLAGS): Likewise.
9353         (default_mod_LDFLAGS): Likewise.
9354         (timeout_mod_SOURCES): Removed.
9355         (timeout_mod_CFLAGS): Likewise.
9356         (timeout_mod_LDFLAGS): Likewise.
9358         * DISTLIST: Removed commands/default.c, commands/timeout.c and
9359         normal/context.c.
9361         * commands/default.c: Removed.
9362         * commands/timeout.c: Likewise.
9363         * normal/context.c: Likewise.
9365 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
9367         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
9369 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
9371         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
9372         "next" to "prev" for readability.
9373         (struct grub_env_sorted_var): New struct.
9374         (grub_env_context): Renamed to ...
9375         (initial_context): ... this.
9376         (grub_env_var_context): Renamed to ...
9377         (current_context): ... this.
9378         (grub_env_find): Look only at CURRENT_CONTEXT.
9379         (grub_env_context_open): Rewritten to copy exported variables from
9380         previous context.
9381         (grub_env_context_close): Rewritten according to the new
9382         scheme. Also, add an assertion to prevent the initial context from
9383         removed.
9384         (grub_env_insert): Removed the code for the sorted list.
9385         (grub_env_remove): Likewise.
9386         (grub_env_export): Simply mark the variable with
9387         GRUB_ENV_VAR_GLOBAL.
9388         (grub_env_set): A cosmetic change for naming consistency.
9389         (grub_env_get): Likewise.
9390         (grub_env_unset): Likewise.
9391         (grub_env_iterate): Rewritten to sort variables within this
9392         function.
9393         (grub_register_variable_hook): Fixed for naming consistency. Call
9394         grub_env_find again, only if NAME is not found at the first time.
9395         (mangle_data_slot_name): New function.
9396         (grub_env_set_data_slot): Likewise.
9397         (grub_env_get_data_slot): Likewise.
9398         (grub_env_unset_data_slot): Likewise.
9400         * include/grub/env.h (grub_env_var_type): New enum.
9401         (GRUB_ENV_VAR_LOCAL): New constant.
9402         (GRUB_ENV_VAR_GLOBAL): Likewise.
9403         (GRUB_ENV_VAR_DATA): Likewise.
9404         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
9405         "type".
9406         (grub_env_set): Replace VAR with NAME for consistency.
9407         (grub_register_variable_hook): Likewise.
9408         (grub_env_export): Specify the name of the argument.
9409         (grub_env_set_data_slot): New prototype.
9410         (grub_env_get_data_slot): Likewise.
9411         (grub_env_unset_data_slot): Likewise.
9413 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
9415         Extend the loader so that GRUB can accept a loader which comes
9416         back to GRUB when a loaded image exits. Also, this change adds
9417         support for a chainloader on EFI.
9419         * term/efi/console.c: Include grub/misc.h.
9420         (grub_console_checkkey): Display a scan code on the top for
9421         debugging. This will be removed once the EFI port gets stable.
9422         Correct the scan code mapping.
9424         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
9425         allocate memory from larger regions, in order to reduce the number
9426         of allocated regions. Otherwise, the MacOSX loader panics.
9427         (filter_memory_map): Avoid less than 1MB for compatibility with
9428         other loaders.
9429         (add_memory_regions): Allocate from the tail of a region, if
9430         possible, to avoid allocating a region near to 1MB, for the MacOSX
9431         loader.
9433         * kern/efi/init.c (grub_efi_set_prefix): Specify
9434         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
9436         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
9437         argument IMAGE_HANDLE and specify it to get a loaded image.
9438         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
9439         grub_efi_get_loaded_image.
9440         (grub_efi_get_filename): Divide the length by the size of
9441         grub_efi_char16_t.
9442         (grub_efi_get_device_path): New function.
9443         (grub_efi_print_device_path): Print End Device Path nodes. Divide
9444         the length by the size of grub_efi_char16_t for a file path device
9445         path node.
9447         * kern/loader.c (grub_loader_noreturn): New variable.
9448         (grub_loader_set): Accept a new argument NORETURN. Set
9449         GRUB_LOADER_NORETURN to NORETURN.
9450         All callers changed.
9451         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
9452         grub_machine_fini.
9454         * include/grub/efi/efi.h (grub_efi_get_device_path): New
9455         prototype.
9456         (grub_efi_get_loaded_image): Take an argument to specify an image
9457         handle.
9459         * include/grub/loader.h (grub_loader_set): Added one more argument
9460         NORETURN.
9462         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
9463         instead of grub_efi_open_protocol.
9464         (grub_efidisk_get_device_name): Likewise.
9465         (grub_efidisk_close): Print a newline.
9466         (grub_efidisk_get_device_handle): Fixed to use
9467         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
9468         GRUB_EFI_DEVICE_PATH_TYPE.
9470         * disk/efi/efidisk.c (device_path_guid): Moved to ...
9471         * kern/efi/efi.c (device_path_guid): ... here.
9473         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
9474         chain.mod.
9475         (kernel_mod_HEADERS): Added efi/disk.h.
9476         (_chain_mod_SOURCES): New variable.
9477         (_chain_mod_CFLAGS): Likewise.
9478         (_chain_mod_LDFLAGS): Likewise.
9479         (chain_mod_SOURCES): Likewise.
9480         (chain_mod_CFLAGS): Likewise.
9481         (chain_mod_LDFLAGS): Likewise.
9483         * DISTLIST: Added include/grub/efi/chainloader.h,
9484         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
9486         * include/grub/efi/chainloader.h: New file.
9487         * loader/efi/chainloader.c: Likewise.
9488         * loader/efi/chainloader_normal.c: Likewise.
9490 2006-04-30  Marco Gerards  <marco@gnu.org>
9492         * commands/configfile.c (grub_cmd_source): New function.
9493         (GRUB_MOD_INIT): Register the commands `source' and `.'.
9494         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
9496 2006-04-30  Marco Gerards  <marco@gnu.org>
9498         * normal/execute.c (grub_script_execute_cmd): Change the return
9499         type to `grub_err_t'.  Correctly return the error.
9500         (grub_script_execute_cmdline): In case a command line is not a
9501         command or a function, try to interpret it as an assignment.
9503 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
9505         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
9506         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
9507         skip a node whose name is obviously invalid as UTF-16,
9508         i.e. contains a NUL character. Stop the iteration when the last
9509         directory entry is found. Instead of using the return value of
9510         grub_hfsplus_btree_iterate_node, store the value in RET and use
9511         it, because the iterator can be stopped by the last directory
9512         entry.
9514 2006-04-30  Marco Gerards  <marco@gnu.org>
9516         * include/grub/env.h (grub_env_export): New prototype.  Reported
9517         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
9519 2006-04-30  Marco Gerards  <marco@gnu.org>
9521         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
9522         size of the extents in a catalog file record.
9524 2006-04-29  Marco Gerards  <marco@gnu.org>
9526         * commands/configfile.c (grub_cmd_configfile): Execute the
9527         configfile within its own context.
9529         * include/grub/env.h (grub_env_context_open): New prototype.
9530         (grub_env_context_close): Likewise.
9532         * kern/env.c (grub_env): Removed.
9533         (grub_env_sorted): Likewise.
9534         (grub_env_context): New variable.
9535         (grub_env_var_context): Likewise.
9536         (grub_env_find): Search both the active context and the global
9537         context.
9538         (grub_env_context_open): New function.
9539         (grub_env_context_close): Likewise.
9540         (grub_env_insert): Likewise.
9541         (grub_env_remove): Likewise.
9542         (grub_env_export): Likewise.
9543         (grub_env_set): Changed to use helper functions to avoid code
9544         duplication.
9545         (grub_env_iterate): Rewritten so both the current context and the
9546         global context are being used.
9548         * normal/command.c (export_command): New function.
9549         (grub_command_init): Register the `export' function.
9551 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
9553         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
9554         explicitly to suppress gcc's warnings.
9555         * fs/fat.c (grub_fat_find_dir): Likewise.
9556         (grub_fat_label): Likewise.
9557         * fs/xfs.c (grub_xfs_read_inode): Likewise.
9558         (grub_xfs_mount): Likewise.
9559         (grub_xfs_label): Likewise.
9560         * fs/affs.c (grub_affs_mount): Likewise.
9561         (grub_affs_label): Likewise.
9562         (grub_affs_iterate_dir): Likewise.
9563         * fs/sfs.c (grub_sfs_mount): Likewise.
9564         (grub_sfs_iterate_dir): Likewise.
9565         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
9566         * fs/hfs.c (grub_hfs_mount): Likewise.
9567         (grub_hfs_cmp_catkeys): Likewise.
9568         (grub_hfs_find_dir): Likewise.
9569         (grub_hfs_dir): Likewise.
9570         (grub_hfs_label): Likewise.
9571         * fs/jfs.c (grub_jfs_mount): Likewise.
9572         (grub_jfs_opendir): Likewise.
9573         (grub_jfs_getent): Likewise.
9574         (grub_jfs_lookup_symlink): Likewise.
9575         (grub_jfs_label): Likewise.
9576         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
9577         (grub_hfsplus_iterate_dir): Likewise.
9578         (grub_hfsplus_btree_iterate_node): Made static.
9580         * util/grub-emu.c (prefix): New variable.
9581         (grub_machine_set_prefix): New function.
9582         (main): Do not set the environment variable "prefix" here. Only
9583         set PREFIX, which is used later by grub_machine_set_prefix.
9585         * include/grub/video.h: Do not include grub/symbol.h.
9586         (grub_video_register): Not exported. This symbol is not defined in
9587         the kernel.
9588         (grub_video_unregister): Likewise.
9589         (grub_video_iterate): Likewise.
9590         (grub_video_setup): Likewise.
9591         (grub_video_restore): Likewise.
9592         (grub_video_get_info): Likewise.
9593         (grub_video_get_blit_format): Likewise.
9594         (grub_video_set_palette): Likewise.
9595         (grub_video_get_palette): Likewise.
9596         (grub_video_set_viewport): Likewise.
9597         (grub_video_get_viewport): Likewise.
9598         (grub_video_map_color): Likewise.
9599         (grub_video_map_rgb): Likewise.
9600         (grub_video_map_rgba): Likewise.
9601         (grub_video_fill_rect): Likewise.
9602         (grub_video_blit_glyph): Likewise.
9603         (grub_video_blit_bitmap): Likewise.
9604         (grub_video_blit_render_target): Likewise.
9605         (grub_video_scroll): Likewise.
9606         (grub_video_swap_buffers): Likewise.
9607         (grub_video_create_render_target): Likewise.
9608         (grub_video_delete_render_target): Likewise.
9609         (grub_video_set_active_render_target): Likewise.
9611         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
9612         Undefined.
9613         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
9615         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
9616         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9617         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9618         instead of $(srcdir)/genkernsyms.sh.
9620         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
9621         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9622         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9623         instead of $(srcdir)/genkernsyms.sh.
9625         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
9626         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9627         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9628         instead of $(srcdir)/genkernsyms.sh.
9630         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
9631         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9632         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9633         instead of $(srcdir)/genkernsyms.sh.
9635         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
9636         genkernsyms.sh.
9638         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
9639         genkernsyms.sh.
9640         (gensymlist.sh): New target.
9641         (genkernsyms.sh): Likewise.
9643         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
9644         genkernsyms.sh.in and gensymlist.sh.in.
9646         * genkernsyms.sh: Removed.
9647         * gensymlist.sh: Likewise.
9649         * genkernsyms.sh.in: New file.
9650         * gensymlist.sh.in: Likewise.
9652 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
9654         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
9655         clobber "prefix", since we may have already set it manually.
9657 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
9659         * kern/misc.c (abort): New alias for grub_abort.
9661 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
9663         A new machine-specific function "grub_machine_set_prefix" is
9664         defined. This is called after loading modules, so that a prefix
9665         initialization can use modules. Also, this change adds an
9666         intensive debugging feature for the memory manager via the
9667         configure option "--enable-mm-debug".
9669         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
9670         PART.LEN.
9672         * kern/sparc64/ieee1275/init.c (abort): Removed.
9673         (grub_stop): Likewise.
9674         (grub_exit): New function.
9675         (grub_set_prefix): Renamed to ...
9676         (grub_machine_set_prefix): ... this.
9677         (grub_machine_init): Do not call grub_set_prefix.
9679         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
9680         (grub_machine_set_prefix): ... this.
9681         (grub_machine_init): Do not call grub_set_prefix.
9683         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
9684         (grub_machine_init): Do not set the prefix here.
9686         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
9688         * kern/efi/init.c: Include grub/mm.h.
9689         (grub_efi_set_prefix): New function.
9691         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
9692         (grub_efi_get_filename): New function.
9693         (grub_print_device_path): Renamed to ...
9694         (grub_efi_print_device_path): ... this.
9696         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
9697         [MM_DEBUG] (grub_realloc): Likewise.
9698         [MM_DEBUG] (grub_free): Likewise.
9699         [MM_DEBUG] (grub_memalign): Likewise.
9700         [MM_DEBUG] (grub_mm_debug): New variable.
9701         [MM_DEBUG] (grub_debug_malloc): New function.
9702         [MM_DEBUG] (grub_debug_free): New function.
9703         [MM_DEBUG] (grub_debug_realloc): New function.
9704         [MM_DEBUG] (grub_debug_memalign): New function.
9706         * kern/misc.c (grub_abort): Print a newline to distinguish
9707         the message.
9709         * kern/main.c (grub_main): Call grub_machine_set_prefix and
9710         grub_set_root_dev after loading modules. This is necessary when
9711         setting a prefix depends on modules.
9713         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
9714         (grub_efi_print_device_path): ... this.
9715         (grub_efi_get_filename): New prototype.
9716         (grub_efi_set_prefix): Likewise.
9718         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
9719         and grub/disk.h.
9720         (grub_efidisk_get_device_handle): New prototype.
9721         (grub_efidisk_get_device_name): Likewise.
9723         * include/grub/mm.h: Include config.h.
9724         (MM_DEBUG): Removed.
9725         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
9726         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
9727         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
9728         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
9729         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
9730         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
9731         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
9732         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
9733         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
9735         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
9737         * disk/efi/efidisk.c: Include grub/partition.h.
9738         (iterate_child_devices): New function.
9739         (add_device): First, compare only last device path nodes, so that
9740         devices are sorted by the types.
9741         (grub_efidisk_get_device_handle): New function.
9742         (grub_efidisk_get_device_name): Likewise.
9744         * configure.ac (--enable-mm-debug): New option to enable the
9745         memory manager debugging feature. This makes the binary much
9746         bigger, so is disabled by default.
9748 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
9750         Use grub_abort instead of grub_stop, and grub_exit must be
9751         define in each architecture now. Also, this change adds support
9752         for EFI disks.
9754         * util/i386/pc/grub-probefs.c: Include grub/term.h.
9755         (grub_getkey): New function.
9756         (grub_term_get_current): Likewise.
9758         * util/i386/pc/grub-setup.c: Include grub/term.h.
9759         (grub_getkey): New function.
9760         (grub_term_get_current): Likewise.
9762         * util/misc.c (grub_stop): Renamed to ...
9763         (grub_exit): ... this.
9765         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
9766         (grub_exit): ... this.
9767         (grub_machine_init): Use grub_abort instead of abort.
9768         (grub_stop): Removed.
9770         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
9771         abort.
9773         * kern/i386/pc/startup.S (grub_exit): New function.
9774         (cold_reboot): New label.
9776         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
9777         (grub_efi_init): Call grub_efidisk_init.
9778         (grub_efi_fini): Call grub_efidisk_fini.
9780         * kern/efi/efi.c: Include grub/mm.h.
9781         (grub_efi_console_control_guid): Renamed to ...
9782         (console_control_guid): ... this.
9783         (grub_efi_loaded_image_guid): Renamed to ...
9784         (loaded_image_guid): ... this.
9785         (grub_efi_locate_handle): New function.
9786         (grub_efi_open_protocol): Likewise.
9787         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
9788         GRUB_EFI_CONSOLE_CONTROL_GUID.
9789         (grub_efi_exit): Removed.
9790         (grub_stop): Likewise.
9791         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
9792         (grub_exit): New function.
9793         (grub_print_device_path): Likewise.
9795         * kern/rescue.c (grub_rescue_cmd_exit): New function.
9796         (grub_enter_rescue_mode): Register "exit".
9798         * kern/misc.c (grub_real_dprintf): A cosmetic change.
9799         (grub_abort): New function.
9801         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
9803         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
9805         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
9807         * include/grub/efi/efi.h (grub_efi_exit): Removed.
9808         (grub_print_device_path): New prototype.
9809         (grub_efi_locate_handle): Likewise.
9810         (grub_efi_open_protocol): Likewise.
9812         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
9813         * disk/efi/efidisk.c: Likewise.
9815         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
9817         * include/grub/efi/console_control.h
9818         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
9820         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
9821         last 8 bytes as an array.
9822         (GRUB_EFI_DISK_IO_GUID): New macro.
9823         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
9824         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
9825         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
9826         grub_uint8_t.
9827         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
9828         (struct grub_efi_device_path): Rename the member "sub_type" to
9829         "subtype".
9830         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
9831         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
9832         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
9833         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
9834         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
9835         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
9836         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
9837         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
9838         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
9839         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
9840         (struct grub_efi_pci_device_path): New structure.
9841         (grub_efi_pci_device_path_t): New type.
9842         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
9843         (struct grub_efi_pccard_device_path): New structure.
9844         (grub_efi_pccard_device_path_t): New type.
9845         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
9846         (struct grub_efi_memory_mapped_device_path): New structure.
9847         (grub_efi_memory_mapped_device_path_t): New type.
9848         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
9849         (struct grub_efi_vendor_device_path): New structure.
9850         (grub_efi_vendor_device_path_t): New type.
9851         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
9852         (struct grub_efi_controller_device_path): New structure.
9853         (grub_efi_controller_device_path_t): New type.
9854         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
9855         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
9856         (struct grub_efi_acpi_device_path): New structure.
9857         (grub_efi_acpi_device_path_t): New type.
9858         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
9859         (struct grub_efi_expanded_acpi_device_path): New structure.
9860         (grub_efi_expanded_acpi_device_path_t): New type.
9861         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
9862         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
9863         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
9864         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
9865         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
9866         (struct grub_efi_atapi_device_path): New structure.
9867         (grub_efi_atapi_device_path_t): New type.
9868         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
9869         (struct grub_efi_fibre_channel_device_path): New structure.
9870         (grub_efi_fibre_channel_device_path_t): New type.
9871         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
9872         (struct grub_efi_1394_device_path): New structure.
9873         (grub_efi_1394_device_path_t): New type.
9874         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
9875         (struct grub_efi_usb_device_path): New structure.
9876         (grub_efi_usb_device_path_t): New type.
9877         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
9878         (struct grub_efi_usb_class_device_path): New structure.
9879         (grub_efi_usb_class_device_path_t): New type.
9880         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
9881         (struct grub_efi_i2o_device_path): New structure.
9882         (grub_efi_i2o_device_path_t): New type.
9883         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
9884         (struct grub_efi_mac_address_device_path): New structure.
9885         (grub_efi_mac_address_device_path_t): New type.
9886         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
9887         (struct grub_efi_ipv4_device_path): New structure.
9888         (grub_efi_ipv4_device_path_t): New type.
9889         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
9890         (struct grub_efi_ipv6_device_path): New structure.
9891         (grub_efi_ipv6_device_path_t): New type.
9892         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
9893         (struct grub_efi_infiniband_device_path): New structure.
9894         (grub_efi_infiniband_device_path_t): New type.
9895         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
9896         (struct grub_efi_uart_device_path): New structure.
9897         (grub_efi_uart_device_path_t): New type.
9898         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
9899         (struct grub_efi_vendor_messaging_device_path): New structure.
9900         (grub_efi_vendor_messaging_device_path_t): New type.
9901         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
9902         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
9903         (struct grub_efi_hard_drive_device_path): New structure.
9904         (grub_efi_hard_drive_device_path_t): New type.
9905         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
9906         (struct grub_efi_cdrom_device_path): New structure.
9907         (grub_efi_cdrom_device_path_t): New type.
9908         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
9909         (struct grub_efi_vendor_media_device_path): New structure.
9910         (grub_efi_vendor_media_device_path_t): New type.
9911         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
9912         (struct grub_efi_file_path_device_path): New structure.
9913         (grub_efi_file_path_device_path_t): New type.
9914         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
9915         (struct grub_efi_protocol_device_path): New structure.
9916         (grub_efi_protocol_device_path_t): New type.
9917         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
9918         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
9919         (struct grub_efi_bios_device_path): New structure.
9920         (grub_efi_bios_device_path_t): New type.
9921         (struct grub_efi_disk_io): New structure.
9922         (grub_efi_disk_io_t): New type.
9923         (struct grub_efi_block_io_media): New structure.
9924         (grub_efi_block_io_media_t): New type.
9925         (struct grub_efi_block_io): New structure.
9926         (grub_efi_block_io_t): New type.
9928         * include/grub/misc.h (grub_stop): Removed.
9929         (grub_exit): New prototype.
9930         (grub_abort): Likewise.
9932         * include/grub/disk.h (enum grub_disk_dev_id): Added
9933         GRUB_DISK_DEVICE_EFIDISK_ID.
9935         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
9936         disk/efi/efidisk.c.
9937         (kernel_syms.lst): Remove the target if an error occurs.
9939 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
9941         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
9942         as it was simply too buggy.
9944 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
9946         * kern/misc.c (grub_lltoa): New function.
9947         (grub_vsprintf): Added support for the long long suffix,
9948         i.e. "ll".
9950 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
9952         * Makefile.in (LDFLAGS): Add variable.
9953         (LD): Remove variable.
9954         * configure.ac: Add -m32 to LDFLAGS.
9955         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
9956         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
9957         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
9958         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
9959         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
9960         variables.
9961         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
9962         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
9963         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
9965 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
9967         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
9968         length for unknown glyph.
9970 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
9972         Add support for pre-loaded modules into the EFI port.
9974         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
9975         completely. Accept one more argument DIR. The caller has changed.
9977         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
9979         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
9980         (grub_efi_loaded_image_guid): New variable.
9981         (grub_efi_get_loaded_image): New function.
9982         (grub_arch_modules_addr): Likewise.
9984         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
9985         prototype.
9987         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
9988         (struct grub_efi_loaded_image): New structure.
9989         (grub_efi_loaded_image_t): New type.
9991 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
9993         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
9994         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
9995         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
9997 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
9999         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
10001 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
10003         * DISTLIST: Added include/grub/efi/console.h,
10004         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
10005         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10007         * include/grub/efi/console.h: New file.
10008         * include/grub/efi/time.h: Likewise.
10009         * include/grub/i386/efi/kernel.h: Likewise.
10010         * kern/efi/init.c: Likewise.
10011         * kern/efi/mm.c: Likewise.
10012         * term/efi/console.c: Likewise.
10014         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
10015         (grub_stop): Removed.
10016         (grub_get_rtc): Likewise.
10017         (grub_machine_init): Simply call grub_efi_init.
10018         (grub_machine_fini): Call grub_efi_fini.
10020         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
10021         (grub_efi_output_string): Removed.
10022         (grub_efi_stall): New function.
10023         (grub_stop): Likewise.
10024         (grub_get_rtc): Likewise.
10026         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
10027         (grub_efi_stall): New prototype.
10028         (grub_efi_allocate_pages): Likewise.
10029         (grub_efi_free_pages): Likewise.
10030         (grub_efi_get_memory_map): Likewise.
10031         (grub_efi_mm_init): Likewise.
10032         (grub_efi_mm_fini): Likewise.
10033         (grub_efi_init): Likewise.
10034         (grub_efi_fini): Likewise.
10036         * include/grub/i386/efi/time.h: Do not include
10037         grub/symbol.h. Include grub/efi/time.h.
10038         (GRUB_TICKS_PER_SECOND): Removed.
10039         (grub_get_rtc): Likewise.
10041         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
10042         Added padding. The EFI spec is buggy.
10043         (GRUB_EFI_BLACK): New macro.
10044         (GRUB_EFI_BLUE): Likewise.
10045         (GRUB_EFI_GREEN): Likewise.
10046         (GRUB_EFI_CYAN): Likewise.
10047         (GRUB_EFI_RED): Likewise.
10048         (GRUB_EFI_MAGENTA): Likewise.
10049         (GRUB_EFI_BROWN): Likewise.
10050         (GRUB_EFI_LIGHTGRAY): Likewise.
10051         (GRUB_EFI_BRIGHT): Likewise.
10052         (GRUB_EFI_DARKGRAY): Likewise.
10053         (GRUB_EFI_LIGHTBLUE): Likewise.
10054         (GRUB_EFI_LIGHTGREEN): Likewise.
10055         (GRUB_EFI_LIGHTCYAN): Likewise.
10056         (GRUB_EFI_LIGHTRED): Likewise.
10057         (GRUB_EFI_LIGHTMAGENTA): Likewise.
10058         (GRUB_EFI_YELLOW): Likewise.
10059         (GRUB_EFI_WHITE): Likewise.
10060         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
10061         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
10062         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
10063         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
10064         (GRUB_EFI_BACKGROUND_RED): Likewise.
10065         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
10066         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
10067         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
10068         (GRUB_EFI_TEXT_ATTR): Likewise.
10070         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
10071         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10072         (kernel_mod_HEADERS): Added efi/time.h.
10074 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
10076         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
10077         include/grub/efi/api.h, include/grub/efi/console_control.h,
10078         include/grub/efi/efi.h, include/grub/efi/pe32.h,
10079         include/grub/i386/efi/time.h, kern/efi/efi.c,
10080         kern/i386/efi/init.c, kern/i386/efi/startup.S,
10081         and util/i386/efi/grub-mkimage.c.
10083         * Makefile.in (RMKFILES): Added i386-efi.rmk.
10085         * genmk.rb (PModule#rule): Do not export symbols if
10086         #{prefix}_EXPORTS is set to "no".
10088         * conf/i386-efi.mk: New file.
10089         * conf/i386-efi.rmk: Likewise.
10090         * include/grub/efi/api.h: Likewise.
10091         * include/grub/efi/console_control.h: Likewise.
10092         * include/grub/efi/efi.h: Likewise.
10093         * include/grub/efi/pe32.h: Likewise.
10094         * include/grub/i386/efi/time.h: Likewise.
10095         * kern/efi/efi.c: Likewise.
10096         * kern/i386/efi/init.c: Likewise.
10097         * kern/i386/efi/startup.S: Likewise.
10098         * util/i386/efi/grub-mkimage.c: Likewise.
10100 2006-04-17  Marco Gerards  <marco@gnu.org>
10102         * include/grub/script.h: Include <grub/parser.h> and
10103         "grub_script.tab.h".
10104         (struct grub_lexer_param): New struct.
10105         (struct grub_parser_param): Likewise.
10106         (grub_script_create_arglist): Pass the state in an argument.
10107         (grub_script_add_arglist): Likewise.
10108         (grub_script_create_cmdline): Likewise.
10109         (grub_script_create_cmdblock): Likewise.
10110         (grub_script_create_cmdif): Likewise.
10111         (grub_script_create_cmdmenu): Likewise.
10112         (grub_script_add_cmd): Likewise.
10113         (grub_script_arg_add): Likewise.
10114         (grub_script_lexer_ref): Likewise.
10115         (grub_script_lexer_deref): Likewise.
10116         (grub_script_lexer_record_start): Likewise.
10117         (grub_script_lexer_record_stop): Likewise.
10118         (grub_script_mem_record): Likewise.
10119         (grub_script_mem_record_stop): Likewise.
10120         (grub_script_malloc): Likewise.
10121         (grub_script_yylex): Likewise.
10122         (grub_script_yyparse): Likewise.
10123         (grub_script_yyerror): Likewise.
10124         (grub_script_yylex): Likewise.
10125         (grub_script_lexer_init): Return the state.
10127         * normal/lexer.c (grub_script_lexer_state): Removed variable.
10128         (grub_script_lexer_done): Likewise.
10129         (grub_script_lexer_getline): Likewise.
10130         (grub_script_lexer_refs): Likewise.
10131         (script): Likewise.
10132         (newscript): Likewise.
10133         (record): Likewise.
10134         (recording): Likewise.
10135         (recordpos): Likewise.
10136         (recordlen): Likewise.
10137         (grub_script_lexer_init): Return the state instead of setting
10138         global variables.
10139         (grub_script_lexer_ref): Use the newly added argument for state
10140         instead of globals.
10141         (grub_script_lexer_deref): Likewise.
10142         (grub_script_lexer_record_start): Likewise.
10143         (grub_script_lexer_record_stop): Likewise.
10144         (recordchar): Likewise.
10145         (nextchar): Likewise.
10146         (grub_script_yylex2): Likewise.
10147         (grub_script_yylex): Likewise.
10148         (grub_script_yyerror): Likewise.
10150         * normal/parser.y (func_mem): Removed variable.
10151         (menu_entry): Likewise.
10152         (err): Likewise.
10153         (%lex-param): New parser option.
10154         (%parse-param): Likewise.
10155         (script): Always return the AST.
10156         (argument): Pass the state around.
10157         (arguments): Likewise.
10158         (grubcmd): Likewise.
10159         (commands): Likewise.
10160         (function): Likewise.
10161         (menuentry): Likewise.
10162         (if_statement): Likewise.
10163         (if): Likewise.
10165         * normal/script.c (grub_script_memused): Removed variable.
10166         (grub_script_parsed): Likewise.
10167         (grub_script_malloc): Added a state argument.  Use that instead of
10168         global variables.
10169         (grub_script_mem_record): Likewise.
10170         (grub_script_mem_record_stop): Likewise.
10171         (grub_script_arg_add): Likewise.
10172         (grub_script_add_arglist): Likewise.
10173         (grub_script_create_cmdline): Likewise.
10174         (grub_script_create_cmdif): Likewise.
10175         (grub_script_create_cmdmenu): Likewise.
10176         (grub_script_add_cmd): Likewise.
10177         (grub_script_parse): Setup the state before calling the parser.
10179 2006-04-16  Marco Gerards  <marco@gnu.org>
10181         * normal/command.c (grub_command_init): Remove the title command.
10183         * normal/lexer.c (grub_script_yylex): Renamed from this...
10184         (grub_script_yylex2): ... to this.
10185         (grub_script_yylex): New function.  Temporary
10186         introduced to filter some tokens.
10187         (grub_script_yyerror): Print a newline.
10189         * normal/main.c (read_config_file): Output information about the
10190         lines that contain errors.  Wait for a key after all lines have
10191         been processed.  Don't return an empty menu.
10193         * normal/parser.y (func_mem): Don't initialize.
10194         (menu_entry): Likewise.
10195         (err): New variable.
10196         (script): Don't return anything when an error was encountered.
10197         (ws, returns): Removed rules.
10198         (argument): Disabled concatenated variable support.
10199         (arguments): Remove explicit separators.
10200         (grubcmd): Likewise.
10201         (function): Likewise.
10202         (menuentry): Likewise.
10203         (if): Likewise.
10204         (commands): Likewise.  Add error handling.
10206         * normal/script.c (grub_script_create_cmdline): If
10207         `grub_script_parsed' is 0, assume the parser encountered an error.
10209 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
10211         * configure.ac: Add support for EFI. Fix the typo
10212         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
10214 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
10216         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
10217         foreign multibyte characters should be shown correctly.
10219 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
10221         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
10222         calculation.
10223         (read_config_file): Made it to close file before returning.
10225 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
10227         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
10228         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
10229         video/i386/pc/vbefill.c.
10231         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
10232         video/i386/pc/vbefill.c.
10234         * include/grub/video.h (grub_video_blit_format): New enum.
10235         (grub_video_mode_info): Added new member blit_format.
10236         (grub_video_get_blit_format): New function prototype.
10238         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
10239         function prototype.
10240         (grub_video_vbe_map_rgb): Likewise.
10241         (grub_video_vbe_unmap_color): Likewise.
10243         * include/grub/i386/pc/vbeblit.h: New file.
10245         * include/grub/i386/pc/vbefill.h: New file.
10247         * video/video.c (grub_video_get_blit_format): New function.
10248         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
10249         (grub_video_vbe_map_rgb): Likewise.
10250         (grub_video_vbe_unmap_color): Likewise.
10252         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
10253         optimized fills.
10254         (grub_video_vbe_blit_render_target): Changed to use more optimized
10255         blits.
10256         (grub_video_vbe_setup): Added detection for optimized settings.
10257         (grub_video_vbe_create_render_target): Likewise.
10259         * video/i386/pc/vbeblit.c: New file.
10261         * video/i386/pc/vbefill.c: New file.
10263 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
10265         * font/manager.c (grub_font_get_glyph): Removed font fixup from
10266         here...
10268         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
10269         parsing to support both hex and dec ranges.  If filename was missing
10270         show usage information.
10272 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
10274         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
10275         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
10277         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
10278         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
10279         (video_mod_SOURCES): Added.
10280         (video_mod_CFLAGS): Likewise.
10281         (video_mod_LDFLAGS): Likewise.
10282         (gfxterm_mod_SOURCES): Likewise.
10283         (gfxterm_mod_CFLAGS): Likewise.
10284         (gfxterm_mod_LDFLAGS): Likewise.
10285         (videotest_mod_SOURCES): Likewise.
10286         (videotest_mod_CFLAGS): Likewise.
10287         (videotest_mod_LDFLAGS): Likewise.
10288         (vesafb_mod_SOURCES): Removed.
10289         (vesafb_mod_CFLAGS): Likewise.
10290         (vesafb_mod_LDFLAGS): Likewise.
10291         (vga_mod_SOURCES): Likewise.
10292         (vga_mod_CFLAGS): Likewise.
10293         (vga_mod_LDFLAGS): Likewise.
10295         * commands/videotest.c: New file.
10297         * font/manager.c (fill_with_default_glyph): Modified to use
10298         grub_font_glyph.
10299         (grub_font_get_glyph): Likewise.
10300         (fontmanager): Renamed from this...
10301         (font_manager): ... to this.
10303         * include/grub/font.h (grub_font_glyph): Added new structure.
10304         (grub_font_get_glyph): Modified to use grub_font_glyph.
10306         * include/grub/misc.h (grub_abs): Added as inline function.
10308         * include/grub/video.h: New file.
10310         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
10311         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
10312         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
10313         (grub_vbe_get_controller_info): Renamed from this...
10314         (grub_vbe_bios_get_controller_info): ... to this.
10315         (grub_vbe_get_mode_info): Renamed from this...
10316         (grub_vbe_bios_get_mode_info): ... to this.
10317         (grub_vbe_set_mode): Renamed from this...
10318         (grub_vbe_bios_set_mode): ... to this.
10319         (grub_vbe_get_mode): Renamed from this...
10320         (grub_vbe_bios_get_mode): ... to this.
10321         (grub_vbe_set_memory_window): Renamed from this...
10322         (grub_vbe_bios_set_memory_window): ... to this.
10323         (grub_vbe_get_memory_window): Renamed from this...
10324         (grub_vbe_bios_get_memory_window): ... to this.
10325         (grub_vbe_set_scanline_length): Renamed from this...
10326         (grub_vbe_set_scanline_length): ... to this.
10327         (grub_vbe_get_scanline_length): Renamed from this...
10328         (grub_vbe_bios_get_scanline_length): ... to this.
10329         (grub_vbe_set_display_start): Renamed from this...
10330         (grub_vbe_bios_set_display_start): ... to this.
10331         (grub_vbe_get_display_start): Renamed from this...
10332         (grub_vbe_bios_get_display_start): ... to this.
10333         (grub_vbe_set_palette_data): Renamed from this...
10334         (grub_vbe_bios_set_palette_data): ... to this.
10335         (grub_vbe_set_pixel_rgb): Removed.
10336         (grub_vbe_set_pixel_index): Likewise.
10338         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
10339         from this...
10340         (grub_vbe_bios_get_controller_info): ... to this.
10341         (grub_vbe_get_mode_info): Renamed from this...
10342         (grub_vbe_bios_get_mode_info): ... to this.
10343         (grub_vbe_set_mode): Renamed from this...
10344         (grub_vbe_bios_set_mode): ... to this.
10345         (grub_vbe_get_mode): Renamed from this...
10346         (grub_vbe_bios_get_mode): ... to this.
10347         (grub_vbe_set_memory_window): Renamed from this...
10348         (grub_vbe_bios_set_memory_window): ... to this.
10349         (grub_vbe_get_memory_window): Renamed from this...
10350         (grub_vbe_bios_get_memory_window): ... to this.
10351         (grub_vbe_set_scanline_length): Renamed from this...
10352         (grub_vbe_set_scanline_length): ... to this.
10353         (grub_vbe_get_scanline_length): Renamed from this...
10354         (grub_vbe_bios_get_scanline_length): ... to this.
10355         (grub_vbe_set_display_start): Renamed from this...
10356         (grub_vbe_bios_set_display_start): ... to this.
10357         (grub_vbe_get_display_start): Renamed from this...
10358         (grub_vbe_bios_get_display_start): ... to this.
10359         (grub_vbe_set_palette_data): Renamed from this...
10360         (grub_vbe_bios_set_palette_data): ... to this.
10361         (grub_vbe_bios_get_controller_info): Fixed problem with registers
10362         getting corrupted after calling it.  Added more pushes and pops.
10363         (grub_vbe_bios_set_mode): Likewise.
10364         (grub_vbe_bios_get_mode): Likewise.
10365         (grub_vbe_bios_get_memory_window): Likewise.
10366         (grub_vbe_bios_set_scanline_length): Likewise.
10367         (grub_vbe_bios_get_scanline_length): Likewise.
10368         (grub_vbe_bios_get_display_start): Likewise.
10369         (grub_vbe_bios_set_palette_data): Likewise.
10371         * normal/cmdline.c (cl_set_pos): Refresh the screen.
10372         (cl_insert): Likewise.
10373         (cl_delete): Likewise.
10375         * term/gfxterm.c: New file.
10377         * term/i386/pc/vesafb.c: Removed file.
10379         * video/video.c: New file.
10381         * video/i386/pc/vbe.c (real2pm): Added new function.
10382         (grub_video_vbe_draw_pixel): Likewise.
10383         (grub_video_vbe_get_video_ptr): Likewise.
10384         (grub_video_vbe_get_pixel): Likewise
10385         (grub_video_vbe_init): Likewise.
10386         (grub_video_vbe_fini): Likewise.
10387         (grub_video_vbe_setup): Likewise.
10388         (grub_video_vbe_get_info): Likewise.
10389         (grub_video_vbe_set_palette): Likewise.
10390         (grub_video_vbe_get_palette): Likewise.
10391         (grub_video_vbe_set_viewport): Likewise.
10392         (grub_video_vbe_get_viewport): Likewise.
10393         (grub_video_vbe_map_color): Likewise.
10394         (grub_video_vbe_map_rgb): Likewise.
10395         (grub_video_vbe_map_rgba): Likewise.
10396         (grub_video_vbe_unmap_color): Likewise.
10397         (grub_video_vbe_fill_rect): Likewise.
10398         (grub_video_vbe_blit_glyph): Likewise.
10399         (grub_video_vbe_blit_bitmap): Likewise.
10400         (grub_video_vbe_blit_render_target): Likewise.
10401         (grub_video_vbe_scroll): Likewise.
10402         (grub_video_vbe_swap_buffers): Likewise.
10403         (grub_video_vbe_create_render_target): Likewise.
10404         (grub_video_vbe_delete_render_target): Likewise.
10405         (grub_video_vbe_set_active_render_target): Likewise.
10406         (grub_vbe_set_pixel_rgb): Remove function.
10407         (grub_vbe_set_pixel_index): Likewise.
10408         (index_color_mode): Remove static variable.
10409         (active_mode): Likewise.
10410         (framebuffer): Likewise.
10411         (bytes_per_scan_line): Likewise.
10412         (grub_video_vbe_adapter): Added new static variable.
10413         (framebuffer): Likewise.
10414         (render_target): Likewise.
10415         (initial_mode): Likewise.
10416         (mode_in_use): Likewise.
10417         (mode_list): Likewise.
10419 2006-03-10  Marco Gerards  <marco@gnu.org>
10421         * configure.ac (AC_INIT): Bumped to 1.93.
10423         * DISTLIST: Added `include/grub/hfs.h'.
10425 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
10427         * boot/i386/pc/boot.S (general_error): Before looping, try INT
10428         18H, which might help the BIOS falling back to next boot media.
10430 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
10432         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
10433         Poe Chen <poe.poechen@gmail.com>.
10435 2006-01-17  Marco Gerards  <marco@gnu.org>
10437         * include/grub/normal.h: Include <grub/script.h>.
10438         (grub_command_list): Removed struct.
10439         (grub_command_list_t): Removed type.
10440         (grub_menu_entry): Remove members `num' and `command_list'.  Add
10441         members `commands' and `sourcecode'.
10442         * include/grub/script.h: Add inclusion guards.
10443         (grub_script_cmd_menuentry): New struct.
10444         (grub_script_execute_menuentry): New prototype.
10445         (grub_script_lexer_record_start): Likewise.
10446         (grub_script_lexer_record_stop): Likewise.
10447         * normal/execute.c (grub_script_execute_menuentry): New function.
10448         * normal/lexer.c (record, recording, recordpos, recordlen): New
10449         variables.
10450         (grub_script_lexer_record_start): New function.
10451         (grub_script_lexer_record_stop): Likewise.
10452         (recordchar): Likewise.
10453         (nextchar): Likewise.
10454         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
10455         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
10456         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
10457         (current_menu): New variable.
10458         (free_menu): Mainly rewritten.
10459         (grub_normal_menu_addentry): New function.
10460         (read_config_file): Rewritten.
10461         * normal/menu.c (run_menu_entry): Mainly rewritten.
10462         * normal/menu_entry.c (make_screen): Rewritten the code to insert
10463         the menu entry.
10464         (run): Mainly rewritten.
10465         * normal/parser.y (menu_entry): New variable.
10466         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
10467         (menuentry): New rule.
10468         (command): Add `menuentry'.
10469         (if_statement): Allow additional returns before `fi'.
10470         * normal/script.c (grub_script_create_cmdmenu): New function.
10472 2006-01-03  Marco Gerards  <marco@gnu.org>
10474         * INSTALL: GNU Bison is required.
10475         * configure.ac: Rewritten the test to detect Bison.
10476         * Makefile.in (YACC): New variable.  Reported by Xun Sun
10477         <xun.sun.cn@gmail.com>.
10479 2006-01-03  Marco Gerards  <marco@gnu.org>
10481         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
10482         the HFS+ filesystem to filesystem blocks.
10483         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
10484         GCC warning is silenced.
10486 2006-01-03  Marco Gerards  <marco@gnu.org>
10488         * partmap/apple.c (apple_partition_map_iterate): Convert the data
10489         read from disk from big endian to host byte order.
10491 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
10493         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
10494         documentation.
10495         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
10496         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
10497         embedded HFS+ filesystem.
10498         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
10499         (grub_hfs_sblock): Move from here...
10500         * include/grub/hfs.h: To here...  New file.
10501         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
10502         documentation.
10503         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
10504         New macros.
10505         (grub_hfsplus_volheader): Change type of member `magic' to
10506         `grub_uint16_t'.
10507         (grub_hfsplus_data): Add new member `embedded_offset'.
10508         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
10509         returned block.
10510         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
10511         Calculate the offset.
10513 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
10515         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
10516         Removed.
10517         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
10519 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
10521         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
10522         ENV->NAME is NULL after allocating ENV->VALUE.
10524 2005-12-25  Marco Gerards  <marco@gnu.org>
10526         * kern/env.c (grub_env_set): Rewritten the error handling code.
10528 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
10530         * geninit.sh: Made more robust, and more portable.
10532 2005-12-25  Marco Gerards  <marco@gnu.org>
10534         Add support for Apple HFS+ filesystems.
10536         * fs/hfsplus.c: New file.
10538         * DISTLIST: Added `fs/hfsplus.c'.
10540         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
10541         (hfsplus_mod_SOURCES): New variable.
10542         (hfsplus_mod_CFLAGS): Likewise.
10543         (hfsplus_mod_LDFLAGS): Likewise.
10544         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
10545         (grub_setup_SOURCES): Likewise.
10546         (grub_mkdevicemap_SOURCES): Likewise.
10547         (grub_emu_SOURCES): Likewise.
10548         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10550         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
10552         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
10554 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
10556         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
10557         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
10558         include/grub/parser.h, include/grub/script.h, kern/parser.c,
10559         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
10560         normal/lexer.c, normal/parser.y, normal/script.c, and
10561         partmap/gpt.c.
10562         Removed kern/sparc64/cache.c.
10564         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
10565         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
10566         grub_emu_init.c.
10568         * configure.ac (AC_INIT): Bumped to 1.92.
10570 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
10572         * kern/err.c (grub_error_push): Added new function to support error
10573         stacks.
10574         (grub_error_pop): Likewise.
10575         (grub_error_stack_items): New local variable to support error stacks.
10576         (grub_error_stack_pos): Likewise.
10577         (grub_error_stack_assert): Likewise.
10578         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
10579         stack depth.
10580         (grub_print_error): Added support to print errors from error stack.
10582         * include/grub/err.h (grub_error_push): Added function prototype.
10583         (grub_error_pop): Likewise.
10585 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
10587         * configure.ac: Accept `powerpc64' as host_cpu.
10588         (amd64): Rename to `biarch32'.
10590         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
10591         non-cacheline-aligned addresses.
10593         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
10594         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
10595         if `size' is non-zero.
10597 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
10599         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
10600         and `cd' to make sure the filename is not prefixed with a
10601         directory name.
10602         (pkgdata_MODULES): Add `gpt.mod'.
10603         (gpt_mod_SOURCES): New variable.
10604         (gpt_mod_CFLAGS): Likewise.
10605         (gpt_mod_LDFLAGS): Likewise.
10607         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
10609         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
10610         New macro.
10612         * partmap/gpt.c: New file.
10614         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
10615         GPT partition map is detected.
10617 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
10619         * commands/i386/pc/play.c: New file.
10620         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
10621         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
10622         macros.
10624 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
10626         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
10627         ((unused))' to silence gcc warning.
10629 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
10631         * configure.ac: Correct `AC_PROG_YACC' test.
10633 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
10635         * util/powerpc/ieee1275/grub-install.in: Run the mount point
10636         check before installing files.
10638 2005-11-22  Mike Small  <smallm@panix.com>
10640         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
10641         number regex so multidigit numbers are recognized correctly.
10643 2005-11-22  Mike Small  <smallm@panix.com>
10645         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
10646         debugging message before attempting to claim memory.
10647         (grub_rescue_cmd_initrd): Add a claim debugging message and try
10648         multiple addresses in case of failure.
10650 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
10652         * term/tparm.c (get_space): Remove empty `if' statement.
10654         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
10656         * kern/parser.c (check_varstate): Rename `state' to 's'.
10658 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
10660         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
10661         variable definitions to the beginning of each function.  Sort stack
10662         variables by size.
10663         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
10664         `buf' argument to `char *'.
10666 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
10668         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
10669         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10670         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10671         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10672         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10673         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10674         configfile.mod, search.mod, gzio.mod and test.mod.
10675         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10676         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10677         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10678         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10679         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10680         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10681         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10682         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10683         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10684         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10685         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10686         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10687         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10688         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10689         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10690         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10691         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10692         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10693         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10694         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10695         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10696         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10697         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
10699         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
10700         `grep --include'.
10701         (pkgdata_MODULES): Add test.mod.
10703 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
10705         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
10706         appending to variables with "+=".
10707         (PModule): Use full pathname to generate *.lst filenames.
10709         * Makefile.in: Fixed list rules moved from genmk.rb.
10710         (.DELETE_ON_ERROR): New special target.
10711         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
10713         * conf/i386-pc.rmk: Include conf/common.mk.
10714         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10715         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10716         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10717         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10718         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10719         configfile.mod, search.mod, gzio.mod and test.mod.
10720         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10721         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10722         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10723         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10724         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10725         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10726         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10727         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10728         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10729         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10730         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10731         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10732         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10733         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10734         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10735         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10736         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10737         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10738         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10739         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10740         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10741         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10742         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
10743         here...
10744         * conf/common.rmk: ... to here.  New file.
10746         * conf/common.mk: New file.
10748 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
10750         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
10751         (grub_script.tab.c): ... here.
10753         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
10754         (grub_script.tab.c): ... here.
10756         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
10757         (grub_script.tab.c): ... here.
10759         * normal/command.c (grub_command_find): Fixed a memory leak of
10760         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
10762 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
10764         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
10765         "@" which marks the start of a comment on ARM.
10766         (VARIABLE): Likewise.
10768 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
10770         Add support for Linux/ADFS partition tables.
10772         * partmap/acorn.c: New file.
10774         * include/grub/acorn_filecore.h: Likewise.
10776         * DISTLIST: Added `partmap/acorn.c' and
10777         `include/grub/acorn_filecore.h'.
10779         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10780         `partmap/acorn.c'.
10781         (pkgdata_MODULES): Add `acorn.mod'.
10782         (acorn_mod_SOURCES): New variable.
10783         (acorn_mod_CFLAGS): Likewise.
10785         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10786         `partmap/acorn.c'.
10787         (pkgdata_MODULES): Add `acorn.mod'.
10788         (acorn_mod_SOURCES): New variable.
10789         (acorn_mod_CFLAGS): Likewise.
10791         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
10792         (pkgdata_MODULES): Add `acorn.mod'.
10793         (acorn_mod_SOURCES): New variable.
10794         (acorn_mod_CFLAGS): Likewise.
10795         (acorn_mod_LDFLAGS): Likewise.
10797         * include/types.h (grub_disk_addr_t): New typedef.
10799 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
10801         * geninit.sh: New file.
10803         * geninitheader.sh: Likewise.
10805         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
10806         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
10807         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
10808         * commands/configfile.c (grub_configfile_init)
10809         (grub_configfile_fini): Likewise.
10810         * commands/default.c (grub_default_init, grub_default_fini):
10811         Likewise.
10812         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
10813         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
10814         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
10815         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
10816         Likewise.
10817         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
10818         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
10819         Likewise.
10820         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
10821         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
10822         Likewise.
10823         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
10824         Likewise.
10825         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
10826         Likewise.
10827         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
10828         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
10829         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
10830         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
10831         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
10832         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
10833         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
10834         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
10835         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
10836         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
10837         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
10838         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
10839         * partmap/amiga.c (grub_amiga_partition_map_init)
10840         (grub_amiga_partition_map_fini): Likewise.
10841         * partmap/apple.c (grub_apple_partition_map_init)
10842         (grub_apple_partition_map_fini): Likewise.
10843         * partmap/pc.c (grub_pc_partition_map_init)
10844         (grub_pc_partition_map_fini): Likewise.
10845         * partmap/sun.c (grub_sun_partition_map_init,
10846         grub_sun_partition_map_fini): Likewise.
10847         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
10848         Likewise.
10850         * util/grub-emu.c: Include <grub_modules_init.h>.
10851         (main): Don't initialize and de-initialize any modules directly,
10852         use `grub_init_all' and `grub_fini_all' instead.
10854         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
10855         `grub_vesafb_mod_init'.
10856         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
10857         all users.
10858         * term/i386/pc/vga.c (grub_vga_init): Renamed to
10859         `grub_vga_mod_init'.  Updated all users.
10860         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
10862         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
10863         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
10864         rules.
10866         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
10867         Generate a function to initialize the module in utilities.
10868         Updated all callers.
10869         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
10870         initialize the module in utilities.  Updated all callers.
10872 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
10874         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
10875         escape sequence and a literal ^L to clear the screen.
10877         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
10878         when returning from Open Firmware.
10880 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
10882         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
10883         (grub_ofconsole_height): Likewise.
10884         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
10885         manually insert a '\n'.
10886         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
10887         `grub_ofconsole_height'.  Return early if these are already set.
10889 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
10891         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10892         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
10893         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
10894         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
10895         and `normal/script.c'.
10896         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10897         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10898         (test_mod_SOURCES): New variable.
10899         (test_mod_CFLAGS): Likewise.
10900         (test_mod_LDFLAGS): Likewise.
10901         (pkgdata_MODULES): Add `test.mod'.
10902         (grub_script.tab.c): New rule.
10903         (grub_script.tab.h): Likewise.
10905 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
10907         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10908         `commands/test.c', `normal/execute.c', `normal/lexer.c',
10909         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10910         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10911         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10912         (test_mod_SOURCES): New variable.
10913         (test_mod_CFLAGS): Likewise.
10914         (pkgdata_MODULES): Add `test.mod'.
10915         (grub_script.tab.c): New rule.
10916         (grub_script.tab.h): Likewise.
10918 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
10920         Add initial scripting support.
10922         * commands/test.c: New file.
10923         * include/grub/script.h: Likewise.
10924         * normal/execute.c: Likewise.
10925         * normal/function.c: Likewise.
10926         * normal/lexer.c: Likewise.
10927         * normal/parser.y: Likewise.
10928         * normal/script.c: Likewise.
10930         * configure.ac: Add `AC_PROG_YACC' test.
10932         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
10933         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
10934         `normal/function.c' and `normal/script.c'.
10935         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10936         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10937         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
10938         variables.
10939         (pkgdata_MODULES): Add `test.mod'.
10940         (grub_script.tab.c): New rule.
10941         (grub_script.tab.h): Likewise.
10943         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
10945         * include/grub/normal.h (grub_test_init): New prototype.
10946         (grub_test_fini): Likewise.
10948         * normal/command.c: Include <grub/script.h>.
10949         (grub_command_execute): Rewritten.
10951         * util/grub-emu.c (main): Call `grub_test_init' and
10952         `grub_test_fini'.
10954 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10956         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
10957         to 0.
10958         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
10959         there are no pending characters.
10961 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10963         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
10964         `grub_strndup' to drop device arguments. Replace unnecessary
10965         `grub_strndup' with `grub_strdup'.
10967 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10969         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
10970         `debug' environment variable has been set.
10972 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
10974         * Makefile.in (install-local): Use $(DATA).
10975         (uninstall): Likewise.
10976         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
10977         (sbin_UTILITIES): ... to here.
10978         (sbin_SCRIPTS): New variable.
10979         (grub_install_SOURCES): New variable.
10980         * util/powerpc/ieee1275/grub-install.in: New file.
10981         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
10982         variable.
10983         (add_segments): Call `grub_util_get_path'.
10985 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
10987         From Timothy Baldwin:
10988         * commands/ls.c (grub_ls_list_files): Close FILE with
10989         grub_file_close.
10990         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
10992 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
10994         * include/grub/parser.h: New file.
10996         * kern/parser.c: Likewise.
10998         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
10999         (grub_setup_SOURCES): Likewise.
11000         (grub_probefs_SOURCES): Likewise.
11001         (grub_emu_SOURCES): Likewise.
11002         (kernel_img_HEADERS): Add `parser.h'.
11004         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11005         (grub_emu_SOURCES): Add `kern/parser.c'.
11006         (grubof_SOURCES): Likewise.
11008         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11009         (grubof_SOURCES): Add `kern/parser.c'.
11011         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
11013         * kern/misc.c (grub_split_cmdline): Removed function.
11015         * kern/rescue.c: Include <grub/parser.h>.
11016         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
11017         of `grub_split_cmdline'.
11019         * normal/command.c: Include <grub/parser.h>.
11020         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
11021         of `grub_split_cmdline'.
11023         * normal/completion.c: Include <grub/parser.h>.
11024         (cmdline_state): New variable.
11025         (iterate_dir): End the filename with a quote depending on the
11026         command line state.
11027         (get_state): new function.
11028         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
11029         split the arguments and determine the current argument.  When the
11030         argument string is not quoted, escape all spaces.
11032 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
11034         * normal/sparc64/setjmp.S: New file.
11036 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
11038         * include/grub/sparc64/libgcc.h: New file.
11039         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
11040         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
11041         normal/sparc64/setjmp.c.
11043 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
11045         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
11046         * kern/sparc64/cache.S: New file.
11047         * kern/sparc64/cache.c: Removed.
11048         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
11049         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
11050         -mtune=ultrasparc.
11051         (COMMON_LDFLAGS): Add -melf64_sparc.
11052         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
11053         (grubof_SOURCES): Use cache.S instead of cache.c.
11054         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
11055         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
11056         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
11057         commented though.
11058         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
11059         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
11060         (linux_mod_CFLAGS): Commented out.
11061         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
11062         out because module isn't built.
11063         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
11064         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
11065         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
11066         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
11067         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
11068         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11069         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11070         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
11071         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
11072         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
11073         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11074         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11075         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
11076         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
11078 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
11080         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
11081         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
11082         longer, because HFS should not be used on PC.
11084 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
11086         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
11087         consistently within the loop.
11089 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
11091         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
11092         directory can not be read.
11094 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11096         * configure.ac (AC_INIT): Increase the version number to 1.91.
11098         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
11099         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
11100         term/i386/pc/serial.c.
11102 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11104         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
11105         file size must be permitted.
11107         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
11108         between %ah and %al.
11110 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11112         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
11113         grub_uint64_t.
11114         Call the hook with a NUL-terminated filename.
11115         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
11116         grub_cpu_to_be32.
11118         * kern/term.c (cursor_state): New variable.
11119         (grub_term_set_current): Reset the cursor state on a new
11120         terminal.
11121         (grub_setcursor): Rewritten to use CURSOR_STATE.
11122         (grub_getcursor): New function.
11124         * include/grub/term.h (grub_getcursor): New prototype.
11126         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
11127         integers on ARM. Reported by Timothy Baldwin
11128         <T.E.Baldwin99@members.leeds.ac.uk>.
11130 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
11132         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
11133         allocated.
11134         (grub_sfs_dir): Likewise.
11136 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
11138         Add support for the SFS filesystem.
11140         * fs/sfs.c: New file.
11142         * DISTLIST: Added `fs/sfs.c'.
11144         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
11145         (grub_probefs_SOURCES): Likewise.
11146         (grub_emu_SOURCES): Likewise.
11147         (pkgdata_MODULES): Add `sfs.mod'.
11148         (sfs_mod_SOURCES): New variable.
11149         (sfs_mod_CFLAGS): Likewise.
11150         (sfs_mod_LDFLAGS): Likewise.
11152         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
11153         (pkgdata_MODULES): Add `sfs.mod'.
11154         (sfs_mod_SOURCES): New variable.
11155         (sfs_mod_CFLAGS): Likewise.
11157         * util/grub-emu.c (main): Call `grub_sfs_init' and
11158         `grub_sfs_fini'.
11160         * include/grub/fs.h (grub_sfs_init): New prototype.
11161         (grub_sfs_fini): Likewise.
11163 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
11165         Add support for the AFFS filesystem.
11167         * fs/affs.c: New file.
11169         * DISTLIST: Added `fs/affs.c'.
11171         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
11172         (grub_probefs_SOURCES): Likewise.
11173         (grub_emu_SOURCES): Likewise.
11174         (pkgdata_MODULES): Add `affs.mod'.
11175         (affs_mod_SOURCES): New variable.
11176         (affs_mod_CFLAGS): Likewise.
11177         (affs_mod_LDFLAGS): Likewise.
11179         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
11180         (pkgdata_MODULES): Add `affs.mod'.
11181         (affs_mod_SOURCES): New variable.
11182         (affs_mod_CFLAGS): Likewise.
11184         * util/grub-emu.c (main): Call `grub_affs_init' and
11185         `grub_affs_fini'.
11187         * include/grub/fs.h (grub_affs_init): New prototype.
11188         (grub_affs_fini): Likewise.
11190 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
11192         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
11194 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
11196         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
11197         `-m32' to CFLAGS.
11199         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
11200         linking.
11202         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
11203         (COMMON_LDFLAGS): New variable.
11204         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
11205         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
11206         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
11207         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
11208         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
11209         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
11210         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
11211         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
11212         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
11213         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
11214         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11215         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11216         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
11217         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
11218         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
11219         variables.
11220         (normal_mod_ASFLAGS): Add `-m32'.
11222         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
11223         (grub_host_size_t, grub_host_ssize_t): New types.
11224         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
11225         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
11226         `GRUB_HOST_SIZEOF_VOID_P'.
11228         * include/grub/kernel.h (struct grub_module_header): Type of
11229         member offset changed to `grub_host_off_t'.  Type of member size
11230         changed to `grub_host_size_t'.
11231         (struct grub_module_info): Type of member offset changed to
11232         `grub_host_off_t'.  Type of member size changed to
11233         `grub_host_size_t'.
11235 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
11237         Make GRUB's kernel compliant to Multiboot Specification.
11239         * kern/i386/pc/startup.S (multiboot_header): New label.
11240         (multiboot_entry): Likewise.
11241         (multiboot_trampoline): Likewise.
11243         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11244         Increased to 0x4A0.
11246         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
11247         put parentheses after a question mark.
11248         [!GRUB_UTIL] (my_mod): New variable.
11250         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
11252 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
11254         Adds support for the XFS filesystem.  Btrees are not supported
11255         yet.
11257         * fs/xfs.c: New file.
11259         * DISTLIST: Added `fs/xfs.c'.
11261         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
11262         (grub_probefs_SOURCES): Likewise.
11263         (grub_emu_SOURCES): Likewise.
11264         (pkgdata_MODULES): Add `xfs.mod'.
11265         (xfs_mod_SOURCES): New variable.
11266         (xfs_mod_CFLAGS): Likewise.
11268         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
11269         (pkgdata_MODULES): Add `xfs.mod'.
11270         (xfs_mod_SOURCES): New variable.
11271         (xfs_mod_CFLAGS): Likewise.
11273         * util/grub-emu.c (main): Call `grub_xfs_init' and
11274         `grub_xfs_fini'.
11276         * include/grub/fs.h (grub_xfs_init): New prototype.
11277         (grub_xfs_fini): Likewise.
11280 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
11282         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
11283         color modes, allow greater than 16 colors to be configured as
11284         a default palette.
11286 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
11288         * normal/completion.c (complete_arguments): Add the qualifier
11289         const into OPTIONS.
11291         From Omniflux <omniflux+lists@omniflux.com>:
11292         * include/grub/terminfo.h: New file.
11293         * include/grub/tparm.h: Likewise.
11294         * include/grub/i386/pc/serial.h: Likewise.
11295         * term/terminfo.c: Likewise.
11296         * term/tparm.c: Likewise.
11297         * term/i386/pc/serial.c: Likewise.
11298         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
11299         serial.mod.
11300         (terminfo_mod_SOURCES): New variable.
11301         (terminfo_mod_CFLAGS): Likewise.
11302         (serial_mod_SOURCES): Likewise.
11303         (serial_mod_CFLAGS): Likewise.
11305 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
11307         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
11308         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
11309         and kern/powerpc/ieee1275/cmain.c, respectively.
11311         * boot/powerpc/ieee1275/crt0.S: Moved to ...
11312         * kern/powerpc/ieee1275/crt0.S: ... here.
11314         * boot/powerpc/ieee1275/cmain.c: Moved to ...
11315         * kern/powerpc/ieee1275/cmain.c: ... here.
11317         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
11318         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
11319         instead of boot/powerpc/ieee1275/crt0.S and
11320         boot/powerpc/ieee1275/cmain.c, respectively.
11322         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
11323         sectors. It was not used anyway.
11325 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
11327         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
11328         `unused parameter' warning.
11330 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
11332         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
11333         function.
11334         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
11335         getcharwidth.
11337 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
11339         * include/grub/normal.h (enum grub_completion_type): Added
11340         `GRUB_COMPLETION_TYPE_ARGUMENT'.
11342         * normal/cmdline.c (print_completion): Handle
11343         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
11344         * normal/menu_entry.c (store_completion): Likewise.
11346         * normal/completion.c (complete_arguments): New function.
11347         (grub_normal_do_completion): Call `complete_arguments' when the
11348         current words start with a dash.
11350 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
11352         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
11353         `gzio.mod' instead of `io.mod').
11355 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
11357         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
11358         (DISTDIRS): Added io and video.
11359         Rewrite the search routine to make an output consistently.
11361         * DISTLIST: Added conf/sparc64-ieee1275.mk,
11362         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
11363         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
11364         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
11365         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
11366         util/powerpc/ieee1275/misc.c.
11368         * include/grub/gzio.h: New file.
11369         * io/gzio.c: Likewise.
11371         * kern/file.c (grub_file_close): Call grub_device_close only if
11372         FILE->DEVICE is not NULL.
11374         * include/grub/mm.h [!NULL] (NULL): New macro.
11376         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
11378         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
11379         (pkgdata_MODULES): Added gzio.mod.
11380         (gzio_mod_SOURCES): New variable.
11381         (gzio_mod_CFLAGS): Likewise.
11383         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
11384         (pkgdata_MODULES): Added gzio.mod.
11385         (gzio_mod_SOURCES): New variable.
11386         (gzio_mod_CFLAGS): Likewise.
11388         * commands/cat.c: Include grub/gzio.h.
11389         (grub_cmd_cat): Use grub_gzfile_open instead of
11390         grub_file_open.
11392         * commands/cmp.c: Include grub/gzio.h.
11393         (grub_cmd_cmp): Use grub_gzfile_open instead of
11394         grub_file_open.
11396         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
11397         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
11398         grub_file_open.
11399         (grub_rescue_cmd_module): Likewise.
11401 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
11403         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
11404         kern/sparc64/ieee1275/init.c because it contains _start.
11405         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
11407 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
11409         * configure.ac: Add support for sparc64 host with ieee1275
11410         firmware.
11411         * configure: Generated from configure.ac.
11412         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
11413         instead of int.
11414         (grub_ofdisk_read): Likewise.
11415         (grub_ofdisk_open): Use %p to print pointer values, and cast the
11416         pointers as (void *) to remove a warning.
11417         (grub_ofdisk_close): Likewise.
11418         (grub_ofdisk_read): Likewise.
11419         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
11420         returns, so make it return void to remove a warning.
11421         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
11422         Corresponding prototype change.
11423         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
11424         values, and cast the pointers as (void *) to remove a warning.
11425         (grub_mm_dump): Likewise.
11426         * conf/sparc64-ieee1275.mk: New file.
11427         * conf/sparc64-ieee1275.rmk: Likewise.
11428         * include/grub/sparc64/setjmp.h: Likewise.
11429         * include/grub/sparc64/types.h: Likewise.
11430         * include/grub/sparc64/ieee1275/console.h: Likewise.
11431         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11432         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11433         * include/grub/sparc64/ieee1275/time.h: Likewise.
11434         * kern/sparc64/cache.c: Likewise.
11435         * kern/sparc64/dl.c: Likewise.
11436         * kern/sparc64/ieee1275/init.c: Likewise.
11437         * kern/sparc64/ieee1275/openfw.c: Likewise.
11439 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
11441         * util/console.c (grub_ncurses_putchar): If C is greater than
11442         0x7f, set C to a question mark.
11443         (grub_ncurses_getcharwidth): New function.
11444         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
11445         getcharwidth.
11447         * normal/menu.c (print_entry): Made aware of Unicode. First,
11448         convert TITLE to UCS-4, and predict the cursor position by
11449         grub_getcharwidth.
11451         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
11452         const to SRC.
11453         * kern/misc.c (grub_utf16_to_utf8): Likewise.
11455 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
11457         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
11458         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11459         grub_strcat.
11461         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
11462         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11463         grub_strcpy and grub_strlen. Take it into account that a space
11464         character is inserted as a delimiter.
11466 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
11468         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
11469         invalid magic in the error.
11471         * commands/search.c: New file.
11473         * util/grub-emu.c (main): Call grub_search_init and
11474         grub_search_fini.
11476         * kern/rescue.c (grub_rescue_print_disks): Removed.
11477         (grub_rescue_print_devices): New function.
11478         (grub_rescue_cmd_ls): Use grub_device_iterate with
11479         grub_rescue_print_devices instead of grub_disk_dev_iterate with
11480         grub_rescue_print_disks.
11482         * kern/partition.c (grub_partition_iterate): Return the result of
11483         PARTMAP->ITERATE instead of GRUB_ERRNO.
11485         * kern/device.c: Include grub/partition.h.
11486         (grub_device_iterate): New function.
11488         * include/grub/partition.h (grub_partition_iterate): Return int
11489         instead of grub_err_t.
11491         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
11492         prototype.
11493         [GRUB_UTIL] (grub_search_fini): Likewise.
11495         * include/grub/device.h (grub_device_iterate): New prototype.
11497         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11498         commands/search.c.
11499         (pkgdata_MODULES): Added search.mod.
11500         (search_mod_SOURCES): New variable.
11501         (search_mod_CFLAGS): Likewise.
11503         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
11504         (pkgdata_MODULES): Added search.mod.
11505         (search_mod_SOURCES): New variable.
11506         (search_mod_CFLAGS): Likewise.
11508         * commands/ls.c (grub_ls_list_disks): Renamed to ...
11509         (grub_ls_list_devices): ... this, and use grub_device_iterate.
11510         All callers changed.
11512         * DISTLIST: Added commands/search.c.
11514 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
11516         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
11517         conversion.
11518         (grub_getcharwidth): New function.
11520         * kern/misc.c (grub_utf8_to_ucs4): New function.
11522         * include/grub/term.h (struct grub_term): Added a new member
11523         "getcharwidth".
11524         (grub_getcharwidth): New prototype.
11526         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
11528         * term/i386/pc/console.c (map_char): New function. Segregated from
11529         grub_console_putchar.
11530         (grub_console_putchar): Use map_char.
11531         (grub_console_getcharwidth): New function.
11532         (grub_console_term): Specified grub_console_getcharwidth as
11533         getcharwidth.
11535         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
11536         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
11538         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
11539         GRUB_ERRNO.
11540         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
11541         on grub_strtoul completely.
11542         (write_char): Declare local variables in the beginning of the
11543         function.
11544         (grub_vesafb_getcharwidth): New function.
11545         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
11546         getcharwidth.
11548 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
11550         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
11551         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
11552         commands/i386/pc/vbetest.c.
11554         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
11555         call grub_vbe_get_controller_info again, because the returned
11556         information is volatile.
11557         (grub_vbe_set_video_mode): Mostly rewritten.
11558         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
11559         grub_vbe_status_t correctly.
11560         (grub_vbe_get_video_mode_info): Likewise.
11561         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
11562         several if statements.
11564         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
11565         * commands/i386/pc/vbeinfo.c: ... this.
11567         * commands/i386/pc/vbe_test.c: Renamed to ...
11568         * commands/i386/pc/vbetest.c: ... this.
11570         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
11571         ...
11572         (grub_cmd_vbeinfo): ... this. Save video modes before
11573         iterating. Skip a video mode, if it is not available, not enough
11574         information is given or it is monochrome. Show the memory
11575         model. Leave the interpretation of MODEVAR to grub_strtoul
11576         completely.
11577         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
11578         (GRUB_MOD_FINI): Likewise.
11580         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
11581         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
11582         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
11583         duplicated grub_env_get. Leave the interpretation of MODEVAR to
11584         grub_strtoul completely.
11585         (real2pm): Removed.
11586         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
11587         (GRUB_MOD_FINI): Likewise.
11589         * normal/misc.c: Include grub/mm.h.
11591         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
11592         vbe_list_modes with vbetest.mod and vbeinfo.mod.
11593         (vbe_list_modes_mod_SOURCES): Removed.
11594         (vbe_list_modes_mod_CFLAGS): Likewise.
11595         (vbe_test_mod_SOURCES): Likewise.
11596         (vbe_test_mod_CFLAGS): Likewise.
11597         (vbeinfo_mod_SOURCES): New variable.
11598         (vbeinfo_mod_CFLAGS): Likewise.
11599         (vbetest_mod_SOURCES): Likewise.
11600         (vbetest_mod_CFLAGS): Likewise.
11602 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
11604         * normal/misc.c: New file.
11606         * DISTLIST: Added normal/misc.c.
11608         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
11609         DISK to HOOK. Call HOOK with DISK.
11610         * partmap/apple.c (apple_partition_map_iterate): Likewise.
11611         * partmap/pc.c (pc_partition_map_iterate): Likewise.
11612         * partmap/sun.c (sun_partition_map_iterate): Likewise.
11614         * normal/menu_entry.c (struct screen): Added a new member
11615         "completion_shown".
11616         (completion_buffer): New global variable.
11617         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
11618         (store_completion): New function.
11619         (complete): Likewise.
11620         (clear_completions): Likewise.
11621         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
11622         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
11623         a tab, call complete.
11625         * normal/completion.c (disk_dev): Removed.
11626         (print_simple_completion): Likewise.
11627         (print_partition_completion): Likewise.
11628         (print_func): New global variable.
11629         (add_completion): Do not take the arguments WHAT or PRINT any
11630         longer. Added a new argument TYPE. Instead of printing directly,
11631         call PRINT_FUNC if not NULL.
11632         All callers changed.
11633         (complete_device): Use a local variable DEV instead of
11634         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
11635         (grub_normal_do_completion): Take a new argument HOOK. Do not
11636         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
11637         empty string, return NULL instead.
11638         All callers changed.
11640         * normal/cmdline.c (print_completion): New function.
11642         * kern/partition.c (grub_partition_iterate): Add an argument DISK
11643         to HOOK.
11644         All callers changed.
11646         * kern/disk.c (grub_print_partinfo): Removed.
11648         * include/grub/partition.h (struct grub_partition_map): Add a new
11649         argument DISK into HOOK of ITERATE.
11650         (grub_partition_iterate): Add a new argument DISK to HOOK.
11652         * include/grub/normal.h (enum grub_completion_type): New enum.
11653         (grub_completion_type_t): New type.
11654         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
11655         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
11656         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
11657         (GRUB_COMPLETION_TYPE_FILE): Likewise.
11658         (grub_normal_do_completion): Added a new argument HOOK.
11659         (grub_normal_print_device_info): New prototype.
11661         * include/grub/disk.h (grub_print_partinfo): Removed.
11663         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
11664         (normal_mod_SOURCES): Likewise.
11665         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11666         (normal_mod_SOURCES): Likewise.
11668         * commands/ls.c (grub_ls_list_disks): Use
11669         grub_normal_print_device_info instead of grub_print_partinfo. Free
11670         PNAME.
11671         (grub_ls_list_files): Use grub_normal_print_device_info instead of
11672         duplicating the code.
11674 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
11676         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
11677         follow GCS more precisely.
11678         * commands/i386/pc/vbe_test.c: Likewise.
11679         * include/grub/i386/pc/vbe.h: Likewise.
11680         * term/i386/pc/vesafb.c: Likewise.
11681         * video/i386/pc/vbe.c: Likewise.
11683 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
11685         * DISTLIST: Added term/i386/pc/vesafb.c
11686         DISTLIST: Added video/i386/pc/vbe.c
11687         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
11688         DISTLIST: Added commands/i386/pc/vbe_test.c.
11689         * commands/i386/pc/vbe_list_modes.c: New file.
11690         * commands/i386/pc/vbe_test.c: Likewise.
11691         * term/i386/pc/vesafb.c: Likewise.
11692         * video/i386/pc/vbe.c: Likewise.
11693         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
11694         (grub_vbe_probe) Added prototype.
11695         (grub_vbe_set_video_mode) Likewise.
11696         (grub_vbe_get_video_mode) Likewise.
11697         (grub_vbe_get_video_mode_info) Likewise.
11698         (grub_vbe_set_pixel_rgb) Likewise.
11699         (grub_vbe_set_pixel_index) Likewise.
11700         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
11701         (pkgdata_MODULES): Added vesafb.mod.
11702         (pkgdata_MODULES): Added vbe_list_modes.mod.
11703         (pkgdata_MODULES): Added vbe_test.mod.
11704         (vbe_mod_SOURCES): Added.
11705         (vbe_mod_CFLAGS): Likewise.
11706         (vesafb_mod_SOURCES): Likewise.
11707         (vesafb_mod_CFLAGS): Likewise.
11708         (vbe_list_modes_mod_SOURCES): Likewise.
11709         (vbe_list_modes_mod_CFLAGS): Likewise.
11710         (vbe_test_mod_SOURCES): Likewise.
11711         (vbe_test_mod_CFLAGS): Likewise.
11713 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
11715         * normal/command.c (grub_command_execute): If INTERACTIVE is
11716         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
11717         CMDLINE. Disable the pager if INTERACTIVE is true.
11718         All callers are changed.
11720         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
11721         before reading a config file.
11722         * normal/main.c (read_config_file): Even if a command is not
11723         found, register it if it is within an entry.
11725         * util/grub-emu.c: Include sys/types.h and unistd.h.
11726         (options): Added --hold.
11727         (struct arguments): Added a new member "hold".
11728         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
11729         missing.
11730         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
11731         cleared by a debugger, if it is not zero.
11733         * include/grub/normal.h (grub_command_execute): Add an argument
11734         INTERACTIVE.
11736 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
11738         * DISTLIST: Added include/grub/i386/pc/vbe.h.
11740 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
11742         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
11743         program with another one, because the old one didn't detect a bug
11744         in gcc-3.4. Always use regparm 2, because the new test is still
11745         not enough for gcc-4.0. Someone must investigate a simple test
11746         case which detects a bug in gcc-4.0.
11748 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
11750         * DISTLIST: Added normal/completion.c.
11752         * normal/completion.c: New file.
11754         * term/i386/pc/console.c (grub_console_getwh): New function.
11755         (grub_console_term): Assign grub_console_getwh to getwh.
11757         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
11758         function is defined in normal/completion.c as
11759         grub_normal_do_completion.
11760         (grub_cmdline_get): Use grub_normal_do_completion instead of
11761         grub_tab_complete.
11763         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
11764         returns non-zero, otherwise return 0.
11765         (grub_partition_iterate): First, probe the partition map. Then,
11766         call ITERATE only for this partition map.
11768         * kern/misc.c (grub_strncmp): Rewritten.
11770         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
11771         returns non-zero. Otherwise return 0.
11773         * include/grub/partition.h (grub_partition_map_iterate): Return
11774         int instead of void.
11776         * include/grub/normal.h (grub_normal_do_completion): New prototype.
11778         * include/grub/misc.h (grub_strncmp): Change the type of N to
11779         grub_size_t.
11781         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
11782         of void.
11784         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
11785         unsigned explicitly before comparing it with I.
11787         * kern/main.c (grub_env_write_root): Add the attribute unused into
11788         VAR.
11790         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11791         normal/completion.c.
11792         (normal_mod_SOURCES): Likewise.
11793         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11794         (normal_mod_SOURCES): Likewise.
11796         * normal/command.c (grub_iterate_commands): If ITERATE returns
11797         non-zero, return one immediately.
11799 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
11801         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
11802         * kern/i386/pc/startup.S: Updated Global Descriptor table's
11803         descriptions.
11804         (grub_vbe_get_controller_info): New function.
11805         (grub_vbe_get_mode_info): Likewise.
11806         (grub_vbe_set_mode): Likewise.
11807         (grub_vbe_get_mode): Likewise.
11808         (grub_vbe_set_memory_window): Likewise.
11809         (grub_vbe_get_memory_window): Likewise.
11810         (grub_vbe_set_scanline_length): Likewise.
11811         (grub_vbe_get_scanline_length): Likewise.
11812         (grub_vbe_set_display_start): Likewise.
11813         (grub_vbe_get_display_start): Likewise.
11814         (grub_vbe_set_palette_data): Likewise.
11815         * include/grub/i386/pc/vbe.h: New file.
11817 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
11819         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11820         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
11821         * DISTLIST: Likewise.
11822         * kern/ieee1275/of.c: Moved to ...
11823         * kern/ieee1275/ieee1275.c: ... here.
11825 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
11827         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
11828         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
11829         Pass 0 as `end' parameter to grub_strtoul().
11831 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
11833         * include/grub/powerpc/ieee1275/console.h: Do not include
11834         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
11835         ifdef.
11836         (grub_console_cur_color): Remove i386-specific prototype.
11837         (grub_console_real_putchar): Likewise.
11838         (grub_console_checkkey): Likewise.
11839         (grub_console_getkey): Likewise.
11840         (grub_console_getxy): Likewise.
11841         (grub_console_gotoxy): Likewise.
11842         (grub_console_cls): Likewise.
11843         (grub_console_setcursor): Likewise.
11844         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
11845         Include <grub/machine/console.h>.
11846         * term/ieee1275/ofconsole.c: Likewise.
11848 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
11850         * Makefile.in (LIBLZO): New variable.
11852         * configure.ac: Check for LZO version 2.
11854         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
11855         lzo/lzo1x.h instead of lzo1x.h.
11857         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
11858         of -llzo.
11860         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
11861         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
11863         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
11864         copying the data from PARTITION to P.
11866 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
11868         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
11869         negative, unload the module.
11871         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
11872         map is "pc_partition_map" but not "pc".
11873         (usage): Fix the description. The options are --boot-image and
11874         --core-image but not --boot-file or --core-file.
11875         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
11876         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
11877         DEFAULT_DIRECTORY.
11879         * util/i386/pc/grub-install.in: Do not specify --boot-file or
11880         --core-file. Specify INSTALL_DEVICE as an argument.
11882         * util/console.c: Include config.h.
11883         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
11884         [HAVE_NCURSES_H]: Include ncurses.h.
11885         [HAVE_CURSES_H]: Include curses.h.
11886         [!A_NORMAL] (A_NORMAL): Defined as zero.
11887         [!A_STANDOUT] (A_STANDOUT): Likewise.
11889         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
11890         -lncurses.
11891         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
11893         * configure.ac: Check for curses libraries and headers.
11895         * Makefile.in (LIBCURSES): New variable.
11897         * genmk.rb (Script::rule): Set the executable bits.
11899         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
11900         name of the PC partition map is "pc_partition_map" but not "pc".
11902 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
11904         * util/i386/pc/grub-install.in (grub_probefs): New variable.
11905         (modules): Likewise.
11906         (usage): Added descriptions for --modules and --grub-probefs.
11907         Handle --modules and --grub-probefs. Save the arguments in MODULES
11908         and GRUB_PROBEFS, respectively.
11909         Auto-detect a filesystem module against GRUBDIR. If the result is
11910         empty and modules are not specified explicitly, abort the
11911         installation. Add the result to MODULES.
11913         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
11914         disk/powerpc/ieee1275/ofdisk.c,
11915         include/grub/powerpc/ieee1275/init.h and
11916         term/powerpc/ieee1275/ofconsole.c.
11917         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
11918         term/ieee1275/ofconsole.c.
11920         * include/grub/powerpc/ieee1275/console.h: Resurrected.
11922         * COPYING: Upgraded to the latest version. Only the address of the
11923         FSF office has changed.
11925 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
11927         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11928         kern/ieee1275.c with kern/ieee1275/of.c.
11930         * kern/ieee1275.c: Moved to ...
11931         * kern/ieee1275/of.c: ... here.
11933 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
11935         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
11936         readability.
11938         * config.guess: Updated to the latest version from gnulib.
11939         * config.sub: Likewise.
11940         * install.sh: Likewise.
11941         * mkinstalldirs: Likewise.
11943         * include/grub/console.h: Removed. This file is arch-specific. Do
11944         not put this in include/grub.
11946         * include/grub/i386/pc/console.h: Resurrected.
11948         * util/console.c: Include grub/machine/console.h instead of
11949         grub/console.h.
11950         * util/grub-emu.c: Likewise.
11952 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
11954         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
11955         hardcoded value.
11957         From Vincent Pelletier  <subdino2004@yahoo.fr>
11958         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
11959         Redefined to use grub_getwh.
11960         (grub_term): New member named getwh.
11961         (grub_getwh): New prototype.
11962         * kern/term.c (grub_getwh): New function.
11963         * term/i386/pc/console.c (grub_console_getwh): New function.
11964         (grub_console_term): New member `getwh'.
11965         * term/i386/pc/vga.c (grub_vga_getwh): New function.
11966         (grub_vga_term): New member `getwh'.
11967         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
11968         grub_ssize_t.
11969         (grub_ofconsole_getw): New function.
11970         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
11971         (grub_ofconsole_term): New field named getwh and new initial
11972         value.
11974 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
11976         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
11977         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
11978         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
11979         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
11980         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
11981         of <grub/machine/ieee1275.h>.
11982         * commands/ieee1275/reboot.c: Likewise.
11983         * boot/powerpc/ieee1275/ieee1275.c: Move ...
11984         * kern/ieee1275.c: ... to here.  All users updated.  Change all
11985         parameter structs to use new type `grub_ieee1275_cell_t'.
11986         * term/powerpc/ieee1275/ofconsole.c: Move ...
11987         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
11988         * disk/powerpc/ieee1275/ofdisk.c: Move ...
11989         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
11990         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
11991         to return int.
11992         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
11993         Remove unused prototypes.  All users updated.
11994         * include/grub/powerpc/ieee1275/console.h: Removed.
11995         * include/grub/powerpc/ieee1275/ieee1275.h: Define
11996         `grub_ieee1275_cell_t'.
11997         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
11998         Cast comparisons with -1 to the correct type.
11999         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
12000         type to match `grub_ieee1275_entry_fn'.
12002 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
12004         * DISTLIST: Added util/i386/pc/grub-probefs.c.
12006         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
12007         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
12008         partmap/sun.c.
12009         (grub_probefs_SOURCES): New variable.
12011         * util/i386/pc/grub-probefs.c: New file.
12013         * util/i386/pc/grub-setup.c (main): Call
12014         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
12015         grub_hfs_init and grub_jfs_init to initialize the system. Call
12016         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
12017         grub_pc_partition_map_fini to finish the system.
12019 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
12021         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
12022         function.
12023         (grub_multiboot_load_elf32): Likewise.
12024         (grub_multiboot_is_elf64): Likewise.
12025         (grub_multiboot_load_elf64): Likewise.
12026         (grub_multiboot_load_elf): Likewise.
12027         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
12028         an ELF32 or ELF64 file.
12029         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
12031         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
12032         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
12033         NULL before calling FS->LABEL.
12034         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
12035         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
12036         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
12037         before calling FS->LABEL.
12039 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
12041         * util/i386/pc/grub-install.in (datadir): New variable.
12042         (libdir): Removed.
12043         (pkgdatadir): New variable.
12044         (pkglibdir): Removed.
12046 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
12048         * DISTLIST: Added util/i386/pc/grub-install.in.
12050         * util/i386/pc/grub-install.in: New file.
12052         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
12053         (grub_install_SOURCES): Likewise.
12055         * genmk.rb: Added support for scripts.
12056         (Script): New class.
12057         (scripts): New variable.
12059         * Makefile.in (install-local): Install sbin_SCRIPTS by
12060         INSTALL_SCRIPT.
12061         (uninstall): Remove sbin_SCRIPTS.
12063         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
12064         device, try to get a GRUB device by
12065         grub_util_biosdisk_get_grub_dev.
12066         Free DEST_DEV.
12068         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
12069         description for --device-map.
12071 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
12073         Change the semantics of variable hooks. They now return strings
12074         instead of error values.
12076         * util/i386/pc/grub-setup.c: Include grub/env.h.
12077         (setup): Use grub_device_set_root instead of grub_env_set.
12079         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
12080         grub_env_get instead of grub_device_set_root and
12081         grub_device_get_root, respectively.
12083         * kern/main.c (grub_env_write_root): New function.
12084         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
12085         grub_env_set instead of grub_device_set_root.
12087         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
12088         many variables.
12089         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
12090         rather than calling ENV->WRITE_HOOK afterwards.
12091         (grub_env_get): Return the result of ENV->READ_HOOK rather than
12092         passing a pointer of a pointer.
12093         (grub_register_variable_hook): Change the types of "read_hook" and
12094         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
12095         respectively.
12096         Allocate the default empty string on the heap, because this string
12097         may be freed later.
12099         * kern/device.c: Include grub/env.h.
12100         (grub_device_set_root): Removed.
12101         (grub_device_get_root): Likewise.
12102         (grub_device_open): Use grub_env_get instead of
12103         grub_device_get_root.
12105         * include/grub/env.h (grub_env_read_hook_t): New type.
12106         (grub_env_write_hook_t): Likewise.
12107         (grub_env_var): Change the types of "read_hook" and "write_hook"
12108         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
12109         (grub_register_variable_hook): Likewise.
12111         * include/grub/device.h (grub_device_set_root): Removed.
12112         (grub_device_set_root): Likewise.
12114         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
12115         make sure that DIRNAME terminates with '/', so that
12116         grub_fat_find_dir will fail if PATH is not a directory.
12118         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
12119         from DIRNAME.
12120         Use the qualifier auto for print_files and print_files_long.
12121         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
12122         as a regular file.
12123         Put a newline only if there is no error.
12124         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
12125         used.
12127 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
12129         * kern/partition.c (grub_partition_probe): Initialize PART to
12130         NULL. Otherwise, when no partition map is registered, this returns
12131         a garbage.
12133 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
12135         * partmap/apple.c (apple_partition_map_iterate): Check if POS
12136         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
12137         valid.
12139 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
12141         * commands/ls.c (grub_ls_list_disks): Print the filesystem
12142         information on each device, if it does not have partitions. Print
12143         "Device" instead of "Disk", because this function is not specific
12144         to disk devices.
12146         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
12147         static to ensure that it is put on the memory rather than a
12148         register.
12150 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
12152         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
12153         (grub_cat_init): Likewise.
12154         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
12155         (options): Likewise.
12156         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
12157         (grub_configfile_init): Likewise.
12158         * font/manager.c (GRUB_MOD_INIT): Likewise.
12159         * commands/help.c (GRUB_MOD_INIT): Likewise.
12160         (grub_help_init): Likewise.
12161         * normal/command.c (grub_command_init): Likewise.
12162         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
12163         * disk/loopback.c (grub_loop_init): Likewise.
12164         (GRUB_MOD_INIT): Likewise.
12165         * commands/ls.c (grub_ls_init): Likewise.
12166         (GRUB_MOD_INIT): Likewise.
12167         (options): Likewise.
12168         * commands/boot.c (grub_boot_init): Likewise.
12169         (GRUB_MOD_INIT): Likewise.
12170         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
12171         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
12172         (GRUB_MOD_INIT): Likewise.
12173         * commands/cmp.c (grub_cmp_init): Likewise.
12174         (GRUB_MOD_INIT): Likewise.
12176         * normal/arg.c: Use <> instead of "" to include header files.
12177         (SHORT_ARG_HELP): New macro.
12178         (SHORT_ARG_USAGE): Likewise.
12179         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
12180         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
12181         descriptions.
12182         (find_short): Check if C is 'h' or 'u' explicitly.
12183         (grub_arg_show_help): Use space characters instead of tabs. Treat
12184         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
12185         are shown with --help and --usage only if they are not used for
12186         the command itself.
12187         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
12188         'h' and 'u'.
12190         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
12191         const into "longarg". Change the type of "shortarg" to int.
12193 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
12195         * boot/i386/pc/boot.S (boot_drive_check): New label.
12197         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
12198         macro.
12200         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
12201         which do not pass a boot drive correctly. Copied from GRUB Legacy.
12203 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
12205         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
12206         When turning off Gate A20, skip the check and return immediately,
12207         because this is not fatal usually.
12209 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
12211         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
12212         be 0x7C00 instead of 0x8000.
12214         * boot/i386/pc/pxeboot.S: Rewritten.
12216         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
12217         EXT_C.
12218         (gate_a20_check_state): Read a byte from 0x108000. Invert the
12219         result.
12221 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
12223         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
12224         robustness. This routine now supports a BIOS call and System
12225         Control Port A to modify the gate A20.
12227         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12228         Increased to 0x440.
12230 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
12232         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
12233         device path and resulting ihandle.
12234         (grub_ofdisk_close): dprintf the ihandle being closed.
12235         (grub_ofdisk_read): dprintf function parameters.
12236         * kern/mm.c (grub_mm_init_region): Likewise.
12237         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
12238         (grub_linux_boot): dprintf the Linux entry point, initrd address and
12239         size, and boot arguments.
12240         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
12241         before loading into memory.
12242         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
12243         before loading into memory.
12245 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
12247         * kern/mm.c: Added much documentation.
12248         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
12249         8, set to 5 instead of 8.
12251 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
12253         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
12255         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
12256         (grub_mkdevicemap_SOURCES): New variable.
12258         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
12259         lib/device.c of GRUB Legacy.
12261 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
12263         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
12264         instead of PATH is NULL.
12266 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
12268         * commands/cmp.c (BUFFER_SIZE): New macro.
12269         (grub_cmd_cmp): Close the right file at the right time.  Compare
12270         only data just read.  Don't report files of different  size as
12271         identical.  Dynamically allocate buffers.  Move variable
12272         declarations at the beginning of function.
12274 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
12276         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
12277         reverse.
12279 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
12281         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
12282         when backspace is pressed at beginning of line.
12284 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
12286         * DISTLIST: Added genfslist.sh.
12288         * normal/main.c (fs_module_list): New variable.
12289         (autoload_fs_module): New function.
12290         (read_fs_list): Likewise.
12291         (grub_normal_execute): Call read_fs_list.
12293         * kern/fs.c (grub_fs_autoload_hook): New variable.
12294         (grub_fs_probe): Added support for auto-loading.
12296         * include/grub/normal.h (struct grub_fs_module_list): New struct.
12297         (grub_fs_module_list_t): New type.
12299         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
12300         (grub_fs_autoload_hook): New prototype.
12302         * genfslist.sh: New file.
12304         * genmk.rb: Added a rule to generate a filesystem list.
12306 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
12308         * configure.ac: Fix the test for cross-compiling.
12310         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
12311         define GRUB_UTIL anymore.
12313         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
12314         so this function works on other systems than just big endian.
12315         (load_modules): Likewise.
12316         (add_segments): Likewise.
12318 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
12320         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
12321         contains `l' modifier, get a long from va_arg().
12323 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
12325         * kern/mm.c (grub_free): If the next free block which is being
12326         merged is the first free block, set the first block to the block
12327         being freed.
12328         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
12330 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
12332         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
12333         `grub_ieee1275_chosen'.
12335 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
12337         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
12338         (grub_ieee1275_chosen): New variable.
12339         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
12340         `chosen'.
12341         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
12342         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12343         Rename first argument to `phandle' for consistency.
12344         (grub_ieee1275_get_property_length): Likewise.
12345         (grub_ieee1275_next_property): Likewise.  Change type of first argument
12346         to grub_ieee1275_phandle_t.
12347         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
12348         Move export next to declaration.
12349         (grub_ieee1275_chosen): New variable.
12350         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
12351         Correct cosmetic typo.
12352         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
12353         `grub_ieee1275_chosen'.
12354         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
12355         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
12356         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
12357         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
12358         `grub_ieee1275_chosen'.
12360 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
12362         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
12363         /chosen/bootargs.
12364         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
12365         /chosen/bootargs as "variable=value" pairs.
12367 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
12369         * include/grub/misc.h (grub_dprintf): New macro.
12370         (grub_real_dprintf): New prototype.
12371         (grub_strword): Likewise.
12372         (grub_iswordseparator): Likewise.
12373         * kern/misc.c (grub_real_dprintf): New function.
12374         (grub_strword): Likewise.
12375         (grub_iswordseparator): Likewise.
12377 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
12379         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
12380         (roundup): Remove macro.
12381         (grub_ieee1275_flags): Make static.
12382         (grub_ieee1275_realmode): Remove.
12383         (grub_ieee1275_test_flag): New function.
12384         (grub_ieee1275_set_flag): Likewise.
12385         (find_options): Rename to `grub_ieee1275_find_options'; update
12386         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
12387         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
12388         (cmain): New prototype.
12389         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
12390         `grub_ieee1275_flags' directly.
12391         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
12392         machine/biosdisk.h.
12393         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
12394         Don't include grub/machine/init.h.
12395         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
12396         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12397         Remove prototype.
12398         (grub_ieee1275_realmode): Likewise.
12399         (grub_ieee1275_flag): New enum.
12400         (grub_ieee1275_test_flag): New prototype.
12401         (grub_ieee1275_set_flag): New prototype.
12402         * include/grub/powerpc/ieee1275/init.h: Remove file.
12403         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
12404         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
12405         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
12406         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
12407         comment.
12408         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
12409         `grub_ieee1275_test_flag'.
12410         (grub_ieee1275_encode_devname): Likewise.
12412 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
12414         * include/grub/powerpc/ieee1275/ieee1275.h
12415         (grub_ieee1275_encode_devname): New prototype.
12416         (grub_ieee1275_get_filename): Likewise.
12417         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
12418         function.
12419         (grub_set_prefix): Likewise.
12420         (grub_machine_init): Call grub_set_prefix.
12421         * kern/powerpc/ieee1275/openfw.c: Fix typos.
12422         (grub_parse_type): New enum.
12423         (grub_ieee1275_get_devargs): New function.
12424         (grub_ieee1275_get_devname): Likewise.
12425         (grub_ieee1275_parse_args): Likewise.
12426         (grub_ieee1275_get_filename): Likewise.
12427         (grub_ieee1275_encode_devname): Likewise.
12429 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
12431         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
12432         `grub_loader_unset'.
12434 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
12436         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
12437         instead of grub_ieee1275_interpret.
12438         (grub_halt_init): New function.
12439         (grub_halt_fini): Likewise.
12440         (GRUB_MOD_INIT): Correct message grammar.
12441         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
12442         instead of grub_ieee1275_interpret.
12443         (grub_reboot_init): New function.
12444         (grub_reboot_fini): Likewise.
12445         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
12446         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
12447         util/i386/pc/misc.c with commands/ieee1275/halt.c,
12448         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
12449         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
12450         function.
12451         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
12452         Add prototype.
12453         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
12454         prototype.
12455         (grub_halt): Likewise.
12456         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
12457         (cmain): Remove __attribute__((unused)).
12458         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
12459         (grub_heap_len): Likewise.
12460         (grub_machine_fini): New function.
12461         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
12462         (grub_halt): Likewise.
12463         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
12464         function.
12465         * util/powerpc/ieee1275/misc.c: New file.
12467 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
12469         * DISTLIST: New file.
12470         * gendistlist.sh: Likewise.
12472         * Makefile.in (COMMON_DISTFILES): Removed.
12473         (BOOT_DISTFILES): Likewise.
12474         (CONF_DISTFILES): Likewise.
12475         (DISK_DISTFILES): Likewise.
12476         (FS_DISTFILES): Likewise.
12477         (INCLUDE_DISTFILES): Likewise.
12478         (KERN_DISTFILES): Likewise.
12479         (LOADER_DISTFILES): Likewise.
12480         (TERM_DISTFILES): Likewise.
12481         (UTIL_DISTFILES): Likewise.
12482         (DISTFILES): Likewise.
12483         (uninstall): Uninstall files in $(pkgdata_DATA).
12484         (DISTLIST): New target.
12485         (distdir): Use the contents of the file DISTLIST to get a list of
12486         distributed files.
12488 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
12490         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
12491         descriptor. This is ported from GRUB Legacy.
12493         * gencmdlist.sh: Added an extra semicolon to make it work with
12494         old sed versions. Reported by Robert Bihlmeyer
12495         <robbe@orcus.priv.at>.
12497 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
12499         Automatic loading of commands is supported.
12501         * normal/main.c (read_command_list): New function.
12502         (grub_normal_execute): Call read_command_list.
12504         * normal/command.c (grub_register_command): Return zero or CMD.
12505         Allocate CMD->NAME from the heap.
12506         Initialize CMD->MODULE_NAME to zero.
12507         Find the same name as well. If the same command is found and it is
12508         a dummy command, overwrite members. If it is not a dummy command,
12509         return zero.
12510         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
12511         (grub_command_find): If a dummy command is found, load a module
12512         and retry to find a command only once.
12514         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
12515         make sure that each command is loaded.
12517         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
12518         macro.
12519         (struct grub_command): Remove const from the member `name'.
12520         Add a new member `module_name'.
12521         (grub_register_command): Return grub_command_t.
12523         * commands/help.c (grub_cmd_help): Call grub_command_find to make
12524         sure that each command is loaded.
12526         * genmk.rb (PModule::rule): Specify a module name without the
12527         suffix ".mod" to gencmdlist.sh.
12529 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
12531         * gencmdlist.sh: New file.
12533         * genmk.rb (PModule::rule): Generate a rule for a command list.
12534         Clean command.lst.
12535         Generate command.lst from $(COMMANDFILES).
12537         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
12538         (DATA): Added $(pkgdata_DATA).
12539         (install-local): Install files in $(pkgdata_DATA).
12541 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
12543         * term/i386/pc/vga.c (debug_command): Removed.
12544         (GRUB_MOD_INIT): Do not register the command "debug".
12546         From Hollis Blanchard:
12547         * commands/configfile.c: New file.
12548         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12549         commands/configfile.c.
12550         (pkgdata_MODULES): Added configfile.mod.
12551         (configfile_mod_SOURCES): New variable.
12552         (configfile_mod_CFLAGS): Likewise.
12553         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12554         commands/configfile.c.
12555         (pkgdata_MODULES): Added configfile.mod.
12556         (configfile_mod_SOURCES): New variable.
12557         (configfile_mod_CFLAGS): Likewise.
12558         * util/grub-emu.c (main): Call grub_configfile_init and
12559         grub_configfile_fini.
12560         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
12561         prototype.
12562         [GRUB_UTIL] (grub_configfile_fini): Likewise.
12564 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
12566         * normal/arg.c (grub_arg_show_help): Do not show the bug report
12567         address.
12569         * commands/help.c (grub_cmd_help): Do not print newlines after
12570         the last command in print_command_help.
12572 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
12574         * commands/default.h: New file.
12575         * commands/timeout.h: Likewise.
12576         * normal/context.c: Likewise.
12578         * util/misc.c: Do not include sys/times.h.
12579         Include sys/time.h and grub/machine/time.h.
12580         (grub_get_rtc): Rewritten with gettimeofday.
12582         * util/grub-emu.c (main): Call grub_default_init and
12583         grub_timeout_init before grub_normal_init, and call
12584         grub_timeout_fini and grub_default_fini after grub_main.
12586         * util/console.c (grub_ncurses_checkkey): Return the read
12587         character or -1.
12589         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
12590         timeouts.
12592         * normal/main.c (read_config_file): Push MENU. If this fails,
12593         print an error and wait for a user input.
12594         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
12595         If a menu is empty or an error occurs, pop MENU.
12596         (grub_normal_execute): Pop and free MENU after grub_menu_run
12597         returns.
12599         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
12601         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
12602         include time.h.
12603         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12604         without GRUB_UTIL.
12605         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
12606         time.h.
12607         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12608         without GRUB_UTIL.
12610         * include/grub/normal.h (struct grub_menu_list): New struct.
12611         (grub_menu_list_t): New type.
12612         (struct grub_context): New struct.
12613         (grub_context_t): New type.
12614         (grub_register_command): Got rid of EXPORT_FUNC.
12615         (grub_unregister_command): Likewise.
12616         (grub_context_get): New prototype.
12617         (grub_context_get_current_menu): Likewise.
12618         (grub_context_push_menu): Likewise.
12619         (grub_context_pop_menu): Likewise.
12620         [GRUB_UTIL] (grub_default_init): Likewise.
12621         [GRUB_UTIL] (grub_default_fini): Likewise.
12622         [GRUB_UTIL] (grub_timeout_init): Likewise.
12623         [GRUB_UTIL] (grub_timeout_fini): Likewise.
12625         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
12626         commands/timeout.c and normal/context.c.
12627         (pkgdata_MODULES): Added default.mod and timeout.mod.
12628         (normal_mod_SOURCES): Added normal/context.c.
12629         (default_mod_SOURCES): New variable.
12630         (default_mod_CFLAGS): Likewise.
12631         (timeout_mod_SOURCES): Likewise.
12632         (timeout_mod_CFLAGS): Likewise.
12633         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
12634         conf/i386-pc.rmk.
12635         (pkgdata_MODULES): Added default.mod and timeout.mod.
12636         (normal_mod_SOURCES): Added normal/context.c.
12637         (default_mod_SOURCES): New variable.
12638         (default_mod_CFLAGS): Likewise.
12639         (timeout_mod_SOURCES): Likewise.
12640         (timeout_mod_CFLAGS): Likewise.
12642         * Makefile.in (all-local): Added $(MKFILES).
12644 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
12646         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
12647         (grub_emu_SOURCES): Likewise.
12648         (pkgdata_MODULES): Add `sun.mod'.
12649         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12650         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12651         `partmap/sun.c'.
12652         (pkgdata_MODULES): Add `sun.mod'.
12653         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12654         * include/grub/partition.h (grub_sun_partition_map_init): New
12655         prototype.
12656         (grub_sun_partition_map_fini): Likewise.
12657         * partmap/sun.c: New file.
12658         * util/grub-emu.c (main): Initialize and de-initialize the sun
12659         partitionmap support.
12661 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
12663         This implements an Emacs-like menu entry editor.
12665         * normal/menu_entry.c: New file.
12667         * util/console.c (grub_ncurses_putchar): Translate some Unicode
12668         characters to ASCII.
12669         (saved_char): New variable.
12670         (grub_ncurses_checkkey): Rewritten completely.
12671         (grub_ncurses_getkey): Likewise.
12672         (grub_ncurses_init): Call raw instead of cbreak.
12674         * normal/menu.c (print_entry): Do not put a space.
12675         (init_page): Renamed to ...
12676         (grub_menu_init_page): ... this. All callers changed.
12677         (edit_menu_entry): Removed.
12678         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
12680         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
12682         * kern/misc.c (grub_vprintf): Call grub_refresh.
12684         * normal/menu.c (DISP_LEFT): Renamed to ...
12685         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
12686         * normal/menu.c (DISP_UP): Renamed to ...
12687         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
12688         * normal/menu.c (DISP_RIGHT): Renamed to ...
12689         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
12690         * normal/menu.c (DISP_DOWN): Renamed to ...
12691         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
12692         * normal/menu.c (DISP_HLINE): Renamed to ...
12693         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
12694         * normal/menu.c (DISP_VLINE): Renamed to ...
12695         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
12696         * normal/menu.c (DISP_UL): Renamed to ...
12697         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
12698         * normal/menu.c (DISP_UR): Renamed to ...
12699         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
12700         * normal/menu.c (DISP_LL): Renamed to ...
12701         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
12702         * normal/menu.c (DISP_LR): Renamed to ...
12703         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
12704         * normal/menu.c (TERM_WIDTH): Renamed to ...
12705         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
12706         * normal/menu.c (TERM_HEIGHT): Renamed to ...
12707         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
12708         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
12709         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
12710         * normal/menu.c (TERM_MARGIN): Renamed to ...
12711         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
12712         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
12713         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
12714         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
12715         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
12716         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
12717         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
12718         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
12719         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
12720         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
12721         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
12722         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
12723         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
12724         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
12725         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
12726         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
12727         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
12728         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
12729         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
12730         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
12731         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
12732         All callers changed.
12734         * include/grub/normal.h: New prototype.
12736         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12737         normal/menu_entry.c.
12738         (normal_mod_SOURCES): Likewise.
12739         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12740         (normal_mod_SOURCES): Likewise.
12742 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
12744         * include/grub/normal.h (grub_halt_init): New prototype.
12745         (grub_halt_fini): Likewise.
12746         (grub_reboot_init): Likewise.
12747         (grub_reboot_fini): Likewise.
12749         * util/grub-emu.c: Include signal.h.
12750         (main_env): New global variable.
12751         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
12752         catch C-c.
12753         (grub_machine_fini): New function.
12754         (main): Call grub_halt_init and grub_reboot_init before
12755         grub_main, and grub_reboot_fini and grub_halt_fini after it.
12756         Call setjmp with MAIN_ENV to go back afterwards.
12757         Call grub_machine_fini right before return.
12759         * include/grub/util/misc.h: Include setjmp.h.
12760         (main_env): New prototype.
12762         * include/grub/kernel.h (grub_machine_fini): New prototype.
12763         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
12764         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
12766         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
12767         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
12768         * term/i386/pc/console.c (grub_console_fini): Likewise.
12770         * util/i386/pc/misc.c: New file.
12772         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12773         util/i386/pc/misc.c, commands/i386/pc/halt.c and
12774         commands/i386/pc/reboot.c.
12776 2005-02-14  Guillem Jover  <guillem@hadrons.org>
12778         * include/grub/dl.h (grub_dl_check_header): New prototype.
12779         (grub_arch_dl_check_header): Change return type to grub_err_t,
12780         remove size parameter and export function.  Update all callers.
12781         * kern/dl.c (grub_dl_check_header): New function.
12782         (grub_dl_load_core): Use `grub_dl_check_header' instead of
12783         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
12784         are inside the core.
12785         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
12786         independent ELF header checks.
12787         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12788         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
12789         `grub_dl_check_header' instead of explicit checks.  Check for the
12790         ELF type.
12791         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
12792         `grub_dl_check_header' instead of explicit checks.  Remove arch
12793         specific ELF header checks.
12795         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
12796         argument SIZE.
12798 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
12800         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
12801         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
12803 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
12805         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
12806         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
12807         (part_map_iterate): Clear `grub_errno' and return 0 if
12808         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
12809         * partmap/amiga.c (amiga_partition_map_iterate): Return
12810         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
12811         * partmap/apple.c (apple_partition_map_iterate): Likewise.
12813 2005-02-01  Guillem Jover  <guillem@hadrons.org>
12815         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
12816         help info.
12818 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
12820         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
12821         Removed prototype.
12822         (grub_rescue_cmd_linux): New prototype.
12823         (grub_rescue_cmd_initrd): Likewise.
12824         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
12825         `bi_rec'.
12826         (grub_linux_release_mem): Release the memory for the initrd.
12827         (grub_load_linux): Renamed from this...
12828         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
12829         Changed `entry' not to be static.  Loop over memory regions to
12830         find another one when the default fails.
12831         (grub_rescue_cmd_initrd): New function.
12832         (grub_linux_init): Remove function.
12833         (grub_linux_fini): Likewise.
12834         (GRUB_MOD_INIT): Register `initrd'.
12835         (GRUB_MOD_FINI): Unregister `initrd'.
12836         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
12837         Function removed.
12838         (grub_linux_normal_fini): Likewise.
12839         (GRUB_MOD_INIT): Register `initrd'.
12840         (GRUB_MOD_FINI): Unregister `initrd'.
12842 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
12844         * commands/help.c: New file.
12845         * normal/arg.c (show_help): Renamed to...
12846         (grub_arg_show_help): ... this.
12847         * commands/i386/pc/halt.c: New file.
12848         * commands/i386/pc/reboot.c: Likewise.
12849         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
12850         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
12851         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
12852         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
12853         variables.
12854         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12855         `commands/help.c'.
12856         (pkgdata_MODULES): Add `help.mod'.
12857         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
12858         * grub/i386/pc/init.h (grub_reboot): New prototype.
12859         (grub_halt): Likewise.
12860         * include/grub/normal.h (grub_arg_show_help): New prototype.
12861         (grub_help_init): Likewise.
12862         (grub_help_fini): Likewise.
12863         * util/grub-emu.c (main): Initialize and deinitialize the help
12864         command.
12866         * normal/cmdline.c (grub_cmdline_get): Doc fix.
12868         * normal/command.c (grub_command_init): Fixed the description of
12869         the `set' and `unset' commands.
12871 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
12873         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
12874         function.
12875         * commands/ieee1275/halt.c: New file.
12876         * commands/ieee1275/reboot.c: Likewise.
12877         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
12878         `__attribute__ ((unused))'.  Some GCS related fixed.
12879         (grub_suspend_init) [GRUB_UTIL]: Function removed.
12880         (grub_suspend_fini): Likewise.
12881         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
12882         and `halt.mod'.
12883         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
12884         (halt_mod_CFLAGS): New variables.
12885         * include/grub/powerpc/ieee1275/ieee1275.h
12886         (grub_ieee1275_interpret): New prototype.
12888 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
12890         * include/grub/misc.h (memmove): New prototype.
12891         (memcpy): Likewise.
12893 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
12895         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
12896         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
12898 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
12900         * kern/misc.c (grub_strndup): Function rewritten.
12902 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
12904         * normal/menu.c (TERM_WIDTH): Macro redefined.
12905         (TERM_TOP_BORDER_Y): Likewise.
12906         (draw_border): Replaced while-loop by a for-loop.  Make the number
12907         of lines consistent with the number of lines displayed in
12908         print_entries.  Added a margin below the rectangle.
12909         (print_entry): Make the entry fit in the rectangle.
12910         (print_entries): Display the scroll arrows next to the right
12911         border.
12913 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
12915         * fs/minix.c (grub_minix_find_file): Reserve more space for
12916         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
12917         `grub_strncpy' to copy `path' into it.
12919 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
12921         Add the loopback device, a device via which files can be accessed
12922         as devices.
12924         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
12925         (pkgdata_MODULES): Add loopback.mod.
12926         (loopback_mod_SOURCES): New variable.
12927         (loopback_mod_CFLAGS): Likewise.
12928         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12929         `disk/loopback.c'.
12930         (pkgdata_MODULES): Add loopback.mod.
12931         (loopback_mod_SOURCES): New variable.
12932         (loopback_mod_CFLAGS): Likewise.
12933         * disk/loopback.c: new file.
12934         * include/grub/normal.h (grub_loop_init): New prototype.
12935         (grub_loop_fini): New prototype.
12936         * util/grub-emu.c (main): Initialize and de-initialize loopback
12937         support.
12938         * include/grub/disk.h (grub_disk_dev_id): Add
12939         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
12941 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
12943         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
12944         function.
12945         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
12946         (suspend_mod_SOURCES): New variable.
12947         (suspend_mod_CFLAGS): Likewise.
12948         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
12949         New prototype.
12950         * commands/ieee1275/suspend.c: New file.
12952 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12954         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
12955         ((unused))' to `__attribute__ ((used))'.
12956         (GRUB_MOD_FINI): Likewise.
12957         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
12958         * genmk.rb (PModule): Assign space to common symbols when linking
12959         modules.
12961 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
12963         * include/grub/mm.h (grub_mm_init_region): Change the type of the
12964         `unsigned' arguments to `grub_size_t'.
12965         (grub_malloc): Likewise.
12966         (grub_realloc): Likewise.
12967         (grub_memalign): Likewise.
12968         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
12969         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12970         * util/misc.c (grub_malloc): Likewise.
12971         (grub_realloc): Likewise.
12972         * kern/mm.c (get_header_from_pointer): Change the casts to
12973         `unsigned' into a cast to `grub_size_t'.
12975         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
12976         point to `currnode' when `currnode' is changed.
12978         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
12979         Schottelius <nico-linux@schottelius.org>.
12981 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
12983         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
12984         (note_path): Remove variable.
12985         (GRUB_IEEE1275_NOTE_NAME): New macro.
12986         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
12987         (grub_ieee1275_note_hdr): New structure.
12988         (grub_ieee1275_note_desc): Likewise.
12989         (grub_ieee1275_note): Likewise.
12990         (load_note): Remove `dir' argument.  All callers updated.  Remove
12991         `note_img' and `path'.  Do not load a file from `note_path'.
12992         Initialize a struct grub_ieee1275_note and write that to `out'.
12993         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
12995 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
12997         * util/misc.c (grub_util_read_image): Revert last change.  It
12998         called `grub_util_read_at', which seeks from the beginning of the
12999         file.
13001 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
13003         * TODO: Add note about endianness in grub-mkimage.
13004         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
13005         section.
13006         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
13007         (grub_mkimage_SOURCES): New target.
13008         * include/grub/kernel.h (grub_start_addr): Remove variable.
13009         (grub_end_addr): Likewise.
13010         (grub_total_module_size): Likewise.
13011         (grub_kernel_image_size): Likewise.
13012         (GRUB_MODULE_MAGIC): New constant.
13013         (grub_module_info): New structure.
13014         (grub_arch_modules_addr): New prototype.
13015         (grub_get_end_addr): Remove prototype.
13016         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
13017         * include/grub/powerpc/ieee1275/kernel.h: New file.
13018         * include/grub/util/misc.h (grub_util_get_fp_size): New
13019         prototype.
13020         (grub_util_read_at): Likewise.
13021         (grub_util_write_image_at): Likewise.
13022         * kern/main.c (grub_get_end_addr): Remove function.
13023         (grub_load_modules): Call grub_arch_modules_addr instead of using
13024         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
13025         the grub_module_info fields instead of calling grub_get_end_addr
13026         as loop conditions.  Move grub_add_unused_region code here.
13027         (grub_add_unused_region): Remove function.
13028         * kern/i386/pc/init.c: Include grub/cache.h.
13029         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
13030         one call to add_mem_region.
13031         (grub_arch_modules_addr): New function.
13032         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
13033         (grub_total_module_size): Likewise.
13034         Include grub/machine/kernel.h.
13035         (grub_arch_modules_addr): New function.
13036         * util/grub-emu.c (grub_end_addr): Remove variable.
13037         (grub_total_module_size): Likewise.
13038         (grub_arch_modules_addr): New function.
13039         * util/misc.c: Include unistd.h.
13040         (grub_util_get_fp_size): New function.
13041         (grub_util_read_at): Likewise.
13042         (grub_util_write_image_at): Likewise.
13043         (grub_util_read_image): Call grub_util_read_at.
13044         (grub_util_write_image): Call grub_util_write_image_at.
13045         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
13046         additional memory in kernel_img for a struct grub_module_info.
13047         Fill in that grub_module_info.
13048         * util/powerpc/ieee1275/grub-mkimage.c: New file.
13050 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
13052         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
13053         New function.
13054         * include/grub/powerpc/ieee1275/ieee1275.h
13055         (grub_ieee1275_milliseconds): New prototype.
13056         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
13057         Change to 1000.
13058         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
13059         grub_ieee1275_milliseconds.
13061 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
13063         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
13064         variable.
13065         (find_options): New function.
13066         (cmain): Call find_options.
13067         * include/grub/powerpc/ieee1275/ieee1275.h
13068         (grub_ieee1275_realmode): New extern variable.
13069         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
13070         grub_map if grub_ieee1275_realmode is false.
13072 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
13074         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
13075         lines are inserted and make it work like readline.  Reported by
13076         Vincent Pelletier <subdino2004@yahoo.fr>.
13078 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
13080         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
13082         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
13083         `kern/powerpc/cache.S'.
13085 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
13087         * genmk.rb: Handle the `Program' class in the main loop.  Written
13088         by Johan Rydberg <jrydberg@gnu.org>.
13089         (Program): New class.
13090         (programs): New variable.
13091         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
13092         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
13093         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
13094         (help_arch): Function removed.
13095         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
13096         `powerpc/libgcc.h' and `loader.h'.
13097         (pkgdata_PROGRAMS): New variable.
13098         (sbin_UTILITIES): Variable removed.
13099         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
13100         (grubof_SOURCES): Variable re-defined so it only includes the
13101         core functionality.
13102         (grubof_CFLAGS): Remove `-DGRUBOF'.
13103         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
13104         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
13105         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
13106         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
13107         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
13108         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
13109         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
13110         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
13111         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
13112         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
13113         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13114         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
13115         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
13116         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
13117         (pc_mod_CFLAGS): New variables.
13118         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
13119         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
13120         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
13121         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
13122         Moved from here...
13123         * include/grub/i386/pc/init.h (grub_os_area_addr)
13124         (rub_os_area_size): ... to here.
13125         * include/grub/powerpc/ieee1275/ieee1275.h
13126         (grub_ieee1275_entry_fn): Export symbol.
13127         * include/grub/powerpc/ieee1275/init.h: New file.
13128         * include/grub/powerpc/libgcc.h: Likewise.
13129         * include/grub/cache.h: Likewise.
13130         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
13131         <hollis@penguinppc.org>.
13132         * kern/dl.c: Include <grub/cache.h>.
13133         (grub_dl_flush_cache): New function.
13134         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
13135         for this module.
13136         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
13137         (grub_console_init): Removed prototypes.
13138         (grub_machine_init): Don't initialize the modules anymore.
13139         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
13140         static.
13141         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
13142         Macro undef removed.
13143         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
13144         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
13145         relocation `R_PPC_REL32'.  Return an error when the relocation is
13146         unknown.
13147         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
13148         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
13149         * util/misc.c (grub_arch_sync_caches): Likewise.
13151 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
13153         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
13154         `symlist.c', add `grubof_symlist.c'.
13155         (symlist.c): Variable removed.
13156         (grubof_HEADERS): Variable added.
13157         (grubof_symlist.c): New target.
13158         (kernel_syms.lst): Use `grubof_HEADERS' instead of
13159         `kernel_img_HEADERS'.
13160         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
13161         * kern/powerpc/dl.c: New file.
13162         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
13163         Function removed.
13164         (grub_arch_dl_relocate_symbols): Likewise.
13165         (grub_register_exported_symbols): Likewise.
13167 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
13169         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
13170         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
13171         to fail instead.  Reported by Vincent Pelletier
13172         <subdino2004@yahoo.fr>.
13174         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
13175         it is not allocated.  Reported by Vincent Pelletier
13176         <subdino2004@yahoo.fr>.
13178         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
13179         output so the output looks better.
13181 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
13183         Modulize the partition map support and add support for the amiga
13184         partition map.
13186         * commands/ls.c: Include <grub/partition.h> instead of
13187         <grub/machine/partition.h>.
13188         * kern/disk.c: Likewise.
13189         * kern/rescue.c: Likewise.
13190         * loader/i386/pc/chainloader.c: Likewise.
13191         * normal/cmdline.c: Likewise.
13192         * kern/powerpc/ieee1275/init.c: Likewise.
13193         (grub_machine_init): Call `grub_pc_partition_map_init',
13194         `grub_amiga_partition_map_init' and
13195         `grub_apple_partition_map_init'.
13196         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
13197         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
13198         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
13199         `partition.h' and `pc_partition.h'.
13200         (grub_setup_SOURCES): Remove
13201         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
13202         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13203         (grub_emu_SOURCES): Likewise.
13204         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
13205         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
13206         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
13207         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13208         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
13209         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13210         (grubof_SOURCES): Likewise.
13211         * disk/i386/pc/partition.c: File removed.
13212         * disk/powerpc/ieee1275/partition.c: Likewise.
13213         * include/grub/powerpc/ieee1275/partition.h: Likewise.
13214         * include/grub/i386/pc/partition.h: Likewise.
13215         * kern/partition.c: New file.
13216         * partmap/amiga.c: Likewise.
13217         * partmap/apple.c: Likewise.
13218         * partmap/pc.c: Likewise.
13219         * include/grub/partition.h: Likewise..
13220         * include/grub/pc_partition.h: Likewise.
13221         * util/grub-emu.c: Include <grub/partition.h> instead of
13222         <grub/machine/partition.h>.
13223         (main): Call `grub_pc_partition_map_init',
13224         `grub_amiga_partition_map_init' and
13225         `grub_apple_partition_map_init' and deinitialize afterwards.
13226         * util/i386/pc/biosdisk.c: Include `#include
13227         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13228         `<grub/machine/partition.h>'.
13229         * util/i386/pc/grub-setup.c: Likewise.
13230         * util/i386/pc/biosdisk.c: Likewise.
13231         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
13232         partition information in case of a PC partition.
13233         * util/i386/pc/grub-setup.c: Include `#include
13234         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13235         `<grub/machine/partition.h>'.
13236         (setup): Only access the PC specific partition information in case
13237         of a PC partition.
13239 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
13241         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
13242         (grub_longjmp): Likewise.
13243         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
13244         20.
13245         * normal/powerpc/setjmp.S: New file.
13246         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13247         `normal/powerpc/setjmp.S'.
13248         (grubof_CFLAGS): Add `-DGRUBOF'.
13249         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
13250         [GRUB_UTIL && !GRUBOF].
13252 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
13254         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
13255         property named `name'.  Correctly handle the error returned by
13256         `grub_ieee1275_finddevice' if a device can not be opened.
13258 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13260         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
13261         `actual' for negativity.
13262         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13263         kern/fshelp.c.
13265 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
13267         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
13268         (PAGE_OFFSET): New macro.
13269         (CRTC_ADDR_PORT): Likewise.
13270         (CRTC_DATA_PORT): Likewise.
13271         (START_ADDR_HIGH_REGISTER): Likewise.
13272         (START_ADDR_LOW_REGISTER): Likewise.
13273         (GRAPHICS_ADDR_PORT): Likewise.
13274         (GRAPHICS_DATA_PORT): Likewise.
13275         (READ_MAP_REGISTER): Likewise.
13276         (INPUT_STATUS1_REGISTER): Likewise.
13277         (INPUT_STATUS1_VERTR_BIT): Likewise.
13278         (page): New variable.
13279         (wait_vretrace): New function.
13280         (set_read_map): Likewise.
13281         (set_start_address): Likewise.
13282         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
13283         the right page.
13284         (check_vga_mem): Take the page into account.
13285         (write_char): Likewise.
13286         (write_cursor): Likewise.
13287         (scroll_up): Likewise.  Copy the page to the page that is not
13288         shown and switch between both pages.
13289         (grub_vga_putchar): Fix off by one error.
13290         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
13291         account.
13293 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
13295         Add support for iso9660 (including rockridge).
13297         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13298         (iso9660_mod_SOURCES): New variable.
13299         (iso9660_mod_CFLAGS): Likewise.
13300         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13301         * include/grub/fs.h (grub_iso9660_init): New prototype.
13302         * util/grub-emu.c (main): Call `grub_iso9660_init'.
13303         * fs/iso9660.c: New file.
13305         * include/grub/misc.h (grub_strncat): New prototype.
13306         * kern/misc.c (grub_strncat): New function.
13308         * fs/hfs.c (grub_hfs_mount): Translate the error
13309         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
13310         * fs/jfs.c (grub_jfs_mount): Likewise.
13311         * fs/ufs.c (grub_ufs_mount): Likewise.
13313 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
13315         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
13316         which initialized BAT registers.
13317         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
13318         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13319         Move from here...
13320         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
13321         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13322         ... to here.
13323         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
13324         (grub_mapclaim): Likewise.
13325         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
13326         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
13327         hand.
13329 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
13331         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
13332         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
13333         -ffreestanding and -msoft-float.
13335 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
13337         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
13338         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
13339         set in grub_ieee1275_flags.
13341 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
13343         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
13344         prototype.
13345         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
13346         grub_console_init first.
13347         Change the memory range used for grub_ieee1275_claim and
13348         grub_mm_init_region.
13349         Print an error message if the claim fails.
13350         Include <grub/misc.h>.
13352 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
13354         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
13355         Call grub_children_iterate for device nodes of type `scsi',
13356         `ide', or `ata'.
13357         (grub_ofdisk_open): Remove manual device alias resolution.
13358         Fix memory leak when device cannot be opened.
13359         * include/grub/powerpc/ieee1275/ieee1275.h
13360         (grub_children_iterate): New prototype.
13361         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
13362         New function.
13363         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13364         Return -1 if args.size was -1.
13366 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
13368         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
13369         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
13370         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
13371         Open Firmware's memory for it; claim memory from _start to _end.
13372         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
13373         (_end): New extern.
13374         (_start): Zero BSS from __bss_start to _end.
13375         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13376         New extern.
13377         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
13379 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
13381         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
13382         -1 if args.base was -1.
13384 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
13386         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
13387         escape sequence instead of a literal ^L. Also call
13388         grub_ofconsole_gotoxy.
13390 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
13392         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
13393         void *  arguments to grub_addr_t.  All callers updated.  Also make
13394         the `result' argument optional.
13395         (grub_ieee1275_release): change void * arguments to grub_addr_t.
13396         All callers updated.
13398 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
13400         * commands/ls.c (grub_ls_list_files): Use the string following the
13401         initial ')', if present, as the filesystem path.
13402         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
13404         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
13406 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
13408         Make the source code of the menu interface more readable.
13410         * normal/menu.c: Include grub/mm.h.
13411         (TERM_WIDTH): New macro.
13412         (TERM_HEIGHT): Likewise.
13413         (TERM_INFO_HEIGHT): Likewise.
13414         (TERM_MARGIN): Likewise.
13415         (TERM_SCROLL_WIDTH): Likewise.
13416         (TERM_TOP_BORDER_Y): Likewise.
13417         (TERM_LEFT_BORDER_X): Likewise.
13418         (TERM_BORDER_WIDTH): Likewise.
13419         (TERM_MESSAGE_HEIGHT): Likewise.
13420         (TERM_BORDER_HEIGHT): Likewise.
13421         (TERM_NUM_ENTRIES): Likewise.
13422         (TERM_FIRST_ENTRY_Y): Likewise.
13423         (TERM_ENTRY_WIDTH): Likewise.
13424         (TERM_CURSOR_X): Likewise.
13425         (draw_border): Use macros instead of magic numbers.
13426         (print_entry): Likewise.
13427         (print_entries): Likewise.
13428         (run_menu): Likewise. Also, handle the key 'e'.
13429         (run_menu_entry): Ignore empty command lines.
13430         (print_message): Added a new argument EDIT. If EDIT is true,
13431         print a different message.
13432         (init_page): Likewise.
13433         (edit_menu_entry): New function. Not implemented yet.
13435 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
13437         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
13438         can be loaded from normal mode.
13440         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
13441         `multiboot.mod'.
13442         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
13443         (multiboot_mod_CFLAGS): New variables.
13444         * loader/i386/pc/linux_normal.c: New file.
13445         * loader/i386/pc/multiboot_normal.c: Likewise.
13447         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
13448         attribute `unused'.
13450         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
13451         `fdiro' to read the mode information from instead of `diro'.
13453         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
13454         looking up a symlink.
13456         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
13457         macro.
13458         * normal/command.c (grub_command_execute): Don't parse the
13459         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
13460         flags of the command.
13462         * normal/menu.c (grub_menu_run): Fix typo.
13464 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
13466         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
13468         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
13469         `y + 1' instead of `y - 1'.
13471         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
13473 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
13475         From Hollis Blanchard <hollis@penguinppc.org>:
13476         * kern/misc.c (memmove): New alias for grub_memmove.
13477         (memcmp): New alias for grub_memcmp.
13478         (memset): New alias for grub_memset.
13479         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13480         Change "int handle" to "grub_ieee1275_phandle_t handle".
13481         * include/grub/powerpc/ieee1275/ieee1275.h
13482         (grub_ieee1275_get_property): Likewise.
13484 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
13486         Added normal mode command `chainloader' as module chain.mod, which
13487         depends on normal.mod and _chain.mod.
13489         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
13490         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
13491         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
13492         Deleted prototype.
13493         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
13494         but arguments parsing moved to ...
13495         (grub_chainloader_cmd): ... here.  New function.
13496         * include/grub/i386/pc/chainloader.h: New file.
13497         * loader/i386/pc/chainloader_normal.c: Likewise.
13499 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
13501         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
13502         (grub_mkimage_LDFLAGS): Likewise.
13503         (grub_emu_SOURCES): Likewise.
13504         (kernel_img_HEADERS): Added fshelp.h.
13505         * fs/ext2.c: Include <grub/fshelp.h>.
13506         (FILETYPE_REG): New macro.
13507         (FILETYPE_INO_REG): Likewise.
13508         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
13509         Changed all users.
13510         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
13511         all users.
13512         (grub_fshelp_node): New struct.
13513         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
13514         to a pointer.
13515         (grub_ext2_get_file_block): Removed function.
13516         (grub_ext2_read_block): New function.
13517         (grub_ext2_read_file): Replaced parameter `data' by `node'.
13518         This function was written.
13519         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
13520         (grub_ext2_find_file): Removed function.
13521         (grub_ext2_read_symlink): New function.
13522         (grub_ext2_iterate_dir): Likewise.
13523         (grub_ext2_open): Rewritten.
13524         (grub_ext2_dir): Rewritten.
13525         * include/grub/fshelp.h: New file.
13526         * fs/fshelp.c: Likewise.
13528 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
13530         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
13531         (print_message): Add a missing newline.
13532         (run_menu): Added timeout support.
13533         (run_menu_entry): New local function.
13534         (grub_menu_run): Added support for booting.
13536         * kern/loader.c (grub_loader_is_loaded): New function.
13538         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
13539         (grub_get_rtc): Exported.
13541         * include/grub/i386/pc/time.h: Include grub/symbol.h.
13542         (grub_get_rtc): Exported.
13544         * include/grub/normal.h (struct grub_command_list): Remove
13545         constant from the member `command'.
13547         * include/grub/loader.h (grub_loader_is_loaded): Declared.
13549         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
13551         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
13553 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
13555         Add support for the JFS filesystem.
13557         * fs/jfs.c: New file.
13558         * include/grub/fs.h (grub_jfs_init): New prototype.
13559         (grub_jfs_fini): New prototype.
13560         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
13561         (grub_emu_SOURCES): Likewise.
13562         (pkgdata_MODULES): Add jfs.mod.
13563         (jfs_mod_SOURCES): New variable.
13564         (jfs_mod_CFLAGS): Likewise.
13565         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
13566         (grubof_SOURCES): Likewise.
13567         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
13569         * fs/fat.c (grub_fat_find_dir): Convert the filename little
13570         endian to the host endian.
13571         (grub_fat_utf16_to_utf8): Move function from there...
13572         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
13573         the endianness of the source string anymore.
13574         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
13576 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
13578         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
13579         (grub_boot_fini) [GRUB_UTIL]: Likewise.
13580         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
13581         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
13583         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
13584         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
13585         for `node_found' and `it_dir'.
13586         (grub_hfs_dir): Add prototype for `dir_hook'.
13588         * fs/minix.c (grub_minix_get_file_block): Add prototype for
13589         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
13590         and `indir32' to silence a gcc warning.
13592         * include/grub/fs.h (grub_hfs_init): New prototype.
13593         (grub_hfs_fini): Likewise.
13596 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
13598         Each disk device has its own id now. This is useful to make use
13599         of multiple disk devices.
13601         * include/grub/disk.h (grub_disk_dev_id): New enum.
13602         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
13603         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
13605         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
13606         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13608         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
13609         GRUB_DISK_DEVICE_OFDISK_ID as an id.
13611         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
13612         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13614         * include/grub/disk.h (struct grub_disk_dev): Added a new member
13615         "id" which is used by the cache manager.
13617         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
13618         of just "GRUB".
13620 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
13622         * fs/hfs.c: New file.
13623         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
13624         (grub_emu_SOURCES): Likewise.
13625         (pkgdata_MODULES): Add hfs.mod.
13626         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
13627         (grubof_SOURCES): Likewise.
13628         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
13630         * include/grub/misc.h (grub_strncasecmp): Add prototype.
13631         * kern/misc.c (grub_strncasecmp): Add function.
13633 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
13635         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
13636         with parentheses.
13638         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
13639         (grub_ext2_dir): In case the directory entry type is unknown, read
13640         it from the inode.
13642 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
13644         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
13645         grub_load_linux instead of grub_rescue_cmd_linux as second
13646         argument of grub_rescue_register_command.
13648         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
13650 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
13652         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
13653         function.
13654         * commands/boot.c: Remove the check for `GRUB_UTIL'.
13655         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13656         `loader/powerpc/ieee1275/linux.c',
13657         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
13658         * include/grub/powerpc/ieee1275/ieee1275.h
13659         (grub_ieee1275_release): New prototype.
13660         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
13661         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
13662         normal, boot, linux and linux_normal.
13663         * loader/powerpc/ieee1275/linux.c: New file.
13664         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13666 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
13668         * normal/arg.c (grub_arg_parse): Correct error handling after
13669         reallocating the argumentlist (check if `argl' is not null instead
13670         of checking if `args' is not null).
13671         * kern/mm.c (grub_realloc): Return the same pointer when using the
13672         same region, instead of returning the header address.
13674 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
13676         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
13677         one block instead of two when looking for the initial partition.
13678         (grub_partition_probe): Initialize the local variable `p' with 0.
13679         Use base 10 for the grub_strtoul call.
13680         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
13681         need for one local variable.
13682         (grub_strtoul): Don't add the new value to `num', instead of that
13683         just assign it.
13685 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
13687         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
13688         (pxeboot_img_SOURCES): New variable.
13689         (pxeboot_img_ASFLAGS): Likewise.
13690         (pxeboot_img_LDFLAGS): Likewise.
13691         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
13692         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
13693         <lode_leroy@hotmail.com>.
13695 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
13697         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
13698         there was no input.
13700 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
13702         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
13703         the history buffer logic.
13705 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
13707         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
13708         (FILETYPE_INO_SYMLINK): New macros.
13709         (grub_ext2_find_file): Check if the node is a directory using the
13710         inode stat information instead of using the filetype in the
13711         dirent.  Exclude the first character of an absolute symlink.
13712         (grub_ext2_dir): Mask out the filetype part of the mode member of
13713         the inode.
13715 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
13717         Add support for UFS version 1 and 2.  Add support for the minix
13718         filesystem version 1 and 2, both the variants with 14 and 30 long
13719         filenames.
13721         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
13722         fs/minix.c.
13723         (grub_emu_SOURCES): Likewise.
13724         (pkgdata_MODULES): Add ufs.mod and minix.mod.
13725         (ufs_mod_SOURCES): New variable.
13726         (ufs_mod_CFLAGS): Likewise.
13727         (minix_mod_SOURCES): Likewise.
13728         (minix_mod_CFLAGS): Likewise.
13729         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
13730         fs/minix.c.
13731         (grubof_SOURCES): Likewise.
13732         * fs/ufs.c: New file.
13733         * fs/minix.c: New file.
13734         * include/grub/fs.h (grub_ufs_init): New prototype.
13735         (grub_ufs_fini): Likewise.
13736         (grub_minix_init): Likewise.
13737         (grub_minix_fini): Likewise.
13738         * util/grub-emu.c (main): Initialize and deinitialize UFS and
13739         minix fs.
13741 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
13743         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
13744         commands/ls.c, commands/terminal.c, commands/boot.c,
13745         commands/cmp.c and commands/cat.c.
13746         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
13748         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
13749         "env.h"
13751 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
13753         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
13754         and grub_, respectively. Because the conversion is trivial and
13755         mechanical, I omit the details here. Please refer to the CVS
13756         if you need more information.
13758 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
13760         * include/pupa: Renamed to ...
13761         * include/grub: ... this.
13762         * util/i386/pc/pupa-mkimage.c: Renamed to ...
13763         * util/i386/pc/grub-mkimage.c: ... this.
13764         * util/i386/pc/pupa-setup.c: Renamed to ...
13765         * util/i386/pc/grub-setup.c: ... this.
13766         * util/pupa-emu.c: Renamed to ...
13767         * util/grub-emu.c: ... this.
13769 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
13771         Add support for the newworld apple macintosh (PPC).  This has been
13772         tested on the powerbook 2000 only.  It only adds support for
13773         generic ieee1275 functions, console and disk support.  This should
13774         be easy to port to other architectures with support for Open
13775         Firmware.
13777         * configure.ac: Accept the powerpc as host_cpu.  In the case of
13778         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
13779         specific tests are only executed while building for the i386.
13780         Inverse test for crosscompile.
13781         * genmk.rb (Utility): Allow assembler files.
13782         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
13783         * conf/powerpc-ieee1275.rmk: New file.
13784         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
13785         * disk/powerpc/ieee1275/partition.c: Likewise.
13786         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
13787         * include/pupa/powerpc/ieee1275/console.h: Likewise.
13788         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
13789         * include/pupa/powerpc/ieee1275/time.h: Likewise.
13790         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
13791         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
13792         * include/pupa/powerpc/ieee1275/loader.h
13793         * include/pupa/powerpc/setjmp.h: Likewise.
13794         * include/pupa/powerpc/types.h: Likewise.
13795         * kern/powerpc/ieee1275/init.c: Likewise.
13796         * kern/powerpc/ieee1275/openfw.c: Likewise.
13797         * term/powerpc/ieee1275/ofconsole.c: Likewise.
13799         These files were written by Johan Rydberg
13800         (jrydberg@night.trouble.net) and I only modified them slightly.
13802         * boot/powerpc/ieee1275/cmain.c: New file.
13803         * boot/powerpc/ieee1275/crt0.S: Likewise.
13804         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
13805         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
13807 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
13809         * Makefile.in: Update copyright.
13810         * genmodsrc.sh: Likewise.
13811         * gensymlist.sh: Likewise.
13812         * term/i386/pc/vga.c: Indent correctly.
13814         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
13815         bugreporting address.
13816         * util/i386/pc/pupa-setup.c (usage): Likewise,
13817         (main): Call pupa_ext2_init and pupa_ext2_fini.
13819         * fs/fat.c (log2): Renamed to ...
13820         (fat_log2): ... this.
13821         All callers changed.
13822         * kern/misc.c (memcpy): Alias to pupa_memmove.
13823         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
13824         lvalue cast.
13825         * util/console.c (pupa_ncurses_fini): Return 0.
13827         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
13828         Move fail label here.
13829         [__GNU__]: Don't warn when using stat.
13830         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
13831         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
13832         long int. Use strtol instead of strtoul.
13834 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
13836         * commands/boot.c: New file.
13837         * commands/cat.c: Likewise.
13838         * commands/cmp.c: Likewise.
13839         * commands/ls.c: Likewise.
13840         * commands/terminal.c: Likewise.
13841         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
13842         (pupa_register_command): Changed interface to match the new
13843         argument parser.
13844         (pupa_command_execute): Changed (almost rewritten) so it uses
13845         pupa_split_command.  Added support for setting variables using the
13846         syntax `foo=bar'.
13847         (rescue_command): Changed to work with the new argument parser.
13848         (terminal_command): Moved from here to commands/terminal.c.
13849         (set_command): New function.
13850         (unset_command): New function.
13851         (insmod_command): New function.
13852         (rmmod_command): New function.
13853         (lsmod_command): New function.
13854         (pupa_command_init): Don't initialize the command terminal
13855         anymore.  Initialize the commands set, unset, insmod, rmmod and
13856         lsmod.
13857         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
13858         (kernel_img_HEADERS): Add arg.h and env.h.
13859         (pupa_mkimage_LDFLAGS): Add kern/env.c.
13860         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
13861         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
13862         normal/arg.c.
13863         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
13864         terminal.mod.
13865         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
13866         (boot_mod_SOURCES): New variable.
13867         (terminal_mod_SOURCES): Likewise.
13868         (ls_mod_SOURCES): Likewise.
13869         (cmp_mod_SOURCES): Likewise.
13870         (cat_mod_SOURCES): Likewise.
13872         * normal/arg.c: New file.
13873         * kern/env.c: Likewise.
13874         * include/pupa/arg.h: Likewise.
13875         * include/pupa/env.h: Likewise.
13876         * font/manager.c (font_command): Changed to match argument parsing
13877         interface changes.
13878         (PUPA_MOD_INIT): Likewise.
13879         * hello/hello.c (pupa_cmd_hello): Likewise.
13880         (PUPA_MOD_INIT): Likewise.
13881         * include/pupa/disk.h: Include <pupa/device.h>.
13882         (pupa_print_partinfo): New prototype.
13883         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
13884         (pupa_dl_get_prefix): Likewise.
13885         * include/pupa/misc.h: Include <pupa/err.h>.
13886         (pupa_isgraph): New prototype.
13887         (pupa_isdigit): Likewise.
13888         (pupa_split_cmdline): Likewise.
13889         * include/pupa/normal.h: Include <pupa/arg.h>.
13890         (pupa_command): Changed the prototype of the member `func' to
13891         match the argument parsing interface.  Added member `options'.
13892         (pupa_register_command): Updated to match function.
13893         (pupa_arg_parse): New prototype.
13894         (pupa_hello_init) [PUPA_UTIL]: New prototype.
13895         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
13896         (pupa_ls_init) [PUPA_UTIL]: Likewise.
13897         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
13898         (pupa_cat_init) [PUPA_UTIL]: Likewise.
13899         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
13900         (pupa_boot_init) [PUPA_UTIL]: Likewise.
13901         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
13902         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
13903         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
13904         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
13905         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
13906         * kern/disk.c: Include <pupa/file.h>.
13907         (pupa_print_partinfo): New function.
13908         * kern/dl.c: Include <pupa/env.h>.
13909         (pupa_dl_dir): Variable removed.
13910         (pupa_dl_load): Use the environment variable `prefix' instead of
13911         the variable pupa_dl_dir.
13912         (pupa_dl_set_prefix): Function removed.
13913         (pupa_dl_get_prefix): Likewise.
13914         * kern/i386/pc/init.c: Include <pupa/env.h>.
13915         (pupa_machine_init): Use the environment variable `prefix' instead of
13916         using pupa_dl_set_prefix to set the prefix.
13917         * kern/main.c: Include <pupa/env.h>.
13918         (pupa_set_root_dev): Use the environment variable `prefix' instead of
13919         using pupa_dl_get_prefix to get the prefix.
13920         * kern/misc.c: Include <pupa/env.h>.
13921         (pupa_isdigit): New function.
13922         (pupa_isgraph): Likewise.
13923         (pupa_ftoa): Likewise.
13924         (pupa_vsprintf): Added support for printing values of the type
13925         `double'.  Make it possible to format variable output when using
13926         formatting like `%1.2%f'.
13927         (pupa_split_cmdline): New function.
13928         * kern/rescue.c: Include <pupa/env.h>.
13929         (next_word): Removed function.
13930         (pupa_rescue_cmd_prefix): Likewise.
13931         (pupa_rescue_cmd_set): New function.
13932         (pupa_rescue_cmd_unset): New function.
13933         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
13934         split the command line instead of splitting it here.  Added
13935         support for setting variables using the syntax `foo=bar'.  Don't
13936         initialize the prefix command anymore.  Initialized the set and
13937         unset commands.
13938         * normal/cmdline.c: Include <pupa/env.h>.
13939         (pupa_tab_complete): Added prototypes for print_simple_completion,
13940         print_partition_completion, add_completion, iterate_commands,
13941         iterate_dev, iterate_part and iterate_dir. Moved code to print
13942         partition information from here to kern/disk.c.
13943         (pupa_cmdline_run): Don't check if the function exists anymore.
13944         * normal/main.c: Include <pupa/env.h>.
13945         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
13946         instead of using pupa_dl_get_prefix to get the prefix.
13947         * term/i386/pc/vga.c: Include <pupa/arg.h>.
13948         (check_vga_mem): Cast pointers to `void *' to silence a gcc
13949         warning.
13950         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
13951         (pupa_vga_setcolor): Declare unused variables with `__attribute__
13952         ((unused))' to silence a gcc warning.
13953         (pupa_vga_setcolor): Likewise.
13954         (debug_command): Changed to match argument parsing
13955         interface changes.
13956         * util/pupa-emu.c: Include <pupa/env.h>.
13957         (options): Added 0's for unused fields to silence a gcc warning.
13958         (argp): Likewise.
13959         (main): Use the environment variable `prefix' instead of using
13960         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
13961         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
13962         and terminal.
13964         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
13965         * util/misc.c: Include <malloc.h>.
13966         (pupa_malloc): Rewritten so errors are correctly reported.
13967         (pupa_realloc): Likewise.
13968         (pupa_memalign): Likewise.
13969         (pupa_mm_init_region): Declare unused variables with
13970         `__attribute__ ((unused))' to silence a gcc warning.
13971         * normal/i386/setjmp.S: Remove tab at the end of the file to
13972         silence a gcc warning.
13973         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
13974         variables with `__attribute__ ((unused))' to silence a gcc
13975         warning.
13976         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
13977         local variable i unsigned to silence a gcc warning.
13979         * kern/term.c: Include <pupa/misc.h>.
13980         (pupa_more_lines): New variable.
13981         (pupa_more): Likewise.
13982         (pupa_putcode): When the pager is active pause at the end of every
13983         screen.
13984         (pupa_set_more): New function.
13985         * include/pupa/term.h (pupa_set_more): New prototype.
13988 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
13990         Now this project is GRUB 2 rather than PUPA. The location of
13991         the CVS repository was moved to GRUB's.
13993         * configure.ac: Use bug-grub as the reporting address.
13994         Use GRUB instead of PUPA.
13995         Change the version number to 1.90.
13997 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
13999         * genkernsyms.sh: Updated copyright information.
14000         * genmk.rb: Likewise.
14001         * genmodsrc.sh: Likewise.
14002         * gensymlist.sh: Likewise.
14003         * boot/i386/pc/boot.S: Likewise.
14004         * boot/i386/pc/diskboot.S: Likewise.
14005         * disk/i386/pc/biosdisk.c: Likewise.
14006         * disk/i386/pc/partition.c: Likewise.
14007         * font/manager.c: Likewise.
14008         * fs/ext2.c: Likewise.
14009         * fs/fat.c: Likewise.
14010         * include/pupa/boot.h: Likewise.
14011         * include/pupa/device.h: Likewise.
14012         * include/pupa/disk.h: Likewise.
14013         * include/pupa/dl.h: Likewise.
14014         * include/pupa/elf.h: Likewise.
14015         * include/pupa/err.h: Likewise.
14016         * include/pupa/file.h: Likewise.
14017         * include/pupa/font.h: Likewise.
14018         * include/pupa/fs.h: Likewise.
14019         * include/pupa/kernel.h: Likewise.
14020         * include/pupa/loader.h: Likewise.
14021         * include/pupa/misc.h: Likewise.
14022         * include/pupa/mm.h: Likewise.
14023         * include/pupa/net.h: Likewise.
14024         * include/pupa/normal.h: Likewise.
14025         * include/pupa/rescue.h: Likewise.
14026         * include/pupa/setjmp.h: Likewise.
14027         * include/pupa/symbol.h: Likewise.
14028         * include/pupa/term.h: Likewise.
14029         * include/pupa/types.h: Likewise.
14030         * include/pupa/i386/setjmp.h: Likewise.
14031         * include/pupa/i386/types.h: Likewise.
14032         * include/pupa/i386/pc/biosdisk.h: Likewise.
14033         * include/pupa/i386/pc/boot.h: Likewise.
14034         * include/pupa/i386/pc/console.h: Likewise.
14035         * include/pupa/i386/pc/init.h: Likewise.
14036         * include/pupa/i386/pc/kernel.h: Likewise.
14037         * include/pupa/i386/pc/linux.h: Likewise.
14038         * include/pupa/i386/pc/loader.h: Likewise.
14039         * include/pupa/i386/pc/memory.h: Likewise.
14040         * include/pupa/i386/pc/multiboot.h: Likewise.
14041         * include/pupa/i386/pc/partition.h: Likewise.
14042         * include/pupa/i386/pc/time.h: Likewise.
14043         * include/pupa/i386/pc/vga.h: Likewise.
14044         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
14045         * include/pupa/util/getroot.h: Likewise.
14046         * include/pupa/util/misc.h: Likewise.
14047         * include/pupa/util/resolve.h: Likewise.
14048         * kern/device.c: Likewise.
14049         * kern/disk.c: Likewise.
14050         * kern/dl.c: Likewise.
14051         * kern/err.c: Likewise.
14052         * kern/file.c: Likewise.
14053         * kern/fs.c: Likewise.
14054         * kern/loader.c: Likewise.
14055         * kern/main.c: Likewise.
14056         * kern/misc.c: Likewise.
14057         * kern/mm.c: Likewise.
14058         * kern/rescue.c: Likewise.
14059         * kern/term.c: Likewise.
14060         * kern/i386/dl.c: Likewise.
14061         * kern/i386/pc/init.c: Likewise.
14062         * kern/i386/pc/lzo1x.S: Likewise.
14063         * kern/i386/pc/startup.S: Likewise.
14064         * loader/i386/pc/chainloader.c: Likewise.
14065         * loader/i386/pc/linux.c: Likewise.
14066         * loader/i386/pc/multiboot.c: Likewise.
14067         * normal/cmdline.c: Likewise.
14068         * normal/command.c: Likewise.
14069         * normal/main.c: Likewise.
14070         * normal/menu.c: Likewise.
14071         * normal/i386/setjmp.S: Likewise.
14072         * term/i386/pc/console.c: Likewise.
14073         * term/i386/pc/vga.c: Likewise.
14074         * util/console.c: Likewise.
14075         * util/genmoddep.c: Likewise.
14076         * util/misc.c: Likewise.
14077         * util/pupa-emu.c: Likewise.
14078         * util/resolve.c: Likewise.
14079         * util/unifont2pff.rb: Likewise.
14080         * util/i386/pc/biosdisk.c: Likewise.
14081         * util/i386/pc/getroot.c: Likewise.
14082         * util/i386/pc/pupa-mkimage.c: Likewise.
14083         * util/i386/pc/pupa-setup.c: Likewise.
14085 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
14087         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
14088         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
14089         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
14090         reading and reset it after reading.
14091         (pupa_ext2_close): Return PUPA_ERR_NONE.
14093         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
14094         Correct value.
14095         (struct linux_kernel_header): Add kernel_version and
14096         initrd_addr_max.
14097         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
14098         pupa_file_read succeeds.
14099         (pupa_rescue_cmd_initrd): Implement.
14101 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
14103         * fs/ext2.c (pupa_ext2_label): New function.
14104         (pupa_ext2_fs): Added label.
14105         * fs/fat.c (pupa_fat_label): New function.
14106         (pupa_fat_fs): Added label.
14107         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
14109         * kern/misc.c (pupa_strndup): New function.
14110         * include/pupa/misc.h (pupa_strndup): New prototype.
14112         * include/pupa/normal.h: Include <pupa/err.h>.
14113         (pupa_set_history): New prototype.
14114         (pupa_iterate_commands): New prototype.
14115         * normal/cmdline.c: Include <pupa/machine/partition.h>,
14116         <pupa/disk.h>, <pupa/file.h>.
14117         (hist_size): New variable.
14118         (hist_lines): Likewise.
14119         (hist_end): Likewise.
14120         (hist_used): Likewise.
14121         (pupa_set_history): New function.
14122         (pupa_history_get): Likewise.
14123         (pupa_history_add): Likewise.
14124         (pupa_history_replace): Likewise.
14125         (pupa_tab_complete): Likewise.
14126         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
14127         completion shows partitionnames while completing partitions, this
14128         feature was suggested by Jeff Bailey.
14129         * normal/command.c (pupa_iterate_commands): New function.
14130         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
14131         (pupa_normal_init): Initialize history buffer.
14132         (PUPA_MOD_INIT): Likewise.
14133         (pupa_normal_fini): Free the history buffer.
14134         (PUPA_MOD_FINI): Likewise.
14136         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
14137         key.
14139         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
14140         * configure.ac [i386]: Check for regparam bug.
14141         (NESTED_FUNC_ATTR) [! i386]: Defined.
14143 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
14145         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
14146         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
14147         (pupa_emu_SOURCES): New variable.
14148         (pupa_emu_LDFLAGS): Likewise.
14149         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
14150         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
14151         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
14152         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14153         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
14154         (pupa_jmp_buf): New typedef.
14155         (pupa_setjmp) [PUPA_UTIL]: New macro.
14156         (pupa_longjmp) [PUPA_UTIL]: Likewise.
14157         * include/pupa/term.h (struct pupa_term): New member `refresh'.
14158         (pupa_refresh): New prototype.
14159         * include/pupa/util/getroot.h: New file.
14160         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
14161         it.
14162         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
14163         (pupa_rescue_cmd_cat): Likewise.
14164         (pupa_rescue_cmd_ls): Likewise.
14165         (pupa_rescue_cmd_testload): Likewise.
14166         (pupa_rescue_cmd_lsmod): Likewise.
14167         * normal/cmdline.c (pupa_cmdline_get): Likewise.
14168         * normal/menu.c (run_menu): Likewise.
14169         * kern/term.c (pupa_cls): Likewise.
14170         (pupa_refresh): New function.
14171         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
14172         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14173         * util/console.c: New file.
14175         * util/i386/pc/getroot.c: New file.
14176         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
14177         (pupa_putchar): New function.
14178         (pupa_refresh): Likewise.
14179         (xgetcwd): Function moved to ...
14180         (strip_extra_slashes): Likewise.
14181         (get_prefix): Likewise.
14182         * util/i386/pc/getroot.c: ... here.
14183         (find_root_device): Function moved and renamed to...
14184         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
14185         Changed all callers.
14186         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
14187         and renamed to...
14188         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
14189         Changed all callers.
14190         * util/misc.c (pupa_memalign): New function.
14191         (pupa_mm_init_region): Likewise.
14192         (pupa_register_exported_symbols): Likewise.
14193         (pupa_putchar): Function removed.
14194         * util/pupa-emu.c: New file.
14196 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
14198         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
14199         (_multiboot_mod_SOURCES): New variable.
14200         (_multiboot_mod_CFLAGS): Likewise.
14201         * loader/i386/pc/multiboot.c: New file.
14202         * include/pupa/i386/pc/multiboot.h: Likewise.
14203         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
14204         (pupa_multiboot_real_boot): New function.
14205         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
14206         (pupa_multiboot_real_boot): New prototype.
14207         (pupa_rescue_cmd_multiboot): Likewise
14208         (pupa_rescue_cmd_module): Likewise.
14210         * kern/loader.c (pupa_loader_set): Continue when
14211         pupa_loader_unload_func() fails.
14212         (pupa_loader_unset): New function.
14213         * include/pupa/loader.h (pupa_loader_unset): New prototype.
14215         * kern/misc.c (pupa_stpcpy): New function.
14216         * include/pupa/misc.h (pupa_stpcpy): New prototype.
14218 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
14220         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
14221         for available extensions.
14223         * include/pupa/i386/pc/time.h: New file.
14224         * kern/disk.c: Include <pupa/machine/time.h>.
14225         (PUPA_CACHE_TIMEOUT): New macro.
14226         (pupa_last_time): New variable.
14227         (pupa_disk_open): Flush the cache when there was a timeout.
14228         (pupa_disk_close): Reset the timer.
14229         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
14230         pupa_currticks.
14231         * util/misc.c: Include <sys/times.h>
14232         (pupa_get_rtc): New function.
14234 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
14236         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
14237         as blocks.
14238         (pupa_ext2_get_file_block): Use blocks member.
14240         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
14241         first block. Return -1 instead of pupa_errno on error.
14243 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
14245         * README: In the pupa-mkimage example use _chain instead of chain
14246         and ext2 instead of fat.
14247         * TODO: Replace ext2fs with jfs as an example.  Add an item for
14248         adding journal playback for ext2fs.
14249         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
14250         (pkgdata_MODULES): Added ext2.mod.
14251         (ext2_mod_SOURCES): New variable.
14252         (ext2_mod_CFLAGS): Likewise.
14253         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
14254         * include/pupa/misc.h (pupa_strncpy): New prototype.
14255         (pupa_strcat): Likewise.
14256         (pupa_strncmp): Likewise.
14257         * kern/misc.c (pupa_strcat): Enable function.
14258         (pupa_strncpy): New function.
14259         (pupa_strncmp): Likewise.
14260         * fs/ext2.c: New file.
14262         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
14263         when the read failed before retrying.
14264         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
14265         (_FILE_OFFSET_BITS): Likewise.
14266         * configure.ac: Added AC_SYS_LARGEFILE.
14268 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
14270         * genmk.rb (PModule#rule): Make sure to get only symbol names
14271         from the output of nm.
14272         Reported by Robert Millan <zeratul2@wanadoo.es>.
14274 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
14276         I forgot to check in these changes for a long time. This adds
14277         incomplete support for VGA console, and this is still very
14278         buggy. Also, a lot of consideration is required for I18N,
14279         UNICODE, and VGA font issues. Therefore, assume that this is
14280         such that "better than nothing".
14282         * font/manager.c: New file.
14283         * include/pupa/font.h: Likewise.
14284         * include/pupa/i386/pc/vga.h: Likewise.
14285         * term/i386/pc/vga.c: Likewise.
14286         * util/unifont2pff.rb: Likewise.
14288         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
14289         (pkgdata_MODULES): Added vga.mod and font.mod.
14290         (vga_mod_SOURCES): New variables.
14291         (vga_mod_CFLAGS): Likewise.
14292         (font_mod_SOURCES): Likewise.
14293         (font_mod_CFLAGS): Likewise.
14295         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
14297         * include/pupa/term.h: Include pupa/err.h.
14298         (struct pupa_term): Added init and fini.
14299         Changed the argument of putchar to pupa_uint32_t.
14301         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
14302         (pupa_console_real_putchar): New prototype.
14303         (pupa_console_putchar): Removed.
14304         (pupa_console_checkkey): Exported.
14305         (pupa_console_getkey): Likewise.
14307         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
14308         characters.
14310         * kern/term.c (pupa_term_set_current): Rewritten.
14311         (pupa_putchar): Likewise.
14312         (pupa_putcode): New function.
14314         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
14315         (pupa_console_real_putchar): ... this.
14316         (pupa_vga_set_mode): New function.
14317         (pupa_vga_get_font): Likewise.
14319         * normal/command.c: Include pupa/term.h.
14320         (terminal_command): New function.
14321         (pupa_command_init): Register the command "terminal".
14323         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
14324         (DISP_UP): Likewise.
14325         (DISP_RIGHT): Likewise.
14326         (DISP_DOWN): Likewise.
14327         (DISP_HLINE): Likewise.
14328         (DISP_VLINE): Likewise.
14329         (DISP_UL): Likewise.
14330         (DISP_UR): Likewise.
14331         (DISP_LL): Likewise.
14332         (DISP_LR): Likewise.
14334         * term/i386/pc/console.c (pupa_console_putchar): New function.
14336 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
14338         * util/resolve.c (pupa_util_resolve_dependencies): BUG
14339         FIX. Reverse the path_list.
14341         * include/pupa/normal.h: Export pupa_register_command and
14342         pupa_unregister_command.
14344         * hello/hello.c (pupa_cmd_hello): New module.
14345         * conf/i386-pc.rmk: Added hello.mod.
14347 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
14349         * kern/i386/pc/lzo1x.S: New file.
14351         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
14352         (compress_kernel): New variable.
14353         (generate_image): Heavily modified to support compressing a
14354         large part of the core image.
14356         * util/misc.c (pupa_util_read_image): Fix a file descriptor
14357         leak.
14358         (pupa_util_load_image): New function.
14360         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
14361         (pupa_compressed_size): New variable.
14362         (codestart): Enable Gate A20 here.
14363         Decompress the compressed part of the core image.
14364         Rearrange the code to put functions and variables which are
14365         required for initialization in the non-compressed part.
14366         Include lzo1x.S.
14368         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
14369         here.
14371         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
14373         * include/pupa/i386/pc/kernel.h
14374         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
14375         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
14376         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14377         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14378         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
14380         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
14382         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
14383         (Utility#rule): Likewise.
14385         * configure.ac: Check if LZO is available.
14387 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
14389         * include/pupa/normal.h: New file.
14390         * include/pupa/setjmp.h: Likewise.
14391         * include/pupa/i386/setjmp.h: Likewise.
14392         * normal/cmdline.c: Likewise.
14393         * normal/command.c: Likewise.
14394         * normal/main.c: Likewise.
14395         * normal/menu.c: Likewise.
14396         * normal/i386/setjmp.S: Likewise.
14398         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
14399         (pupa_rescue_cmd_initrd): Likewise.
14401         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
14402         Likewise.
14404         * kern/i386/pc/startup.S (translation_table): New variable.
14405         (translate_keycode): New function.
14406         (pupa_console_getkey): Call translate_keycode.
14408         * kern/rescue.c (attempt_normal_mode): New function.
14409         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
14410         it failed, print a message.
14412         * kern/mm.c (pupa_real_malloc): Print more information when a
14413         free magic is broken.
14414         (pupa_free): If the first free header is not free actually, set
14415         it to P.
14417         * kern/main.c (pupa_load_normal_mode): Just load the module
14418         "normal".
14419         (pupa_main): Don't print the message
14420         "Entering into rescue mode..." here.
14422         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
14423         Declared.
14424         (pupa_rescue_cmd_initrd): Likewise.
14425         (pupa_rescue_cmd_initrd): Likewise.
14427         * include/pupa/symbol.h (FUNCTION): Specify the type.
14428         (VARIABLE): Likewise.
14430         * include/pupa/err.h (pupa_err_t): Added
14431         PUPA_ERR_UNKNOWN_COMMAND.
14433         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
14434         (pupa_dl_get_prefix): Likewise.
14436         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
14437         Added _chain.mod and _linux.mod instead of chain.mod and
14438         linux.mod.
14439         (chain_mod_SOURCES): Renamed to ...
14440         (_chain_mod_SOURCES): ... this.
14441         (chain_mod_CFLAGS): Renamed to ...
14442         (_chain_mod_CFLAGS): ... this.
14443         (linux_mod_SOURCES): Renamed to ...
14444         (_linux_mod_SOURCES): ... this.
14445         (linux_mod_CFLAGS): Renamed to ...
14446         (_linux_mod_CFLAGS): ... this.
14447         (normal_mod_SOURCES): New variable.
14448         (normal_mod_CFLAGS): Likewise.
14449         (normal_mod_ASFLAGS): Likewise.
14451 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
14453         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
14454         possible.
14456         * kern/dl.c (pupa_dl_ref): Refer depending modules
14457         recursively.
14458         (pupa_dl_unref): Unrefer depending modules recursively.
14459         Don't call pupa_dl_unload implicitly, because PUPA can crash if
14460         a module is unloaded before one depending on that module is
14461         unloaded.
14462         (pupa_dl_unload): Unload depending modules explicitly,
14463         if possible.
14465 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
14467         * include/pupa/i386/pc/linux.h: New file.
14468         * loader/i386/pc/linux.c: Likewise.
14470         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
14471         Removed.
14472         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
14473         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
14474         of PUPA_CHAINLOADER_BOOT_SECTOR.
14476         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
14477         (pupa_linux_prot_size): New variable.
14478         (pupa_linux_tmp_addr): Likewise.
14479         (pupa_linux_real_addr): Likewise.
14480         (pupa_linux_boot_zimage): New function.
14481         (pupa_linux_boot_bzimage): Likewise.
14483         * kern/i386/pc/init.c (struct mem_region): New structure.
14484         (MAX_REGIONS): New macro.
14485         (mem_regions): New variable.
14486         (num_regions): Likewise.
14487         (pupa_os_area_addr): Likewise.
14488         (pupa_os_area_size): Likewise.
14489         (pupa_lower_mem): Likewise.
14490         (pupa_upper_mem): Likewise.
14491         (add_mem_region): New function.
14492         (compact_mem_regions): Likewise.
14493         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
14494         the size of the conventional memory and that of so-called upper
14495         memory (before the first memory hole).
14496         Instead of adding each found region to free memory, use
14497         add_mem_region and add them after removing overlaps.
14498         Also, add only 1/4 of the upper memory to free memory. The rest
14499         is used for loading OS images. Maybe this is ad hoc, but this
14500         makes it much easier to relocate OS images when booting.
14502         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
14503         (pupa_enter_rescue_mode): Don't register initrd and module.
14505         * kern/mm.c: Include pupa/dl.h.
14507         * kern/main.c: Include pupa/file.h and pupa/device.h.
14509         * kern/loader.c (pupa_loader_load_module_func): Removed.
14510         (pupa_loader_load_module): Likewise.
14512         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
14513         ``.o''.
14515         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
14516         (pupa_linux_tmp_addr): Likewise.
14517         (pupa_linux_real_addr): Likewise.
14518         (pupa_linux_boot_zimage): Likewise.
14519         (pupa_linux_boot_bzimage): Likewise.
14521         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
14522         (pupa_upper_mem): Likewise.
14523         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
14524         module is too dangerous.
14526         * include/pupa/loader.h (pupa_os_area_addr): Declared.
14527         (pupa_os_area_size): Likewise.
14528         (pupa_loader_set): Remove the first argument. Loader doesn't
14529         manage modules or initrd any longer.
14530         (pupa_loader_load_module): Removed.
14532         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
14533         (linux_mod_SOURCES): New variable.
14534         (linux_mod_CFLAGS): Likewise.
14536 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
14538         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
14539         the length of a blocklist correctly.
14541         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
14542         Use ioctl only if the OS file is a block device.
14543         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
14544         not very useful for normal files.
14546         * kern/main.c (pupa_set_root_dev): New function.
14547         (pupa_load_normal_mode): Likewise.
14548         (pupa_main): Call those above.
14550         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
14551         pupa_uint16_t.
14553         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
14555 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
14557         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
14558         (setup): Configure the installed partition information and the
14559         dl prefix.
14561         * loader/i386/pc/chainloader.c (my_mod): New variable.
14562         (pupa_chainloader_unload): New function.
14563         (pupa_rescue_cmd_chainloader): Refer itself.
14564         (PUPA_MOD_INIT): Save its own module in MY_MOD.
14566         * kern/i386/pc/startup.S (install_partition): Removed.
14567         (version_string): Likewise.
14568         (config_file): Likewise.
14569         (pupa_install_dos_part): New variable.
14570         (pupa_install_bsd_part): Likewise.
14571         (pupa_prefix): Likewise.
14572         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
14574         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
14575         and pupa/misc.h.
14576         (make_install_device): New function.
14577         (pupa_machine_init): Set the dl prefix.
14579         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
14580         (buf): Renamed to ...
14581         (linebuf): ... this.
14582         (pupa_rescue_cmd_prefix): New function.
14583         (pupa_rescue_cmd_insmod): Likewise.
14584         (pupa_rescue_cmd_rmmod): Likewise.
14585         (pupa_rescue_cmd_lsmod): Likewise.
14586         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
14587         rmmod and lsmod.
14589         * kern/mm.c (pupa_memalign): If failed even after invalidating
14590         disk caches, unload unneeded modules and retry.
14592         * kern/misc.c (pupa_memmove): New function.
14593         (pupa_memcpy): Removed.
14594         (pupa_strcpy): New function.
14595         (pupa_itoa): Made static.
14597         * kern/dl.c (pupa_dl_iterate): New function.
14598         (pupa_dl_ref): Likewise.
14599         (pupa_dl_unref): Likewise.
14600         (pupa_dl_unload): Return if succeeded or not.
14601         (pupa_dl_unload_unneeded): New function.
14602         (pupa_dl_unload_all): Likewise.
14603         (pupa_dl_init): Renamed to ...
14604         (pupa_dl_set_prefix): ... this.
14605         (pupa_dl_get_prefix): New function.
14607         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
14608         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
14609         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14610         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14611         (pupa_install_dos_part): Declared.
14612         (pupa_install_bsd_part): Likewise.
14613         (pupa_prefix): Likewise.
14614         (pupa_boot_drive): Likewise.
14616         * include/pupa/types.h: Fix a typo.
14618         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
14619         pupa_memmove.
14620         (pupa_memmove): Declared.
14621         (pupa_strcpy): Likewise.
14623         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
14624         pupa_mod_init takes one argument, its own module.
14625         (pupa_dl_unload_unneeded): Declared.
14626         (pupa_dl_unload_all): Likewise.
14627         (pupa_dl_ref): Likewise.
14628         (pupa_dl_unref): Likewise.
14629         (pupa_dl_iterate): Likewise.
14630         (pupa_dl_init): Renamed to ...
14631         (pupa_dl_set_prefix): ... this.
14632         (pupa_dl_get_prefix): Declared.
14634         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
14635         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
14636         unloaded.
14637         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
14638         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
14640         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
14641         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
14643 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
14645         * util/i386/pc/pupa-setup.c (setup): Define the internal
14646         function find_first_partition_start at the top level, because GCC
14647         3.0.x cannot compile internal functions in deeper scopes
14648         correctly.
14649         (find_root_device): Use lstat instead of stat.
14650         Don't follow symbolic links.
14651         Fix the path-constructing code.
14653         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
14654         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
14655         by a BLKGETSIZE ioctl first, because block devices don't fill
14656         the member st_mode of the structure stat on Linux.
14657         [__linux__] (linux_find_partition): Use a temporary buffer
14658         REAL_DEV for the working space. Copy it to DEV before returning.
14659         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
14660         buffer cache consistent.
14661         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
14662         strncmp. The previous value was merely wrong.
14663         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
14665         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
14666         FAT size is 12. The previous value was merely wrong.
14668         * kern/main.c (pupa_main): Don't split the starting message from
14669         newlines.
14671         * kern/term.c (pupa_putchar): Put CR after LF instead of before
14672         LF, because BIOS goes crazy about character attributes in this
14673         case.
14675 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
14677         * include/i386/pc/util/biosdisk.h: New file.
14678         * util/i386/pc/biosdisk.c: Likewise.
14679         * util/i386/pc/pupa-setup.c: Likewise.
14681         * Makefile.in (INCLUDE_DISTFILES): Added
14682         include/pupa/i386/pc/util/biosdisk.h.
14683         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
14684         directory util/i386/pc.
14685         (install-local): Added a rule for sbin_UTILITIES.
14686         (uninstall): Likewise.
14688         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
14690         * util/misc.c (xrealloc): New function.
14691         (pupa_malloc): Likewise.
14692         (pupa_free): Likewise.
14693         (pupa_realloc): Likewise.
14694         (pupa_stop): Likewise.
14695         (pupa_putchar): Likewise.
14697         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
14699         * include/pupa/util/misc.h (xrealloc): Declared.
14701         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
14702         macro.
14703         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
14704         (PUPA_BOOT_MACHINE_BPB_END): ... this.
14706         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
14707         [PUPA_UTIL] (pupa_fat_fini): Likewise.
14709         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
14710         way should be implemented.
14711         [PUPA_UTIL] (pupa_fat_fini): Likewise.
14713         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
14714         the size of NAME for safety.
14715         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
14716         0x88.
14718         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
14719         (pupa_setup_SOURCES): Likewise.
14721         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
14723 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
14725         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
14726         bunch of pushl's from pusha, because this destroys the return
14727         value.
14729 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
14731         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
14732         This means that any missing prototypes could be fatal. Also, you
14733         must take care when writing assembly code. See the comments at
14734         the beginning of startup.S, for more details.
14736         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
14737         compilation mechanism.
14738         (pupa_chainloader_real_boot): Likewise.
14739         (pupa_biosdisk_rw_int13_extensions): Likewise.
14740         (pupa_biosdisk_rw_standard): Likewise.
14741         (pupa_biosdisk_check_int13_extensions): Likewise.
14742         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
14743         (pupa_biosdisk_get_diskinfo_standard): Likewise.
14744         (pupa_get_memsize): Likewise.
14745         (pupa_get_mmap_entry): Likewise.
14746         (pupa_console_putchar): Likewise.
14747         (pupa_console_setcursor): Likewise.
14748         (pupa_getrtsecs): Use pushl instead of push.
14750         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
14751         memory instead of the stack for a mmap entry, because some
14752         BIOSes may ignore the maximum size and overflow.
14754         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
14756         * genmk.rb (PModule#rule): Compile automatically generated
14757         sources with module-specific CFLAGS as well as other sources.
14759 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
14761         * configure.ac: Check ld.
14762         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
14763         respectively, before checking endianness and sizes.
14765         * Makefile.in (LD): New variable.
14767 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
14769         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
14771 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
14773         * Changelog: New file.