2009-03-08 Robert Millan <rmh@aybabtu.com>
[grub2/phcoder.git] / ChangeLog
blob150e6d526a45fdb58f8184b4821a7f895b37d59c
1 2009-03-08  Robert Millan  <rmh@aybabtu.com>
3         Make loader/i386/linux.c usable on i386-pc again.
5         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
6         memory to heap.
7         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
8         `#error' stanza.
10 2009-03-07  Bean  <bean123ch@gmail.com>
12         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
13         allocation.
15 2009-03-06  Robert Millan  <rmh@aybabtu.com>
17         Fix display issue on terminals with screen size other than 80x25
18         (e.g. gfxterm with resolution higher than 640x480).
20         * normal/main.c (grub_normal_init_page): Display title text in a
21         position relative to the center of the terminal instead of reliing
22         on a hardcoded offset.
24 2009-03-04  Robert Millan  <rmh@aybabtu.com>
26         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
27         installed.
29         * Makefile.in (host_kernel): New variable.
30         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
31         scripts instead of just the windows one.
32         * configure.ac: Initialize and AC_SUBST `host_kernel'.
34 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
36         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
37         `kern/handler.c'.
38         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
39         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
40         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
41         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
42         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
43         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
45 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
47         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
48         or if there's no space for the disk label and print the partition number on a
49         invalid magic.
51 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
53         * util/misc.c: Include <time.h>.
54         (grub_millisleep): New function.
56 2009-03-04  Bean  <bean123ch@gmail.com>
58         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
59         another option -mno-red-zone.
61         * commands/handler.c: Change module description.
63         * kern/handler.c: Add missing space at the end of description line.
65         * kern/list.c: Likewise.
67 2009-03-03  Robert Millan  <rmh@aybabtu.com>
69         Move more components to the relocation area, and fix mbi pointer
70         handling to use the destination rather than the origin (thanks to
71         Vladimir Serbinenko for spotting).
73         * loader/i386/multiboot.c (mbi_dest): New variable.
74         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
75         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
76         relocation area.
78 2009-03-01  Bean  <bean123ch@gmail.com>
80         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
81         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
82         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
83         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
85         * loader/i386/efi/linux.c (acpi_guid): New variable.
86         (acpi_guid): Likewise.
87         (EBDA_SEG_ADDR): New constant.
88         (LOW_MEM_ADDR): Likewise.
89         (FAKE_EBDA_SEG): Likewise.
90         (fake_bios_data): New function.
91         (grub_linux_boot): Call fake_bios_data.
93 2009-03-01  Bean  <bean123ch@gmail.com>
95         * commands/terminal.c: Removed.
97         * commands/handler.c: New file.
99         * include/grub/list.h: Likewise.
101         * include/grub/handler.h: Likewise.
103         * kern/list.c: Likewise.
105         * kern/handler.c: Likewise.
107         * kern/term.h: Include header file <grub/handler.h>.
108         (grub_term_input): Move next field to the beginning.
109         (grub_term_output): Likewise.
110         (grub_term_input_class): New variable.
111         (grub_term_output_class): Likewise.
112         (grub_term_register_input): Changed to inline function.
113         (grub_term_register_output): Likewise.
114         (grub_term_unregister_input): Likewise.
115         (grub_term_unregister_output): Likewise.
116         (grub_term_set_current_input): Likewise.
117         (grub_term_set_current_output): Likewise.
118         (grub_term_get_current_input): Likewise.
119         (grub_term_get_current_output): Likewise.
120         (grub_term_iterate_input): Removed.
121         (grub_term_iterate_output): Likewise.
123         * kern/term.c (grub_term_list_input): Removed.
124         (grub_term_list_output): Likewise.
125         (grub_term_input_class): New variable.
126         (grub_term_output_class): Likewise.
127         (grub_cur_term_input): Change variable as macro.
128         (grub_cur_term_output): Likewise.
129         (grub_term_register_input): Removed.
130         (grub_term_register_output): Likewise.
131         (grub_term_unregister_input): Likewise.
132         (grub_term_unregister_output): Likewise.
133         (grub_term_set_current_input): Likewise.
134         (grub_term_set_current_output): Likewise.
135         (grub_term_iterate_input): Likewise.
136         (grub_term_iterate_output): Likewise.
137         (grub_term_get_current_input): Likewise.
138         (grub_term_get_current_output): Likewise.
140         * util/grub-editenv.c: Include header file <grub/handler.h>.
141         (grub_term_get_current_input): Removed.
142         (grub_term_get_current_output): Likewise.
143         (grub_term_input_class): New variable.
144         (grub_term_output_class): Likewise.
146         * util/grub-fstest.c (grub_term_get_current_input): Removed.
147         (grub_term_get_current_output): Likewise.
148         (grub_term_input_class): New variable.
149         (grub_term_output_class): Likewise.
151         * util/grub-probe.c (grub_term_get_current_input): Removed.
152         (grub_term_get_current_output): Likewise.
153         (grub_term_input_class): New variable.
154         (grub_term_output_class): Likewise.
156         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
157         (grub_term_get_current_output): Likewise.
158         (grub_term_input_class): New variable.
159         (grub_term_output_class): Likewise.
161         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
162         (terminal_mod_SOURCES): Likewise.
163         (terminal_mod_CFLAGS): Likewise.
164         (terminal_mod_LDFLAGS): Likewise.
166         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
167         handler.c.
168         (kernel_img_SOURCES): Add list.c and handler.c.
169         (kernel_img_HEADERS): Add list.h and handler.h.
171         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
172         handler.c.
173         (kernel_mod_SOURCES): Add list.c and handler.c.
174         (kernel_mod_HEADERS): Add list.h and handler.h.
176         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
177         handler.c.
178         (kernel_elf_SOURCES): Add list.c and handler.c.
179         (kernel_elf_HEADERS): Add list.h and handler.h.
181         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
182         handler.c.
183         (kernel_elf_SOURCES): Add list.c and handler.c.
184         (kernel_elf_HEADERS): Add list.h and handler.h.
186         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
187         handler.c.
188         (kernel_mod_SOURCES): Add list.c and handler.c.
189         (kernel_mod_HEADERS): Add list.h and handler.h.
191         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
192         handler.c.
193         (kernel_elf_SOURCES): Add list.c and handler.c.
194         (kernel_elf_HEADERS): Add list.h and handler.h.
196 2009-02-27  Robert Millan  <rmh@aybabtu.com>
198         Factorize elf32 / elf64 code in Multiboot loader.  This will
199         prevent it from getting out of sync again.
201         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
202         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
203         grub_multiboot_load_elf64): Move from here ...
204         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
205         grub_multiboot_load_elf): ... to here (new file).
207 2009-02-27  Robert Millan  <rmh@aybabtu.com>
209         * util/grub.d/10_linux.in: Rename "single-user mode" to
210         "recovery mode".
212 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
214         Don't leak in SCSI code.
215         * disk/scsi.c (grub_scsi_close): free `scsi'.
217 2009-02-27  Robert Millan  <rmh@aybabtu.com>
219         * loader/i386/pc/multiboot.c: Move from here ...
220         * loader/i386/multiboot.c: ... to here.  Update all users.
222 2009-02-27  Robert Millan  <rmh@aybabtu.com>
224         Patch from Alexandre Bique <bique.alexandre@gmail.com>
225         * util/i386/pc/grub-setup.c (setup): Fix directory path.
227 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
229         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
230         b-tree.
232 2009-02-27  Robert Millan  <rmh@aybabtu.com>
234         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
235         `0x' qualifier as 0 when base is specified as parameter).
237 2009-02-24  Bean  <bean123ch@gmail.com>
239         * configure.ac: Check for -mcmodel=large in x86_64 target.
241         * include/grub/efi/api.h (efi_call_10): New macro.
242         (efi_wrap_10): New function.
244         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
245         (GRUB_PE32_REL_BASED_HIGH): Likewise.
246         (GRUB_PE32_REL_BASED_LOW): Likewise.
247         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
248         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
249         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
250         (GRUB_PE32_REL_BASED_SECTION): Likewise.
251         (GRUB_PE32_REL_BASED_REL): Likewise.
252         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
253         (GRUB_PE32_REL_BASED_DIR64): Likewise.
254         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
256         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
257         issue.
259         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
260         (efi_wrap_10): New function.
262         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
264         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
265         MB/MBP model (NV chipset).
266         (devdata_devs): Add devpath_5 to the list.
268         * load/i386/efi/linux.c (video_base): Remove variable.
269         (RGB_MASK): New macro.
270         (RGB_MAGIC): Likewise.
271         (LINE_MIN): Likewise.
272         (LINE_MAX): Likewise.
273         (FBTEST_STEP): Likewise.
274         (FBTEST_COUNT): Likewise.
275         (fb_list): New variable.
276         (grub_find_video_card): Remove function.
277         (find_framebuf): New function.
278         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
279         line length.
281         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
282         problem for x86_64.
284 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
286         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
288         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
289         coding tool name.
291 2009-02-22  Robert Millan  <rmh@aybabtu.com>
293         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
294         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
295         in our relocation, instead of using it directly from heap.  Also
296         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
298 2009-02-21  Robert Millan  <rmh@aybabtu.com>
300         Implement USB keyboard support (based on patch by Marco Gerards)
302         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
303         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
304         (usb_keyboard_mod_LDFLAGS): New variables.
306         * term/usb_keyboard.c: New file.
308 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
310         Corrected wrong declaration
312         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
314 2009-02-14  Christian Franke  <franke@computer.org>
316         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
317         (grub_lspci_iter): Print class code and programming interface byte.
319 2009-02-14  Christian Franke  <franke@computer.org>
321         * gendistlist.sh: Ignore `.svn' directories.
323 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
325         * fs/fat.c: Add 2009 to Copyright line.
327 2009-02-14  Christian Franke  <franke@computer.org>
329         * commands/hdparm.c: New file.  Provides `hdparm' command
330         which sends ATA commands via grub_disk_ata_pass_through ().
332         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
334         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
335         and <grub/cpu/io.h> to include/grub/ata.h.
336         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
337         (GRUB_CDROM_SECTOR_SIZE): Remove.
338         (GRUB_ATA_*): Move to include/grub/ata.h.
339         (GRUB_ATAPI_*): Likewise.
340         (enum grub_ata_commands): Likewise.
341         (enum grub_ata_timeout_milliseconds): Likewise.
342         (struct grub_ata_device): Likewise.
343         (grub_ata_regset): Likewise.
344         (grub_ata_regget): Likewise.
345         (grub_ata_regset2): Likewise.
346         (grub_ata_regget2): Likewise.
347         (grub_ata_check_ready): Likewise.
348         (grub_ata_wait_not_busy): Remove static, exported in
349         include/grub/ata.h.
350         (grub_ata_wait_drq): Likewise.
351         (grub_ata_pio_read): Likewise.
353         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
354         function for hdparm.mod.
356         * include/grub/ata.h: New file, contains declarations from
357         disk/ata.c.
358         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
360         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
361         (grub_disk_ata_pass_through): New exported variable.
363         * kern/disk.c (grub_disk_ata_pass_through): New variable.
365 2009-02-13  Colin D Bennett  <colin@gibibit.com>
367         Support multiple fallback entries, and provide an API to support
368         executing default+fallback menu entries.  Renamed the `terminal' menu
369         viewer to `text'.
371         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
372         variable declaration.
373         (grub_menu_execute_callback): New structure declaration.
374         (grub_menu_execute_callback_t): New typedef.
375         (grub_menu_execute_with_fallback): New function declaration.
376         (grub_menu_get_entry): Likewise.
377         (grub_menu_get_timeout): Likewise.
378         (grub_menu_set_timeout): Likewise.
380         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
382         * normal/menu.c (grub_wait_after_message): Moved to
383         `normal/menu_text.c'.
384         (draw_border): Likewise.
385         (print_message): Likewise.
386         (print_entry): Likewise.
387         (print_entries): Likewise.
388         (grub_menu_init_page): Likewise.
389         (get_entry_number): Likewise.
390         (print_timeout): Likewise.
391         (run_menu): Likewise.
392         (grub_menu_execute_entry): Likewise.
393         (show_text_menu): Likewise.
394         (get_and_remove_first_entry_number): New function.
395         (grub_menu_execute_with_fallback): Likewise.
396         (get_entry): Renamed to ...
397         (grub_menu_get_entry): .. this and made it global.
398         (get_timeout): Renamed to ...
399         (grub_menu_get_timeout): ... this and made it global.
400         (set_timeout): Renamed to ...
401         (grub_menu_set_timeout): ... this and made it global.
402         (grub_normal_terminal_menu_viewer): Renamed to ...
403         (grub_normal_text_menu_viewer): ... this.
405         * normal/menu_text.c: New file.  Extracted text-menu-specific code
406         from normal/menu.c.
408         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
409         (normal_mod_SOURCES): Likewise.
411         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
412         (normal_mod_SOURCES): Likewise.
414         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
415         (normal_mod_SOURCES): Likewise.
417         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
418         (normal_mod_SOURCES): Likewise.
420         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
421         (normal_mod_SOURCES): Likewise.
423         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
424         (normal_mod_SOURCES): Likewise.
426         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
427         (normal_mod_SOURCES): Likewise.
429 2009-02-11  Robert Millan  <rmh@aybabtu.com>
431         * util/grub.d/00_header.in: Update old reference to `font' command.
433 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
435         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
437         Based on patch from Javier Martín.
439 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
441         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
442         to avoid false positives with FAT.
443         (grub_fstest_SOURCES): Likewise.
444         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
445         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
446         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
447         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
448         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
449         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
451 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
453         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
454         bpb.version_specific.fat12_or_fat16.fstype and
455         bpb.version_specific.fat32.fstype.
457 2009-02-08  Robert Millan  <rmh@aybabtu.com>
459         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
461 2009-02-08  Robert Millan  <rmh@aybabtu.com>
463         * Makefile.in (host_os, host_cpu): New variables.
464         (target_os): Remove.  Update all users.
466 2009-02-08  Marco Gerards  <marco@gnu.org>
468         * Makefile.in (enable_grub_emu_usb): New variable.
469         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
470         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
471         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
472         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
473         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
474         `usbtest.mod' and `usbms.mod'.
475         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
476         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
477         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
478         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
479         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
480         variables.
482         * disk/usbms.c: New file.
484         * include/grub/usb.h: Likewise.
486         * include/grub/usbtrans.h: Likewise.
488         * include/grub/usbdesc.h: Likewise.
490         * bus/usb/usbtrans.c: Likewise.
492         * bus/usb/ohci.c: Likewise.
494         * bus/usb/uhci.c: Likewise.
496         * bus/usb/usbhub.c: Likewise.
498         * bus/usb/usb.c: Likewise.
500         * commands/usbtest.c: Likewise.
502         * util/usb.c: Likewise.
504         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
506         * configure.ac: Test for libusb presence.
508         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
510 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
512         * kern/mm.c: Add more comments.
514 2009-02-08  Robert Millan  <rmh@aybabtu.com>
516         Patch from Javier Martín.
517         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
518         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
520 2009-02-08  Robert Millan  <rmh@aybabtu.com>
522         * fs/cpio.c: Split tar functionality to ...
523         * fs/tar.c: ... here (new file).  Update all users.
525 2009-02-07  Robert Millan  <rmh@aybabtu.com>
527         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
528         backward-incompatible features.
530         Based on patch from Javier Martín, with some adjustments.
532 2009-02-07  Michael Scherer  <misc@mandriva.org>
534         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
536 2009-02-07  Robert Millan  <rmh@aybabtu.com>
538         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
539         position of `disk/lvm.c' to ensure grub_init_all() always picks it
540         after the RAID stuff.
542 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
544         Fixes problem when running vbetest command as reported by
545         Vladimir Serbinenko <phcoder@gmail.com>.
547         * (grub_vbe_set_video_mode): Fixed problem with text modes.
549 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
551         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
552         /dev/md/NpN style mdraid devices.
554 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
556         * util/unifont2pff.rb: Remove.
558 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
560         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
561         `#'.
563 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
565         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
566         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
567         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
568         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
569         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
570         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
571         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
573 2009-02-02  Christian Franke  <franke@computer.org>
575         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
577 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
579         * INSTALL: Note that we now require at least autoconf 2.59 and
580         that LZO is optional.
582 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
584         Base on patch on bug #24154 created by Tomas Tintera
585         <trosos@seznam.cz>.
587         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
589 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
591         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
592         <bero@arklinux.org>.
594         * normal/parser.y (script_init): Add missing semicolon.
596 2009-01-31  Colin D Bennett  <colin@gibibit.com>
598         * normal/main.c: Add include to grub/menu_viewer.h.
599         (free_menu_entry_classes): Added.
600         (grub_normal_menu_addentry): Added class property handling.
601         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
602         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
604         * normal/menu_viewer.c: New file.
606         * normal/menu.c (run_menu_entry): Renamed to ...
607         (grub_menu_execute_entry): ... this and made it as global.
608         (grub_menu_run): Renamed to ...
609         (show_text_menu): ... this and made it local.
610         (show_text_menu): Adapt to new function names.
611         (grub_normal_terminal_menu_viewer): New global variable.
613         * include/grub/menu.h: New file.
615         * include/grub/menu_viewer.h: New file.
617         * include/grub/normal.h: Added include to grub/menu.h.
618         (grub_menu_entry): Moved to include/grub/menu.h.
619         (grub_menu_entry_t): Likewise.
620         (grub_menu): Likewise.
621         (grub_menu_t): Likewise.
622         (grub_normal_terminal_menu_viewer): Added.
623         (grub_menu_execute_entry): Likewise.
624         (grub_menu_run): Removed.
626         * DISTLIST: Added include/grub/menu.h.
627         Added include/grub/menu_viewer.h.
628         Added normal/menu_viewer.c.
630 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
632         * normal/execute.c (grub_script_execute_menuentry): Changed to use
633         arglist for menutitle arguments.
635         * normal/main.c (grub_normal_menu_addentry): Likewise.
637         * normal/parser.y (menuentry): Likewise.
639         * normal/script.c (grub_script_create_cmdmenu): Likewise.
641         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
642         (grub_script_create_cmdmenu): Likewise.
644         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
646         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
647         changes.
649         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
651         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
653         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
655         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
657         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
659         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
661 2009-01-30  Christian Franke  <franke@computer.org>
663         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
664         in option help text.
666 2009-01-27  Pavel Roskin  <proski@gnu.org>
668         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
670 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
672         * commands/lsmmap.c: Add include to grub/machine/memory.h.
674         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
676         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
677         unregister function.
679 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
681         * disk/scsi.c (grub_scsi_read): Fix sign problem.
683         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
685         * util/grub-mkfont.c (usage): Fix typo.
687         * util/elf/grub-mkimage.c (load_modules): Fix warning.
689 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
691         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
693         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
695         * kern/misc.c (grub_strcasecmp): New function.
696         (grub_strcasecmp): Use grub_size_t instead of int for length.
697         Fix return value.
698         * include/grub/misc.h: Update function prototypes.
700 2009-01-26  Robert Millan  <rmh@aybabtu.com>
702         * configure.ac: Fix cross-compilation check.
704 2009-01-22  Christian Franke  <franke@computer.org>
706         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
707         (precision) digit string.  Allow `.format2' without `format1' (width).
708         Limit input chars for `%s' output to `format2' if specified.  This is
709         compatible with standard printf ().
711 2009-01-22  Christian Franke  <franke@computer.org>
713         * disk/ata.c (grub_ata_wait_status): Replace by ...
714         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
715         other status bits may be invalid while BSY is asserted.
716         (grub_ata_check_ready): New function.
717         (grub_ata_cmd): Removed.
718         (grub_ata_wait_drq): New function.
719         (grub_ata_strncpy): Remove inline.
720         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
721         and error check now done by grub_ata_wait_drq ().
722         (grub_ata_pio_write): Likewise.
723         (grub_atapi_identify): Set DEV before check for !BSY.  Use
724         grub_ata_wait_drq () to wait for data.
725         (grub_ata_device_initialize): Add status register check to
726         detect missing SATA slave devices.  Add debug messages.
727         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
728         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
729         transfer loop by grub_ata_pio_write ().
730         (grub_ata_identify): Set DEV before check for !BSY. Use
731         grub_ata_wait_drq () to wait for data.
732         (grub_ata_setaddress): Set DEV before check for !BSY.
733         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
734         read/write in one loop.  Fix invalid command on write.  Fix incomplete
735         command on (size % batch) == 0.  Add missing error check after write of
736         last block.  Add debug messages.
737         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
739 2009-01-19  Christian Franke  <franke@computer.org>
741         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
742         (GRUB_ATAPI_IREASON_*): Likewise.
743         (grub_ata_pio_write): Fix timeout error return.
744         (grub_atapi_identify): Add grub_ata_wait () after cmd.
745         (grub_atapi_wait_drq): New function.
746         (grub_atapi_packet): New parameter `size'.
747         Use grub_atapi_wait_drq () and direct write instead of
748         grub_ata_pio_write ().
749         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
750         reads the number of bytes requested by the device for each DRQ
751         assertion.
752         (grub_atapi_write): Remove old implementation, return not
753         implemented instead.
755 2009-01-19  Christian Franke  <franke@computer.org>
757         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
758         of 512 to calculate data size.
759         (grub_scsi_read12): Likewise.
760         (grub_scsi_write10): Likewise.
761         (grub_scsi_write12): Likewise.
762         (grub_scsi_read): Adjust size according to blocksize.
763         Add checks for invalid blocksize and unaligned transfer.
765 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
767         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
769         * term/gfxterm.c (write_char): Fix background rendering for wide
770         width glyphs.
772 2009-01-19  Robert Millan  <rmh@aybabtu.com>
774         * config.guess: Update to latest version from config git.
775         * config.sub: Likewise.
777 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
779         * Makefile.in: Change font compilation to use new grub-mkfont instead
780         of java version.
782         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
783         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
784         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
785         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
786         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
787         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
788         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
789         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
790         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
792 2009-01-16  Christian Franke  <franke@computer.org>
794         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
795         (enum grub_ata_timeout_milliseconds): New enum.
796         (grub_ata_wait_status): Add parameter milliseconds.
797         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
798         recovery from timed-out commands.
799         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
800         return grub_errno instead of REG_ERROR.
801         (grub_ata_pio_write): Add parameter milliseconds.
802         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
803         Pass milliseconds to grub_ata_wait_status () and
804         grub_ata_pio_read ().
805         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
806         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
807         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
808         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
809         It is not suitable for device detection, because DEV bit is ignored,
810         the command may run too long, and not all devices set the signature
811         properly.
812         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
813         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
814         Fix device selection, DEV bit must be set first to address the registers
815         of the correct device.
816         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
817         grub_ata_pio_read/write ().
818         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
819         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
821 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
823         * util/grub-editenv.c (main): Use fseeko(), not fseek().
825 2009-01-13  Bean  <bean123ch@gmail.com>
827         * util/grub-mkfont.c (write_font): forget to remove some debug code.
829 2009-01-13  Bean  <bean123ch@gmail.com>
831         * Makefile.in: (enable_grub_mkfont): New variable.
832         (freetype_cflags): Likewise.
833         (freetype_libs): Likewise.
835         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
836         (grub_mkfont_SOURCES): New variable.
837         (grub_mkfont_CFLAGS): Likewise.
838         (grub_mkfont_LDFLAGS): Likewise.
840         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
841         library if `--enable-grub-mkfont' is requested.
842         (enable_grub_mkfont): New variable.
843         (freetype_cflags): Likewise.
844         (freetype_libs): Likewise.
846         * util/grub-mkfont.c: New file.
848 2009-01-12  Christian Franke  <franke@computer.org>
850         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
851         mode check.  Fix setting of compat_use[].
853 2009-01-10  Robert Millan  <rmh@aybabtu.com>
855         Update a few copyright years which we forgot to do in 2008 (only for
856         files whose changes made in 2008 were copyright-significant)
858         * Makefile.in: Add 2008 to Copyright line.
859         * disk/ieee1275/ofdisk.c: Likewise.
860         * disk/efi/efidisk.c: Likewise.
861         * kern/dl.c: Likewise.
862         * kern/sparc64/ieee1275/init.c: Likewise.
863         * kern/mm.c: Likewise.
864         * kern/efi/mm.c: Likewise.
865         * boot/i386/pc/boot.S: Likewise.
866         * genfslist.sh: Likewise.
867         * fs/iso9660.c: Likewise.
868         * fs/hfs.c: Likewise.
869         * fs/jfs.c: Likewise.
870         * fs/minix.c: Likewise.
871         * fs/ufs.c: Likewise.
872         * gensymlist.sh.in: Likewise.
873         * genkernsyms.sh.in: Likewise.
874         * include/grub/misc.h: Likewise.
875         * include/grub/types.h: Likewise.
876         * include/grub/symbol.h: Likewise.
877         * include/grub/elf.h: Likewise.
878         * include/grub/kernel.h: Likewise.
879         * include/grub/disk.h: Likewise.
880         * include/grub/dl.h: Likewise.
881         * include/grub/i386/linux.h: Likewise.
882         * include/grub/i386/pc/biosdisk.h: Likewise.
883         * include/grub/efi/api.h: Likewise.
884         * include/grub/efi/pe32.h: Likewise.
885         * include/grub/util/misc.h: Likewise.
886         * normal/execute.c: Likewise.
887         * normal/arg.c: Likewise.
888         * normal/completion.c: Likewise.
889         * normal/lexer.c: Likewise.
890         * normal/parser.y: Likewise.
891         * normal/misc.c: Likewise.
892         * commands/i386/pc/vbeinfo.c: Likewise.
893         * commands/hexdump.c: Likewise.
894         * commands/terminal.c: Likewise.
895         * commands/ls.c: Likewise.
896         * commands/help.c: Likewise.
897         * partmap/pc.c: Likewise.
898         * loader/efi/chainloader.c: Likewise.
899         * loader/multiboot_loader.c: Likewise.
900         * loader/i386/pc/multiboot2.c: Likewise.
901         * term/efi/console.c: Likewise.
902         * term/i386/pc/serial.c: Likewise.
903         * util/lvm.c: Likewise.
904         * util/console.c: Likewise.
905         * util/i386/efi/grub-mkimage.c: Likewise.
906         * util/raid.c: Likewise.
908 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
910         * commands/videotest.c: Removed include to grub/machine/memory.h.
912         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
913         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
914         (video_mod_SOURCES): Removed.
915         (video_mod_CFLAGS): Likewise.
916         (video_mod_LDFLAGS): Likewise.
917         (gfxterm_mod_SOURCES): Likewise.
918         (gfxterm_mod_CFLAGS): Likewise.
919         (gfxterm_mod_LDFLAGS): Likewise.
920         (videotest_mod_SOURCES): Likewise.
921         (videotest_mod_CFLAGS): Likewise.
922         (videotest_mod_LDFLAGS): Likewise.
923         (bitmap_mod_SOURCES): Likewise.
924         (bitmap_mod_CFLAGS): Likewise.
925         (bitmap_mod_LDFLAGS): Likewise.
926         (tga_mod_SOURCES): Likewise.
927         (tga_mod_CFLAGS): Likewise.
928         (tga_mod_LDFLAGS): Likewise.
929         (jpeg_mod_SOURCES): Likewise.
930         (jpeg_mod_CFLAGS): Likewise.
931         (jpeg_mod_LDFLAGS): Likewise.
932         (png_mod_SOURCES): Likewise.
933         (png_mod_CFLAGS): Likewise.
934         (png_mod_LDFLAGS): Likewise.
936         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
937         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
938         (video_mod_SOURCES): Added.
939         (video_mod_CFLAGS): Likewise.
940         (video_mod_LDFLAGS): Likewise.
941         (videotest_mod_SOURCES): Likewise.
942         (videotest_mod_CFLAGS): Likewise.
943         (videotest_mod_LDFLAGS): Likewise.
944         (bitmap_mod_SOURCES): Likewise.
945         (bitmap_mod_CFLAGS): Likewise.
946         (bitmap_mod_LDFLAGS): Likewise.
947         (tga_mod_SOURCES): Likewise.
948         (tga_mod_CFLAGS): Likewise.
949         (tga_mod_LDFLAGS): Likewise.
950         (jpeg_mod_SOURCES): Likewise.
951         (jpeg_mod_CFLAGS): Likewise.
952         (jpeg_mod_LDFLAGS): Likewise.
953         (png_mod_SOURCES): Likewise.
954         (png_mod_CFLAGS): Likewise.
955         (png_mod_LDFLAGS): Likewise.
956         (gfxterm_mod_SOURCES): Likewise.
957         (gfxterm_mod_CFLAGS): Likewise.
958         (gfxterm_mod_LDFLAGS): Likewise.
960         * term/gfxterm.c: Removed include to grub/machine/memory.h,
961         grub/machine/console.h.
963 2009-01-04  Jerone Young  <jerone@gmail.com>
965         Make on screen instructions clearer
967         Based on patch created by Jidanni <jidanni@jidanni.org>
969         * normal/menu.c: print clearer instructions on the screen
971 2009-01-02  Colin D Bennett  <colin@gibibit.com>
973         New font engine.
975         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
976         build system and fixed gfxterm.c to work with different sized fonts.
978         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
980         * configure: Re-generated.
982         * DISTLIST: Removed font/manager.c.
983         Added font/font.c.
984         Added font/font_cmd.c.
986         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
987         compilation.
989         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
991         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
993         * kern/term.c: Changed users of grub_utf8_to_ucs4.
995         * normal/menu.c: Likewise.
997         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
998         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
1000         * include/grub/font.h: Replaced with new file.
1002         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
1003         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
1004         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
1005         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
1006         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
1007         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1008         fg_red, fg_green, fg_blue, fg_alpha.
1009         (grub_video_adapter): Removed blit_glyph.
1010         (grub_video_blit_glyph): Removed.
1012         * font/manager.c: Removed file.
1014         * font/font.c: New file.
1016         * font/font_cmd.c: Likewise.
1018         * video/video.c (grub_video_blit_glyph): Removed.
1020         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
1021         (grub_video_vbe_map_rgba): Likewise.
1022         (grub_video_vbe_unmap_color_int): Likewise.
1023         (grub_video_vbe_blit_glyph): Removed.
1024         (grub_video_vbe_adapter): Removed blit_glyph.
1026         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
1027         (get_pixel): Likewise.
1028         (set_pixel): Likewise.
1030         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
1032         * term/gfxterm.c: Adapted to new font engine.
1034         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
1036         * term/i386/pc/vga.c: Likewise.
1038         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
1040         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
1042         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1044         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1046         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
1048         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
1050         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
1052         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
1054         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1056         * util/grub.d/00_header.in: Changed to use new loadfont command.
1058         * util/grub-mkconfig_lib.in: Changed font extension.
1060 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
1062         * util/getroot.c (grub_util_get_grub_dev): Add support for
1063         /dev/md/dNNpNN style partitionable mdraid devices.
1065 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
1067         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
1068         at a time limit of the PXE TFTP API correctly.
1069         (grub_pxefs_close): Likewise.
1071 2008-11-29  Robert Millan  <rmh@aybabtu.com>
1073         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
1074         grub_ata_device_initialize() calls.
1076 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
1078         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
1079         iteration failed.
1080         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
1082 2008-11-28  Robert Millan  <rmh@aybabtu.com>
1084         Fix build on powerpc-ieee1275.  Based on patch created by
1085         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
1086         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1087         `kern/ieee1275/mmap.c'.
1088         * include/grub/powerpc/ieee1275/memory.h: New file.
1090         Provide grub-install on coreboot.
1091         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
1092         (grub_install_SOURCES): New variable.
1093         * util/i386/pc/grub-install.in: Add a few condition checks to make it
1094         usable on coreboot.
1096 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
1098         * util/grub-fstest.c (grub_term_get_current_input): Change return type
1099         to `grub_term_input_t'.
1100         (grub_term_get_current_output): Change return type to
1101         `grub_term_output_t'.
1103 2008-11-22  Robert Millan  <rmh@aybabtu.com>
1105         Fix breakage on coreboot due to declaration mismatch.
1106         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
1107         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
1108         grub_vga_text_cls().
1110         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
1111         comments.  Avoid copying one more byte than necessary (just in case).
1113         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
1114         to 0x200000 (avoids trouble with some OFW implementations, and matches
1115         with the one in Yaboot).
1116         Reported by Manoel Abranches
1118 2008-11-20  Robert Millan  <rmh@aybabtu.com>
1120         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
1121         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
1123         * util/grub-mkconfig_lib.in (grub_warn): New function.
1124         (convert_system_path_to_grub_path): Use grub_warn() when issuing
1125         warnings, to obtain consistent formatting.
1126         * util/grub.d/00_header.in: Likewise.
1127         * util/update-grub_lib.in: Likewise.
1129         * loader/i386/linux.c (allocate_pages): Fix a warning.
1130         Move comment text to `#error' stanza.
1132         Harmonize ieee1275's grub_available_iterate() with the generic
1133         grub_machine_mmap_iterate() interface (fixes a recently-introduced
1134         build problem on i386-ieee1275):
1135         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
1136         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
1137         parameter `type'.  Update all users of this function.
1138         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1139         `kern/ieee1275/mmap.c'.
1140         * kern/ieee1275/init.c
1141         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
1142         with ...
1143         (grub_machine_mmap_iterate): ... this.
1144         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
1145         return type to `grub_err_t'.  Update all implementations of this
1146         function prototype.
1147         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
1148         Likewise.
1150         Add `lsmmap' command (lists firmware-provided memory map):
1151         * commands/lsmmap.c: New file.
1152         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
1153         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
1154         variables.
1155         * conf/powerpc-ieee1275.rmk: Likewise.
1156         * conf/i386-coreboot.rmk: Likewise.
1157         * conf/i386-ieee1275.rmk: Likewise.
1159 2008-11-19  Robert Millan  <rmh@aybabtu.com>
1161         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
1162         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
1163         constraints to initrd allocation (based on code from
1164         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
1165         for Linux to find it.
1167 2008-11-14  Robert Millan  <rmh@aybabtu.com>
1169         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
1170         order to cope with duplicate slashes.
1172 2008-11-14  Robert Millan  <rmh@aybabtu.com>
1174         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
1175         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
1176         don't want to mess with lower memory, because it is used in the Linux
1177         loader.
1179         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
1180         an appropriate place in lower memory, between 0x10000 and 0x90000,
1181         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
1182         is in our heap (probably as a result of it being corrupted during
1183         decompression).  Add #error instance with comment to explain why this
1184         loader isn't currently usable on PC/BIOS.
1186 2008-11-14  Robert Millan  <rmh@aybabtu.com>
1188         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
1189         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
1191 2008-11-12  Robert Millan  <rmh@aybabtu.com>
1193         Make loader/i386/linux.c buildable on i386-pc (although disabled).
1195         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
1196         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
1197         from here ...
1198         * include/grub/i386/pc/memory.h: ... to here.
1200 2008-11-12  Robert Millan  <rmh@aybabtu.com>
1202         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
1203         split).
1205         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
1206         (grub_console_cur_color, grub_console_real_putchar)
1207         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1208         (grub_console_setcolorstate, grub_console_setcolor)
1209         (grub_console_getcolor): Move from here ...
1210         * include/grub/i386/vga_common.h: ... to here (new file).
1212         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
1213         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
1214         `<grub/i386/io.h>'.
1215         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
1216         `<grub/i386/vga_common.h>'.
1218 2008-11-12  Robert Millan  <rmh@aybabtu.com>
1220         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
1221         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
1222         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
1223         variables.
1224         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1225         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
1227         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
1228         grub_console_init() with call to grub_vga_text_init().
1229         (grub_machine_fini): Replace call to
1230         grub_console_fini() with call to grub_vga_text_fini() and
1231         grub_at_keyboard_fini().
1233         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
1234         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1235         (grub_console_setcolorstate, grub_console_setcolor)
1236         (grub_console_getcolor): New function prototypes.
1238         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
1239         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
1240         (grub_vga_text_setcursor): Static-ize.
1241         (grub_vga_text_term): New structure.
1242         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
1244         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
1245         (grub_console_cur_color, grub_console_standard_color)
1246         (grub_console_normal_color, grub_console_highlight_color)
1247         (map_char, grub_console_putchar, grub_console_getcharwidth)
1248         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
1249         (grub_console_getcolor): Move from here ...
1250         * term/i386/vga_common.c: ... to here (same function names).
1252 2008-11-12  Robert Millan  <rmh@aybabtu.com>
1254         Use newly-added Multiboot support in coreboot.
1256         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1257         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
1259         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
1260         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
1261         (codestart): Store the MBI in `startup_multiboot_info' when we're
1262         being loaded using Multiboot.
1264         * kern/i386/coreboot/init.c (grub_machine_init): Move
1265         grub_at_keyboard_init() call to beginning of function (useful for
1266         debugging).  Call grub_machine_mmap_init() before attempting to use
1267         grub_machine_mmap_iterate().
1268         (grub_lower_mem, grub_upper_mem): Move from here ...
1269         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
1270         here (new file).
1272         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
1273         function prototype.
1275 2008-11-12  Robert Millan  <rmh@aybabtu.com>
1277         Fix a regression introduced by the at_keyboard.mod split.  Because
1278         some terminals are default on some platforms and non-default on
1279         others, the first terminal being registered determines which is
1280         going to be default.
1282         * kern/term.c (grub_term_register_input): If this is the first
1283         terminal being registered, set it as the current one.
1284         (grub_term_register_output): Likewise.
1286         * term/efi/console.c (grub_console_init): Do not call
1287         grub_term_set_current_output() or grub_term_set_current_input().
1288         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
1289         * term/i386/pc/console.c (grub_console_init): Likewise.
1290         (grub_console_fini): Do not call grub_term_set_current_input()
1291         (but leave grub_term_set_current_output() to restore text mode).
1293 2008-11-10  Robert Millan  <rmh@aybabtu.com>
1295         * util/grub.d/00_header.in: Add backward compatibility check for
1296         versions of terminal.mod that don't understand `terminal_input' or
1297         `terminal_output'.
1299 2008-11-09  Robert Millan  <rmh@aybabtu.com>
1301         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
1302         `terminal_input' / `terminal_output', not `terminal'.
1304 2008-11-08  Robert Millan  <rmh@aybabtu.com>
1306         * Makefile.in (include_DATA): Fix srcdir=. assumption.
1307         (DISTCLEANFILES): Add `build_env.mk'.
1309 2008-11-08  Robert Millan  <rmh@aybabtu.com>
1311         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
1312         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
1313         members.  Update all users.
1314         * util/console.c (grub_ncurses_term): Split in ...
1315         (grub_ncurses_term_input): ... this, and ...
1316         (grub_ncurses_term_output): ... this.  Update all users.
1317         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
1319 2008-11-08  Robert Millan  <rmh@aybabtu.com>
1321         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
1322         (PKGDATA): Add $(pkgdata_SRCDIR).
1323         (pkglib_BUILDDIR): New variable.
1324         (pkgdata_SRCDIR): New variable.
1325         (build_env.mk): New target.
1326         (include_DATA): New variable.
1327         (install-local): Install $(include_DATA) files in $(includedir).
1329 2008-11-07  Pavel Roskin  <proski@gnu.org>
1331         * gendistlist.sh: Use C locale for sorting to ensure consistent
1332         output on all systems.
1334         * util/grub.d/00_header.in: Remove incorrect space before
1335         "serial".
1337 2008-11-07  Robert Millan  <rmh@aybabtu.com>
1339         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
1340         per specification.
1341         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
1342         * loader/multiboot_loader.c (find_multi_boot2_header): New function
1343         (based on find_multi_boot1_header).
1344         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
1345         using find_multi_boot2_header(), and abort if neither Multiboot or
1346         Multiboot headers were found.
1348 2008-11-07  Robert Millan  <rmh@aybabtu.com>
1350         Modularize at_keyboard.mod:
1352         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
1353         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
1354         (at_keyboard_mod_LDFLAGS): New variables.
1356         Actual terminal split:
1358         * include/grub/term.h (struct grub_term): Split in ...
1359         (struct grub_term_input): ... this, and ...
1360         (struct grub_term_output): ... this.  Update all users.
1361         (grub_term_set_current): Split in ...
1362         (grub_term_set_current_input): ... this, and ...
1363         (grub_term_set_current_output): ... this.
1364         (grub_term_get_current): Split in ...
1365         (grub_term_get_current_input): ... this, and ...
1366         (grub_term_get_current_output): ... this.
1367         (grub_term_register): Split in ...
1368         (grub_term_register_input): ... this, and ...
1369         (grub_term_register_output): ... this.
1370         (grub_term_unregister): Split in ...
1371         (grub_term_unregister_input): ... this, and ...
1372         (grub_term_unregister_output): ... this.
1373         (grub_term_iterate): Split in ...
1374         (grub_term_iterate_input): ... this, and ...
1375         (grub_term_iterate_output): ... this.
1377         * kern/term.c (grub_term_list): Split in ...
1378         (grub_term_list_input): ... this, and ...
1379         (grub_term_list_output): ... this.  Update all users.
1380         (grub_cur_term): Split in ...
1381         (grub_cur_term_input): ... this, and ...
1382         (grub_cur_term_output): ... this.  Update all users.
1383         (grub_term_set_current): Split in ...
1384         (grub_term_set_current_input): ... this, and ...
1385         (grub_term_set_current_output): ... this.
1386         (grub_term_get_current): Split in ...
1387         (grub_term_get_current_input): ... this, and ...
1388         (grub_term_get_current_output): ... this.
1389         (grub_term_register): Split in ...
1390         (grub_term_register_input): ... this, and ...
1391         (grub_term_register_output): ... this.
1392         (grub_term_unregister): Split in ...
1393         (grub_term_unregister_input): ... this, and ...
1394         (grub_term_unregister_output): ... this.
1395         (grub_term_iterate): Split in ...
1396         (grub_term_iterate_input): ... this, and ...
1397         (grub_term_iterate_output): ... this.
1399         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
1400         a check for input and one for output (and only attempt to get keys
1401         from user when input works).
1403         * util/grub-probe.c (grub_term_get_current): Split in ...
1404         (grub_term_get_current_input): ... this, and ...
1405         (grub_term_get_current_output): ... this.
1406         * util/grub-fstest.c: Likewise.
1407         * util/i386/pc/grub-setup.c: Likewise.
1408         * util/grub-editenv.c: Likewise.
1410         Portability adjustments:
1412         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
1413         `term/i386/pc/at_keyboard.c'.
1414         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
1415         grub_keyboard_controller_init() (now handled by terminal .init).
1416         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
1417         grub_at_keyboard_init().
1418         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
1419         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
1420         at_keyboard.mod via input terminal interface).
1421         * include/grub/i386/coreboot/console.h: Convert into a stub for
1422         `<grub/i386/pc/console.h>'.
1424         Migrate full terminals to new API:
1426         * term/efi/console.c (grub_console_term): Split into ...
1427         (grub_console_term_input): ... this, and ...
1428         (grub_console_term_output): ... this.  Update all users.
1429         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
1430         (grub_ofconsole_init): Split into ...
1431         (grub_ofconsole_init_input): ... this, and ...
1432         (grub_ofconsole_init_output): ... this.
1433         (grub_ofconsole_term): Split into ...
1434         (grub_ofconsole_term_input): ... this, and ...
1435         (grub_ofconsole_term_output): ... this.  Update all users.
1436         * term/i386/pc/serial.c (grub_serial_term): Split into ...
1437         (grub_serial_term_input): ... this, and ...
1438         (grub_serial_term_output): ... this.  Update all users.
1439         * term/i386/pc/console.c (grub_console_term): Split into ...
1440         (grub_console_term_input): ... this, and ...
1441         (grub_console_term_output): ... this.  Update all users.
1442         (grub_console_term_input): Only enable it on PC/BIOS platform.
1443         (grub_console_init): Remove grub_keyboard_controller_init() call.
1445         Migrate input terminals to new API:
1447         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
1448         `i386' and `i386/pc' to enable build on x86_64 (this driver is
1449         i386-specific anyway).
1450         (grub_console_checkkey): Rename to ...
1451         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
1452         users.
1453         (grub_keyboard_controller_orig): New variable.
1454         (grub_console_getkey): Rename to ...
1455         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
1456         users.
1457         (grub_keyboard_controller_init): Static-ize.  Save original
1458         controller value so that it can be restored ...
1459         (grub_keyboard_controller_fini): ... here (new function).
1460         (grub_at_keyboard_term): New structure.
1461         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
1462         functions.
1464         Migrate output terminals to new API:
1466         * term/i386/pc/vga.c (grub_vga_term): Change type to
1467         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
1468         members.  Update all users.
1469         * term/gfxterm.c (grub_video_term): Change type to
1470         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
1471         members.  Update all users.
1472         * include/grub/i386/pc/console.h (grub_console_checkkey)
1473         (grub_console_getkey): Do not export (no longer needed by gfxterm,
1474         etc).
1476         Migrate `terminal' command and userland tools to new API:
1478         * commands/terminal.c (grub_cmd_terminal): Split into ...
1479         (grub_cmd_terminal_input): ... this, and ...
1480         (grub_cmd_terminal_output): ... this.
1481         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
1482         `terminal_input' and `terminal_output'.
1483         * util/grub.d/00_header.in: Adjust `terminal' calls to new
1484         `terminal_input' / `terminal_output' API.
1485         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
1486         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
1487         provided ${GRUB_TERMINAL}, convert it).
1489 2008-11-04  Robert Millan  <rmh@aybabtu.com>
1491         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
1492         for FreeBSD.
1493         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
1495 2008-11-03  Bean  <bean123ch@gmail.com>
1497         * kern/elf.c (grub_elf32_load): Revert to previous code.
1498         (grub_elf64_load): Likewise.
1500         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
1502 2008-11-01  Robert Millan  <rmh@aybabtu.com>
1504         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
1505         (TARGET_CPPFLAGS): Likewise.
1506         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
1508 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
1510         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
1512 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
1514         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
1515         addition of objects until the code is not going to be able to fail.
1517 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
1519         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
1520         (add a missing NULL check, and correct them by moving the pointer
1521         operations after the actual check).
1523 2008-10-29  Robert Millan  <rmh@aybabtu.com>
1525         * util/i386/pc/grub-install.in: Handle empty string as output from
1526         make_system_path_relative_to_its_root().
1528 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
1530         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
1531         circular metadata worst case scenario. If the metadata is circular
1532         then copy the wrap in place.
1533         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
1534         project lib/format_text/layout.h
1535         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
1537 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
1539         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
1541 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
1543         * util/update-grub_lib.in: Mention filename in warning message.
1545 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
1547         * NEWS: Update for rename of update-grub to grub-mkconfig.
1549 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
1551         * util/update-grub_lib.in: Copy to ...
1552         * util/grub-mkconfig_lib.in: ... this.  Update all users.
1553         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
1554         * util/update-grub.in: Rename to ...
1555         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
1556         option. Add `--output' option to allow users to specify the generated
1557         configuration file.  Default to stdout.
1558         (update_grub_dir): Rename to ...
1559         (grub_mkconfig_dir): ... this.
1560         (grub_cfg): Default to an empty string.
1561         * conf/common.rmk (update-grub): Rename to ...
1562         (grub-mkconfig): ... this.
1563         (update-grub_lib): Copy to ...
1564         (grub-mkconfig_lib): ... this.
1565         (update-grub_SCRIPTS): Copy to ...
1566         (grub-mkconfig_SCRIPTS): ... this. Update all users.
1567         (update-grub_DATA): Rename to ...
1568         (grub-mkconfig_DATA): ... this.
1570 2008-09-28  Robert Millan  <rmh@aybabtu.com>
1572         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
1573         to `modified'.  Add the real `created' field.
1574         (grub_iso9660_uuid): Use `modified' rather than `created' for
1575         constructing the UUID.
1577 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
1579         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
1580         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
1582 2008-09-28  Bean  <bean123ch@gmail.com>
1584         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
1585         Thanks to Christian Franke for finding this bug.
1587 2008-09-25  Robert Millan  <rmh@aybabtu.com>
1589         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
1590         instances of grub_util_get_disk_name() (see previous commit).
1592 2008-09-25  Robert Millan  <rmh@aybabtu.com>
1594         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
1595         `util/i386/get_disk_name.c'.
1596         * conf/i386-efi.rmk: Likewise.
1597         * conf/x86_64-efi.rmk: Likewise.
1598         * conf/i386-coreboot.rmk: Likewise.
1599         * conf/i386-ieee1275.rmk: Likewise.
1600         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
1601         `util/ieee1275/get_disk_name.c'.
1602         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
1603         * util/ieee1275/get_disk_name.c: Remove file.
1604         * util/i386/get_disk_name.c: Remove file.
1605         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
1606         "hd%d" for device.map entries, rather than using
1607         grub_util_get_disk_name().
1609 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
1611         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
1612         warning.
1613         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
1615 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
1617         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
1618         Changed to 0x5100.
1619         (GRUB_TERM_PPAGE): Changed to 0x4900.
1621 2008-09-24  Robert Millan  <rmh@aybabtu.com>
1623         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
1624         macros (they were i386-pc specific).
1625         * include/grub/sparc64/ieee1275/console.h: Likewise.
1626         * include/grub/efi/console.h: Likewise.
1628 2008-09-22  Bean  <bean123ch@gmail.com>
1630         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
1631         resident and in attribute list.
1633         * include/grub/ntfs.h (BMP_LEN): Removed.
1635 2008-09-22  Bean  <bean123ch@gmail.com>
1637         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
1638         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
1640         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
1641         error occurs, as grub_disk_open will call grub_disk_close, which will
1642         call p->close (scsi).
1644 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
1646         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
1647         (AC_PREREQ): Bumped to 2.59.
1648         (AC_TRY_COMPILE): Replace obsolete macro with ...
1649         (AC_COMPILE_IFELSE): ... this.
1650         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
1651         (AC_LINK_IFELSE): ... this.
1653 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
1655         * autogen.sh: Add a call to `gendistlist.sh'.
1657 2008-09-19  Christian Franke  <franke@computer.org>
1659         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
1660         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
1661         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
1662         Export __enable_execute_stack() to modules.
1663         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
1664         New function.
1666 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
1668         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
1669         Sort the list.
1671 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
1673         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
1674         #include <grub/util/hostdisk.h>.
1676 2008-09-08  Robert Millan  <rmh@aybabtu.com>
1678         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
1679         segments when their filesz is zero (grub_file_read() interprets
1680         zero-size as "read until EOF", which results in memory corruption).
1681         Use `lowest_segment' rather than 0 for calculating the current
1682         segment load address.
1684 2008-09-08  Robert Millan  <rmh@aybabtu.com>
1686         * util/hostdisk.c (open_device): Replace a grub_util_info() call
1687         with grub_dprintf("hostdisk", ...), as it was so verbose that it
1688         clobbered useful information.
1690 2008-09-08  Robert Millan  <rmh@aybabtu.com>
1692         * include/grub/util/biosdisk.h: Move to ...
1693         * include/grub/util/hostdisk.h: ... here.  Update all users.
1694         * util/biosdisk.c: Move to ...
1695         * util/hostdisk.c: ... here.  Update all users.
1697 2008-09-07  Robert Millan  <rmh@aybabtu.com>
1699         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
1700         variables.
1701         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
1702         and length can be stored directly in the `mbi->mmap_addr' and
1703         `mbi->mmap_length' struct fields.
1705 2008-09-07  Robert Millan  <rmh@aybabtu.com>
1707         * conf/i386.rmk: New file.  Provides declaration for building
1708         `cpuid.mod'.
1709         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
1710         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
1711         variables.
1712         Include `conf/i386.mk'.
1713         * conf/i386-efi.rmk: Likewise.
1714         * conf/x86_64-efi.rmk: Likewise.
1715         * conf/i386-coreboot.rmk: Likewise.
1716         * conf/i386-ieee1275.rmk: Likewise.
1718 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
1720         Based on patch created by Colin D Bennett <colin@gibibit.com>.
1721         Adds optimization support for BGR based modes.
1723         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
1724         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1725         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1726         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1727         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1728         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1729         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1730         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1731         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1732         (grub_video_i386_vbeblit_index_index): Likewise.
1733         (grub_video_i386_vbeblit_replace_directN): Added.
1734         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1735         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1736         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1737         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1738         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1739         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1740         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1741         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1742         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1743         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1744         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1745         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1746         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1748         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
1749         (grub_video_i386_vbefill_R8G8B8): Likewise.
1750         (grub_video_i386_vbefill_index): Likewise.
1751         (grub_video_i386_vbefill_direct32): Added.
1752         (grub_video_i386_vbefill_direct24): Likewise.
1753         (grub_video_i386_vbefill_direct16): Likewise.
1754         (grub_video_i386_vbefill_direct8): Likewise.
1756         * include/grub/video.h (grub_video_blit_format): Removed
1757         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
1758         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
1759         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
1760         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
1761         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
1763         * video/video.c (grub_video_get_blit_format): Updated to use new
1764         blit formats.  Added handling for 16 bit color modes.
1766         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
1767         fillers.
1768         (common_blitter): Updated to use new blitters.
1770         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
1771         Removed.
1772         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1773         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1774         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1775         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1776         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1777         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1778         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1779         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1780         (grub_video_i386_vbeblit_index_index): Likewise.
1781         (grub_video_i386_vbeblit_replace_directN): Added.
1782         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1783         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1784         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1785         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1786         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1787         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1788         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1789         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1790         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1791         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1792         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1793         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1794         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1796         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
1797         (grub_video_i386_vbefill_R8G8B8): Likewise.
1798         (grub_video_i386_vbefill_index): Likewise.
1799         (grub_video_i386_vbefill_direct32): Added.
1800         (grub_video_i386_vbefill_direct24): Likewise.
1801         (grub_video_i386_vbefill_direct16): Likewise.
1802         (grub_video_i386_vbefill_direct8): Likewise.
1804         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
1805         types.
1807         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
1808         types.
1810         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
1811         blitter types.
1813         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
1814         types.
1816 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
1818         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
1819         RAID level 1.
1821 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
1823         * fs/iso9660.c (grub_iso9660_date): New structure.
1824         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
1825         (grub_iso9660_uuid): New function.
1827 2008-09-05  Bean  <bean123ch@gmail.com>
1829         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
1831         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
1832         insensitive bit for names in Win32 and Win32 & DOS namespace.
1834         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
1836         * include/grub/types.h (LONG_MAX): Likewise.
1838 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
1840         * util/getroot.c: Include <config.h>.
1841         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
1842         add support for /dev/md/N devices and handle LVM double dash escaping.
1844 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
1846         * config.guess: Update to latest version from config git.
1847         * config.sub: Likewise.
1849 2008-09-03  Robert Millan  <rmh@aybabtu.com>
1851         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
1852         `disk->total_sectors'.
1854 2008-09-01  Colin D Bennett  <colin@gibibit.com>
1856         * include/grub/normal.h: Fixed incorrect comment for
1857         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
1859 2008-09-01  Colin D Bennett  <colin@gibibit.com>
1861         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
1862         values with defines.
1864         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
1865         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
1866         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
1867         (GRUB_VBE_MODEATTR_COLOR): Likewise.
1868         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
1869         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
1870         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
1871         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
1872         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
1873         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
1874         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
1875         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
1876         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
1877         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
1878         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
1879         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
1880         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
1881         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
1882         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
1884 2008-08-31  Robert Millan  <rmh@aybabtu.com>
1886         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
1887         declaration.
1888         (grub_multiboot): Fix a few warnings.
1890 2008-08-31  Robert Millan  <rmh@aybabtu.com>
1892         * loader/i386/pc/multiboot.c: Update comment not to say that
1893         boot_device support is unimplemented.
1895 2008-08-31  Robert Millan  <rmh@aybabtu.com>
1897         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
1898         or memory map support are unimplemented.
1900 2008-08-31  Colin D Bennett  <colin@gibibit.com>
1902         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
1904 2008-08-31  Colin D Bennett  <colin@gibibit.com>
1906         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
1907         total video memory in 'vbeinfo' output; show color format details for
1908         each video mode.
1910 2008-08-30  Pavel Roskin  <proski@gnu.org>
1912         * util/genmoddep.c: Remove for real this time.
1913         * DISTLIST: Remove util/genmoddep.c.
1915 2008-08-30  Robert Millan  <rmh@aybabtu.com>
1917         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
1918         as required by Multiboot spec (it was already 4-byte aligned, but
1919         only by chance).
1921 2008-08-29  Pavel Roskin  <proski@gnu.org>
1923         * kern/powerpc/ieee1275/crt0.S: Rename to ...
1924         * kern/powerpc/ieee1275/startup.S: ... this.
1925         * conf/powerpc-ieee1275.rmk: Adjust for the above.
1926         * DISTLIST: Likewise.
1928         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
1929         grub/cpu/kernel.h.  Add start label for consistency with other
1930         platforms.  Add grub_prefix immediately after start.  Add jump
1931         to the code after grub_prefix.
1932         * include/grub/powerpc/kernel.h: Provide valid values for
1933         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
1935 2008-08-29  Bean  <bean123ch@gmail.com>
1937         * configure.ac: Change host_os to cygwin for mingw.
1938         (asprintf): New check for function.
1940         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
1941         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
1943         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
1944         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
1945         sync, sleep and grub_util_get_disk_size for mingw.
1947         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
1948         to get size in mingw.
1949         (open_device): Use flag O_BINARY if it's defined.
1950         (find_root_device): Add dummy code for mingw.
1952         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
1953         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
1954         (get_scsi_disk_name): Return 0 for mingw.
1956         * util/hostfs.c: #include <grub/util/misc.h>.
1957         (grub_hostfs_open): Use "rb" flag to open file, use
1958         grub_util_get_disk_size to get disk size for mingw.
1960         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
1961         (asprintf): New function if HAVE_ASPRINTF is not set.
1962         (sync): New function for mingw.
1963         (sleep): Likewise.
1964         (grub_util_get_disk_size): Likewise.
1966 2008-08-28  Pavel Roskin  <proski@gnu.org>
1968         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1969         kern/time.c.
1971 2008-08-28  Robert Millan  <rmh@aybabtu.com>
1973         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
1975 2008-08-28  Robert Millan  <rmh@aybabtu.com>
1977         Change find_grub_drive() syntax so it doesn't prevent it from
1978         detecting NULL names as errors.
1980         * util/biosdisk.c (find_grub_drive): Move free slot search code
1981         from here ...
1982         (find_free_slot): ... to here.
1983         (read_device_map): Use find_free_slot() to search for free slots.
1985 2008-08-27  Marco Gerards  <marco@gnu.org>
1987         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
1988         (scsi_mod_SOURCES): New variable.
1989         (scsi_mod_CFLAGS): Likewise
1990         (scsi_mod_LDFLAGS): Likewise.
1992         * disk/scsi.c: New file.
1994         * include/grub/scsi.h: Likewise.
1996         * include/grub/scsicmd.h: Likewise.
1998         * disk/ata.c: Include <grub/scsi.h>.
1999         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
2000         instead.
2001         (grub_ata_iterate): Skip ATAPI devices.
2002         (grub_ata_open): Only handle ATAPI devices.
2003         (struct grub_atapi_read): Removed.
2004         (grub_atapi_readsector): Likewise.
2005         (grub_ata_read): No longer handle ATAPI devices.
2006         (grub_ata_write): Likewise.
2007         (grub_atapi_iterate): New function.
2008         (grub_atapi_read): Likewise.
2009         (grub_atapi_write): Likewise.
2010         (grub_atapi_open): Likewise.
2011         (grub_atapi_close): Likewise.
2012         (grub_atapi_dev): New variable.
2013         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
2014         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
2016         * include/grub/disk.h (enum grub_disk_dev_id): Add
2017         `GRUB_DISK_DEVICE_SCSI_ID'.
2019 2008-08-26  Robert Millan  <rmh@aybabtu.com>
2021         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
2022         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
2023         descriptive.
2025 2008-08-23  Bean  <bean123ch@gmail.com>
2027         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
2028         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2029         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
2030         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
2031         dm_nv.mod.
2032         (raid5rec_mod_SOURCES): New macro.
2033         (raid5rec_mod_CFLAGS): Likewise.
2034         (raid5rec_mod_LDFLAGS): Likewise.
2035         (raid6rec_mod_SOURCES): Likewise.
2036         (raid6rec_mod_CFLAGS): Likewise.
2037         (raid6rec_mod_LDFLAGS): Likewise.
2038         (mdraid_mod_SOURCES): Likewise.
2039         (mdraid_mod_CFLAGS): Likewise.
2040         (mdraid_mod_LDFLAGS): Likewise.
2041         (dm_nv_mod_SOURCES): Likewise.
2042         (dm_nv_mod_CFLAGS): Likewise.
2043         (dm_nv_mod_LDFLAGS): Likewise.
2045         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
2046         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
2047         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2049         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
2050         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2052         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2054         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2056         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2058         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2060         * disk/raid5_recover.c: New file.
2062         * disk/raid6_recover.c: Likewise.
2064         * disk/mdraid_linux.c: Likewise.
2066         * disk/dmraid_nvidia.c: Likewise.
2068         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
2069         ULONG_MAX.
2071         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
2072         calculate the size of raid device.
2073         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
2074         different layout of raid5.
2075         (grub_raid_scan_device): Remove code specific to mdraid.
2076         (grub_raid_list): New variable.
2077         (free_array): New function.
2078         (grub_raid_register): Likewise.
2079         (grub_raid_unregister): Likewise.
2080         (grub_raid_rescan): Likewise.
2081         (GRUB_MOD_INIT): Don't iterate device here.
2082         (GRUB_MOD_FINI): Use free_array to release resource.
2084         * include/grub/raid.h: Remove macro and structure specific to mdraid.
2085         (grub_raid5_recover_func_t): New function variable type.
2086         (grub_raid6_recover_func_t): Likewise.
2087         (grub_raid5_recover_func): New variable.
2088         (grub_raid6_recover_func): Likewise.
2089         (grub_raid_register): New function.
2090         (grub_raid_unregister): Likewise.
2091         (grub_raid_rescan): Likewise.
2092         (grub_raid_block_xor): Likewise.
2094         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
2095         (CMD_CRC): New macro.
2096         (part): Removed.
2097         (read_file): Handle device as well as file.
2098         (cmd_crc): New function.
2099         (fstest): Handle multiple disks.
2100         (options): Remove part, raw and long, add root and diskcount.
2101         (usage): Add crc, remove -p, -r, -l, add -r and -c.
2102         (main): Find the first non option entry and ignore subsequent options,
2103         add handling for the new options, support multiple disks.
2105         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
2107 2008-08-23  Bean  <bean123ch@gmail.com>
2109         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
2111         * genfslist.sh: Ignore kernel.mod.
2113         * genpartmaplist.sh: Likewise.
2115 2008-08-23  Robert Millan  <rmh@aybabtu.com>
2117         * util/getroot.c (find_root_device): Skip anything that starts with
2118         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
2120 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
2122         * util/update-grub.in (GRUB_GFXMODE): Export variable.
2123         * util/grub.d/00_header.in: Allow the administrator to change default
2124         gfxmode via ${GRUB_GFXMODE}.
2126 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
2128         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
2130 2008-08-21  Robert Millan  <rmh@aybabtu.com>
2132         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
2133         loader.
2134         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
2135         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
2137 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
2139         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
2140         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
2142 2008-08-19  Robert Millan  <rmh@aybabtu.com>
2144         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
2145         (struct grub_virtual_screen): Remove `cursor_color'.
2146         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
2147         initialization.
2148         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
2150 2008-08-18  Robert Millan  <rmh@aybabtu.com>
2152         Unify (identical) linux_normal.c files.
2153         * loader/i386/efi/linux_normal.c: Move from here ...
2154         * loader/linux_normal.c: ... to here.  Update all users.
2155         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
2156         * loader/i386/ieee1275/linux_normal.c: Likewise.
2158 2008-08-18  Robert Millan  <rmh@aybabtu.com>
2160         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
2161         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
2162         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
2163         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
2164         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
2165         New macros.
2166         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
2167         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
2168         (GRUB_LINUX_CL_END_OFFSET): ... to here.
2169         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
2170         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
2171         (GRUB_EFI_CL_END_OFFSET): Rename to ...
2172         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
2173         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
2174         Initialize `params->video_cursor_x' and `params->video_cursor_y'
2175         portably using grub_getxy().
2176         Replace `-EFI' with `-bzImage' in boot message.
2178 2008-08-17  Robert Millan  <rmh@aybabtu.com>
2180         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
2182 2008-08-17  Robert Millan  <rmh@aybabtu.com>
2184         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
2186         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
2187         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
2188         (grub_machine_mmap_iterate): New function declaration.
2189         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
2190         structure.
2191         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
2192         macros.
2194         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
2195         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
2196         Move e820 parsing from here ...
2197         * kern/i386/pc/mmap.c: New file.
2198         (grub_machine_mmap_iterate): ... to here.
2200         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
2201         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
2202         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
2203         (grub_available_iterate): Redeclare to return `void', and redeclare
2204         its hook to use grub_uint64_t as addr and size parameters, and rename
2205         to ...
2206         (grub_machine_mmap_iterate): ... this.  Update all users.
2208         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
2209         to make it more readable.  Rename to ...
2210         (grub_machine_mmap_iterate): ... this.
2212         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
2213         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
2214         (grub_multiboot): Allocate an extra region after the payload, and fill
2215         it with a Multiboot memory map.  Adjust a.out loader to calculate size
2216         with the extra space.
2217         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
2218         with the extra space.
2220 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
2222         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
2224 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
2226         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
2227         mdate-sh to the list `find' searches for.
2228         * DISTLIST: Regenerated.
2230 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
2232         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
2233         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
2234         genmoddep.awk, gensymlist.sh.in.
2235         (DISTDIRS): Add bus, docs, hook, lib.
2236         * DISTLIST: Regenerated.
2237         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
2239 2008-08-16  Robert Millan  <rmh@aybabtu.com>
2241         * disk/raid.c (grub_raid_init): Handle/report errors set by
2242         grub_device_iterate().
2243         * disk/lvm.c (grub_lvm_init): Likewise.
2245 2008-08-15  Bean  <bean123ch@gmail.com>
2247         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2248         and datehook.mod.
2249         (datetime_mod_SOURCES): New macro.
2250         (datetime_mod_CFLAGS): Likewise.
2251         (datetime_mod_LDFLAGS): Likewise.
2252         (date_mod_SOURCES): Likewise.
2253         (date_mod_CFLAGS): Likewise.
2254         (date_mod_LDFLAGS): Likewise.
2255         (datehook_mod_SOURCES): Likewise.
2256         (datehook_mod_CFLAGS): Likewise.
2257         (datehook_mod_LDFLAGS): Likewise.
2259         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2260         and datehook.mod.
2261         (datetime_mod_SOURCES): New macro.
2262         (datetime_mod_CFLAGS): Likewise.
2263         (datetime_mod_LDFLAGS): Likewise.
2264         (date_mod_SOURCES): Likewise.
2265         (date_mod_CFLAGS): Likewise.
2266         (date_mod_LDFLAGS): Likewise.
2267         (datehook_mod_SOURCES): Likewise.
2268         (datehook_mod_CFLAGS): Likewise.
2269         (datehook_mod_LDFLAGS): Likewise.
2271         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2272         and datehook.mod.
2273         (datetime_mod_SOURCES): New macro.
2274         (datetime_mod_CFLAGS): Likewise.
2275         (datetime_mod_LDFLAGS): Likewise.
2276         (date_mod_SOURCES): Likewise.
2277         (date_mod_CFLAGS): Likewise.
2278         (date_mod_LDFLAGS): Likewise.
2279         (datehook_mod_SOURCES): Likewise.
2280         (datehook_mod_CFLAGS): Likewise.
2281         (datehook_mod_LDFLAGS): Likewise.
2283         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2284         and datehook.mod.
2285         (datetime_mod_SOURCES): New macro.
2286         (datetime_mod_CFLAGS): Likewise.
2287         (datetime_mod_LDFLAGS): Likewise.
2288         (date_mod_SOURCES): Likewise.
2289         (date_mod_CFLAGS): Likewise.
2290         (date_mod_LDFLAGS): Likewise.
2291         (datehook_mod_SOURCES): Likewise.
2292         (datehook_mod_CFLAGS): Likewise.
2293         (datehook_mod_LDFLAGS): Likewise.
2295         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2296         and datehook.mod.
2297         (datetime_mod_SOURCES): New macro.
2298         (datetime_mod_CFLAGS): Likewise.
2299         (datetime_mod_LDFLAGS): Likewise.
2300         (date_mod_SOURCES): Likewise.
2301         (date_mod_CFLAGS): Likewise.
2302         (date_mod_LDFLAGS): Likewise.
2303         (datehook_mod_SOURCES): Likewise.
2304         (datehook_mod_CFLAGS): Likewise.
2305         (datehook_mod_LDFLAGS): Likewise.
2307         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
2309         * commands/date.c: New file.
2311         * hook/datehook.c: Likewise.
2313         * include/grub/lib/datetime.h: Likewise.
2315         * include/grub/i386/cmos.h: Likewise.
2317         * lib/datetime.c: Likewise.
2319         * lib/i386/datetime.c: Likewise.
2321         * lib/efi/datetime.c: Likewise.
2323 2008-08-14  Robert Millan  <rmh@aybabtu.com>
2325         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
2326         (grub_mkelfimage_SOURCES): New variable.
2327         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
2329         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
2330         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
2331         * conf/powerpc-ieee1275.rmk: Likewise.
2332         * conf/i386-ieee1275.rmk: Likewise.
2334         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
2335         * kern/i386/coreboot/init.c: Likewise.
2337         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
2338         with `<grub/cpu/kernel.h>'.
2339         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
2340         to ...
2341         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
2342         * kern/i386/coreboot/startup.S: Likewise.
2344         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
2345         (GRUB_MOD_GAP): Remove.
2346         * include/grub/powerpc/kernel.h: New file.
2347         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
2348         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2349         * include/grub/i386/kernel.h: New file.
2350         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
2351         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
2352         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2354         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
2355         `grub-mkelfimage'.
2356         Use --directory when invoking grub_mkimage.
2358         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
2359         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
2360         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
2361         and GRUB_KERNEL_CPU_PREFIX.
2363 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
2365         * include/grub/err.h (grub_err_printf): New function prototype.
2366         * util/misc.c (grub_err_printf): New function.
2367         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
2368         grub_printf.
2369         * kern/err.c (grub_print_error): Use grub_err_printf.
2371 2008-08-13  Robert Millan  <rmh@aybabtu.com>
2373         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
2375 2008-08-13  Robert Millan  <rmh@aybabtu.com>
2377         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
2378         boot entry.
2380 2008-08-12  Robert Millan  <rmh@aybabtu.com>
2382         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
2383         of the relocation code from here ...
2384         (grub_multiboot): ... to here.
2385         (forward_relocator, backward_relocator): Move from here ...
2386         * kern/i386/loader.S (grub_multiboot_forward_relocator)
2387         (grub_multiboot_backward_relocator): ... to here.
2388         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
2389         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
2390         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
2391         (grub_multiboot_forward_relocator_end)
2392         (grub_multiboot_backward_relocator)
2393         (grub_multiboot_backward_relocator_end): New variables.
2395 2008-08-12  Bean  <bean123ch@gmail.com>
2397         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
2399 2008-08-11  Robert Millan  <rmh@aybabtu.com>
2401         * kern/i386/linuxbios/startup.S: Move from here ...
2402         * kern/i386/coreboot/startup.S: ... to here.
2404         * kern/i386/linuxbios/init.c: Move from here ...
2405         * kern/i386/coreboot/init.c: ... to here.
2407         * kern/i386/linuxbios/table.c: Move from here ...
2408         * kern/i386/coreboot/mmap.c: ... to here.
2410         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
2412 2008-08-11  Robert Millan  <rmh@aybabtu.com>
2414         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
2415         errors.  Leave it to the upper layer to handle them.
2417 2008-08-09  Christian Franke  <franke@computer.org>
2419         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
2420         * conf/common.rmk: Install `grub-pe2elf' only if requested.
2421         Install `grub.d/10_windows' only on Cygwin.
2422         * configure.ac: Add subst of `target_os'.
2423         Check `target_os' also before setting TARGET_OBJ2ELF.
2424         Add `--enable-grub-pe2elf'.
2426 2008-08-08  Robert Millan  <rmh@aybabtu.com>
2428         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2429         (grub_last_time): Change type to grub_uint64_t.
2430         (grub_disk_open): Migrate code from to using grub_get_time_ms().
2431         (grub_disk_close): Likewise.
2433         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2434         (run_menu): Migrate code from to using grub_get_time_ms().
2436         * util/misc.c (grub_get_time_ms): New function.
2438 2008-08-08  Marco Gerards  <marco@gnu.org>
2440         * disk/ata.c (grub_ata_regget): Change return type to
2441         `grub_uint8_t'.
2442         (grub_ata_regget2): Likewise.
2443         (grub_ata_wait_status): New function.
2444         (grub_ata_wait_busy): Removed function, updated all users to use
2445         `grub_ata_wait_status'.
2446         (grub_ata_wait_drq): Likewise.
2447         (grub_ata_cmd): New function.
2448         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
2449         error handling.
2450         (grub_ata_pio_write): Add error handling.
2451         (grub_atapi_identify): Likewise.
2452         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
2453         handling.
2454         (grub_ata_identify): Use `grub_ata_cmd' and improve error
2455         handling.  Actually use the detected registers.  Reorder the
2456         detection logic such that it is easier to read.
2457         (grub_ata_pciinit): Do not assign the same ID to each controller.
2458         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
2459         handling.
2460         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
2462         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
2464 2008-08-08  Marco Gerards  <marco@gnu.org>
2466         * NEWS: Update.
2468 2008-08-07  Bean  <bean123ch@gmail.com>
2470         * include/grub/x86_64/pci.h: New file.
2472 2008-08-07  Christian Franke  <franke@computer.org>
2474         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
2475         (TIMER2_GATE): Likewise.
2476         (grub_pit_wait): Add enable/disable of the timer2 gate
2477         bit of port 0x61.  This fixes a possible infinite loop.
2479 2008-08-07  Bean  <bean123ch@gmail.com>
2481         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
2482         kern/i386/tsc.c and kern/i386/pit.c.
2484         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
2485         x86_64 platform.
2487         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
2488         <grub/i386/tsc.h>.
2490         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
2492 2008-08-07  Bean  <bean123ch@gmail.com>
2494         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
2496         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
2498         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
2499         multiple inclusion. Add #include <grub/types.h>.
2501 2008-08-06  Christian Franke  <franke@computer.org>
2503         * conf/common.rmk: Build and install `10_windows'.
2504         * util/grub.d/10_windows.in: New script.
2506 2008-08-06  Pavel Roskin  <proski@gnu.org>
2508         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
2510 2008-08-06  Robert Millan  <rmh@aybabtu.com>
2512         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
2513         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
2515 2008-08-06  Bean  <bean123ch@gmail.com>
2517         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
2518         (grub_pxefs_fs_int): Remove dummy definition.
2519         (grub_pxefs_open): Use data->block_size to store the current block
2520         size setting.
2521         (grub_pxefs_read): Use block size stored in data->block_size. As the
2522         value of grub_pxe_blksize can be changed after the file is opened.
2524 2008-08-06  Bean  <bean123ch@gmail.com>
2526         * fs/i386/pc/pxe.c (curr_file): new variable.
2527         (grub_pxefs_open): Simply the handling of pxe file system. Don't
2528         require the dummy internal file system anymore.
2529         (grub_pxefs_read): Removed.
2530         (grub_pxefs_close): Likewise.
2531         (grub_pxefs_fs_int): Likewise.
2532         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
2533         connection when we switch file.
2534         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
2536 2008-08-06  Robert Millan  <rmh@aybabtu.com>
2538         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
2539         `halt.mod'.
2540         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
2541         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
2543         * kern/i386/halt.c: New file.
2544         * kern/i386/reboot.c: Likewise.
2545         * include/grub/i386/reboot.h: Likewise.
2546         * include/grub/i386/halt.h: Likewise.
2548         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
2549         Include `<grub/cpu/halt.h>'.
2550         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
2551         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
2553         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
2554         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
2555         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
2556         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
2557         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
2558         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
2559         from here ...
2560         * include/grub/i386/at_keyboard.h: ... to here.
2562 2008-08-05  Robert Millan  <rmh@aybabtu.com>
2564         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
2565         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
2566         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
2567         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2568         `kern/generic/millisleep.c'.
2570         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
2571         instead of grub_get_rtc().
2572         (grub_tsc_init): Initialize `tsc_boot_time'.
2574         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
2575         (grub_machine_init): Use grub_tsc_init() rather than
2576         installing an RTC-based handler via grub_install_get_time_ms().
2578         * kern/i386/pit.c: New file.
2579         * include/grub/i386/pit.h: Likewise.
2581 2008-08-05  Bean  <bean123ch@gmail.com>
2583         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
2585         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
2586         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
2587         (pxe_mod_SOURCES): New macro.
2588         (pxe_mod_CFLAGS): Likewise.
2589         (pxe_mod_LDFLAGS): Likewise.
2590         (pxecmd_mod_SOURCES): Likewise.
2591         (pxecmd_mod_CFLAGS): Likewise.
2592         (pxecmd_mod_LDFLAGS): Likewise.
2594         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
2595         (grub_pxe_call): Likewise.
2597         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
2599         * commands/i386/pc/pxecmd.c: New file.
2601         * fs/i386/pc/pxe.c: Likewise.
2603         * include/grub/i386/pc/pxe.h: Likewise.
2605 2008-08-05  Bean  <bean123ch@gmail.com>
2607         * util/console.c (grub_console_cur_color): New variable.
2608         (grub_console_standard_color): Likewise.
2609         (grub_console_normal_color): Likewise.
2610         (grub_console_highlight_color): Likewise.
2611         (color_map): Likewise.
2612         (use_color): Likewise.
2613         (NUM_COLORS): New macro.
2614         (grub_ncurses_setcolorstate): Handle color properly.
2615         (grub_ncurses_setcolor): Don't change color here, just remember the
2616         settings, color will be set in grub_ncurses_setcolorstate.
2617         (grub_ncurses_getcolor): New function.
2618         (grub_ncurses_init): Initialize color pairs.
2619         (grub_ncurses_term): New member grub_ncurses_getcolor.
2621 2008-08-05  Colin D Bennett  <colin@gibibit.com>
2623         High resolution timer support.  Implemented for x86 CPUs using TSC.
2624         Extracted generic grub_millisleep() so it's linked in only as needed.
2625         This requires a Pentium compatible CPU; if the RDTSC instruction is
2626         not supported, then it falls back on the generic grub_get_time_ms()
2627         implementation that uses the machine's RTC.
2629         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
2630         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2631         `kern/generic/millisleep.c'.
2633         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
2634         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
2636         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
2637         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
2639         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2641         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2642         `kern/generic/millisleep.c'.
2644         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2646         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
2648         * kern/generic/rtc_get_time_ms.c: New file.
2650         * kern/generic/millisleep.c: New file.
2652         * kern/misc.c: Don't include
2653         <kern/time.h> anymore.
2654         (grub_millisleep_generic): Removed.
2656         * commands/sleep.c (grub_interruptible_millisleep): Uses
2657         grub_get_time_ms() instead of grub_get_rtc().
2659         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
2660         function.
2661         (grub_cpu_is_cpuid_supported): New inline function.
2662         (grub_cpu_is_tsc_supported): New inline function.
2663         (grub_tsc_init): New function prototype.
2664         (grub_tsc_get_time_ms): New function prototype.
2666         * kern/i386/tsc.c (grub_get_time_ms): New file.
2668         * include/grub/time.h: Include <grub/types.h.
2669         (grub_millisleep_generic): Removed.
2670         (grub_get_time_ms): New prototype.
2671         (grub_install_get_time_ms): New prototype.
2672         (grub_rtc_get_time_ms): New prototype.
2674         * kern/time.c (grub_get_time_ms): New function.
2675         (grub_install_get_time_ms): New function.
2677         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
2678         <grub/time.h> anymore.
2679         (grub_millisleep): Removed.
2680         (grub_machine_init): Call grub_tsc_init.
2682         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
2683         get_time_ms() implementation.
2685         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
2686         (ieee1275_get_time_ms): New function.
2687         (grub_machine_init): Install get_time_ms() implementation.
2689         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
2690         (grub_machine_init): Call grub_tsc_init().
2691         (grub_millisleep): Removed.
2693         * kern/ieee1275/init.c (grub_millisleep): Removed.
2694         (grub_machine_init): Install ieee1275_get_time_ms()
2695         implementation.
2696         (ieee1275_get_time_ms): New function.
2697         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
2698         real work.
2700 2008-08-05  Marco Gerards  <marco@gnu.org>
2702         * disk/ata.c: Include <grub/pci.h>.
2703         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
2704         (grub_ata_initialize): Rewritten.
2705         (grub_ata_device_initialize): New function.
2707 2008-08-04  Pavel Roskin  <proski@gnu.org>
2709         * kern/main.c: Include grub/mm.h.
2711 2008-08-04  Robert Millan  <rmh@aybabtu.com>
2713         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
2714         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
2715         corruption problem).
2717 2008-08-04  Robert Millan  <rmh@aybabtu.com>
2719         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
2720         warnings introduced in my last commit.
2722 2008-08-03  Robert Millan  <rmh@aybabtu.com>
2724         Make PCI available on all i386 architectures.
2726         * include/grub/i386/pc/pci.h: Move from here ...
2727         * include/grub/i386/pci.h: ... to here.
2729         * include/grub/i386/pc/pci.h: Remove.
2730         * include/grub/i386/efi/pci.h: Remove.
2731         * include/grub/x86_64/efi/pci.h: Remove.
2733         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
2734         `<grub/cpu/pci.h>'.
2736         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
2737         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
2738         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
2740         * conf/i386-ieee1275.rmk: Likewise.
2742 2008-08-03  Robert Millan  <rmh@aybabtu.com>
2744         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
2745         (grub_console_setcursor): Make it possible to set cursor off.
2747 2008-08-03  Robert Millan  <rmh@aybabtu.com>
2749         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
2750         of modules instead of assuming which platform provides what.
2751         * util/update-grub.in: Likewise.
2753 2008-08-03  Robert Millan  <rmh@aybabtu.com>
2755         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
2756         instead of `grub_install_dos_part' to determine whether a drive needs
2757         to be prepended to prefix (`grub_install_dos_part' is not reliable,
2758         because it can be overridden when loading GRUB via Multiboot).
2760 2008-08-02  Robert Millan  <rmh@aybabtu.com>
2762         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
2764 2008-08-02  Robert Millan  <rmh@aybabtu.com>
2766         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
2767         of informational grub_dprintf() calls.
2769 2008-08-02  Robert Millan  <rmh@aybabtu.com>
2771         * disk/memdisk.c (memdisk_size): Don't initialize.
2772         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
2774         * include/grub/i386/pc/kernel.h
2775         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
2776         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
2777         (grub_memdisk_image_size, grub_arch_memdisk_addr)
2778         (grub_arch_memdisk_size): Remove.
2780         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
2781         field (was only used to transfer a constant).  Add `type' field to
2782         support multiple module types.
2783         (grub_module_iterate): New function.
2785         * kern/device.c (grub_device_open): Do not hide error messages
2786         when grub_disk_open() fails.  Use grub_print_error() instead.
2788         * kern/i386/pc/init.c (grub_arch_modules_addr)
2789         (grub_arch_memdisk_size): Remove functions.
2790         (grub_arch_modules_addr): Return the module address in high memory
2791         (now that it isn't copied anymore).
2793         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
2794         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
2795         decompression routine (grub_total_module_size already includes that
2796         now).  Don't copy modules back to low memory.
2798         * kern/main.c: Include `<grub/mm.h>'.
2799         (grub_load_modules): Split out (and use) ...
2800         (grub_module_iterate): ... this function, which iterates through
2801         module objects and runs a hook.
2802         Comment out grub_mm_init_region() call, as it would cause non-ELF
2803         modules to be overwritten.
2805         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
2806         the memdisk image in its own region, make it part of the module list.
2807         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
2808         (main): Parse --memdisk|-m option, and pass user-provided path as
2809         parameter to generate_image().
2810         (add_segments): Pass `memdisk_path' down to load_modules().
2811         (load_modules): Embed memdisk image in module section when requested.
2812         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
2813         `header.type' instead of `header.offset'.
2815         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
2816         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
2817         (memdisk_mod_LDFLAGS): New variables.
2818         * conf/i386-coreboot.rmk: Likewise.
2819         * conf/i386-ieee1275.rmk: Likewise.
2821 2008-08-02  Robert Millan  <rmh@aybabtu.com>
2823         * loader/i386/pc/multiboot.c (playground, forward_relocator)
2824         (backward_relocator): New variables.  Used to allocate and relocate
2825         the payload, respectively.
2826         (grub_multiboot_load_elf32): Load into heap instead of requested
2827         address, install the appropriate relocator code in each bound of
2828         the payload, and set the entry point such that
2829         grub_multiboot_real_boot() will jump to one of them.
2831         * kern/i386/loader.S (grub_multiboot_payload_size)
2832         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2833         (grub_multiboot_payload_entry_offset): New variables.
2834         (grub_multiboot_real_boot): Set cpu context to what the relocator
2835         expects, and jump to the relocator instead of the payload.
2837         * include/grub/i386/loader.h (grub_multiboot_payload_size)
2838         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2839         (grub_multiboot_payload_entry_offset): Export.
2841 2008-08-01  Bean  <bean123ch@gmail.com>
2843         * normal/menu_entry.c (editor_getline): Don't return the original
2844         string as result, as it will be released by lexer once it has done
2845         using it.
2847 2008-08-01  Robert Millan  <rmh@aybabtu.com>
2849         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
2850         within menuentries, not before them.
2851         util/grub.d/10_hurd.in: Likewise.
2853 2008-08-01  Bean  <bean123ch@gmail.com>
2855         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
2856         (bufio_mod_SOURCES): New macro.
2857         (bufio_mod_CFLAGS): Likewise.
2858         (bufio_mod_LDFLAGS): Likewise.
2860         * include/grub/bufio.h: New file.
2862         * io/bufio.c: Likewise.
2864         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
2865         (grub_video_reader_png): Use grub_buffile_open to open file.
2867         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
2868         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
2870         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
2871         (grub_video_reader_tga): Use grub_buffile_open to open file.
2873         * font/manager.c: Include <grub/bufio.h>.
2874         (add_font): Use grub_buffile_open to open file.
2876 2008-07-31  Robert Millan  <rmh@aybabtu.com>
2878         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
2879         ELF segments, use a macro for arbitrarily accessing any of them instead
2880         of preparing a pointer that allows access to one at a time.
2881         (grub_multiboot_load_elf64): Likewise.
2883 2008-07-31  Bean  <bean123ch@gmail.com>
2885         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
2886         GRUB_KERNEL_MACHINE_DATA_END.
2888 2008-07-30  Robert Millan  <rmh@aybabtu.com>
2890         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
2891         Increase from 0x50 to 0x60.
2892         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
2893         use UUIDs to identify the root drive for them.  If that's not
2894         possible, abort.
2895         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
2896         check, for cross-disk installs.
2898 2008-07-30  Robert Millan  <rmh@aybabtu.com>
2900         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
2901         is non-empty, use it to set the `prefix' environment variable instead
2902         of the usual approach.
2903         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
2904         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
2905         environment variable instead of dummy make_install_device().
2907         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
2908         (start): Insert a data section, with `grub_prefix' variable.
2909         * kern/i386/linuxbios/startup.S: Likewise.
2911         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
2912         New variable reference.
2913         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
2914         New macro.  Defines offset of `grub_prefix' within startup.S (relative
2915         to `start').
2916         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
2917         section within startup.S (relative to `start').
2918         * include/grub/i386/coreboot/kernel.h: Likewise.
2920         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
2921         Overwrite grub_prefix with its contents, at the beginning of the
2922         first segment.
2923         (main): Understand -p|--prefix.
2925 2008-07-30  Robert Millan  <rmh@aybabtu.com>
2927         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
2929 2008-07-30  Robert Millan  <rmh@aybabtu.com>
2931         * term/i386/pc/vga_text.c (grub_console_cls): Use
2932         grub_console_gotoxy() to go back to beginning of the screen.
2933         Found by Patrick Georgi <patrick.georgi@coresystems.de>
2935 2008-07-29  Christian Franke  <franke@computer.org>
2937         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2938         Add conversion of emulated mount points on Cygwin.
2940 2008-07-29  Christian Franke  <franke@computer.org>
2942         * util/update-grub.in: Add a check for admin
2943         group on Cygwin.
2944         Remove old `grub.cfg.new' before creation.
2945         Add `-f' to `mv' to handle the different filesystem
2946         semantics of Windows.
2948 2008-07-29  Bean  <bean123ch@gmail.com>
2950         * normal/main.c (get_line): Fix buffer overflow bug.
2952 2008-07-28  Robert Millan  <rmh@aybabtu.com>
2954         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
2955         (struct grub_apple_header): New struct.  Describes the layout of
2956         the partmap header.
2957         (apple_partition_map_iterate): Check the header magic as well as the
2958         partition magic (which was already being checked).
2960 2008-07-28  Pavel Roskin  <proski@gnu.org>
2962         * genmk.rb: Add a warning to the beginning of the output that
2963         it's a generated file and should not be edited.
2965 2008-07-28  Robert Millan  <rmh@aybabtu.com>
2967         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2968         with the same number are found, just use issue a warning with
2969         grub_dprintf(), as this error has been reported to be non-fatal.
2971 2008-07-27  Robert Millan  <rmh@aybabtu.com>
2973         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
2974         information.
2976 2008-07-27  Bean  <bean123ch@gmail.com>
2978         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
2979         (grub_fat_find_dir): Ignore case when comparing filename.
2981 2008-07-27  Bean  <bean123ch@gmail.com>
2983         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
2984         smallino, as it's more descriptive, and i8count can be confused with
2985         the other field count.
2986         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
2987         inode type.
2989 2008-07-27  Bean  <bean123ch@gmail.com>
2991         * commands/crc.c: New file.
2993         * lib/crc.c: Likewise.
2995         * include/grub/lib/crc.h: Likewise.
2997         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
2999         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
3000         (hexdump): Move this function to ...
3002         * lib/hexdump.c: ... here.
3004         * include/grub/hexdump.h: Renamed to ...
3006         * include/grub/lib/hexdump.h: ... this.
3008         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
3010         * util/grub-editenv.c: Likewise.
3012         * include/envblk.h: Renamed to ...
3014         * include/lib/envblk.h: ... this.
3016         * util/envblk.c: Renamed to ...
3018         * lib/envblk.c: ... this.
3020         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
3021         lib/hexdump.c.
3022         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
3023         (pkglib_MODULES): Add crc.mod.
3024         (hexdump_mod_SOURCES): Add lib/hexdump.c.
3025         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
3026         (crc_mod_SOURCES): New macro.
3027         (crc_mod_CFLAGS): Likewise.
3028         (crc_mod_LDFLAGS): Likewise.
3030         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
3032         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3034         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3036         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3038         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3040 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
3042         * commands/help.c: Include <grub/term.h>.
3043         (TERM_WIDTH): Removed.  Updated all users.
3045 2008-07-27  Pavel Roskin  <proski@gnu.org>
3047         * util/getroot.c (find_root_device): Rephrase a comment to avoid
3048         spurious warnings about a comment within a comment.
3050 2008-07-25  Robert Millan  <rmh@aybabtu.com>
3052         * util/getroot.c (find_root_device): Skip devices that match
3053         /dev/dm-[0-9].  This lets the real device be found for any type of
3054         abstraction (LVM, EVMS, RAID..).
3055         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
3056         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
3057         device is found first, find_root_device() will now skip it.
3059 2008-07-24  Pavel Roskin  <proski@gnu.org>
3061         * include/grub/types.h: Use __builtin_bswap32() and
3062         __builtin_bswap64() with gcc 4.3 and newer.
3064 2008-07-24  Christian Franke  <franke@computer.org>
3066         * util/i386/pc/grub-install.in: If `--debug' is specified,
3067         pass `--verbose' to grub-setup.
3068         Abort script if make_system_path_relative_to_its_root() fails.
3070 2008-07-24  Bean  <bean123ch@gmail.com>
3072         * configure.ac: Fixed a bug caused by the previous cygwin patch,
3073         variable `target_platform' should be `platform'.
3075 2008-07-24  Bean  <bean123ch@gmail.com>
3077         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
3078         (grub_png_init_fixed_block): New function.
3079         (grub_png_decode_image_data): Handle fixed huffman code compression.
3081 2008-07-24  Bean  <bean123ch@gmail.com>
3083         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
3084         (grub_pe2elf_SOURCES): New macro.
3085         (CLEANFILES): Add grub-pe2elf.
3087         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
3088         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
3089         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
3090         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
3091         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
3092         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
3093         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
3094         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
3095         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
3096         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
3097         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
3098         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
3099         (GRUB_PE32_DT_FUNCTION): Likewise.
3100         (GRUB_PE32_REL_I386_DIR32): Likewise.
3101         (GRUB_PE32_REL_I386_REL32): Likewise.
3102         (grub_pe32_symbol): New structure.
3103         (grub_pe32_reloc): Likewise.
3105         * util/grub-pe2elf.c: New file.
3107         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
3108         start symbol in non pc platform.
3110         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
3112         The following patches are from Christian Franke.
3114         * include/grub/dl.h: Remove .previous, gas supports this only
3115         for ELF format.
3117         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
3118         Remove .type, gas supports this only for ELF format.
3120         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
3121         nullbytes in symbol table. This fixes an infinite loop if table is
3122         zero filled.
3124         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
3125         TARGET_IMG_LDFLAGS and EXEEXT.
3127         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
3128         TARGET_IMG_LDFLAGS_AC.
3129         (grub_CHECK_STACK_ARG_PROBE): New function.
3131         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
3133         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
3135         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
3136         to set TARGET_IMG_LD* accordingly.
3137         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
3138         Add call to grub_CHECK_STACK_ARG_PROBE.
3139         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
3141         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
3143         * genmk.rb: Add EXEEXT to CLEANFILES.
3145 2008-07-23  Robert Millan  <rmh@aybabtu.com>
3147         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
3148         define the codes for arrows and lines used for the menu).
3149         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
3150         as well.
3152         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
3153         fonts, because the latter are too slow.
3155 2008-07-21  Bean  <bean123ch@gmail.com>
3157         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
3158         a20. Run keyboard test last, as it will cause macbook to halt.
3160 2008-07-18  Pavel Roskin  <proski@gnu.org>
3162         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
3163         load foreign architecture modules correctly anyway.  Keep
3164         support for loading host architecture modules, whether we
3165         compile them or not.
3167 2008-07-17  Pavel Roskin  <proski@gnu.org>
3169         * configure.ac: Use -m32 or -m64 regardless of whether we had to
3170         change target_cpu.  The compiler default can mismatch target_cpu
3171         in any case.
3173         * disk/efi/efidisk.c: Fix format warnings on x86_64.
3174         * kern/efi/efi.c: Likewise.
3176         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
3177         target compiler is functional.
3178         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
3179         are set up.
3181         * configure.ac: Default to efi platform for x86_64-apple.  Allow
3182         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
3183         adjustments from the rest, only do them if target is not
3184         explicitly given.  Merge other adjustments with the final sanity
3185         check.  Remove an extraneous check for supported CPU.  Be
3186         specific which CPU and which platform is not supported.
3188         * configure.ac: Default to pc platform for x86_64.
3190 2008-07-17  Robert Millan  <rmh@aybabtu.com>
3192         Partial LinuxBIOS -> Coreboot rename.
3194         * conf/i386-linuxbios.rmk: Renamed to ...
3195         * conf/i386-coreboot.rmk: ... this.
3196         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
3197         * configure.ac: Accept "coreboot" as input platform (but maintain
3198         compatibility with "linuxbios").
3199         * include/grub/i386/linuxbios: Renamed to ...
3200         * include/grub/i386/coreboot: ... this.
3202 2008-07-17  Bean  <bean123ch@gmail.com>
3204         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
3205         (appleldr_mod_SOURCE): New variable.
3206         (appleldr_mod_CFLAGS): Likewise.
3207         (appleldr_mod_LDFLAGS): Likewise.
3208         (pci_mod_SOURCES): Likewise.
3209         (pci_mod_CFLAGS): Likewise.
3210         (pci_mod_LDFLAGS): Likewise.
3211         (lspci_mod_SOURCES): Likewise.
3212         (lspci_mod_CFLAGS): Likewise.
3213         (lspci_mod_LDFLAGS): Likewise.
3215         * conf/x86_64-efi.rmk: New file.
3217         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
3218         macro.
3219         (grub_efidisk_write): Likewise.
3221         * include/efi/api.h (efi_call_0): New macro.
3222         (efi_call_1): Likewise.
3223         (efi_call_2): Likewise.
3224         (efi_call_3): Likewise.
3225         (efi_call_4): Likewise.
3226         (efi_call_5): Likewise.
3227         (efi_call_6): Likewise.
3229         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
3230         grub_rescue_cmd_chainloader.
3232         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
3233         (grub_pe32_optional_header): Change some fields based on i386 or
3234         x86_64 platform.
3235         (GRUB_PE32_PE32_MAGIC): Likewise.
3237         * include/grub/efi/uga_draw.h: New file.
3239         * include/grub/elf.h (STN_ABS): New constant.
3240         (R_X86_64_NONE): Relocation constant for x86_64.
3241         (R_X86_64_64): Likewise.
3242         (R_X86_64_PC32): Likewise.
3243         (R_X86_64_GOT32): Likewise.
3244         (R_X86_64_PLT32): Likewise.
3245         (R_X86_64_COPY): Likewise.
3246         (R_X86_64_GLOB_DAT): Likewise.
3247         (R_X86_64_JUMP_SLOT): Likewise.
3248         (R_X86_64_RELATIVE): Likewise.
3249         (R_X86_64_GOTPCREL): Likewise.
3250         (R_X86_64_32): Likewise.
3251         (R_X86_64_32S): Likewise.
3252         (R_X86_64_16): Likewise.
3253         (R_X86_64_PC16): Likewise.
3254         (R_X86_64_8): Likewise.
3255         (R_X86_64_PC8): Likewise.
3257         * include/grub/i386/efi/pci.h: New file.
3259         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
3260         Change it value based on platform.
3261         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
3262         (GRUB_E820_RAM): Likewise.
3263         (GRUB_E820_RESERVED): Likewise.
3264         (GRUB_E820_ACPI): Likewise.
3265         (GRUB_E820_NVS): Likewise.
3266         (GRUB_E820_EXEC_CODE): Likewise.
3267         (GRUB_E820_MAX_ENTRY): Likewise.
3268         (grub_e820_mmap): New structure.
3269         (linux_kernel_header): Change the efi field according to different
3270         kernel version, also field from linux_kernel_header.
3272         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
3274         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
3275         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
3276         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
3277         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
3278         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
3279         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
3280         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
3281         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
3282         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
3283         (GRUB_PCI_ADDR_IO_MASK): Likewise.
3285         * include/grub/x86_64/efi/kernel.h: New file.
3287         * include/grub/x86_64/efi/loader.h: Likewise.
3289         * include/grub/x86_64/efi/machine.h: Likewise.
3291         * include/grub/x86_64/efi/pci.h: Likewise.
3293         * include/grub/x86_64/efi/time.h: Likewise.
3295         * include/grub/x86_64/linux.h: Likewise.
3297         * include/grub/x86_64/setjmp.h: Likewise.
3299         * include/grub/x86_64/time.h: Likewise.
3301         * include/grub/x86_64/types.h: Likewise.
3303         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
3304          GRUB_TARGET_SIZEOF_VOID_P.
3306         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
3307         (grub_efi_locate_handle): Likewise.
3308         (grub_efi_open_protocol): Likewise.
3309         (grub_efi_set_text_mode): Likewise.
3310         (grub_efi_stall): Likewise.
3311         (grub_exit): Likewise.
3312         (grub_reboot): Likewise.
3313         (grub_halt): Likewise.
3314         (grub_efi_exit_boot_services): Likewise.
3315         (grub_get_rtc): Likewise.
3317         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
3318         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
3319         (grub_efi_allocate_pages): Wrap efi calls.
3320         (grub_efi_free_pages): Wrap efi calls.
3321         (grub_efi_get_memory_map): Wrap efi calls.
3323         * kern/x86_64/dl.c: New file.
3325         * kern/x86_64/efi/callwrap.S: Likewise.
3327         * kern/x86_64/efi/startup.S: Likewise.
3329         * loader/efi/appleloader.c: Likewise.
3331         * loader/efi/chainloader.c (cmdline): New variable.
3332         (grub_chainloader_unload): Wrap efi calls.
3333         (grub_chainloader_boot): Likewise.
3334         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
3335         command line.
3337         * loader/efi/chainloader_normal.c (chainloader_command):
3338         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
3339         command line.
3341         * loader/i386/efi/linux.c (allocate_pages): Change allocation
3342         method.
3343         (grub_e820_add_region): New function.
3344         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
3345         booting.
3346         (grub_find_video_card): New function.
3347         (grub_linux_setup_video): New function.
3348         (grub_rescue_cmd_linux): Probe for video information.
3350         * normal/x86_64/setjmp.S: New file.
3352         * term/efi/console.c (map_char): New function.
3353         (grub_console_putchar): Map unicode char.
3354         (grub_console_checkkey): Wrap efi calls.
3355         (grub_console_getkey): Likewise.
3356         (grub_console_getwh): Likewise.
3357         (grub_console_gotoxy): Likewise.
3358         (grub_console_cls): Likewise.
3359         (grub_console_setcolorstate): Likewise.
3360         (grub_console_setcursor): Likewise.
3362         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
3364 2008-07-16  Pavel Roskin  <proski@gnu.org>
3366         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
3367         format strings.
3369         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
3370         pointer, not an integer.  This fixes a warning and prevents
3371         precision loss on 64-bit systems.
3372         (relocate_addresses): Remove unneeded cast.
3374 2008-07-15  Pavel Roskin  <proski@gnu.org>
3376         * kern/i386/ieee1275/init.c: Include grub/cache.h.
3378         * term/ieee1275/ofconsole.c: Disable code unused on i386.
3380         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
3381         Fix comparison between signed and unsigned.
3383         * include/grub/i386/ieee1275/console.h: Declare
3384         grub_console_init() and grub_console_fini().
3386         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
3387         It's empty and unused.
3389         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
3390         beginning to avoid warnings with some compilers.
3392         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
3393         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
3395 2008-07-14  Pavel Roskin  <proski@gnu.org>
3397         * kern/env.c (grub_register_variable_hook): Don't copy empty
3398         string, it leaks memory.  Pass "" to grub_env_set(), it should
3399         handle constant strings.
3401         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
3402         * commands/cmp.c (grub_cmd_cmp): Likewise.
3403         * kern/dl.c (grub_dl_flush_cache): Likewise.
3404         (grub_dl_load_core): Likewise.
3405         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
3406         (grub_elf64_load_phdrs): Likewise.
3408 2008-07-13  Pavel Roskin  <proski@gnu.org>
3410         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
3411         between signed and unsigned.
3412         (LzmaEnc_Finish): Fix warning about an unused parameter.
3414 2008-07-13  Bean  <bean123ch@gmail.com>
3416         * Makefile.in (enable_lzo): New rule.
3418         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
3420         * configure.ac (ENABLE_LZO): New option --enable-lzo.
3422         * boot/i386/pc/lnxboot.S: #include <config.h>.
3424         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
3425         its value according to the compression algorithm used, lzo or lzma.
3427         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
3428         compression algorithm according to configure macro.
3430         * kern/i386/pc/startup.S (codestart): Likewise.
3432         * kern/i386/pc/lzma_decode.S: New file.
3434         * include/grub/lib/LzFind.h: Likewise.
3436         * include/grub/lib/LzHash.h: Likewise.
3438         * include/grub/lib/LzmaDec.h: Likewise.
3440         * include/grub/lib/LzmaEnc.h: Likewise.
3442         * include/grub/lib/LzmaTypes.h: Likewise.
3444         * lib/LzFind.c: Likewise.
3446         * lib/LzmaDec.c: Likewise.
3448         * lib/LzmaEnc.c: Likewise.
3450 2008-07-13  Bean  <bean123ch@gmail.com>
3452         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
3453         (grub_ext4_extent_header): New structure.
3454         (grub_ext4_extent): Likewise.
3455         (grub_ext4_extent_idx): Likewise.
3456         (grub_ext4_find_leaf): New function.
3457         (grub_ext2_read_block): Handle extents.
3459 2008-07-12  Robert Millan  <rmh@aybabtu.com>
3461         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
3463 2008-07-11  Robert Millan  <rmh@aybabtu.com>
3465         * util/grub.d/40_custom.in: New file. Example on how to add custom
3466         entries to /etc/grub.d.
3467         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
3468         40_custom (implicitly, by merging all the grub.d rules).
3470 2008-07-11  Pavel Roskin  <proski@gnu.org>
3472         * commands/read.c (grub_getline): Fix invalid memory access.
3473         Don't add newline to the variable value.
3475         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
3476         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
3477         (serial_hw_get_port): Check validity of the port number.
3478         (grub_cmd_serial): Check return value of serial_hw_get_port().
3480 2008-07-07  Pavel Roskin  <proski@gnu.org>
3482         * boot/i386/pc/diskboot.S (notification_string): Replace
3483         "Loading kernel" with just "loading".  This is shorter, less
3484         confusing and saves a few bytes for possible future changes.
3486 2008-07-05  Pavel Roskin  <proski@gnu.org>
3488         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
3489         size for ATAPI devices, they are undefined.  Output sector
3490         number in decimal form.
3492         * disk/ata.c: Use named constants for status bits.
3494 2008-07-04  Pavel Roskin  <proski@gnu.org>
3496         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
3497         grub_addr_t before casting it to the void pointer to fix a
3498         warning.  Non-addressable regions are discarded earlier.
3499         (grub_arch_modules_addr): Cast _end to grub_addr_t.
3500         * kern/i386/linuxbios/table.c: Include grub/misc.h.
3501         (check_signature): Don't shadow table_header.
3502         (grub_linuxbios_table_iterate): Cast numeric constants to
3503         grub_linuxbios_table_header_t.
3504         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
3505         grub_stop().
3507         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
3508         prevent warnings.
3510         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
3511         pointer, which can cause warnings.  Support 64-bit addresses.
3513         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
3514         of sizeof(long).  This fixes PowerPC image generation on x86_64.
3516 2008-07-04  Robert Millan  <rmh@aybabtu.com>
3518         This fixes a performance issue when pc & gpt partmap iterators
3519         didn't abort iteration even after our hook found what it was
3520         looking for (often causing expensive probes of non-existent drives).
3522         Some callers relied on previous buggy behaviour, since they would
3523         raise an error when their own hooks caused early abortion of its
3524         iteration.
3526         * kern/device.c (grub_device_open): Improve error message.
3527         * disk/lvm.c (grub_lvm_open): Likewise.
3528         * disk/raid.c (grub_raid_open): Likewise.
3530         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
3531         when hook requests it, independently of grub_errno.
3532         (pc_partition_map_probe): Do not fail when find_func() caused
3533         early abortion of pc_partition_map_iterate().
3535         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
3536         when hook requests it, independently of grub_errno.
3537         (gpt_partition_map_probe): Do not fail when find_func() caused
3538         early abortion of gpt_partition_map_iterate().
3540         * kern/partition.c (grub_partition_iterate): Abort parent iteration
3541         when hook requests it, independently of grub_errno.  Do not fail when
3542         part_map_iterate_hook() caused early abortion of p->iterate().
3544         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
3545         when grub_partition_iterate() returned with non-zero.
3547 2008-07-03  Pavel Roskin  <proski@gnu.org>
3549         * disk/ata.c (grub_ata_pio_write): Check status before writing,
3550         like we do in grub_ata_pio_read().
3551         (grub_ata_readwrite): Always write individual sectors.  Fix the
3552         sector count for the remainder.
3553         (grub_ata_write): Enable writing to ATA devices.  Correctly
3554         report error for ATAPI devices.
3556 2008-07-02  Pavel Roskin  <proski@gnu.org>
3558         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
3559         warning.
3561         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
3562         for every read sector, we already increment it for the whole
3563         batch.  This fixes reading more than 256 sectors at once.
3565         * util/grub-editenv.c (cmd_info): Cast argument to long
3566         explicitly.  ptrdiff_t reduces to int on i386.
3568         * util/grub-editenv.c (main): Be specific which parameter is
3569         missing.
3571         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
3572         (memdisk): Make memdisk_orig_addr a pointer.
3574         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
3575         for file offsets, use grub_off_t instead.  Fix printf format
3576         warnings.
3578         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
3579         there.  Real unexpected warnings should not drown in the noise
3580         about known problems.
3582         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
3583         grub_disk_addr_t for memory addresses.
3585         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
3586         explicitly to fix a warning.
3588         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
3590         * Makefile.in (MODULE_LDFLAGS): New variable.
3591         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
3592         the linker accepts --build-id=none.
3593         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
3594         MODULE_LDFLAGS.
3595         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
3597         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
3598         those in Linux XFS code.  Provide a way to access 64-bit parent
3599         inode.
3600         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
3601         the end of struct grub_xfs_dir_header.
3603 2008-07-02  Bean  <bean123ch@gmail.com>
3605         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
3606         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3607         and GRUB_IEEE1275_FLAG_NO_ANSI.
3609         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
3610         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3611         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
3613         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
3614         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
3616         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
3617         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
3619         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
3620         esc sequence on non ANSI terminal.
3621         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
3623         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
3624         beginning of file.
3626 2008-07-02  Bean  <bean123ch@gmail.com>
3628         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
3629         (grub_editenv_SOURCES): New variable.
3630         (pkglib_MODULES): Add loadenv.mod.
3631         (loadenv_mod_SOURCES): New variable.
3632         (loadenv_mod_CFLAGS): Likewise.
3633         (loadenv_mod_LDFLAGS): Likewise.
3635         * include/grub/envblk.h: New file.
3637         * util/envblk.c: New file.
3639         * util/grub-editenv.c: New file.
3641         * commands/loadenv.c: New file.
3643 2008-07-01  Pavel Roskin  <proski@gnu.org>
3645         * include/multiboot2.h (struct multiboot_tag_module): Use char,
3646         not unsigned char.  This fixes warnings and is consistent with
3647         other tags.
3649         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
3651         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
3653         * term/tparm.c (analyze): Always set *popcount.
3655         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
3656         cast to fix a warning.
3658         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
3659         cast to suppress a warning.
3661         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
3662         grub_fshelp_read_file() expects.
3664         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
3665         write uuid as a 32-bit value in CPU byte order, so declare and
3666         use it as such.
3668         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
3669         long if the format specifier expects it.
3670         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
3671         * partmap/pc.c (pc_partition_map_iterate): Likewise.
3672         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
3673         long to fix a warning.
3674         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
3675         grub_dprintf() arguments to fix warnings.
3677 2008-06-30  Pavel Roskin  <proski@gnu.org>
3679         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
3680         install_bsd_part immediately before core.img is embedded or
3681         modified on disk.  This fixes core.img verification if core.img
3682         cannot be embedded.
3684         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
3685         core_path to calculate the blocklist.
3686         Patch from Javier Martín <lordhabbit@gmail.com>
3688 2008-06-29  Robert Millan  <rmh@aybabtu.com>
3690         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
3691         block to disk block.
3692         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
3693         Patch from Niels Böhm <bitbucket@arcor.de>
3695 2008-06-29  Robert Millan  <rmh@aybabtu.com>
3697         * util/update-grub_lib.in (font_path): Search for fonts in
3698         /boot/grub first, which is more likely to be readable (we aren't
3699         deciding where fonts live, just looking for them).
3701 2008-06-26  Pavel Roskin  <proski@gnu.org>
3703         * util/biosdisk.c (read_device_map): Don't leave dead map
3704         entries for devices failing stat() check.
3706         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
3707         core_path_dev for the core.img path on the target device.
3709 2008-06-26  Robert Millan  <rmh@aybabtu.com>
3711         * disk/fs_uuid.c: New file.
3712         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
3713         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
3714         (fs_uuid_mod_LDFLAGS): New variables.
3715         * include/grub/disk.h (grub_disk_dev_id): Add
3716         `GRUB_DISK_DEVICE_UUID_ID'.
3717         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
3718         implement iterate().
3720 2008-06-26  Robert Millan  <rmh@aybabtu.com>
3722         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
3723         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
3724         Linux image includes no initrd.
3726 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
3728         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
3729         call to resolve the core image location that effectively appended the
3730         name twice.
3732 2008-06-21  Robert Millan  <rmh@aybabtu.com>
3734         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
3735         call from here ...
3737         * util/grub.d/10_hurd.in: ... to here ...
3738         * util/grub.d/10_linux.in: ... and here.
3740 2008-06-19  Robert Millan  <rmh@aybabtu.com>
3742         * kern/main.c (grub_main): Export `prefix' variable immediately
3743         after it has been set by grub_machine_set_prefix().
3745 2008-06-19  Robert Millan  <rmh@aybabtu.com>
3747         * commands/search.c (search_label, search_fs_uuid, search_file): Print
3748         search result when not saving to variable, not the other way around.
3749         When saving to variable, abort iteration as soon as a match is found.
3751 2008-06-19  Robert Millan  <rmh@aybabtu.com>
3753         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
3754         check for partition that provides /boot/grub.  Its logic is flawed,
3755         as it prevents prepare_grub_to_access_device() from being called
3756         multiple times.
3758 2008-06-19  Robert Millan  <rmh@aybabtu.com>
3760         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
3761         "insmod" command directly when abstraction modules are needed,
3762         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3763         since it had already been processed).
3765 2008-06-19  Pavel Roskin  <proski@gnu.org>
3767         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
3768         changed.  This is needed in case GRUB_LIBDIR changes.
3769         * conf/i386-ieee1275.rmk: Likewise.
3770         * conf/i386-linuxbios.rmk: Likewise.
3771         * conf/i386-pc.rmk: Likewise.
3772         * conf/powerpc-ieee1275.rmk: Likewise.
3774 2008-06-18  Pavel Roskin  <proski@gnu.org>
3776         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
3777         kernel_elf_symlist.c to symlist.c for consistency with other
3778         architectures.  Update all users.
3779         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3781 2008-06-18  Robert Millan  <rmh@aybabtu.com>
3783         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
3784         it in prefix.
3786         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
3787         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
3788         a RAID device, run setup() for all members independently on whether
3789         LVM abstraction is being used.
3790         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
3791         If grub-mkimage has set `*install_dos_part == -2', don't override this
3792         value.
3793         Perform *install_dos_part adjustments independently on whether
3794         we're embedding or not.
3795         Clarify error message when image is too big for embedding.
3796         Remove duplicate *install_dos_part stanza.
3798 2008-06-17  Robert Millan  <rmh@aybabtu.com>
3800         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
3801         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
3802         variables.
3803         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
3804         values in grub_ofconsole_normal_color and
3805         grub_ofconsole_highlight_color (they're not directly related to
3806         background and foreground).
3807         (grub_ofconsole_setcolorstate): Extract background and foreground
3808         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
3810 2008-06-17  Robert Millan  <rmh@aybabtu.com>
3812         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
3813         /boot/grub for the check in last commit, not /boot (they could be
3814         different partitions).
3816 2008-06-16  Robert Millan  <rmh@aybabtu.com>
3818         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
3819         asked to setup access for the same partition that provides /boot,
3820         don't bother using UUIDs since our root already has the value we
3821         want.
3823 2008-06-16  Robert Millan  <rmh@aybabtu.com>
3825         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
3826         I2O devices.
3827         Patch from Sven Mueller <sven@debian.org>.
3829 2008-06-16  Robert Millan  <rmh@aybabtu.com>
3831         * util/update-grub.in: Check for $EUID instead of $UID.
3832         Reported by Vincent Zweije.
3834 2008-06-16  Bean  <bean123ch@gmail.com>
3836         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
3837         (grub_ext2_read_block): Likewise.
3838         (grub_ext2_read_inode): Likewise.
3839         (grub_ext2_mount): Likewise.
3840         (grub_ext2_close): Likewise.
3841         (grub_ext3_get_journal): Removed.
3843         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
3844         (grub_reiserfs_read_symlink): Likewise.
3845         (grub_reiserfs_mount): Likewise.
3846         (grub_reiserfs_open): Likewise.
3847         (grub_reiserfs_read): Likewise.
3848         (grub_reiserfs_close): Likewise.
3849         (grub_reiserfs_get_journal): Removed.
3851         * fs/fshelp.c (grub_fshelp_read): Removed.
3852         (grub_fshelp_map_block): Likewise.
3854         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
3855         (grub_fshelp_journal): Likewise.
3856         (grub_fshelp_read): Likewise.
3857         (grub_fshelp_map_block): Likewise.
3859 2008-06-16  Pavel Roskin  <proski@gnu.org>
3861         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
3862         floating point anymore.
3863         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
3865 2008-06-15  Pavel Roskin  <proski@gnu.org>
3867         * commands/ls.c (grub_ls_list_files): Use integer calculations
3868         for human readable format, avoid floating point use.
3869         * kern/misc.c (grub_ftoa): Remove.
3870         (grub_vsprintf): Remove floating point support.
3872 2008-06-15  Robert Millan  <rmh@aybabtu.com>
3874         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
3875         devices.
3876         Reported by Max Vozeler.
3878 2008-06-15  Robert Millan  <rmh@aybabtu.com>
3880         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
3881         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
3882         skipped later.
3883         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
3884         the beginning of the prefix.
3886         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
3887         It is assumed that if we have a memdisk, grub-mkimage has set
3888         grub_prefix to include the "(memdisk)" drive in it.
3890 2008-06-15  Robert Millan  <rmh@aybabtu.com>
3892         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
3893         Initialize keyboard controller after registering the terminal, so that
3894         grub_printf() can be called from grub_keyboard_controller_init().
3896 2008-06-15  Robert Millan  <rmh@aybabtu.com>
3898         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
3899         extent-btree which is written as big endian on disk.
3900         Reported by Alain Greppin  <al@chilibi.org>.
3902 2008-06-14  Robert Millan  <rmh@aybabtu.com>
3904         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
3905         * util/i386/pc/grub-install.in (modules): Likewise.
3907 2008-06-13  Pavel Roskin  <proski@gnu.org>
3909         * commands/ls.c (grub_ls_list_files): Fix format warnings.
3911 2008-06-13  Bean  <bean123ch@gmail.com>
3913         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
3915         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
3917         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
3918         to indicate sparse block.
3920 2008-06-12  Pavel Roskin  <proski@gnu.org>
3922         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
3923         number, grub_fshelp_read() does it for us.
3925         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
3926         linear disk read with journal translation.
3927         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
3928         * include/grub/fshelp.h: Declare grub_fshelp_read().
3930 2008-06-09  Pavel Roskin  <proski@gnu.org>
3932         * fs/minix.c (grub_minix_mount): Handle error reading
3933         superblock.
3935 2008-06-08  Robert Millan  <rmh@aybabtu.com>
3937         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
3938         don't append the RAID prefix afterwards.
3939         Reported by Clint Adams.
3941 2008-06-08  Robert Millan  <rmh@aybabtu.com>
3943         Based on description from Pavel:
3944         * kern/disk.c (grub_disk_check_range): Rename to ...
3945         (grub_disk_adjust_range): ... this.  Add a comment explaining the
3946         tasks performed by this function.
3948 2008-06-08  Robert Millan  <rmh@aybabtu.com>
3950         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
3951         `num_serial' (for consistency with other variables).
3952         (struct grub_ntfs_data): Add `uuid' member.
3953         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
3954         (grub_ntfs_uuid): New function.
3955         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
3957 2008-06-07  Pavel Roskin  <proski@gnu.org>
3959         * util/biosdisk.c (open_device): Revert last change to the
3960         function, it broke installation.  The sector needs to be
3961         different dependent on which device is opened.
3963 2008-06-06  Robert Millan  <rmh@aybabtu.com>
3965         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
3966         rest of GRUB, and breakage doesn't happen if its value were modified.
3968         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
3969         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
3970         a constant (same value).
3971         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
3972         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
3974 2008-06-06  Robert Millan  <rmh@aybabtu.com>
3976         * util/biosdisk.c (open_device): Do not modify sector offset when
3977         accessing a partition.  kern/disk.c already handles this for us.
3979 2008-06-06  Robert Millan  <rmh@aybabtu.com>
3981         * util/grub-emu.c (grub_machine_init): Move code in this function from
3982         here ...
3983         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
3984         segfault in case grub_printf() is called).
3986         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
3987         grub_probe.  Update all users not to explicitly add it again.
3988         (grub_device): New variable; contains corresponding device for grubdir.
3989         (fs_module, partmap_module, devabstraction_module): Pass
3990         `--device ${grub_device}' to grub_probe to avoid traversing /dev
3991         every time.
3993 2008-06-05  Robert Millan  <rmh@aybabtu.com>
3995         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
3996         is found, print it (same layout as with labels).
3998 2008-06-04  Robert Millan  <rmh@aybabtu.com>
4000         * util/biosdisk.c (get_drive): Rename to ...
4001         (find_grub_drive): ... this.  Update all users.
4003         (get_os_disk): Rename to ...
4004         (convert_system_partition_to_system_disk): ... this.  Update all users.
4006         (find_drive): Rename to ...
4007         (find_system_device): ... this.  Update all users.
4009 2008-06-04  Robert Millan  <rmh@aybabtu.com>
4011         * util/biosdisk.c (get_os_disk): Handle IDA devices.
4012         * util/grub-mkdevicemap.c (get_mmc_disk_name)
4013         (make_device_map): Likewise.
4015 2008-06-01  Robert Millan  <rmh@aybabtu.com>
4017         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
4018         before dereferencing it.
4020         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
4021         union with fat12/fat16-specific ones.  Add some new fields, including
4022         `num_serial' for both versions.
4023         (struct grub_fat_data): Add `uuid' member.
4024         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
4025         names.  Initialize `data->uuid' using `num_serial'.
4026         (grub_fat_uuid): New function.
4027         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
4029         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
4030         (grub_reiserfs_uuid): New function.
4031         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
4032         member.
4034         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
4035         (grub_xfs_uuid): New function.
4036         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
4038 2008-06-01  Robert Millan  <rmh@aybabtu.com>
4040         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
4041         code that is backward compatible with pre-uuid search command.
4043 2008-05-31  Robert Millan  <rmh@aybabtu.com>
4045         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
4046         floppies after everything else, to ensure floppy drive isn't accessed
4047         unnecessarily (patch from Bean).
4049 2008-05-31  Robert Millan  <rmh@aybabtu.com>
4051         * commands/search.c (search_label, search_fs_uuid, search_file): Do
4052         not print device names when we were asked to set a variable.
4054 2008-05-31  Robert Millan  <rmh@aybabtu.com>
4056         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
4057         using "cursor-on" and "cursor-off" commands (understood at least by
4058         the Open Firmware flavour on OLPC).
4060 2008-05-31  Michael Gorven  <michael@gorven.za.net>
4062         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
4063         on and off sequences.
4065 2008-05-31  Robert Millan  <rmh@aybabtu.com>
4067         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
4068         * util/update-grub.in: Likewise.
4070 2008-05-30  Pavel Roskin  <proski@gnu.org>
4072         * util/biosdisk.c (linux_find_partition): Simplify logic and
4073         make the code more universal.  Keep special processing for
4074         devfs, but use a simple rule for all other devices.  If the
4075         device ends with a number, append 'p' and the partition number.
4076         Otherwise, append only the partition number.
4078 2008-05-30  Robert Millan  <rmh@aybabtu.com>
4080         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
4081         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
4082         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
4083         the `root' parameter to Linux.
4085 2008-05-30  Robert Millan  <rmh@aybabtu.com>
4087         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
4088         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
4089         --fs_uuid with --fs-uuid.
4090         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
4091         all filesystems support them).
4093 2008-05-30  Robert Millan  <rmh@aybabtu.com>
4095         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
4096         grub_printf() flags, since we're printing in units of 2 bytes.
4098 2008-05-30  Robert Millan  <rmh@aybabtu.com>
4100         * util/grub.d/00_header.in: Remove obsolete comment referencing
4101         convert_system_path_to_grub_path().
4102         * util/update-grub.in: Likewise.
4103         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
4104         (convert_system_path_to_grub_path): Add a warning message explaining
4105         that this function is deprecated.  Rely on is_path_readable_by_grub()
4106         for the readability checks.
4107         (font_path): Use is_path_readable_by_grub() for the readability
4108         check rather than convert_system_path_to_grub_path().
4110 2008-05-30  Robert Millan  <rmh@aybabtu.com>
4112         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
4113         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
4114         converting it first.
4115         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
4116         grub.cfg for access to font file, and afterwards call it again to set
4117         the root device.
4119 2008-05-30  Robert Millan  <rmh@aybabtu.com>
4121         * commands/search.c (options): Add --fs_uuid option.
4122         (search_fs_uuid): New function.
4123         (grub_cmd_search): Fix --set argument passing.
4124         Use search_fs_uuid() when requested via --fs_uuid.
4125         (grub_search_init): Update help message.
4126         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
4127         and redeclare it as an array of 16-bit words.
4128         (grub_ext2_uuid): New function.
4129         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
4130         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
4131         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
4132         (GRUB_DEVICE_BOOT_UUID): New variables.
4133         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
4134         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
4135         whenever possible.
4136         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
4137         just assume `root' variable has the right value.
4138         * util/grub.d/10_linux.in: Likewise.
4139         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
4140         via PRINT_FS_UUID.
4141         (main): Recognise `-t fs_uuid' argument.
4143 2008-05-30  Robert Millan  <rmh@aybabtu.com>
4145         * util/biosdisk.c (map): Redefine structure to hold information
4146         about GRUB drive name.
4147         (get_drive): Reimplement without assuming (and verifying) BIOS-like
4148         drive names.
4149         (call_hook): Remove.
4150         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
4151         member.  Assume drive has partitions.
4152         (grub_util_biosdisk_open): Access device names via `.device' struct
4153         member.
4154         (open_device): Likewise.
4155         (find_drive): Likewise.
4156         (read_device_map): Adjust map[] usage to match the new struct
4157         definition.  Don't check for duplicates (still possible, but not cheap
4158         anymore).
4159         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
4160         (make_device_name): Remove assumption of BIOS-like drive names.
4162 2008-05-30  Pavel Roskin  <proski@gnu.org>
4164         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
4165         compiling execute.c doesn't need grub_script.tab.h anymore.
4166         (normal/command.c_DEPENDENCIES): Likewise.
4167         (normal/function.c_DEPENDENCIES): Likewise.
4168         * conf/i386-ieee1275.rmk: Likewise.
4169         * conf/i386-linuxbios.rmk: Likewise.
4170         * conf/i386-pc.rmk: Likewise.
4171         * conf/powerpc-ieee1275.rmk: Likewise.
4172         * conf/sparc64-ieee1275.rmk: Likewise.
4174 2008-05-29  Pavel Roskin  <proski@gnu.org>
4176         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
4177         when scanning metadata for volume group name.
4179         * include/grub/script.h: Don't include grub_script.tab.h.  It's
4180         a generated file, which may only be included from the files with
4181         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
4182         use union YYSTYPE, as the later allows forward declaration.
4183         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
4185 2008-05-29  Robert Millan  <rmh@aybabtu.com>
4187         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
4188         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
4189         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
4190         (grub_console_checkkey): Add grub_dprintf() call to report unknown
4191         scan codes.
4193 2008-05-29  Robert Millan  <rmh@aybabtu.com>
4195         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
4196         control key combinations.
4198 2008-05-29  Robert Millan  <rmh@aybabtu.com>
4200         * util/powerpc/ieee1275/grub-install.in: Move from here ...
4201         * util/ieee1275/grub-install.in: ... to here.
4202         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
4203         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
4204         (grub_install_SOURCES): Likewise.
4206 2008-05-29  Robert Millan  <rmh@aybabtu.com>
4208         * fs/affs.c: Update copyright year.
4209         * fs/ext2.c: Likewise.
4210         * fs/fshelp.c: Likewise.
4211         * fs/hfsplus.c: Likewise.
4212         * fs/ntfs.c: Likewise.
4213         * fs/xfs.c: Likewise.
4214         * include/grub/fshelp.h: Likewise.
4215         * util/grub-mkdevicemap.c: Likewise.
4217 2008-05-28  Robert Millan  <rmh@aybabtu.com>
4219         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
4220         might need to be fatfs to support some firmware implementations
4221         (e.g. OFW or EFI).
4223 2008-05-28  Robert Millan  <rmh@aybabtu.com>
4225         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
4226         devices.
4227         * util/grub-mkdevicemap.c (get_mmc_disk_name)
4228         (make_device_map): Likewise.
4230 2008-05-20  Bean  <bean123ch@gmail.com>
4232         * fs/fshelp.c (grub_fshelp_map_block): New function.
4233         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
4234         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
4236         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
4237         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
4238         (grub_fshelp_journal): New structure.
4239         (grub_fshelp_map_block): New function prototype.
4240         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
4241         (grub_fshelp_map_block): Likewise.
4243         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
4244         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
4245         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
4246         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
4247         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
4248         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
4249         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
4250         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
4251         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
4252         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
4253         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
4254         (grub_ext2_sblock): New members for journal support.
4255         (grub_ext3_journal_header): New structure.
4256         (grub_ext3_journal_revoke_header): Likewise.
4257         (grub_ext3_journal_block_tag): Likewise.
4258         (grub_ext3_journal_sblock): Likewise.
4259         (grub_fshelp_node): New members logfile and journal.
4260         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
4261         grub_fshelp_map_block to get real block number.
4262         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
4263         number.
4264         (grub_ext2_read_inode): Likewise.
4265         (grub_ext3_get_journal): New function.
4266         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
4267         (grub_ext2_close): Release memory used by journal.
4269         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
4270         (REISERFS_MAGIC_DESC_BLOCK): New macro.
4271         (grub_reiserfs_transaction_header): Renamed to
4272         grub_reiserfs_description_block, replace field data with real_blocks.
4273         (grub_reiserfs_commit_block): New structure.
4274         (grub_reiserfs_data): New member journal.
4275         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
4276         number.
4277         (grub_reiserfs_read_symlink): Likewise.
4278         (grub_reiserfs_iterate_dir): Likewise.
4279         (grub_reiserfs_open): Likewise.
4280         (grub_reiserfs_read): Likewise.
4281         (grub_reiserfs_get_journal): New function.
4282         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
4283         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
4284         using grub_reiserfs_get_journal.
4285         (grub_reiserfs_close): Release memory used by journal.
4287         * fs/affs.c (grub_affs_read_block): Change block type to
4288         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
4290         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
4292         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
4294         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
4296         * fs/udf.c (grub_udf_read_block): Change block type to
4297         grub_disk_addr_t. Use type cast to avoid warning.
4299         * fs/xfs.c (grub_xfs_read_block): Likewise.
4301 2008-05-16  Christian Franke  <franke@computer.org>
4303         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
4304         to ensure that break with ESC will always work.
4305         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
4306         Remove ESC from keyboard queue.
4308 2008-05-16  Christian Franke  <franke@computer.org>
4310         * util/biosdisk.c: [__CYGWIN__] Add includes.
4311         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
4312         (get_os_disk): Move variable declarations to OS specific
4313         parts to avoid warning.
4314         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
4315         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
4316         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
4317         Cygwin.
4318         * util/getroot.c: [__CYGWIN__] Add includes.
4319         (strip_extra_slashes): Fix "/" case.
4320         [__CYGWIN__] (get_win32_path): New function.
4321         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
4322         [__CYGWIN__] (find_root_device): Disable.
4323         [__CYGWIN__] (get_bootsec_serial): New function.
4324         [__CYGWIN__] (find_cygwin_root_device): Likewise.
4325         [__linux__] (grub_guess_root_device): Add early returns to simplify
4326         structure.
4327         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
4328         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
4329         check for Linux only.
4331 2008-05-15  Bean  <bean123ch@gmail.com>
4333         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
4334         keyboard hang problem in apple's intel mac.
4336 2008-05-09  Robert Millan  <rmh@aybabtu.com>
4338         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
4339         devices.
4340         * util/grub-mkdevicemap.c (get_virtio_disk_name)
4341         (make_device_map): Likewise.
4342         Reported by Aurelien Jarno <aurel32@debian.org>
4344 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
4346         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
4347         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
4348         (make_device_map): Output entries for xvd type disks.
4350 2008-05-07  Robert Millan  <rmh@aybabtu.com>
4352         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
4353         devices.
4354         * util/grub-mkdevicemap.c (get_cciss_disk_name)
4355         (make_device_map): Likewise.
4356         Reported by Roland Dreier <rdreier@cisco.com>
4358 2008-05-07  Robert Millan  <rmh@aybabtu.com>
4360         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
4361         grub_strstr() call.  Correct a few mistakes in failure path handling.
4363 2008-05-06  Robert Millan  <rmh@aybabtu.com>
4365         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4366         Do not print a trailing slash (therefore, the root directory is an
4367         empty string).
4368         (convert_system_path_to_grub_path): Do not remove trailing slash
4369         from make_system_path_relative_to_its_root() output.
4371         * util/i386/pc/grub-install.in: Add trailing slash to output from
4372         make_system_path_relative_to_its_root().
4374 2008-05-06  Robert Millan  <rmh@aybabtu.com>
4376         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
4377         ensures that output lines aren't intermangled with those sent to
4378         stderr (via grub_util_info()).
4379         * util/grub-probe.c (grub_refresh): Likewise.
4380         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
4382 2008-05-05  Christian Franke  <franke@computer.org>
4384         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
4385         Add Cygwin device names.
4386         (get_ide_disk_name) [__CYGWIN__]: Likewise.
4387         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
4388         (check_device): Return error instead of success on empty name.
4389         (make_device_map): Move label inside linux specific code to
4390         prevent compiler warning.
4392 2008-04-30  Robert Millan  <rmh@aybabtu.com>
4394         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
4395         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
4396         first boot option.
4397         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
4399 2008-04-29  Robert Millan  <rmh@aybabtu.com>
4401         * docs/grub.cfg: New file (example GRUB configuration).
4403 2008-04-26  Robert Millan  <rmh@aybabtu.com>
4405         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
4406         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
4407         and `disk/ieee1275/nand.c'.
4409 2008-04-25  Bean  <bean123ch@gmail.com>
4411         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
4412         i386-linuxbios.
4414         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
4415         change the buffer size to 4096 for cdrom device.
4417         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
4418         and nand.mod.
4419         (_linux_mod_SOURCES): New variable.
4420         (_linux_mod_CFLAGS): Likewise.
4421         (_linux_mod_LDFLAGS): Likewise.
4422         (linux_mod_SOURCES): Likewise.
4423         (linux_mod_CFLAGS): Likewise.
4424         (linux_mod_LDFLAGS): Likewise.
4425         (nand_mod_SOURCES): Likewise.
4426         (nand_mod_CFLAGS): Likewise.
4427         (nand_mod_LDFLAGS): Likewise.
4429         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
4430         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
4431         type property. (nand device in olpc don't have this property)
4433         * include/grub/disk.h (grub_disk_dev_id): New macro
4434         GRUB_DISK_DEVICE_NAND_ID.
4436         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
4437         function prototype.
4438         (grub_rescue_cmd_initrd): Likewise.
4440         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
4441         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
4442         ofw_cif_handler and ofw_idt, adjust padding number.
4444         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
4445         GRUB_MACHINE_IEEE1275 is defined.
4447         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
4448         Use NESTED_FUNC_ATTR attribute on the hook parameter.
4450         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
4451         on nested function heap_init.
4452         (grub_upper_mem): New variable for i386-ieee1275.
4453         (grub_get_extended_memory): New function for i386-ieee1275.
4454         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
4456         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
4457         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
4458         property.
4460         * loader/i386/ieee1275/linux.c: New file.
4462         * loader/i386/ieee1275/linux_normal.c: New file.
4464         * disk/ieee1275/nand.c: New file.
4466 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
4468         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
4469         value.
4470         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
4472 2008-04-18  Robert Millan  <rmh@aybabtu.com>
4474         Restructures early code path on ieee1275 to unify grub_main() as
4475         the first C function that is executed in every platform.
4477         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
4478         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
4479         cmain().
4480         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
4481         * kern/ieee1275/cmain.c (cmain): Rename to ...
4482         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
4483         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
4484         at the beginning.
4486 2008-04-18  Robert Millan  <rmh@aybabtu.com>
4488         * util/update-grub.in: Fix syntax error when setting
4489         `GRUB_PRELOAD_MODULES'.
4490         Reported by Stephane Chazelas <stephane@artesyncp.com>
4492 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
4494         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
4495         section into account, newer toolchains generate unique build ids
4496         * configure.ac: remove the test for --build-id=none acceptance,
4497         we want build ids to be preserved
4498         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
4499         far from other sections don't cause the raw binary images grow
4500         size
4502 2008-04-15  Robert Millan  <rmh@aybabtu.com>
4504         * disk/lvm.c: Update copyright year.
4505         * kern/misc.c: Likewise.
4507 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
4509         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
4510         there is no memory left for physical volume name.
4512 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
4514         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
4515         volume name mapping to support bigger than 9 character names properly.
4517 2008-04-13  Robert Millan  <rmh@aybabtu.com>
4519         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
4520         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
4522 2008-04-13  Christian Franke  <franke@computer.org>
4524         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
4525         to create a floppy emulation boot CD when non emulation mode
4526         does not work.
4527         Enable Joliet CD filesystem extension.
4529 2008-04-13  Robert Millan  <rmh@aybabtu.com>
4531         * kern/misc.c (grub_strncat): Fix off-by-one error.
4532         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
4534         * kern/env.c (grub_env_context_close): Clear current context, not
4535         previous one.
4536         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
4538         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
4540 2008-04-13  Robert Millan  <rmh@aybabtu.com>
4542         Improve robustness when handling LVM.
4544         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
4545         (and leave `*p' unmodified).
4546         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
4547         through it.
4548         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
4549         iterating through it.
4550         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
4551         through it.
4552         (grub_lvm_scan_device): Check the return value (and fail gracefully
4553         when due) on each grub_lvm_getvalue() or grub_strstr() call.
4554         Don't assume `vg->pvs != NULL' when iterating through it.
4556 2008-04-13  Robert Millan  <rmh@aybabtu.com>
4558         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
4559         * genmk.rb (partmap): New variable.
4560         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
4561         (#{partmap}): New target rule.
4562         * genpartmaplist.sh: New file.
4563         * Makefile.in (pkglib_DATA): Add partmap.lst.
4564         (partmap.lst): New target rule.
4565         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
4566         modules (including all partition maps), instead of preloading them.
4568 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
4570         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
4571         `linux-boot-prober' (if installed) to detect other operating
4572         systems which are installed on the computer and add them to
4573         the boot menu.
4574         * conf/common.rmk: Build and install 30_os-prober.
4576 2008-04-12  Robert Millan  <rmh@aybabtu.com>
4578         * kern/powerpc/ieee1275/init.c: Move from here ...
4579         * kern/ieee1275/init.c: ... to here.  Update all users.
4581         * kern/powerpc/ieee1275/cmain.c: Move from here ...
4582         * kern/ieee1275/cmain.c: ... to here.  Update all users.
4584         * kern/powerpc/ieee1275/openfw.c: Move from here ...
4585         * kern/ieee1275/openfw.c: ... to here.  Update all users.
4587         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
4588         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
4590 2008-04-10  Pavel Roskin  <proski@gnu.org>
4592         * configure.ac: Always use "_cv_" in cache variables for
4593         compatibility with Autoconf 2.62.
4595 2008-04-07  Robert Millan  <rmh@aybabtu.com>
4597         Revert grub/machine/init.h addition by Pavel (since it breaks on
4598         i386-ieee1275 and others):
4599         * util/i386/pc/misc.c: Remove grub/machine/init.h.
4600         * util/powerpc/ieee1275/misc.c: Likewise.
4602 2008-04-07  Robert Millan  <rmh@aybabtu.com>
4604         * util/grub-probe.c (probe): Improve error message.
4606 2008-04-07  Robert Millan  <rmh@aybabtu.com>
4608         * util/biosdisk.c (read_device_map): Skip devices that don't exist
4609         (this prevents the presence of a bogus entry from ruining the whole
4610         thing).
4612 2008-04-06  Pavel Roskin  <proski@gnu.org>
4614         * util/biosdisk.c: Include grub/util/biosdisk.h.
4615         * util/grub-fstest.c (execute_command): Make static.
4616         * util/grub-mkdevicemap.c (check_device): Likewise.
4617         * util/i386/pc/misc.c: Include grub/machine/init.h.
4618         * util/powerpc/ieee1275/misc.c: Likewise.
4619         * util/lvm.c: Include grub/util/lvm.h.
4620         * util/misc.c: Include grub/kernel.h, grub/misc.h and
4621         grub/cache.h.
4622         * util/raid.c: Include grub/util/raid.h.
4623         (grub_util_getdiskname): Make static.
4625         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
4626         grub_hostfs_fini(), as they are called from grub_init_all() and
4627         grub_fini_all() respectively.  This fixes an infinite loop in
4628         grub-fstest due to double registration of hostfs.
4629         Reported by Christian Franke <Christian.Franke@t-online.de>
4631 2008-04-05  Pavel Roskin  <proski@gnu.org>
4633         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
4634         all 8 functions.  Otherwise, probe function 0 only.
4636 2008-04-04  Pavel Roskin  <proski@gnu.org>
4638         * commands/lspci.c (grub_lspci_iter): Print the bus number
4639         correctly.
4641         * commands/lspci.c (grub_pci_classes): Fix typos.
4642         (grub_lspci_iter): Don't print func twice.  Print vendor ID
4643         before device ID, as it's normally done.
4645         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
4646         Fix signedness warnings.
4647         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
4648         Likewise.
4649         * util/ieee1275/get_disk_name.c: Include config.h so that
4650         _GNU_SOURCE is defined and getline() is declared.  Mark an
4651         unused argument as such.  Fix a signedness warning.
4653 2008-04-02  Pavel Roskin  <proski@gnu.org>
4655         * genkernsyms.sh.in: Use more robust assignments for CC and
4656         srcdir.  Quote srcdir.
4657         * gensymlist.sh.in: Likewise.  Assert at the compile time that
4658         the symbol table is not empty.
4660         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
4661         * fs/cpio.c (grub_cpio_read): Likewise.
4663 2008-04-01  Pavel Roskin  <proski@gnu.org>
4665         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
4666         * disk/host.c (grub_host_open): Likewise.
4667         * disk/loopback.c (grub_loopback_open): Likewise.
4668         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
4669         disk->id as in disk/host.c, not a multi-character constant.
4671         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
4672         later is obsolete, potentially dangerous and sets a bad example.
4673         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
4674         * util/misc.c (grub_util_get_image_size): Likewise.
4676         * disk/loopback.c (options): Improve help for "--partitions".
4678         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
4679         options to align them with the short options, e.g. "echo -e".
4681 2008-03-31  Bean  <bean123ch@gmail.com>
4683         * video/reader/png.c (grub_png_data): New member is_16bit and
4684         image_data.
4685         (grub_png_decode_image_header): Detect 16 bit png image.
4686         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
4687         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
4688         (grub_video_reader_png): Release memory occupied by image_data.
4690         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
4691         4096 bytes.
4692         (grub_nfs_mount): Skip the test for sector per cluster.
4694         * include/grub/ntfs.h (MAX_SPC): Removed.
4696 2008-03-31  Bean  <bean123ch@gmail.com>
4698         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
4699         (grub_probe_SOURCES): Add fs/afs.c.
4700         (grub_fstest_SOURCES): Likewise.
4701         (afs_mod_SOURCES): New variable.
4702         (afs_mod_CFLAGS): Likewise.
4703         (afs_mod_LDFLAGS): Likewise.
4705         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
4706         (grub_emu_SOURCES): Likewise.
4708         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4710         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4712         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4714         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4716         * fs/afs.c: New file.
4718 2008-03-30  Pavel Roskin  <proski@gnu.org>
4720         * disk/host.c: Include grub/misc.h to fix a warning.
4721         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
4722         warnings about implicit declarations.
4724         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
4725         variable.
4726         * include/grub/i386/loader.h: Change declaration of
4727         grub_linux_boot() to match what grub_loader_set() expects.
4728         * util/getroot.c (grub_guess_root_device): Return const char* to
4729         fix a warning.
4730         * util/grub-probe.c (probe): Fix a warning about uninitialized
4731         abstraction_name variable.
4732         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
4733         second argument as unused to fix a warning.
4735         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
4736         missing grub_error() call.
4738         * util/update-grub_lib.in: Define datarootdir, since Autoconf
4739         2.60 and newer uses it to define datadir.
4741         * commands/sleep.c: Fix warning about implicit declaration.
4742         * disk/memdisk.c: Likewise.
4743         * loader/aout.c: Likewise.
4744         * loader/i386/bsd_normal.c: Likewise.
4745         * util/grub-probe.c: Likewise.
4747         * commands/i386/cpuid.c (has_longmode): Make static.
4748         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
4749         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
4751         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
4752         GDT.  This is more robust, as %ds can change.
4753         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
4754         calling real_to_prot().
4755         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
4757 2008-03-28  Pavel Roskin  <proski@gnu.org>
4759         * kern/i386/pc/startup.S: Assert that uncompressed functions
4760         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
4761         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
4762         code, as they push parts of the code (error handlers) beyond
4763         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
4764         code as correctness and size.
4766 2008-03-28  Pavel Roskin  <proski@gnu.org>
4768         * kern/i386/pc/startup.S
4769         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
4770         data block address to the real mode, keep offset minimal.  This
4771         works around a bug in AWARD BIOS on old Athlon systems, which
4772         makes CD detection hang.
4774 2008-03-26  Pavel Roskin  <proski@gnu.org>
4776         * normal/color.c (grub_parse_color_name_pair): Make `name' a
4777         const.
4778         * include/grub/normal.h: Add grub_parse_color_name_pair()
4779         declaration.
4781 2008-03-24  Bean  <bean123ch@gmail.com>
4783         * disk/i386/pc/biosdisk.c (cd_start): Removed.
4784         (cd_count): Removed.
4785         (cd_drive): New variable.
4786         (grub_biosdisk_get_drive): Don't check for (cdN) device.
4787         (grub_biosdisk_call_hook): Likewise.
4788         (grub_biosdisk_iterate): Change cdrom detection method.
4789         (grub_biosdisk_open): Replace cd_start with cd_drive.
4790         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
4791         detect cdrom device.
4793         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
4794         Removed.
4795         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
4796         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
4797         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
4798         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
4799         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
4800         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
4801         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
4802         (grub_biosdisk_cdrp): New structure.
4803         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
4805         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
4807         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
4808         device.
4810         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
4811         New function.
4813 2008-03-20  Robert Millan  <rmh@aybabtu.com>
4815         Remove 2 TiB limit in ata.mod.
4816         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
4817         (grub_ata_dumpinfo): Print sector count with 0x%llx.
4818         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
4819         grub_uint64_t instead of grub_uint32_t.
4821 2008-03-05  Bean  <bean123ch@gmail.com>
4823         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
4824         (grub_multiboot): Set boot device.
4826         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
4828 2008-03-02  Bean  <bean123ch@gmail.com>
4830         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
4831         symlink_buffer.
4833 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
4835         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
4836         texinfo.tex.
4838         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
4839         modified.
4841         * docs/fdl.texi: New file.
4843         * docs/mdate-sh: New file. Copied from gnulib.
4844         * docs/texinfo.tex: Likewise.
4846         * config.guess: Updated from gnulib.
4847         * install-sh: Likewise.
4849 2008-02-28  Robert Millan  <rmh@aybabtu.com>
4851         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
4852         (aout_mod_SOURCES): New variable.
4853         (aout_mod_CFLAGS): Likewise.
4854         (aout_mod_LDFLAGS): Likewise.
4856         * conf/i386-ieee1275.rmk: Likewise.
4858 2008-02-28  Robert Millan  <rmh@aybabtu.com>
4860         * util/update-grub.in: Reorganise terminal validity check.  Accept
4861         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
4862         Based on suggestion by Franklin PIAT.
4864 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
4866         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
4867         function.
4868         * util/getroot.c (grub_util_check_block_device): New function that
4869         returns the given argument if it is a block device and returns NULL else.
4870         * util/grub-probe.c (argument_is_device): New variable.
4871         (probe): Promote device_name from a variable to an argument. Receive
4872         device_name from grub_util_check_block_device() if path is NULL and from
4873         grub_guess_root_device() else. Do not free() device_name anymore.
4874         (options): Introduce new parameter '-d, --device'.
4875         (main): Add description of the new parameter to the help screen.
4876         Rename path variable to argument. Set argument_is_device if the '-d'
4877         option is given. Pass argument to probe() depending on
4878         argument_is_device.
4880 2008-02-24  Bean  <bean123ch@gmail.com>
4882         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
4883         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
4884         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
4885         (GRUB_ISO9660_VOLDESC_PART): Likewise.
4886         (GRUB_ISO9660_VOLDESC_END): Likewise.
4887         (grub_iso9660_primary_voldesc): New member escape.
4888         (grub_iso9660_data): New member joliet.
4889         (grub_iso9660_convert_string): New function.
4890         (grub_iso9660_mount): Detect joliet extension.
4891         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
4892         (grub_iso9660_iso9660_label): Likewise.
4894         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
4895         (grub_setup_SOURCES): Add fs/udf.c.
4896         (grub_fstest_SOURCES): Likewise.
4897         (udf_mod_SOURCES): New variable.
4898         (udf_mod_CFLAGS): Likewise.
4899         (udf_mod_LDFLAGS): Likewise.
4901         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
4902         (grub_emu_SOURCES): Likewise.
4904         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4906         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4908         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4910         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4912         * fs/udf.c: New file.
4914 2008-02-24  Robert Millan  <rmh@aybabtu.com>
4916         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
4917         (normal/lexer.c_DEPENDENCIES): New variables.
4918         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4919         (normal/lexer.c_DEPENDENCIES): Likewise.
4920         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
4921         (normal/lexer.c_DEPENDENCIES): Likewise.
4922         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
4923         (normal/lexer.c_DEPENDENCIES): Likewise.
4924         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4925         (normal/lexer.c_DEPENDENCIES): Likewise.
4926         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4927         (normal/lexer.c_DEPENDENCIES): Likewise.
4929 2008-02-23  Robert Millan  <rmh@aybabtu.com>
4931         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
4932         since they were intended to be in hex.  This didn't break previously
4933         because of a bug in gpt_partition_map_iterate() (see below).
4935         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
4936         when checking the validity of GPT header.
4937         Remove `partno', since it always provides the same information as `i'.
4939 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
4941         * include/grub/efi/time.h: Fix a wrong comment.
4943 2008-02-19  Pavel Roskin  <proski@gnu.org>
4945         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
4946         message.
4948 2008-02-19  Bean  <bean123ch@gmail.com>
4950         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
4951         (aout_mod_SOURCES): New variable.
4952         (aout_mod_CFLAGS): Likewise.
4953         (aout_mod_LDFLAGS): Likewise.
4954         (_bsd_mod_SOURCES): New variable.
4955         (_bsd_mod_CFLAGS): Likewise.
4956         (_bsd_mod_LDFLAGS): Likewise.
4957         (bsd_mod_SOURCES): New variable.
4958         (bsd_mod_CFLAGS): Likewise.
4959         (bsd_mod_LDFLAGS): Likewise.
4961         * include/grub/aout.h: New file.
4963         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
4965         * include/grub/i386/bsd.h: New file.
4967         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
4968         to make it public.
4970         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
4971         function is called, so that it's possible to change it inside the hook.
4972         (grub_elf64_load): Likewise.
4973         (grub_elf_file): Don't close the file if elf header is not found.
4974         (grub_elf_close): Close the file if grub_elf_file fails (The new
4975         grub_elf_file won't close it).
4976         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
4977         (grub_elf64_size): Likewise.
4979         * kern/i386/loader.S (grub_unix_real_boot): New function.
4981         * loader/aout.c: New file.
4983         * loader/i386/bsd.c: New file.
4985         * loader/i386/bsd_normal.c: New file.
4987         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
4989         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
4990         can test other formats.
4992 2008-02-19  Robert Millan  <rmh@aybabtu.com>
4994         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
4995         (grub_gpt_partition_type_empty): Redefine with macro from
4996         `<grub/gpt_partition.h>'.
4997         (gpt_partition_map_iterate): Adjust partition type comparison.
4999         Export `entry' as partmap-specific `part.data' struct.
5000         (grub_gpt_header, grub_gpt_partentry): Move from here ...
5002         * include/grub/gpt_partition.h (grub_gpt_header)
5003         (grub_gpt_partentry): ... to here (new file).
5005         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
5007         (grub_gpt_partition_type_bios_boot): New const variable, defined
5008         with macro from `<grub/gpt_partition.h>'.
5010         (setup): Replace `first_start' with `embed_region', which keeps
5011         track of the embed region (and is partmap-agnostic).
5013         Replace find_first_partition_start() with find_usable_region(),
5014         which finds a usable region for embedding using partmap-specific
5015         knowledge (supports PC/MSDOS and GPT).
5017         Fix all assumptions that the embed region start at sector 1, using
5018         `embed_region.start' from now on.  Similarly, use `embed_region.end'
5019         rather than `first_start' to calculate available size.
5021         In grub_util_info() message, replace "into after the MBR" with an
5022         indication of the specific sector our embed region starts at.
5024 2008-02-19  Robert Millan  <rmh@aybabtu.com>
5026         * DISTLIST: Replace `commands/ieee1275/halt.c' and
5027         `commands/ieee1275/reboot.c' with `commands/halt.c' and
5028         `commands/reboot.c'.
5029         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5030         (halt_mod_SOURCES): Likewise.
5031         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5032         (halt_mod_SOURCES): Likewise.
5034 2008-02-17  Christian Franke  <franke@computer.org>
5036         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
5038 2008-02-17  Robert Millan  <rmh@aybabtu.com>
5040         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5041         set `first_start' to 0 for non-PC/MSDOS partition maps.
5043 2008-02-16  Robert Millan  <rmh@aybabtu.com>
5045         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5046         do not assume partition map is PC/MSDOS before performing checks that
5047         are specific to that layout.
5049 2008-02-13  Robert Millan  <rmh@aybabtu.com>
5051         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
5052         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
5053         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
5055 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
5057         * configure.ac: Only a cosmetic change on the handling of
5058         -fno-stack-protector.
5060 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
5062         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
5063         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
5064         reboot.c.
5065         (grub_install_SOURCES): Add halt.mod and reboot.mod.
5066         (halt_mod_SOURCES): New variable.
5067         (halt_mod_CFLAGS): Likewise.
5068         (halt_mod_LDFLAGS): Likewise.
5069         (reboot_mod_SOURCES): Likewise.
5070         (reboot_mod_CFLAGS): Likewise.
5071         (reboot_mod_LDFLAGS): Likewise.
5073         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
5074         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
5075         reboot.c.
5076         (halt_mod_SOURCES): Likewise.
5077         (reboot_mod_SOURCES): Likewise.
5079         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
5080         commands/i386/pc/reboot.c by commands/reboot.c.
5081         (reboot_mod_SOURCES): Likewise.
5083         * commands/i386/pc/reboot.c: merge this file ...
5085         * commands/ieee1275/reboot.c: ... and this file ...
5087         * commands/reboot.c: ... to this file.
5088         Add some precompiler directive to include the correct header for
5089         each machine.
5091         * commands/ieee1275/halt.c: move this file ...
5093         * commands/halt.c: ... to here.
5094         Add some precompiler directive to include the correct header for
5095         each machine.
5097         * include/grub/efi/efi.h (grub_reboot): New function declaration.
5098         (grub_halt): Likewise.
5100         * kern/efi/efi.c (grub_reboot): New function.
5101         (grub_halt): Likewise.
5103 2008-02-12  Robert Millan  <rmh@aybabtu.com>
5105         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
5106         /dev (like it is done for /dev/mapper).  This doesn't provide support
5107         for EVMS, but at least it is now easy to identify the problem when it
5108         arises.
5110 2008-02-11  Robert Millan  <rmh@aybabtu.com>
5112         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
5113         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
5114         comparing it with -1, not 0.
5116 2008-02-10  Robert Millan  <rmh@aybabtu.com>
5118         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
5119         `disk/lvm.c'.
5120         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5121         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
5123         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
5124         `disk/lvm.c' to the end of the list.
5125         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5126         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5128 2008-02-10  Robert Millan  <rmh@aybabtu.com>
5130         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
5131         grub_print_error() instead.  This will let user know why we're entering
5132         rescue mode.
5133         Based on suggestions from Sam Morris.
5135 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
5137         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
5138         on remaining N args, instead of "--" arg N times.
5140 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
5142         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
5143         (fill_with_default_glyph): Changed to use unknown_glyph for fill
5144         pattern for unknown glyphs.
5146 2008-02-09  Robert Millan  <rmh@aybabtu.com>
5148         * configure.ac: Probe for `help2man'.
5149         * Makefile.in (builddir): New variable.
5150         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
5151         or otherwise add a few flags/options to it.
5152         (install-local): For every executable utility or script that is
5153         installed, invoke $(HELP2MAN) to install a manpage based on --help
5154         output.
5156         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
5157         that it doesn't prevent --help from working in build tree.
5159         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
5160         with `bug-grub@gnu.org'.
5161         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
5162         * util/update-grub.in (usage): New function.
5163         Implement proper argument check, with support for --help and --version
5164         (as well as existing -y).
5166 2008-02-09  Christian Franke  <franke@computer.org>
5168         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
5169         avoid overwriting previous output.
5170         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
5172 2008-02-09  Robert Millan  <rmh@aybabtu.com>
5174         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
5175         drawing the menu.
5177 2008-02-09  Robert Millan  <rmh@aybabtu.com>
5179         * commands/sleep.c: New file.
5180         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
5181         (sleep_mod_SOURCES): New variable.
5182         (sleep_mod_CFLAGS): Likewise.
5183         (sleep_mod_LDFLAGS): Likewise.
5185 2008-02-09  Robert Millan  <rmh@aybabtu.com>
5187         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
5188         situations in which we can deduce the RAID size and the superblock
5189         doesn't match it.
5191 2008-02-09  Robert Millan  <rmh@aybabtu.com>
5193         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
5194         and return a grub_diskmemberlist_t composed of LVM physical volumes.
5195         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
5197         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
5198         and return a grub_diskmemberlist_t composed of physical array members.
5199         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
5201         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
5202         prototype.
5203         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
5204         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
5205         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
5207         * util/grub-probe.c (probe): Move partmap probing code from here ...
5208         (probe_partmap): ... to here.
5209         (probe): Use probe_partmap() once for the disk we're probing, and
5210         additionally, when such disk contains a memberlist() struct member,
5211         once for each disk that is contained in the structure returned by
5212         memberlist().
5214 2008-02-09  Robert Millan  <rmh@aybabtu.com>
5216         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
5217         environment variable to 'all' in order to obtain debug output from
5218         non-util/ code.
5219         * util/i386/pc/grub-setup.c (main): Likewise.
5221 2008-02-08  Robert Millan  <rmh@aybabtu.com>
5223         * disk/raid.c (grub_raid_scan_device): Check for
5224         `array->device[sb.this_disk.number]' rather than for
5225         `array->device[sb.this_disk.number]->name', since the latter is not
5226         guaranteed to be accessible.
5228 2008-02-08  Robert Millan  <rmh@aybabtu.com>
5230         * disk/raid.c: Update copyright.
5231         * fs/cpio.c: Likewise.
5232         * include/grub/raid.h: Likewise.
5233         * loader/i386/pc/multiboot.c: Likewise.
5234         * util/hostfs.c: Likewise.
5236 2008-02-08  Robert Millan  <rmh@aybabtu.com>
5238         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
5239         to a grub_disk_t array.
5240         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
5241         `device[x]'.
5242         (grub_raid_scan_device): Replace `device[x].name' accesses with
5243         `device[x]->name'.  Simplify initialization of `array->device[x]'.
5245 2008-02-08  Robert Millan  <rmh@aybabtu.com>
5247         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
5248         grub_dprintf() calls.
5249         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
5250         error message.
5252 2008-02-07  Christian Franke  <franke@computer.org>
5254         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
5255         instead of fseek and ftell to support large files.
5256         (grub_hostfs_read): Likewise.
5258 2008-02-07  Robert Millan  <rmh@aybabtu.com>
5260         Patch from Jeroen Dekkers.
5261         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
5262         failure, since successfully reading all array members might not be
5263         required.
5265 2008-02-06  Robert Millan  <rmh@aybabtu.com>
5267         * util/grub-probe.c (probe): Simplify partmap probing (with the
5268         assumption that the first word up to the underscore equals to
5269         the module name).
5271 2008-02-06  Christian Franke  <franke@computer.org>
5273         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
5274         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
5275         last block of a cpio or tar stream.
5276         Check for "TRAILER!!!" instead of any empty data
5277         block to detect last block of a cpio stream.
5278         (grub_cpio_dir): Fix constness of variable np.
5279         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
5280         cpio or tar trailer is detected.  This fixes a crash
5281         on open of a non existing file.
5283 2008-02-05  Bean  <bean123ch@gmail.com>
5285         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
5286         address of entry.
5287         (grub_multiboot_load_elf64): Likewise.
5288         (grub_multiboot): Initialize mbi structure.
5290         * util/grub-fstest.c: Don't include unused header file script.h.
5292         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
5293         of file.
5294         (grub_fstest_SOURCES): Likewise.
5296 2008-02-05  Robert Millan  <rmh@aybabtu.com>
5298         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
5299         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
5300         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
5301         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
5303         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
5304         (translation_table): Replace hardcoded values with macros
5305         provided by `<grub/term.h>'.
5307         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
5308         (keyboard_map): Correct/add a few values, with macros provided
5309         by `<grub/term.h>'.
5310         (keyboard_map_shift): Zero values that don't differ from their
5311         `keyboard_map' equivalents.
5312         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
5313         Discard the second scan code that is always sent by Caps lock.
5314         Only use `keyboard_map_shift' when it provides a non-zero value,
5315         otherwise fallback to `keyboard_map'.
5317 2008-02-04  Bean  <bean123ch@gmail.com>
5319         * Makefile.in (enable_grub_fstest): New variable.
5321         * conf/common.rmk (grub_fstest_init.lst): New rule.
5322         (grub_fstest_init.h): Likewise.
5323         (grub_fstest_init.c): Likewise.
5324         (util/grub-fstest.c_DEPENDENCIES): New variable.
5325         (grub_fstest_SOURCES): Likewise.
5327         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
5329         * util/grub-fstest.c: New file.
5331 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
5333         Make grub-setup handle a separate root device.
5335         * util/i386/pc/grub-setup.c (setup): Always open the root device,
5336         so that the root device can be compared with the destination
5337         device.
5338         When embedding the core image, if the root and destination devices
5339         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
5340         0xFF.
5341         When not embedding, set ROOT_DRIVE to 0xFF.
5343 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
5345         Add support for having a grub directory in a different drive. This
5346         is still only the data handling part.
5348         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
5349         (codestart): Save %dh in GRUB_ROOT_DRIVE.
5350         (grub_root_drive): New variable.
5352         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
5353         instead of GRUB_BOOT_DRIVE to construct a device name. Set
5354         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
5355         as it was.
5357         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
5359         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
5360         macro.
5361         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
5363         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
5364         is bogus, because PXE booting does not specify any drive
5365         correctly.
5367         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
5368         am not sure if this is really correct.
5370         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
5371         is always identical to the boot drive when booting from a CD.
5373         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
5374         longer.
5375         (root_drive): New variable.
5376         (real_start): Unconditionally set %dh to ROOT_DRIVE.
5377         (setup_sectors): Push %dx right after popping it, because %dh will
5378         be modified later.
5379         (copy_buffer): Restore %dx.
5381 2008-02-03  Robert Millan  <rmh@aybabtu.com>
5383         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
5384         use `cdboot.img' for cdrom images.
5386 2008-02-03  Robert Millan  <rmh@aybabtu.com>
5388         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
5389         only setup gfxterm when `font' command has succeeded.
5391 2008-02-03  Robert Millan  <rmh@aybabtu.com>
5393         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
5394         (grub_rescue_cmd_multiboot_loader)
5395         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
5397 2008-02-03  Pavel Roskin  <proski@gnu.org>
5399         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
5400         %edx and %esi from stack only after grub_gate_a20() is called.
5401         grub_gate_a20() clobbers %edx.
5403 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
5405         * configure.ac (AC_INIT): Bumped to 1.96.
5407         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
5408         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
5409         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
5410         video/readers/png.c.
5412 2008-02-03  Bean  <bean123ch@gmail.com>
5414         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
5415         (cdboot_img_SOURCES): New variable.
5416         (cdboot_img_ASFLAGS): New variable.
5417         (cdboot_img_LDFLAGS): New variable.
5419         * boot/i386/pc/cdboot.S: New file.
5421         * disk/i386/pc/biosdisk.c (cd_start): New variable.
5422         (cd_count): Likewise.
5423         (grub_biosdisk_get_drive): Add support for cd device.
5424         (grub_biosdisk_call_hook): Likewise.
5425         (grub_biosdisk_iterate): Likewise.
5426         (grub_biosdisk_open): Likewise.
5427         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
5428         (grub_biosdisk_rw): Support reading from cd device.
5429         (GRUB_MOD_INIT): Iterate cd devices.
5431         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
5432         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
5433         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
5435         * kern/i386/pc/init.c (make_install_device): Check for cd device.
5437 2008-02-02  Robert Millan  <rmh@aybabtu.com>
5439         * commands/read.c: New file.
5440         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
5441         (read_mod_SOURCES): New variable.
5442         (read_mod_CFLAGS): Likewise.
5443         (read_mod_LDFLAGS): Likewise.
5445 2008-02-02  Robert Millan  <rmh@aybabtu.com>
5447         * normal/main.c (grub_normal_execute): Check for `menu->size' when
5448         determining whether menu has to be displayed.
5450 2008-02-02  Marco Gerards  <marco@gnu.org>
5452         * bus/pci.c: New file.
5454         * include/grub/pci.h: Likewise.
5456         * include/grub/i386/pc/pci.h: Likewise.
5458         * commands/lspci.c: Likewise.
5460         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
5461         `lspci.mod'.
5462         (pci_mod_SOURCES): New variable.
5463         (pci_mod_CFLAGS): Likewise.
5464         (pci_mod_LDFLAGS): Likewise.
5465         (lspci_mod_SOURCES): Likewise.
5466         (lspci_mod_CFLAGS): Likewise.
5467         (lspci_mod_LDFLAGS): Likewise.
5469 2008-02-02  Bean  <bean123ch@gmail.com>
5471         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
5472         (grub_ufs_get_file_block): Fix indirect block calculation problem.
5474         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
5475         (grub_xfs_btree_node): New structure.
5476         (grub_xfs_btree_root): New structure.
5477         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
5478         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
5479         (GRUB_XFS_EXTENT_BLOCK): Likewise.
5480         (GRUB_XFS_EXTENT_SIZE): Likewise.
5481         (grub_xfs_read_block): Support btree format type.
5482         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
5483         Use directory block as basic unit.
5485         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
5487         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
5488         __attribute__ ((__regparm__ (1))).
5490 2008-02-01  Robert Millan  <rmh@aybabtu.com>
5492         Correct a mistake in previous commit.
5494         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
5495         top.
5496         (normal/command.c_DEPENDENCIES): New variable.
5498 2008-02-01  Robert Millan  <rmh@aybabtu.com>
5500         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
5501         top.
5502         (normal/command.c_DEPENDENCIES): New variable.
5503         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
5504         * conf/i386-ieee1275.rmk: Likewise.
5505         * conf/i386-linuxbios.rmk: Likewise.
5506         * conf/i386-pc.rmk: Likewise.
5507         * conf/sparc64-ieee1275.rmk: Likewise.
5508         * conf/powerpc-ieee1275.rmk: Likewise.
5509         (grub_emu_SOURCES): Add `fs/fshelp.c'.
5511         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
5513 2008-02-01  Robert Millan  <rmh@aybabtu.com>
5515         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
5516         call at beginning of function.
5518 2008-01-31  Pavel Roskin  <proski@gnu.org>
5520         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
5521         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
5522         (grub_mkrescue_SOURCES): Likewise.
5523         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
5525 2008-01-30  Robert Millan  <rmh@aybabtu.com>
5527         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
5528         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
5529         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
5530         (grub_probe_SOURCES): ... to here.
5532         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
5533         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
5534         * conf/i386-ieee1275.rmk: Likewise.
5535         * conf/i386-linuxbios.rmk: Likewise.
5536         * conf/powerpc-ieee1275.rmk: Likewise.
5538 2008-01-30  Tristan Gingold  <gingold@free.fr>
5540         * kern/rescue.c: Silently accept empty lines.
5542 2008-01-29  Bean  <bean123ch@gmail.com>
5544         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
5545         (real_code_2): Code cleanup and change comment style.
5546         (move_memory): Avoid using 32-bit address mode.
5548 2008-01-29  Bean  <bean123ch@gmail.com>
5550         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
5551         (png_mod_SOURCES): New variable.
5552         (png_mod_CFLAGS): Likewise.
5553         (png_mod_LDFLAGS): Likewise.
5555         * video/readers/png.c: New file.
5557 2008-01-28  Robert Millan  <rmh@aybabtu.com>
5559         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
5560         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
5561         `ifndef GRUB_MOD_GAP' hack.
5562         * util/elf/grub-mkimage.c (add_segments): Likewise.
5564 2008-01-27  Robert Millan  <rmh@aybabtu.com>
5566         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
5567         `GRUB_MOD_GAP' for platforms in which it's not defined.
5568         * util/elf/grub-mkimage.c (add_segments): Likewise.
5570 2008-01-27  Robert Millan  <rmh@aybabtu.com>
5572         Get grub-emu to build again (including parallel builds).
5574         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
5575         Split into ...
5576         (util/grub-emu.c_DEPENDENCIES): ... this, ...
5577         (normal/execute.c_DEPENDENCIES): ... this, ...
5578         (grub-emu_DEPENDENCIES): ... and this.
5580         * conf/i386-efi.rmk: Likewise.
5581         * conf/i386-linuxbios.rmk: Likewise.
5582         * conf/i386-ieee1275.rmk: Likewise.
5583         * conf/powerpc-ieee1275.rmk: Likewise.
5584         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
5586 2008-01-27  Robert Millan  <rmh@aybabtu.com>
5588         * NEWS: Add a few items.
5590 2008-01-27  Robert Millan  <rmh@aybabtu.com>
5592         Fix parallel builds with grub-emu.  Based on earlier commit for
5593         grub-probe and grub-setup.
5595         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5596         (util/grub-emu.c_DEPENDENCIES): ... this.
5597         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5598         (util/grub-emu.c_DEPENDENCIES): ... this.
5599         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5600         (util/grub-emu.c_DEPENDENCIES): ... this.
5601         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5602         (util/grub-emu.c_DEPENDENCIES): ... this.
5603         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5604         (util/grub-emu.c_DEPENDENCIES): ... this.
5606 2008-01-27  Pavel Roskin  <proski@gnu.org>
5608         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
5609         to create a gap between _end and the modules added to the image
5610         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
5611         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
5612         * util/elf/grub-mkimage.c (add_segments): Likewise.
5614 2008-01-26  Pavel Roskin  <proski@gnu.org>
5616         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
5617         just return an error.
5619 2008-01-26  Bean  <bean123ch@gmail.com>
5621         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
5622         (grub_reiserfs_get_item): Save offset of the next item.
5623         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
5625 2008-01-25  Robert Millan  <rmh@aybabtu.com>
5627         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
5628         make all filesystem sources appear together (possibly fixing omissions
5629         while at it).
5630         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5631         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5632         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5633         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5635         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
5636         add `kern/file.c'.
5637         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
5638         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5639         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
5640         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5642         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
5643         (probe): Add a sanity check to make sure of our ability to read
5644         requested files when probing for filesystem type.
5646         * genmk.rb: Update copyright year (2007).
5648         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
5649         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
5650         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
5651         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
5652         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
5653         : Remove function prototypes.
5655 2008-01-25  Robert Millan  <rmh@aybabtu.com>
5657         Revert my previous commits (based on wrong assumption of how grub_errno
5658         works).
5660         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
5661         * kern/file.c (grub_file_open): Likewise.
5663 2008-01-24  Pavel Roskin  <proski@gnu.org>
5665         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
5666         that hang if GRUB tries to setup colors.
5667         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
5668         colors for firmwares that don't support it.
5669         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
5670         Recognize Open Hack'Ware, set flags to work around its
5671         limitations.
5673 2008-01-24  Robert Millan  <rmh@aybabtu.com>
5675         * kern/file.c (grub_file_open): Do not account previous failures of
5676         unrelated functions when grub_errno is checked for.
5677         Reported by Oleg Strikov.
5679 2008-01-24  Bean  <bean123ch@gmail.com>
5681         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
5682         (grub_ufs_sblock): New member volume name.
5683         (grub_ufs_find_file): Fix string copy bug.
5684         (grub_ufs_label): Implement this function properly.
5686         * fs/hfs.c (grub_hfs_cnid_type): New enum.
5687         (grub_hfs_iterate_records): Use the correct file number for extents
5688         and catalog file. Fix problem in next index calculation.
5689         (grub_hfs_find_node): Replace recursive function call with loop.
5690         (grub_hfs_iterate_dir): Replace recursive function call with loop.
5692 2008-01-23  Robert Millan  <rmh@aybabtu.com>
5694         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
5695         `<grub/symbol.h>' and `<grub/multiboot.h>'.
5696         (grub_multiboot2_real_boot): New function prototype.
5698         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
5699         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
5701         * kern/i386/ieee1275/init.c (grub_os_area_addr)
5702         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
5704 2008-01-23  Robert Millan  <rmh@aybabtu.com>
5706         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
5707         #ifdef'ed out grub_printf().
5709 2008-01-23  Robert Millan  <rmh@aybabtu.com>
5711         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
5712         grub_dprintf calls, since they make "debug=all" mode unusable.
5713         (grub_console_checkkey): Likewise.
5715 2008-01-23  Robert Millan  <rmh@aybabtu.com>
5717         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5718         `term/i386/pc/at_keyboard.c'.
5719         (pkglib_MODULES): Add `serial.mod'.
5720         (serial_mod_SOURCES): New variable.
5721         (serial_mod_CFLAGS): Likewise.
5722         (serial_mod_LDFLAGS): Likewise.
5724         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
5725         `<grub/powerpc/ieee1275/console.h>'.
5726         (grub_keyboard_controller_init): New function prototype.
5727         (grub_console_checkkey): Likewise.
5728         (grub_console_getkey): Likewise.
5730         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
5731         keyboard on i386.
5733         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
5734         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
5736 2008-01-23  Robert Millan  <rmh@aybabtu.com>
5738         * kern/i386/pc/init.c (make_install_device): When memdisk image is
5739         present, "(memdisk)/boot/grub" becomes the default prefix.
5741         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
5742         a memdisk tarball with all the modules.  Add --overlay=DIR option that
5743         allows users to overlay additional files into the image.
5745 2008-01-23  Robert Millan  <rmh@aybabtu.com>
5747         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
5748         and `machine/memory.h'.
5749         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
5750         (_multiboot_mod_SOURCES): New variable.
5751         (_multiboot_mod_CFLAGS): Likewise.
5752         (_multiboot_mod_LDFLAGS): Likewise.
5753         (multiboot_mod_SOURCES): Likewise.
5754         (multiboot_mod_CFLAGS): Likewise.
5755         (multiboot_mod_LDFLAGS): Likewise.
5757         * include/grub/i386/ieee1275/loader.h: New file.
5759         * include/grub/i386/ieee1275/machine.h: Likewise.
5761         * include/grub/i386/ieee1275/memory.h: Likewise.
5763         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
5764         variable declaration.
5765         (grub_os_area_size): Likewise.
5767         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
5768         (grub_lower_mem, grub_upper_mem): New variables.
5769         (grub_stop_floppy): New function (just to make
5770         grub_multiboot2_real_boot() happy).
5772         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
5773         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
5774         (grub_stop): New function.
5775         Include `"../realmode.S"' and `"../loader.S"'.
5777         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
5778         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
5780         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
5781         rely on grub_multiboot2_real_boot() for final boot.
5783 2008-01-22  Robert Millan  <rmh@aybabtu.com>
5785         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
5786         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
5787         device that doesn't look like an SD card.
5788         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5789         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
5790         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
5791         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
5792         found.
5794 2008-01-22  Robert Millan  <rmh@aybabtu.com>
5796         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
5797         avoid claiming over our own code.
5799 2008-01-22  Bean  <bean123ch@gmail.com>
5801         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
5802         (jpeg_mod_SOURCES): New variable.
5803         (jpeg_mod_CFLAGS): Likewise.
5804         (jpeg_mod_LDFLAGS): Likewise.
5806         * video/readers/jpeg.c : New file.
5808 2008-01-22  Bean  <bean123ch@gmail.com>
5810         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
5811         there are no more items.
5813 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5815         * kern/mm.c (grub_mm_init_region): Improve debug message.
5817 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5819         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
5820         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
5821         address.
5822         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
5823         a C macro.
5824         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
5825         Indicates start of upper memory.
5826         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
5827         (generate_image): Abort when image size is big enough to corrupt
5828         upper memory.
5830         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
5831         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
5832         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5833         instead of hardcoding 0xA0000.
5834         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
5835         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5836         instead of hardcoding 0xA0000.
5838 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5840         * disk/memdisk.c (memdisk_size): New variable.
5841         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
5842         `memdisk_size'.
5843         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
5844         image to dynamic memory.
5845         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
5846         `memdisk_size'.  Free memdisk block.
5848 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5850         Fix detection of very small filesystems (like tar).
5852         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
5853         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
5854         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
5855         a problem with this disk).
5857 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5859         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
5860         on grub_biosdisk_rw_standard() error.
5862 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5864         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
5865         recent changes.
5866         * kern/elf.c: Likewise.
5867         * kern/ieee1275/ieee1275.c: Likewise.
5868         * kern/powerpc/ieee1275/openfw.c: Likewise.
5869         * term/ieee1275/ofconsole.c: Likewise.
5871 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5873         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
5875         * include/grub/kernel.h (grub_arch_memdisk_addr)
5876         (grub_arch_memdisk_size): Moved from here ...
5878         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
5879         (grub_arch_memdisk_size): ... to here.
5881 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5883         Mostly based on bugfix from Bean.
5885         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
5886         attribute with hook() parameter.
5887         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
5888         declaration.
5889         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
5890         attribute with hook() parameter.
5891         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
5892         declaration.
5894 2008-01-21  Robert Millan  <rmh@aybabtu.com>
5896         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
5897         (pkglib_MODULES): Add `memdisk.mod'.
5898         (memdisk_mod_SOURCES): New variable.
5899         (memdisk_mod_CFLAGS): Likewise.
5900         (memdisk_mod_LDFLAGS): Likewise.
5902         * disk/memdisk.c: New file.
5904         * include/grub/disk.h (grub_disk_dev_id): Add
5905         `GRUB_DISK_DEVICE_MEMDISK_ID'.
5907         * include/grub/i386/pc/kernel.h
5908         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
5909         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
5910         (grub_kernel_image_size): New variable declaration.
5911         (grub_total_module_size): Likewise.
5912         (grub_memdisk_image_size): Likewise.
5914         * include/grub/i386/pc/memory.h
5915         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
5917         * include/grub/kernel.h: Include `<grub/symbol.h>'.
5918         (grub_arch_memdisk_addr): New variable declaration.
5919         (grub_arch_memdisk_size): Likewise.
5921         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
5922         (grub_arch_memdisk_size): Likewise.
5924         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
5925         (codestart): Replace hardcoded `0x100000' with
5926         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
5928         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
5929         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
5930         not NULL, append the contents of the file it refers to, at the end of
5931         the compressed kernel image.  Initialize `grub_memdisk_image_size'
5932         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
5933         (options): Add "memdisk"|'m' option.
5934         (main): Parse --memdisk|-m option, and pass user-provided path as
5935         parameter to generate_image().
5937 2008-01-20  Robert Millan  <rmh@aybabtu.com>
5939         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
5940         grub_dprintf() calls from here ...
5941         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
5943 2008-01-20  Robert Millan  <rmh@aybabtu.com>
5945         Fix detection of "real mode" when /options/real-mode? doesn't exist.
5947         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
5948         declaration.
5949         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
5950         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
5951         `GRUB_IEEE1275_FLAG_REAL_MODE'.
5952         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
5953         property).
5954         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
5955         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
5957 2008-01-19  Robert Millan  <rmh@aybabtu.com>
5959         Get rid of confusing function (superseded by
5960         `grub_ieee1275_get_integer_property')
5961         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
5962         prototype.
5963         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
5964         function.
5965         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
5966         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
5967         in native endianness from grub_ieee1275_get_integer_property().
5969 2008-01-19  Robert Millan  <rmh@aybabtu.com>
5971         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
5972         command after "shut-down", since implementations differ on which
5973         the command for halt is.
5975 2008-01-19  Robert Millan  <rmh@aybabtu.com>
5977         * include/grub/i386/linuxbios/console.h: Add header protection.
5978         (grub_keyboard_controller_init): New function prototype.
5979         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
5980         (KEYBOARD_COMMAND_READ): Likewise.
5981         (KEYBOARD_COMMAND_WRITE): Likewise.
5982         (KEYBOARD_SCANCODE_SET1): Likewise.
5983         (grub_keyboard_controller_write): New function.
5984         (grub_keyboard_controller_read): Likewise.
5985         (grub_keyboard_controller_init): Likewise.
5987         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
5988         (grub_console_init): On coreboot/LinuxBIOS, call
5989         grub_keyboard_controller_init().
5991 2008-01-19  Robert Millan  <rmh@aybabtu.com>
5993         PowerPC changes provided by Pavel Roskin.
5995         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
5996         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
5997         don't rely on cmain() doing it.
5998         * kern/i386/ieee1275/startup.S (_start): Store %eax in
5999         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
6001 2008-01-16  Robert Millan  <rmh@aybabtu.com>
6003         * include/grub/i386/linuxbios/memory.h
6004         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
6005         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
6006         receive `table_header' as argument.  Instead, probe for it in the
6007         known memory ranges where it can be present.
6008         (grub_available_iterate): Do not pass a fixed `table_header' address
6009         to grub_linuxbios_table_iterate().
6011 2008-01-15  Robert Millan  <rmh@aybabtu.com>
6013         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
6014         * conf/i386-ieee1275.rmk: New file.
6015         * include/grub/i386/ieee1275/console.h: Likewise.
6016         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
6017         * include/grub/i386/ieee1275/kernel.h: Likewise.
6018         * include/grub/i386/ieee1275/time.h: Likewise.
6019         * kern/i386/ieee1275/init.c: Likewise.
6020         * kern/i386/ieee1275/startup.S: Likewise.
6022 2008-01-15  Robert Millan  <rmh@aybabtu.com>
6024         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
6025         when pointers are 32-bit (but still do set it to one when they are
6026         64-bit).
6028 2008-01-15  Robert Millan  <rmh@aybabtu.com>
6030         * include/grub/ieee1275/ieee1275.h
6031         (grub_ieee1275_get_integer_property): New function prototype.
6033         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
6034         (grub_ieee1275_get_integer_property): New function.  Wraps around
6035         grub_ieee1275_get_property() to handle endianness.
6037         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
6038         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
6039         where appropriate.
6040         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
6041         (grub_map): Likewise.
6042         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
6044 2008-01-15  Bean  <bean123ch@gmail.com>
6046         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
6047         (grub_script_execute_cmdline): Reset grub_errno.
6049         * normal/main.c (read_config_file): Reset grub_errno.
6051         * normal/parse.y (script_init): New.
6052         (script): Move function and menuentry here.
6053         (delimiter): New.
6054         (command): Add delimiter at the end of command.
6055         (commands): Adjust to match the new command.
6056         (commandblock): Remove grub_script_lexer_record_start.
6057         (menuentry): Add grub_script_lexer_record_start, use the new commands.
6058         (if): Use the new commands.
6060         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
6062 2008-01-15  Robert Millan  <rmh@aybabtu.com>
6064         * normal/menu.c (run_menu): Move timeout message from here ...
6065         (print_timeout): ... to here.
6066         (run_menu): Use print_timeout() once during initial draw to print
6067         the whole message, and again in every clock tick to update only
6068         the number of seconds.
6070 2008-01-15  Robert Millan  <rmh@aybabtu.com>
6072         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
6073         actual size of `available' from grub_ieee1275_get_property(), and
6074         restrict parsing to that bound.
6076 2008-01-15  Christian Franke  <franke@computer.org>
6078         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
6079         (argp_program_version): Remove variable.
6080         (argp_program_bug_address): Likewise.
6081         (options): Convert from struct argp_option to struct option.
6082         (struct arguments): Remove.
6083         (parse_opt): Remove.
6084         (usage): New function.
6085         (main): Replace struct args members by simple variables.
6086         Replace argp_parse() by getopt_long().
6087         Add switch to evaluate options.
6088         Add missing "(...)" around root_dev in prefix string.
6090 2008-01-14  Robert Millan  <rmh@aybabtu.com>
6092         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
6093         for grub_ieee1275_exit(), in order to improve portability.
6095 2008-01-14  Robert Millan  <rmh@aybabtu.com>
6097         * util/grub.d/10_linux.in (prefix): Define.
6098         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
6100 2008-01-13  Pavel Roskin  <proski@gnu.org>
6102         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
6103         grub_errno if no errors have been detected.
6105 2008-01-12  Robert Millan  <rmh@aybabtu.com>
6107         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
6108         (grub_util_get_dev_abstraction): New function prototype.
6110         * util/getroot.c: Include `<grub/util/getroot.h>'
6111         (grub_util_get_grub_dev): Move detection of abstraction type to ...
6112         (grub_util_get_dev_abstraction): ... here (new function).
6114         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
6115         `PRINT_ABSTRACTION'.
6116         (probe): Probe for abstraction type when requested.
6117         (main): Understand `--target=abstraction'.
6119         * util/i386/efi/grub-install.in: Add abstraction module to core
6120         image when it is found to be necessary.
6121         * util/i386/pc/grub-install.in: Likewise.
6122         * util/powerpc/ieee1275/grub-install.in: Likewise.
6124         * util/update-grub_lib.in (font_path): Return system path without
6125         converting to GRUB path.
6126         * util/update-grub.in: Convert system path returned by font_path()
6127         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
6128         abstraction module is needed for loading fonts (if any).  Export
6129         that as `GRUB_PRELOAD_MODULES'.
6130         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
6131         insmod commands).
6133 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
6135         Remove some unused code from reiserfs.
6137         * fs/reiserfs.c (struct grub_reiserfs_key)
6138         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
6139         (struct grub_reiserfs_node_body): Removed.
6140         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6141         Likewise.
6142         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6143         Likewise.
6144         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6145         Likewise.
6146         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6147         Likewise.
6148         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6149         Likewise.
6150         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
6151         Likewise.
6152         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6153         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6154         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6156 2008-01-10  Robert Millan  <rmh@aybabtu.com>
6158         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
6159         Determines if a file is garbage left by packaging systems, etc.
6160         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
6161         for processing /etc/grub.d scripts.
6162         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
6163         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
6164         as a condition for processing Linux images.
6166 2008-01-10  Pavel Roskin  <proski@gnu.org>
6168         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
6169         to compile reiserfs.c on PowerPC.
6171 2008-01-10  Robert Millan  <rmh@aybabtu.com>
6173         * kern/device.c (grub_device_iterate): Do not abort device iteration
6174         when one of the devices cannot be opened.
6175         * kern/disk.c (grub_disk_open): Do not account previous failures of
6176         unrelated functions when grub_errno is checked for.
6178 2008-01-08  Robert Millan  <rmh@aybabtu.com>
6180         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
6181         `! grub_linux_is_bzimage', change order of address comparison to make
6182         it more intuitive, and improve "too big zImage" error message.
6184 2008-01-08  Robert Millan  <rmh@aybabtu.com>
6186         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
6187         `$(update-grub_DATA)'.
6188         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
6189         targets.
6191 2008-01-07  Robert Millan  <rmh@aybabtu.com>
6193         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
6194         which instruction is modified by grub-setup during installation
6195         (since it wasn't obvious by only looking at this file).
6197 2008-01-07  Robert Millan  <rmh@aybabtu.com>
6199         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
6200         listing actual TODO items.
6202 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
6204         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
6205         correctly.
6206         (grub_reiserfs_get_key_offset): Likewise.
6207         (grub_reiserfs_set_key_offset): Likewise.
6208         (grub_reiserfs_set_key_type): Likewise.
6209         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
6211         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
6212         better to remove the bitfield version completely.
6214 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
6216         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
6217         allocated from the heap, due to the fshelp implementation.
6218         (grub_reiserfs_dir): Free NODE, due to the same reason.
6220 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
6222         Mostly from Vincent Pelletier:
6224         * fs/reiserfs.c: New file.
6226         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
6227         (reiserfs_mod_SOURCES): New variable.
6228         (reiserfs_mod_CFLAGS): Likewise.
6229         (reiserfs_mod_LDFLAGS): Likewise.
6231         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
6232         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
6233         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
6234         normal/color.c.
6236 2008-01-06  Robert Millan  <rmh@aybabtu.com>
6238         * normal/color.c: Remove `<grub/env.h>'.
6240 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
6242         * include/grub/normal.h: Include <grub/env.h>.
6244 2008-01-05  Robert Millan  <rmh@aybabtu.com>
6246         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
6247         usage example with `(hd0,1)'.
6248         Reported by Samuel Thibault.
6250 2008-01-05  Robert Millan  <rmh@aybabtu.com>
6252         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
6253         (grub_linux_boot_zimage): Rename to ...
6254         (grub_linux_boot): ... this.
6255         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
6256         (grub_linux_boot_zimage): Conditionalize zImage copy.
6258         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
6259         (grub_linux_boot_bzimage): Remove prototype.
6260         (grub_linux_boot_zimage): Rename to ...
6261         (grub_linux_boot): ... this.
6263         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
6264         (grub_linux_boot): Remove function.
6266 2008-01-05  Robert Millan  <rmh@aybabtu.com>
6268         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
6269         (grub_env_write_color_highlight): Likewise.
6270         (grub_wait_after_message): Likewise.
6272         * normal/color.c: New file.
6274         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6275         (normal_mod_DEPENDENCIES): Likewise.
6277         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6278         (normal_mod_DEPENDENCIES): Likewise.
6280         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6281         (normal_mod_DEPENDENCIES): Likewise.
6283         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6284         (normal_mod_DEPENDENCIES): Likewise.
6286         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
6287         for waiting after a message is printed.
6288         * normal/main.c (read_config_file): Likewise.
6289         (grub_normal_init): Register grub_env_write_color_normal() and
6290         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
6291         `color_highlight' variables as global.
6293         * normal/menu.c (grub_wait_after_message): New function.
6294         (grub_color_menu_normal): New variable.  Replaces ...
6295         (GRUB_COLOR_MENU_NORMAL): ... this macro.
6296         (grub_color_menu_highlight): New variable.  Replaces ...
6297         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
6298         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
6299         `GRUB_TERM_COLOR_STANDARD'.
6300         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
6301         `normal_code' and `highlight_code' to `old_color_normal' and
6302         `old_color_highlight', respectively.
6303         (grub_menu_init_page): Update colors when drawing the menu, based on
6304         `menu_color_normal' and `menu_color_highlight' variables.
6305         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
6306         a message is printed.
6308 2008-01-05  Robert Millan  <rmh@aybabtu.com>
6310         * kern/env.c (grub_env_context_open): Propagate hooks for global
6311         variables to new context.
6313         * kern/main.c (grub_set_root_dev): Export `root' variable.
6315 2008-01-05  Robert Millan  <rmh@aybabtu.com>
6317         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
6318         discs unconditionally, since udev and others have options to provide
6319         them.
6321 2008-01-05  Robert Millan  <rmh@aybabtu.com>
6323         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
6325 2008-01-04  Christian Franke  <franke@computer.org>
6327         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
6328         of eisa_mmap.
6330 2008-01-03  Pavel Roskin  <proski@gnu.org>
6332         * kern/i386/linuxbios/init.c: Put "void" to all function
6333         declarations with no arguments.
6334         * kern/powerpc/ieee1275/init.c: Likewise.
6335         * term/i386/pc/at_keyboard.c: Likewise.
6336         * term/i386/pc/vga_text.c: Likewise.
6337         * util/grub-mkdevicemap.c: Likewise.
6339 2008-01-02  Robert Millan  <rmh@aybabtu.com>
6341         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
6342         message when loaded image is out of bounds.
6343         (grub_multiboot_load_elf64): Likewise.
6345 2008-01-02  Pavel Roskin  <proski@gnu.org>
6347         * util/grub.d/10_linux.in: Try version without ".old" when
6348         looking for initrd.  It's better to use initrd from the newer
6349         kernel of the same version than no initrd at all.
6351 2008-01-01  Robert Millan  <rmh@aybabtu.com>
6353         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
6355 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
6357         * include/grub/video.h: Added grub_video_unmap_color and
6358         grub_video_get_active_render_target.
6359         (grub_video_adapter): Added unmap_color and get_active_render_target.
6361         * video/video.c: Added grub_video_unmap_color and
6362         grub_video_get_active_render_target.
6363         (grub_video_get_info): Changed method to accept NULL pointer as an
6364         argument to allow detection of active video adapter.
6366         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
6367         grub_video_vbe_unmap_color_int.
6368         Added grub_video_vbe_unmap_color and
6369         grub_video_vbe_get_active_render_target.
6370         (grub_video_vbe_adapter): Added unmap_color and
6371         get_active_render_target.
6373         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
6374         with grub_video_vbe_unmap_color_int.
6376         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
6377         (DEFAULT_NORMAL_COLOR): Likewise.
6378         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
6379         (DEFAULT_FG_COLOR): Removed.
6380         (DEFAULT_BG_COLOR): Likewise.
6381         (DEFAULT_CURSOR_COLOR): Changed value.
6382         (grub_virtual_screen): Added standard_color_setting,
6383         normal_color_setting, highlight_color_setting and term_color.
6384         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
6385         (bitmap_width): Added.
6386         (bitmap_height): Likewise.
6387         (bitmap): Likewise.
6388         (set_term_color): Likewise.
6389         (grub_virtual_screen_setup): Changed to use new terminal coloring
6390         settings.
6391         (grub_gfxterm_init): Added init for bitmap.
6392         (grub_gfxterm_fini): Added destroy for bitmap.
6393         (redraw_screen_rect): Updated to use background bitmap and new
6394         terminal coloring.
6395         (scroll_up): Added optimization for case when there is no bitmap.
6396         (grub_gfxterm_cls): Fixed to use correct background color.
6397         (grub_virtual_screen_setcolorstate): Changed to use new terminal
6398         coloring.
6399         (grub_virtual_screen_setcolor): Likewise.
6400         (grub_virtual_screen_getcolor): Added.
6401         (grub_gfxterm_background_image_cmd): Likewise.
6402         (grub_video_term): Added setcolor and getcolor.
6403         (MOD_INIT): Added registration of background_image command.
6404         (MOD_TERM): Added unregistration for background_image command.
6406 2007-12-30  Pavel Roskin  <proski@gnu.org>
6408         * loader/multiboot_loader.c: Fix multiboot command
6409         unregistration.  Fix all typos in the word "multiboot".
6411 2007-12-29  Pavel Roskin  <proski@gnu.org>
6413         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
6414         support for initrd names used in Fedora.
6416 2007-12-26  Bean  <bean123ch@gmail.com>
6418         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
6419         (cpio_mod_SOURCES): New variable.
6420         (cpio_mod_CFLAGS): Likewise.
6421         (cpio_mod_LDFLAGS): Likewise.
6423         * fs/cpio.c: New file.
6425         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
6427         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6429         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6431         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6433 2007-12-25  Robert Millan  <rmh@aybabtu.com>
6435         * include/grub/term.h (struct grub_term): Add `getcolor' function.
6436         (grub_getcolor): New function.
6438         * kern/term.c (grub_getcolor): New function.
6439         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
6440         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
6441         (print_entry): Set normal and highlight colors to
6442         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
6443         respectively, before printing and restore them to old
6444         values afterwards.
6445         (grub_menu_init_page): Likewise.  Fill an additional colored space
6446         that would otherwise be left blank.
6448         * term/efi/console.c (grub_console_getcolor): New function.
6449         (struct grub_console_term.getcolor): New variable.
6450         * term/i386/pc/console.c (grub_console_getcolor): New function.
6451         (struct grub_console_term.getcolor): New variable.
6452         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
6453         (struct grub_console_term.getcolor): New variable.
6455         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
6456         (struct grub_console_term.setcolor): Remove variable.
6457         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
6458         (struct grub_console_term.setcolor): Remove variable.
6459         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
6460         (struct grub_console_term.setcolor): Remove variable.
6461         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
6462         (struct grub_console_term.setcolor): Remove variable.
6464 2007-12-25  Robert Millan  <rmh@aybabtu.com>
6466         * configure.ac: Search for possible unifont.hex locations, and
6467         define UNIFONT_HEX if found.
6469         * Makefile.in (UNIFONT_HEX): Define variable.
6470         (DATA): Rename to ...
6471         (PKGLIB): ... this.  Update all users.
6472         (PKGDATA): New variable.
6473         (pkgdata_IMAGES): Rename to ...
6474         (pkglib_IMAGES): ... this. Update all users.
6475         (pkgdata_MODULES): Rename to ...
6476         (pkglib_MODULES): ... this. Update all users.
6477         (pkgdata_PROGRAMS): Rename to ...
6478         (pkglib_PROGRAMS): ... this. Update all users.
6479         (pkgdata_DATA): Rename to ...
6480         (pkglib_DATA): ... this. Update all users.
6481         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
6482         (unicode.pff, ascii.pff): New rules.
6483         (all-local): Add `$(PKGDATA)' dependency.
6484         (install-local): Process `$(PKGDATA)'.
6486         * util/update-grub_lib.in (font_path): Search for *.pff files in
6487         a few more locations, including `${pkgdata}'.
6489 2007-12-23  Robert Millan  <rmh@aybabtu.com>
6491         Patch from Bean  <bean123ch@gmail.com>:
6492         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
6493         `size'.
6495 2007-12-21  Bean  <bean123ch@gmail.com>
6497         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
6498         (ntfscomp_mod_SOURCES): New variable.
6499         (ntfscomp_mod_CFLAGS): Likewise.
6500         (ntfscomp_mod_LDFLAGS): Likewise.
6502         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
6503         (grub_probe_SOURCES): Likewise.
6504         (grub_emu_SOURCES): Likewise.
6506         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6507         (grub_emu_SOURCES): Likewise.
6509         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6510         (grub_emu_SOURCES): Likewise.
6512         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6513         (grub_emu_SOURCES): Likewise.
6515         * fs/ntfs.c (grub_ntfscomp_func): New variable.
6516         (read_run_list): Renamed to grub_ntfs_read_run_list.
6517         (decomp_nextvcn): Moved to ntfscomp.c.
6518         (decomp_getch): Likewise.
6519         (decomp_get16): Likewise.
6520         (decomp_block): Likewise.
6521         (read_block): Likewise.
6522         (read_data): Partially moved to ntfscomp.c.
6523         (fixup): Change unsigned to grub_uint16_t.
6524         (read_mft): Change unsigned long to grub_uint32_t.
6525         (read_attr): Likewise.
6526         (read_data): Likewise.
6527         (read_run_data): Likewise.
6528         (read_run_list): Likewise.
6529         (read_mft): Likewise.
6531         * fs/ntfscomp.c: New file.
6533         * include/grub/ntfs.h: New file.
6535 2007-12-16  Robert Millan  <rmh@aybabtu.com>
6537         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
6538         IDE disk check, since Linux is known to support 20 IDE disks.
6539         Reported by Colin Watson.
6541 2007-12-15  Bean  <bean123ch@gmail.com>
6543         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
6544         (lnxboot_img_SOURCES): New variable.
6545         (lnxboot_img_ASFLAGS): Likewise.
6546         (lnxboot_img_LDFLAGS): Likewise.
6548         * boot/i386/pc/lnxboot.S: New file.
6550 2007-11-24  Pavel Roskin  <proski@gnu.org>
6552         * configure.ac: Test if '--build-id=none' is supported by the
6553         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
6554         objcopy to generate incorrect binary files (binutils
6555         2.17.50.0.18-1 as shipped by Fedora 8).
6556         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
6557         linking, so that build ID doesn't break the test.
6559 2007-11-24  Pavel Roskin  <proski@gnu.org>
6561         * include/grub/i386/time.h: use "void" in the argument list
6562         of grub_cpu_idle().
6563         * include/grub/powerpc/time.h: Likewise.
6564         * include/grub/sparc64/time.h: Likewise.
6566 2007-11-18  Christian Franke  <franke@computer.org>
6568         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
6569         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
6570         This fixes the problem that function keys did not work in grub-emu.
6572 2007-11-18  Christian Franke  <franke@computer.org>
6574         * disk/host.c (grub_host_open): Remove attribute unused from
6575         name parameter. Add check for "host". This fixes the problem
6576         that grub-emu does not find partitions.
6578 2007-11-18  Christian Franke  <franke@computer.org>
6580         * util/hostfs.c (is_dir): New function.
6581         (grub_hostfs_dir):  Handle missing dirent.d_type case.
6582         (grub_hostfs_read): Add missing fseek().
6583         (grub_hostfs_label): Clear label pointer.  This fixes a crash
6584         of grub-emu on "ls (host)".
6586 2007-11-18  Christian Franke  <franke@computer.org>
6588         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
6589         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
6590         to 64 bit boundary by default.
6592 2007-11-18  Bean  <bean123ch@gmail.com>
6594         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
6595         (hexdump_mod_SOURCES): New variable.
6596         (hexdump_mod_CFLAGS): Likewise.
6597         (hexdump_mod_LDFLAGS): Likewise.
6599         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6601         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6603         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6605         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6607         * include/grub/hexdump.h: New file.
6609         * commands/hexdump.c: New file.
6611 2007-11-10  Robert Millan  <rmh@aybabtu.com>
6613         * commands/i386/pc/play.c (beep_off): Switch order of arguments
6614         in grub_outb() calls.
6615         (beep_on): Likewise.
6617 2007-11-10  Christian Franke  <franke@computer.org>
6619         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
6620         (grub_menu_run): Likewise.
6622 2007-11-10  Robert Millan  <rmh@aybabtu.com>
6624         * include/grub/i386/efi/machine.h: New file.
6625         * include/grub/i386/linuxbios/machine.h: Likewise.
6626         * include/grub/i386/pc/machine.h: Likewise.
6627         * include/grub/powerpc/ieee1275/machine.h: Likewise.
6628         * include/grub/sparc64/ieee1275/machine.h: Likewise.
6630         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
6631         (serial_hw_io_addr): New variable.
6632         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
6633         instead of `(unsigned short *) 0x400'.
6635 2007-11-10  Bean  <bean123ch@gmail.com>
6637         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
6639 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
6641         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
6642         (vga_mod_SOURCES): Added.
6643         (vga_mod_CFLAGS): Likewise.
6644         (vga_mod_LDFLAGS): Likewise.
6646         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
6647         grub_outb() calls.
6648         (set_map_mask): Likewise.
6649         (set_read_map): Likewise.
6650         (set_read_address): Likewise.
6651         (vga_font): Removed variable.
6652         (get_vga_glyph): Removed function.
6653         (invalidate_char): Likewise.
6654         (write_char): Changed to use grub_font_get_glyph() for font
6655         information.
6656         (grub_vga_putchar): Likewise.
6657         (grub_vga_getcharwidth): Likewise.
6659 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
6661         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
6662         flags.
6663         (pxeboot_img_LDFLAGS): Likewise.
6664         (diskboot_img_LDFLAGS): Likewise.
6665         (kernel_img_LDFLAGS): Likewise.
6667 2007-11-06  Robert Millan  <rmh@aybabtu.com>
6669         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
6670         in grub_outb() calls.
6671         (serial_hw_init): Likewise.
6673 2007-11-05  Robert Millan  <rmh@aybabtu.com>
6675         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
6676         spaces.  Skip non-regular files.
6678 2007-11-05  Robert Millan  <rmh@aybabtu.com>
6680         * kern/disk.c (grub_disk_firmware_fini)
6681         (grub_disk_firmware_is_tainted): New variables.
6683         * include/grub/disk.h (grub_disk_firmware_fini)
6684         (grub_disk_firmware_is_tainted): Likewise.
6686         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
6687         (grub_disk_biosdisk_fini): ... to here.
6688         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
6689         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
6690         is set.  Register grub_disk_biosdisk_fini() in
6691         `grub_disk_firmware_fini'.
6693         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
6694         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
6695         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
6696         to finish existing firmware disk interface.
6698         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
6699         (ata_mod_SOURCES): New variable.
6700         (ata_mod_CFLAGS): Likewise.
6701         (ata_mod_LDFLAGS): Likewise.
6703 2007-11-05  Robert Millan  <rmh@aybabtu.com>
6705         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
6706         (grub_ata_wait): Reimplement using grub_millisleep().
6708         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
6709         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
6711 2007-11-03  Marco Gerards  <marco@gnu.org>
6713         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
6714         (CRTC_ADDR_PORT): New macro.
6715         (CRTC_DATA_PORT): Likewise.
6716         (CRTC_CURSOR): Likewise.
6717         (CRTC_CURSOR_ADDR_HIGH): Likewise.
6718         (CRTC_CURSOR_ADDR_LOW): Likewise.
6719         (update_cursor): New function.
6720         (grub_console_real_putchar): Call `update_cursor'.
6721         (grub_console_gotoxy): Likewise.
6722         (grub_console_cls): Set the default color when clearing the
6723         screen.
6724         (grub_console_setcursor): Implemented.
6726 2007-11-03  Marco Gerards  <marco@gnu.org>
6728         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
6729         become activate.
6730         (grub_ata_pio_write): Likewise.
6732         (grub_atapi_identify): Wait after issuing an ATA command.
6733         (grub_atapi_packet): Likewise.
6734         (grub_ata_identify): Likewise.
6735         (grub_ata_readwrite): Likewise.
6737 2007-11-03  Marco Gerards  <marco@gnu.org>
6739         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
6740         (grub_ata_pio_write): Likewise.
6741         (grub_ata_readwrite): Use `grub_error', instead of
6742         returning `grub_errno'.
6744 2007-11-03  Marco Gerards  <marco@gnu.org>
6746         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
6747         grub_ata_pio_write once for every single sector, instead of for
6748         multiple sectors.
6750 2007-10-31  Robert Millan  <rmh@aybabtu.com>
6752         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
6754         * conf/i386-linuxbios.rmk: New file.
6756         * kern/i386/pc/hardware.c: Likewise.
6757         * term/i386/pc/at_keyboard.c: Likewise.
6758         * term/i386/pc/vga_text.c: Likewise.
6760         * include/grub/i386/linuxbios/boot.h: Likewise.
6761         * include/grub/i386/linuxbios/console.h: Likewise.
6762         * include/grub/i386/linuxbios/init.h: Likewise.
6763         * include/grub/i386/linuxbios/kernel.h: Likewise.
6764         * include/grub/i386/linuxbios/loader.h: Likewise.
6765         * include/grub/i386/linuxbios/memory.h: Likewise.
6766         * include/grub/i386/linuxbios/serial.h: Likewise.
6767         * include/grub/i386/linuxbios/time.h: Likewise.
6769         * kern/i386/linuxbios/init.c: Likewise.
6770         * kern/i386/linuxbios/startup.S: Likewise.
6771         * kern/i386/linuxbios/table.c: Likewise.
6773 2007-10-31  Marco Gerards  <marco@gnu.org>
6775         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
6776         (ata_mod_SOURCES): New variable.
6777         (ata_mod_CFLAGS): Likewise.
6778         (ata_mod_LDFLAGS): Likewise.
6780         * disk/ata.c: New file.
6782         * include/grub/disk.h (grub_disk_dev_id): Add
6783         `GRUB_DISK_DEV_ATA_ID'.
6785 2007-10-31  Robert Millan  <rmh@aybabtu.com>
6787         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
6788         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
6790         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
6791         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
6793         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
6794         `<grub/types.h>'.
6796         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
6798 2007-10-27  Robert Millan  <rmh@aybabtu.com>
6800         * include/grub/types.h (ULONG_MAX): Define macro.
6802 2007-10-22  Robert Millan  <rmh@aybabtu.com>
6804         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
6805         `"../realmode.S"'.
6806         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
6808 2007-10-22  Robert Millan  <rmh@aybabtu.com>
6810         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
6811         (pkgdata_MODULES): Add `biosdisk.mod'.
6812         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
6813         variables.
6815         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
6816         (grub_biosdisk_init): Replace with ...
6817         (GRUB_MOD_INIT(biosdisk)): ... this.
6818         (grub_biosdisk_fini): Replace with ...
6819         (GRUB_MOD_FINI(biosdisk)): ... this.
6821         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
6822         (grub_machine_init): Remove call to grub_biosdisk_init().
6823         (grub_machine_fini): Remove call to grub_machine_fini().
6825         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
6827 2007-10-22  Robert Millan  <rmh@aybabtu.com>
6829         * include/grub/time.h: New file.
6830         * include/grub/i386/time.h: Likewise.
6831         * include/grub/powerpc/time.h: Likewise.
6832         * include/grub/sparc64/time.h: Likewise.
6834         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
6835         instances to ...
6836         (KERNEL_MACHINE_TIME_HEADER): ... this.
6837         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6838         instances to ...
6839         (KERNEL_MACHINE_TIME_HEADER): ... this.
6840         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6841         instances to ...
6842         (KERNEL_MACHINE_TIME_HEADER): ... this.
6844         * kern/i386/efi/init.c: Include `<grub/time.h>'.
6845         (grub_millisleep): New function.
6846         * kern/i386/pc/init.c: Include `<grub/time.h>'.
6847         (grub_millisleep): New function.
6848         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
6849         Remove `grub/machine/time.h' include.
6850         (grub_millisleep): New function.
6851         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
6852         Remove `grub/machine/time.h' include.
6853         (grub_millisleep): New function.
6855         * include/grub/misc.h (grub_div_roundup): New function.
6857         * kern/misc.c: Include `<grub/time.h>'.
6858         (grub_millisleep_generic): New function.
6860         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
6861         Add `time.h'.
6862         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
6863         Add `time.h'.
6864         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
6865         `machine/time.h'.  Add `time.h'.
6866         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6868 2007-10-21  Robert Millan  <rmh@aybabtu.com>
6870         * include/grub/misc.h (grub_max): New function.
6872 2007-10-21  Robert Millan  <rmh@aybabtu.com>
6874         * util/misc.c (grub_util_info): Call fflush() before returning.
6876 2007-10-20  Robert Millan  <rmh@aybabtu.com>
6878         * genmk.rb (Image): Copy `extra_flags' from here ...
6879         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
6881         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
6882         to `argc' and `args' arguments.
6884 2007-10-17  Robert Millan  <rmh@aybabtu.com>
6886         * kern/i386/loader.S: New file.
6888         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
6889         * kern/i386/loader.S (grub_linux_prot_size)... to here.
6890         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
6891         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
6892         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
6893         * kern/i386/loader.S (grub_linux_real_addr)... to here.
6894         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
6895         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
6896         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
6897         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
6898         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
6899         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
6900         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
6901         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
6903         * kern/i386/realmode.S: New file.
6905         * kern/i386/pc/startup.S (protstack): Moved from here ...
6906         * kern/i386/realmode.S (protstack)... to here.
6907         * kern/i386/pc/startup.S (gdt): Moved from here ...
6908         * kern/i386/realmode.S (gdt)... to here.
6909         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
6910         * kern/i386/realmode.S (prot_to_real)... to here.
6912         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
6913         `kern/i386/realmode.S'.
6915 2007-10-17  Robert Millan  <rmh@aybabtu.com>
6917         * include/grub/i386/loader.h: New file.
6919         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
6920         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6921         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6922         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6923         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
6924         * include/grub/i386/loader.h (grub_linux_prot_size)
6925         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6926         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6927         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6928         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
6930         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
6932 2007-10-15  Robert Millan  <rmh@aybabtu.com>
6934         * normal/misc.c (grub_normal_print_device_info): Do not probe for
6935         filesystem when dev->disk is unset.
6936         Do probe for filesystem even when dev->disk->has_partitions is set.
6937         In case a filesystem is found, always report it.
6938         In case it isn't, if dev->disk->has_partitions is set, report that
6939         a partition table was found instead of reporting that no filesystem
6940         could be identified.
6942 2007-10-12  Robert Millan  <rmh@aybabtu.com>
6944         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
6945         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
6947         * include/grub/types.h (grub_host_to_target16): New macro.
6948         (grub_host_to_target32): Likewise.
6949         (grub_host_to_target64): Likewise.
6950         (grub_target_to_host16): Likewise.
6951         (grub_target_to_host32): Likewise.
6952         (grub_target_to_host64): Likewise.
6954         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6955         Renamed from to ...
6956         (GRUB_MOD_ALIGN): ...this.  Update all users.
6958         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
6959         grub_host_to_target32.
6960         Replace grub_be_to_cpu32 with grub_target_to_host32.
6961         (load_modules): Likewise.
6962         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
6963         Replace grub_be_to_cpu32 with grub_target_to_host32.
6964         Replace grub_cpu_to_be16 with grub_host_to_target16.
6965         Replace grub_cpu_to_be32 grub_host_to_target32.
6967 2007-10-12  Robert Millan  <rmh@aybabtu.com>
6969         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
6970         * util/elf/grub-mkimage.c: ... here.
6972         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
6973         `util/powerpc/ieee1275/grub-mkimage.c'.
6975 2007-10-07  Robert Millan  <rmh@aybabtu.com>
6977         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
6978         and make it easier to figure out.
6979         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
6980         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
6981         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
6982         leave us with less than HEAP_MIN_SIZE total heap.
6983         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
6985 2007-10-03  Robert Millan  <rmh@aybabtu.com>
6987         * include/grub/i386/io.h: New file.
6988         * commands/i386/pc/play.c (inb): Removed.
6989         (outb): Removed.
6990         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
6991         with grub_outb().
6992         * term/i386/pc/serial.c  (inb): Removed.
6993         (outb): Removed.
6994         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
6995         with grub_outb().
6996         * term/i386/pc/vga.c  (inb): Removed.
6997         (outb): Removed.
6998         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
6999         with grub_outb().
7001 2007-10-02  Robert Millan  <rmh@aybabtu.com>
7003         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
7004         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7005         Reported by Marcin Kurek.
7007 2007-09-07  Robert Millan  <rmh@aybabtu.com>
7009         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
7010         SmartFirmware version updates (as released by Sven Luther), and avoid
7011         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
7012         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
7013         known broken.
7015 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
7017         From Hitoshi Ozeki:
7018         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
7019         when merging two regions.
7021 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
7023         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
7024         * normal/completion.c (grub_normal_do_completion): Likewise.
7025         Reported by Hitoshi Ozeki.
7027 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
7029         Do not use devices at boot in chainloading.
7031         * loader/i386/pc/chainloader.c (boot_drive): New variable.
7032         (boot_part_addr): Likewise.
7033         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
7034         with BOOT_DRIVE and BOOT_PART_ADDR.
7035         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
7036         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
7038 2007-08-29  Robert Millan  <rmh@aybabtu.com>
7040         Patch from Simon Peter <dn.tlp@gmx.net>:
7041         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
7042         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
7043         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
7044         util/i386/pc/grub-setup.c_DEPENDENCIES.
7045         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
7046         util/grub-probe.c_DEPENDENCIES.
7047         * conf/powerpc-ieee1275.rmk: Likewise.
7049 2007-08-28  Robert Millan  <rmh@aybabtu.com>
7051         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
7052         to tell grub-mkdevicemap how to name devices.
7053         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
7054         feature).
7056         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
7057         util/i386/get_disk_name.c.
7058         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
7059         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
7060         util/ieee1275/get_disk_name.c.
7062         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
7064         * DISTLIST: Add util/i386/get_disk_name.c and
7065         util/ieee1275/get_disk_name.c.
7067         * util/grub-mkdevicemap.c: Replace device naming logic with
7068         grub_util_get_disk_name() calls.
7070 2007-08-20  Robert Millan  <rmh@aybabtu.com>
7072         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
7073         (so that it works for both plural and singular quantities).
7075 2007-08-05  Robert Millan  <rmh@aybabtu.com>
7077         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
7078         so that [xz] isn't taken into account when determining order.
7080 2007-08-02  Marco Gerards  <marco@gnu.org>
7082         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
7083         `include/multiboot2.h', `include/grub/elfload.h',
7084         `include/multiboot.h', `include/grub/multiboot.h',
7085         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
7086         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
7087         `kern/elf.c', `loader/multiboot_loader.c',
7088         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
7089         `loader/i386/pc/multiboot2.c',
7090         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
7091         `util/i386/pc/grub-mkrescue.in'.  Remove
7092         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
7093         `include/grub/i386/pc/util/biosdisk.h' and
7094         `include/grub/powerpc/ieee1275/multiboot.h'.
7096 2007-08-02  Bean  <bean123ch@gmail.com>
7098         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
7099         (ntfs_mod_SOURCES): New variable.
7100         (ntfs_mod_CFLAGS): Likewise.
7101         (ntfs_mod_LDFLAGS): Likewise.
7103         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
7104         (grub_probe_SOURCES): Likewise.
7105         (grub_emu_SOURCES): Likewise.
7107         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7108         (grub_emu_SOURCES): Likewise.
7110         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7111         (grub_emu_SOURCES): Likewise.
7113         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
7115         * fs/ntfs.c: New file.
7117 2007-08-02  Bean  <bean123ch@gmail.com>
7119         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
7121         * file.h (grub_file): Likewise.
7123         * fshelp.h (grub_fshelp_read_file): Likewise.
7125         * util/i386/pc/grub-setup.c (setup): Likewise.
7126         (save_first_sector): Likewise.
7127         (save_blocklists): Likewise.
7129         * fs/affs.c (grub_affs_read_file): Likewise.
7131         * fs/ext2.c (grub_ext2_read_file): Likewise.
7133         * fs/fat.c (grub_fat_read_data): Likewise.
7135         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
7137         * fs/hfs.c (grub_hfs_read_file): Likewise.
7139         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7141         * fs/jfs.c (grub_jfs_read_file): Likewise.
7143         * fs/minix.c (grub_minix_read_file): Likewise.
7145         * fs/sfs.c (grub_sfs_read_file): Likewise.
7147         * fs/ufs.c (grub_ufs_read_file): Likewise.
7149         * fs/xfs.c (grub_xfs_read_file): Likewise.
7151         * command/blocklist.c (read_blocklist): Likewise.
7152         (print_blocklist): Likewise.
7154 2007-08-02  Marco Gerards  <marco@gnu.org>
7156         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
7157         `util/hostfs.c'.
7159         * disk/host.c: New file.
7161         * util/hostfs.c: Likewise.
7163         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
7164         return `GRUB_ERR_BAD_FS'.
7165         * fs/sfs.c (grub_sfs_mount): Likewise.
7166         * fs/xfs.c (grub_xfs_mount): Likewise.
7168         * include/grub/disk.h (enum grub_disk_dev_id): Add
7169         `GRUB_DISK_DEVICE_HOST_ID'.
7171         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
7173 2007-07-24  Jerone Young  <jerone@gmail.com>
7175         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
7176         modules for compilation.
7177         * conf/powerpc-ieee1275.rmk: Likewise.
7179         * include/multiboot.h: Move multiboot definitions to one file. Rename
7180         many definitions to not get grub specific.
7181         * include/multiboot2.h: Create header with multiboot 2 definitions.
7182         * include/grub/multiboot.h: Header for grub specific function
7183         prototypes and definitions.
7184         * include/grub/multiboot2.h: Likewise.
7185         * include/grub/multiboot_loader.h: Likewise.
7186         * include/grub/i386/pc/multiboot.h: Removed.
7187         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
7189         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
7190         and 2 to allow for one multiboot and module commands.
7191         * loader/multiboot2.c: Add multiboot2 functionality.
7192         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
7193         and definition names.
7194         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
7195         2 functions.
7196         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
7197         ieee1275 specific multiboot2 code.
7199         * kern/i386/pc/startup.S: Change headers and definition names for
7200         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
7202 2007-07-22  Robert Millan  <rmh@aybabtu.com>
7204         * geninitheader.sh: Process file specified in first parameter rather
7205         than hardcoding grub_modules_init.lst.
7206         * geninit.sh: Likewise.  Also, construct header name dynamically rather
7207         than hardcoding grub_modules_init.h.
7209         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
7210         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
7211         grub_probe_init.[ch] and grub_setup_init.[ch].
7213         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
7214         grub_modules_init.h with grub_emu_init.h.
7215         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
7216         grub_probe_init.[ch] files.
7217         * conf/i386-efi.rmk: Likewise.
7218         * conf/i386-pc.rmk: Likewise.
7219         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
7220         grub_setup_init.[ch] files.
7222         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
7223         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
7224         to initialize modules rather than a list of hardcoded functions.
7225         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
7226         grub_init_all() to initialize modules rather than a list of hardcoded
7227         functions.
7229 2007-07-22  Robert Millan  <rmh@aybabtu.com>
7231         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
7232         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
7234 2007-07-22  Robert Millan  <rmh@aybabtu.com>
7236         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7237         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
7238         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
7239         flag when running on SmartFirmware.
7240         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
7241         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
7242         was set.
7244         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7245         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
7246         rather than decreasing it.
7248         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
7249         there's not enough space to do it, fail in the same way as when it
7250         can't be done because there are no partitions.
7252         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
7253         when nvsetenv failed.
7255 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
7257         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
7258         because this rule is automatically generated.
7259         (grub-mkrescue): Removed for the same reason as above.
7261 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
7263         Migrate to GNU General Public License Version 3.
7265         * COPYING: Replaced with the plain text version of GPLv3.
7267         * config.guess: Updated from gnulib.
7268         * config.sub: Likewise.
7270         * geninit.sh: Output a GPLv3 copyright notice.
7271         * geninitheader.sh: Likewise.
7272         * genmodsrc.sh: Likewise.
7273         * gensymlist.sh.in: Likewise.
7275         * boot/i386/pc/boot.S: Upgraded to GPLv3.
7276         * boot/i386/pc/diskboot.S: Likewise.
7277         * boot/i386/pc/pxeboot.S: Likewise.
7278         * commands/blocklist.c: Likewise.
7279         * commands/boot.c: Likewise.
7280         * commands/cat.c: Likewise.
7281         * commands/cmp.c: Likewise.
7282         * commands/configfile.c: Likewise.
7283         * commands/echo.c: Likewise.
7284         * commands/help.c: Likewise.
7285         * commands/ls.c: Likewise.
7286         * commands/search.c: Likewise.
7287         * commands/terminal.c: Likewise.
7288         * commands/test.c: Likewise.
7289         * commands/videotest.c: Likewise.
7290         * commands/i386/cpuid.c: Likewise.
7291         * commands/i386/pc/halt.c: Likewise.
7292         * commands/i386/pc/play.c: Likewise.
7293         * commands/i386/pc/reboot.c: Likewise.
7294         * commands/i386/pc/vbeinfo.c: Likewise.
7295         * commands/i386/pc/vbetest.c: Likewise.
7296         * commands/ieee1275/halt.c: Likewise.
7297         * commands/ieee1275/reboot.c: Likewise.
7298         * commands/ieee1275/suspend.c: Likewise.
7299         * disk/loopback.c: Likewise.
7300         * disk/lvm.c: Likewise.
7301         * disk/raid.c: Likewise.
7302         * disk/efi/efidisk.c: Likewise.
7303         * disk/i386/pc/biosdisk.c: Likewise.
7304         * disk/ieee1275/ofdisk.c: Likewise.
7305         * font/manager.c: Likewise.
7306         * fs/affs.c: Likewise.
7307         * fs/ext2.c: Likewise.
7308         * fs/fat.c: Likewise.
7309         * fs/fshelp.c: Likewise.
7310         * fs/hfs.c: Likewise.
7311         * fs/hfsplus.c: Likewise.
7312         * fs/iso9660.c: Likewise.
7313         * fs/jfs.c: Likewise.
7314         * fs/minix.c: Likewise.
7315         * fs/sfs.c: Likewise.
7316         * fs/ufs.c: Likewise.
7317         * fs/xfs.c: Likewise.
7318         * hello/hello.c: Likewise.
7319         * include/grub/acorn_filecore.h: Likewise.
7320         * include/grub/arg.h: Likewise.
7321         * include/grub/bitmap.h: Likewise.
7322         * include/grub/boot.h: Likewise.
7323         * include/grub/cache.h: Likewise.
7324         * include/grub/device.h: Likewise.
7325         * include/grub/disk.h: Likewise.
7326         * include/grub/dl.h: Likewise.
7327         * include/grub/elfload.h: Likewise.
7328         * include/grub/env.h: Likewise.
7329         * include/grub/err.h: Likewise.
7330         * include/grub/file.h: Likewise.
7331         * include/grub/font.h: Likewise.
7332         * include/grub/fs.h: Likewise.
7333         * include/grub/fshelp.h: Likewise.
7334         * include/grub/gzio.h: Likewise.
7335         * include/grub/hfs.h: Likewise.
7336         * include/grub/kernel.h: Likewise.
7337         * include/grub/loader.h: Likewise.
7338         * include/grub/lvm.h: Likewise.
7339         * include/grub/misc.h: Likewise.
7340         * include/grub/mm.h: Likewise.
7341         * include/grub/net.h: Likewise.
7342         * include/grub/normal.h: Likewise.
7343         * include/grub/parser.h: Likewise.
7344         * include/grub/partition.h: Likewise.
7345         * include/grub/pc_partition.h: Likewise.
7346         * include/grub/raid.h: Likewise.
7347         * include/grub/rescue.h: Likewise.
7348         * include/grub/script.h: Likewise.
7349         * include/grub/setjmp.h: Likewise.
7350         * include/grub/symbol.h: Likewise.
7351         * include/grub/term.h: Likewise.
7352         * include/grub/terminfo.h: Likewise.
7353         * include/grub/tparm.h: Likewise.
7354         * include/grub/types.h: Likewise.
7355         * include/grub/video.h: Likewise.
7356         * include/grub/efi/api.h: Likewise.
7357         * include/grub/efi/chainloader.h: Likewise.
7358         * include/grub/efi/console.h: Likewise.
7359         * include/grub/efi/console_control.h: Likewise.
7360         * include/grub/efi/disk.h: Likewise.
7361         * include/grub/efi/efi.h: Likewise.
7362         * include/grub/efi/pe32.h: Likewise.
7363         * include/grub/efi/time.h: Likewise.
7364         * include/grub/i386/linux.h: Likewise.
7365         * include/grub/i386/setjmp.h: Likewise.
7366         * include/grub/i386/types.h: Likewise.
7367         * include/grub/i386/efi/kernel.h: Likewise.
7368         * include/grub/i386/efi/loader.h: Likewise.
7369         * include/grub/i386/efi/time.h: Likewise.
7370         * include/grub/i386/pc/biosdisk.h: Likewise.
7371         * include/grub/i386/pc/boot.h: Likewise.
7372         * include/grub/i386/pc/chainloader.h: Likewise.
7373         * include/grub/i386/pc/console.h: Likewise.
7374         * include/grub/i386/pc/init.h: Likewise.
7375         * include/grub/i386/pc/kernel.h: Likewise.
7376         * include/grub/i386/pc/loader.h: Likewise.
7377         * include/grub/i386/pc/memory.h: Likewise.
7378         * include/grub/i386/pc/multiboot.h: Likewise.
7379         * include/grub/i386/pc/serial.h: Likewise.
7380         * include/grub/i386/pc/time.h: Likewise.
7381         * include/grub/i386/pc/vbe.h: Likewise.
7382         * include/grub/i386/pc/vbeblit.h: Likewise.
7383         * include/grub/i386/pc/vbefill.h: Likewise.
7384         * include/grub/i386/pc/vbeutil.h: Likewise.
7385         * include/grub/i386/pc/vga.h: Likewise.
7386         * include/grub/ieee1275/ieee1275.h: Likewise.
7387         * include/grub/ieee1275/ofdisk.h: Likewise.
7388         * include/grub/powerpc/libgcc.h: Likewise.
7389         * include/grub/powerpc/setjmp.h: Likewise.
7390         * include/grub/powerpc/types.h: Likewise.
7391         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
7392         * include/grub/powerpc/ieee1275/console.h: Likewise.
7393         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
7394         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
7395         * include/grub/powerpc/ieee1275/loader.h: Likewise.
7396         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
7397         * include/grub/powerpc/ieee1275/time.h: Likewise.
7398         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
7399         * include/grub/sparc64/libgcc.h: Likewise.
7400         * include/grub/sparc64/setjmp.h: Likewise.
7401         * include/grub/sparc64/types.h: Likewise.
7402         * include/grub/sparc64/ieee1275/console.h: Likewise.
7403         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
7404         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
7405         * include/grub/sparc64/ieee1275/time.h: Likewise.
7406         * include/grub/util/biosdisk.h: Likewise.
7407         * include/grub/util/getroot.h: Likewise.
7408         * include/grub/util/lvm.h: Likewise.
7409         * include/grub/util/misc.h: Likewise.
7410         * include/grub/util/raid.h: Likewise.
7411         * include/grub/util/resolve.h: Likewise.
7412         * io/gzio.c: Likewise.
7413         * kern/device.c: Likewise.
7414         * kern/disk.c: Likewise.
7415         * kern/dl.c: Likewise.
7416         * kern/elf.c: Likewise.
7417         * kern/env.c: Likewise.
7418         * kern/err.c: Likewise.
7419         * kern/file.c: Likewise.
7420         * kern/fs.c: Likewise.
7421         * kern/loader.c: Likewise.
7422         * kern/main.c: Likewise.
7423         * kern/misc.c: Likewise.
7424         * kern/mm.c: Likewise.
7425         * kern/parser.c: Likewise.
7426         * kern/partition.c: Likewise.
7427         * kern/rescue.c: Likewise.
7428         * kern/term.c: Likewise.
7429         * kern/efi/efi.c: Likewise.
7430         * kern/efi/init.c: Likewise.
7431         * kern/efi/mm.c: Likewise.
7432         * kern/i386/dl.c: Likewise.
7433         * kern/i386/efi/init.c: Likewise.
7434         * kern/i386/efi/startup.S: Likewise.
7435         * kern/i386/pc/init.c: Likewise.
7436         * kern/i386/pc/lzo1x.S: Likewise.
7437         * kern/i386/pc/startup.S: Likewise.
7438         * kern/ieee1275/ieee1275.c: Likewise.
7439         * kern/powerpc/cache.S: Likewise.
7440         * kern/powerpc/dl.c: Likewise.
7441         * kern/powerpc/ieee1275/cmain.c: Likewise.
7442         * kern/powerpc/ieee1275/crt0.S: Likewise.
7443         * kern/powerpc/ieee1275/init.c: Likewise.
7444         * kern/powerpc/ieee1275/openfw.c: Likewise.
7445         * kern/sparc64/cache.S: Likewise.
7446         * kern/sparc64/dl.c: Likewise.
7447         * kern/sparc64/ieee1275/init.c: Likewise.
7448         * kern/sparc64/ieee1275/openfw.c: Likewise.
7449         * loader/efi/chainloader.c: Likewise.
7450         * loader/efi/chainloader_normal.c: Likewise.
7451         * loader/i386/efi/linux.c: Likewise.
7452         * loader/i386/efi/linux_normal.c: Likewise.
7453         * loader/i386/pc/chainloader.c: Likewise.
7454         * loader/i386/pc/chainloader_normal.c: Likewise.
7455         * loader/i386/pc/linux.c: Likewise.
7456         * loader/i386/pc/linux_normal.c: Likewise.
7457         * loader/i386/pc/multiboot.c: Likewise.
7458         * loader/i386/pc/multiboot_normal.c: Likewise.
7459         * loader/powerpc/ieee1275/linux.c: Likewise.
7460         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
7461         * normal/arg.c: Likewise.
7462         * normal/cmdline.c: Likewise.
7463         * normal/command.c: Likewise.
7464         * normal/completion.c: Likewise.
7465         * normal/execute.c: Likewise.
7466         * normal/function.c: Likewise.
7467         * normal/lexer.c: Likewise.
7468         * normal/main.c: Likewise.
7469         * normal/menu.c: Likewise.
7470         * normal/menu_entry.c: Likewise.
7471         * normal/misc.c: Likewise.
7472         * normal/parser.y: Likewise.
7473         * normal/script.c: Likewise.
7474         * normal/i386/setjmp.S: Likewise.
7475         * normal/powerpc/setjmp.S: Likewise.
7476         * normal/sparc64/setjmp.S: Likewise.
7477         * partmap/acorn.c: Likewise.
7478         * partmap/amiga.c: Likewise.
7479         * partmap/apple.c: Likewise.
7480         * partmap/gpt.c: Likewise.
7481         * partmap/pc.c: Likewise.
7482         * partmap/sun.c: Likewise.
7483         * term/gfxterm.c: Likewise.
7484         * term/terminfo.c: Likewise.
7485         * term/efi/console.c: Likewise.
7486         * term/i386/pc/console.c: Likewise.
7487         * term/i386/pc/serial.c: Likewise.
7488         * term/i386/pc/vesafb.c: Likewise.
7489         * term/i386/pc/vga.c: Likewise.
7490         * term/ieee1275/ofconsole.c: Likewise.
7491         * util/biosdisk.c: Likewise.
7492         * util/console.c: Likewise.
7493         * util/genmoddep.c: Likewise.
7494         * util/getroot.c: Likewise.
7495         * util/grub-emu.c: Likewise.
7496         * util/grub-mkdevicemap.c: Likewise.
7497         * util/grub-probe.c: Likewise.
7498         * util/lvm.c: Likewise.
7499         * util/misc.c: Likewise.
7500         * util/raid.c: Likewise.
7501         * util/resolve.c: Likewise.
7502         * util/update-grub.in: Likewise.
7503         * util/update-grub_lib.in: Likewise.
7504         * util/grub.d/00_header.in: Likewise.
7505         * util/grub.d/10_hurd.in: Likewise.
7506         * util/grub.d/10_linux.in: Likewise.
7507         * util/i386/efi/grub-install.in: Likewise.
7508         * util/i386/efi/grub-mkimage.c: Likewise.
7509         * util/i386/pc/grub-install.in: Likewise.
7510         * util/i386/pc/grub-mkimage.c: Likewise.
7511         * util/i386/pc/grub-mkrescue.in: Likewise.
7512         * util/i386/pc/grub-setup.c: Likewise.
7513         * util/i386/pc/misc.c: Likewise.
7514         * util/powerpc/ieee1275/grub-install.in: Likewise.
7515         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
7516         * util/powerpc/ieee1275/misc.c: Likewise.
7517         * video/bitmap.c: Likewise.
7518         * video/video.c: Likewise.
7519         * video/i386/pc/vbe.c: Likewise.
7520         * video/i386/pc/vbeblit.c: Likewise.
7521         * video/i386/pc/vbefill.c: Likewise.
7522         * video/i386/pc/vbeutil.c: Likewise.
7523         * video/readers/tga.c: Likewise.
7525 2007-07-02  Robert Millan  <rmh@aybabtu.com>
7527         * conf/i386-efi.rmk: Replace obsolete reference to
7528         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
7529         with util/getroot.c.
7530         * conf/powerpc-ieee1275.rmk: Likewise.
7531         * conf/sparc64-ieee1275.rmk: Likewise.
7533         * util/grub-emu.c (main): Fix unchecked pointer handling.
7535 2007-07-02  Robert Millan  <rmh@aybabtu.com>
7537         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
7538         invocation to fail, in order to support partition-less media.
7540         * util/i386/pc/grub-install.in: Likewise.
7542         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
7543         which fs or partmap modules are needed (akin to its sister scripts).
7545         Also use grub-probe to get rid of unportable /proc/mounts check.
7547         Print the same informational message that the other scripts do, before
7548         exiting.
7550 2007-06-23  Robert Millan  <rmh@aybabtu.com>
7552         * util/update-grub_lib.in (font_path): New function.  Determine whether
7553         a font file can be found and, if so, echo the GRUB path to it.
7555         * util/update-grub.in: Handle multiple terminals depending on user
7556         input, platform availability and font file presence.  Propagate
7557         variables of our findings to /etc/grub.d/ children.
7559         * util/grub.d/00_header.in: Handle multiple terminals, based on
7560         environment setup by update-grub.
7562 2007-06-23  Robert Millan  <rmh@aybabtu.com>
7564         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
7566 2007-06-21  Robert Millan  <rmh@aybabtu.com>
7568         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
7569         indicate end of data section in kernel image.
7570         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
7571         GRUB_KERNEL_MACHINE_DATA_END.
7573         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
7574         space for it.
7575         * kern/i386/efi/startup.S: Likewise.
7577         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
7578         during image generation.  Implement --prefix option to override this
7579         patch.
7580         * util/i386/efi/grub-mkimage.c: Likewise.
7582         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
7583         code to make path relative to its root into a separate function.
7585         * util/i386/pc/grub-install.in: Use newly provided
7586         make_system_path_relative_to_its_root() to convert ${grubdir}, then
7587         pass the result to grub-install --prefix.
7589 2007-06-13  Robert Millan  <rmh@aybabtu.com>
7591         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
7592         DEFAULT_DEVICE_MAP.
7593         * util/grub-emu.c: Use above definitions from misc.h instead of
7594         defining them.
7595         * util/grub-mkdevicemap.c: Likewise.
7596         * util/i386/pc/grub-setup.c: Likewise.
7597         * util/grub-probe.c: Likewise.
7598         (probe): Abort with grub_util_error() when either
7599         grub_guess_root_device or grub_util_get_grub_dev fails.
7601 2007-06-12  Robert Millan  <rmh@aybabtu.com>
7603         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
7604         "pager" assignment.
7605         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
7606         "pcdata".
7607         * util/grub-probe.c (probe): Likewise for "drive_name".
7609 2007-06-11  Robert Millan  <rmh@aybabtu.com>
7611         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
7612         not just the cdrom one.
7614 2007-06-11  Robert Millan  <rmh@aybabtu.com>
7616         * util/i386/pc/grub-mkrescue.in: Add "set -e".
7617         Add --pkglibdir=DIR option to override pkglibdir.
7618         Mention --image-type=TYPE in help output.
7619         Fix --grub-mkimage (it was a no-op).
7620         Abort gracefully when no parameter is given.
7622 2007-06-11  Robert Millan  <rmh@aybabtu.com>
7624         * util/i386/pc/grub-mkrescue.in: New file.
7625         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
7626         * Makefile.in: Handle bin_SCRIPTS.
7628 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
7630         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
7631         list of video modes.
7633 2007-06-06  Robert Millan  <rmh@aybabtu.com>
7635         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
7636         file doesn't exist, or if it is in a filesystem grub can't read.
7638         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
7639         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
7640         header comment to fit in 80 columns when the variables are resolved.
7642         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
7643         could be identified by update-grub.  Remove redundant check for
7644         unifont.pff existence (since convert_system_path_to_grub_path now
7645         handles that).
7647 2007-06-04  Robert Millan  <rmh@aybabtu.com>
7649         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
7651         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
7653         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
7655 2007-06-04  Robert Millan  <rmh@aybabtu.com>
7657         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
7659         * include/grub/partition.h: Declare grub_apple_partition_map_init and
7660         grub_apple_partition_map_fini.
7662         * util/biosdisk.c
7663         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
7664         to access >2 TiB disks).
7666         Print disk->total_sectors with %llu instead of %lu, since this
7667         variable is always 64-bit (prevents wrong disk size from being displayed
7668         on either >2 TiB disk or big-endian CPU).
7670         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
7671         into a generic case that supports all (sane) partition maps.
7673         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
7674         breaks big-endian.
7676         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
7677         and grub_apple_partition_map_fini() after that.
7679 2007-06-01  Robert Millan  <rmh@aybabtu.com>
7681         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
7683         * util/grub.d/00_header.in: Only enable gfxterm when
7684         convert_system_path_to_grub_path() succeeds.
7686 2007-05-20  Robert Millan  <rmh@aybabtu.com>
7688         * util/update-grub_lib.in: New file.
7689         * DISTLIST: Add update-grub_lib.in.
7690         * conf/common.rmk: Generate update-grub_lib and install it in
7691         $(lib_DATA).
7692         * Makefile.in: Add install routine for $(lib_DATA).
7694         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
7695         function provided by update-grub_lib to support arbitrary paths of
7696         unifont.pff.
7697         * util/update-grub.in: Use convert_system_path_to_grub_path() to
7698         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
7700 2007-05-19  Robert Millan  <rmh@aybabtu.com>
7702         * commands/i386/cpuid.c: New module.
7703         * DISTLIST: Add it.
7704         * conf/i386-efi.rmk: Enable cpuid.mod.
7705         * conf/i386-pc.rmk: Likewise.
7707 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
7709         * kern/disk.c (grub_disk_read): Check return value of
7710         grub_realloc().
7712 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
7714         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
7715         arrays.
7716         * disk/raid.c (grub_raid_open): Likewise.
7718 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
7720         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
7721         stack instead of on the heap.
7723         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
7724         before doing a read on it.
7726         * configure.ac: Only use -fno-stack-protector for the target
7727         environment.
7729 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
7731         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
7732         __attribute_ ((unused)) to mode_type argument.
7734         * util/getroot.c (grub_guess_root_device): Fix #endif.
7736         * kern/misc.c (memcmp): Fix prototype.
7738         * include/grub/partition.h [GRUB_UTIL]
7739         (grub_gpt_partition_map_init): Add prototype.
7740         (grub_gpt_partition_map_fini): Likewise.
7742         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
7743         at the right place.
7745         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
7746         (grub_fat_read_data): Likewise.
7747         (grub_fat_find_dir): Likewise.
7749         * font/manager.c (find_glyph): Make table a const.
7750         (grub_font_get_glyph): Remove bitmap from if statement.
7752 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
7754         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
7755         code, first search for device in /dev/mapper, then in /dev.
7756         (grub_util_get_grub_dev): New function.
7757         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
7758         prototype.
7759         * util/grub-probe.c (probe): Remove check for RAID, call
7760         grub_util_get_grub_dev() instead of
7761         grub_util_biosdisk_get_grub_dev().
7762         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
7763         grub_util_biosdisk_get_grub_dev().
7764         * util/i386/pc/grub-setup.c (main): Likewise.
7766 2007-05-16  Robert Millan  <rmh@aybabtu.com>
7768         * DISTLIST: Update for the latest changes.
7769         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
7770         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
7771         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
7772         grub/util/biosdisk.h.
7773         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
7774         grub/util/biosdisk.h.
7776 2007-05-16  Robert Millan  <rmh@aybabtu.com>
7778         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
7780 2007-05-16  Robert Millan  <rmh@aybabtu.com>
7782         * util/i386/efi/grub-install.in: New.
7783         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
7784         newly added grub-install.
7785         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
7786         include.
7787         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
7788         grub/util/biosdisk.h.
7789         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
7790         grub/util/biosdisk.h.
7792 2007-05-16  Robert Millan  <rmh@aybabtu.com>
7794         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
7795         * include/grub/util/biosdisk.h: ... here.
7796         * util/i386/pc/biosdisk.c: Moved to ...
7797         * util/biosdisk.c: ... here.
7798         * util/i386/pc/getroot.c: Moved to ...
7799         * util/getroot.c: ... here.
7800         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
7801         * util/grub-mkdevicemap.c: ... here.
7802         * util/i386/pc/grub-probe.c: Moved to ...
7803         * util/grub-probe.c: ... here.
7805 2007-05-15  Robert Millan  <rmh@aybabtu.com>
7807         * util/update-grub.in: Remove duplicated line in grub.cfg header
7808         message.
7810 2007-05-13  Robert Millan  <rmh@aybabtu.com>
7812         * util/update-grub.in: Fix a few assumptions about the devices holding
7813         /, /boot and /boot/grub being the same.
7814         * util/grub.d/00_header.in: Likewise.
7815         * util/grub.d/10_hurd.in: Likewise.
7816         * util/grub.d/10_linux.in: Likewise.
7818         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
7819         patterns.  Use that to define the `.old' suffix as older than `'.
7821         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
7823         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
7824         the grub.cfg header message.
7826 2007-05-11  Robert Millan  <rmh@aybabtu.com>
7828         * util/update-grub.in: Create device.map if it doesn't already exist,
7829         before attempting to run grub-probe.
7830         Check for grub-probe and grub-mkdevicemap with the same code
7831         grub-install is using.
7832         Remove test mode.
7834 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
7836         * Makefile.in: Add the datarootdir autoconf variable.
7838 2007-05-09  Robert Millan  <rmh@aybabtu.com>
7840         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
7841         fail gracefully if dev->disk->partition == NULL.
7843 2007-05-07  Robert Millan  <rmh@aybabtu.com>
7845         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
7846         determine partition map module.
7847         * util/i386/pc/grub-install.in: Use this feature to decide which
7848         partition module to load, instead of hardcoding pc and gpt.
7850 2007-05-07  Robert Millan  <rmh@aybabtu.com>
7852         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
7853         source directory differs from build directory.
7855 2007-05-05  Robert Millan  <rmh@aybabtu.com>
7857         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
7858         initialisation.
7860 2007-05-05  Robert Millan  <rmh@aybabtu.com>
7862         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
7864 2007-05-05  Robert Millan  <rmh@aybabtu.com>
7866         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
7867         command-line arguments via ${GRUB_CMDLINE_LINUX}.
7869 2007-05-05  Robert Millan  <rmh@aybabtu.com>
7871         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
7872         (grub_probe_SOURCES): Likewise.
7873         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
7874         GPT and initialize dos_part and bsd_part accordingly.
7875         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
7876         install_bsd_part.
7877         (main): Activate gpt module for use during partition identification,
7878         and deactivate it afterwards.
7879         * util/i386/pc/grub-install.in: Add gpt module to core.img.
7880         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
7881         partition identification, and deactivate it afterwards.
7883 2007-05-05  Robert Millan  <rmh@aybabtu.com>
7885         * term/i386/pc/console.c (grub_console_fini): Call
7886         grub_term_set_current() before grub_term_unregister().
7888 2007-05-04  Robert Millan  <rmh@aybabtu.com>
7890         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
7891         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
7892         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
7893         and update-grub_DATA.
7894         * conf/common.rmk: Build and install update-grub components.
7895         * conf/common.mk: Regenerate.
7896         * util/update-grub.in: New.  Core of update-grub.
7897         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
7898         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
7899         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
7900         * util/grub.d/README: New.  Document grub.d directory layout.
7902 2007-05-01  Robert Millan  <rmh@aybabtu.com>
7904         * util/grub-emu.c: Move initialization functions
7905         grub_util_biosdisk_init() and grub_init_all() before
7906         grub_util_biosdisk_get_grub_dev(), which relies on them.
7908 2007-04-19  Robert Millan  <rmh@aybabtu.com>
7910         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
7911         it is used later.
7913 2007-04-18  Jerone Young  <jerone@gmail.com>
7915         * kernel/elf.c: Add missing parenthesis for conditional statement
7916         stanza.
7918 2007-04-10  Jerone Young  <jerone@gmail.com>
7920         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
7921         continue on and look for device node with real device name.
7923 2007-04-10  Jerone Young  <jerone@gmail.com>
7925         * configure.ac: Add argument for autoconf to use transformation
7926         ability.
7927         * Makefile.in: Add autoconf package transformation code.
7928         * util/i386/pc/grub-install.in: Likewise.
7929         * util/powerpc/ieee1275/grub-install.in: Likewise.
7931 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
7933         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
7934         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
7935         (EXT2_REVISION): Likewise.
7936         (EXT2_INODE_SIZE): Likewise.
7937         (struct grub_ext2_block_group): Added a missing member
7938         "used_dirs".
7939         (grub_ext2_read_inode): Divide by the inode size in a superblock
7940         instead of 128 to obtain INODES_PER_BLOCK.
7941         Use the macro EXT2_INODE_SIZE instead of directly using
7942         SBLOCK->INODE_SIZE.
7944 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
7946         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
7947         superblock instead of the structure size to compute an
7948         offset. This fixes the problem that GRUB could not read a
7949         filesystem when inode size is different from 128-byte.
7951 2007-03-05  Marco Gerards  <marco@gnu.org>
7953         * normal/main.c (read_config_file): When "menu" is not set, create
7954         an initial context.
7956 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
7958         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
7959         (HEAP_LIMIT): New macro.
7960         (grub_claim_heap): Claim memory up to `heaplimit'.
7962 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
7964         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
7965         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
7966         (_start): Likewise.
7967         (grub_arch_modules_addr): Return address after `_end'.
7968         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
7969         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
7970         (add_segments): Calculate `_end' from phdr size and location.
7971         (ALIGN_UP): Moved to ...
7972         * include/grub/misc.h: here.
7973         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7974         New macro.
7975         (GRUB_IEEE1275_MODULE_BASE): Removed.
7977 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
7979         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
7980         loop boundary.
7982 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
7984         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
7985         All users updated.
7986         (grub_elf64_load_hook_t): Likewise.
7987         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
7988         debug output.
7990 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
7992         * kern/mm.c: Update copyright.
7993         (grub_mm_debug): Correct syntax error.
7994         (grub_mm_dump_free): New function.
7995         (grub_debug_free): Call `grub_free'.
7996         * include/grub/mm.h: Update copyright.
7997         (grub_mm_dump_free): Add declaration.
7999 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
8001         * include/grub/ieee1275/ieee1275.h: Update copyright.
8002         * kern/powerpc/ieee1275/init.c: Likewise.
8003         * kern/powerpc/ieee1275/openfw.c: Likewise.
8005         * loader/powerpc/ieee1275/linux.c: Likewise.
8006         * include/grub/elfload.h: Likewise.
8007         * kern/elf.c: Likewise.
8008         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
8009         callers.
8010         (grub_elf64_load): Likewise.
8011         (grub_elf32_load_segment): Move to a nested function.
8012         (grub_elf64_load_segment): Likewise.
8014 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
8016         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
8017         prototype.
8018         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
8019         (grub_heap_len): Likewise.
8020         (HEAP_SIZE): New macro.
8021         (grub_claim_heap): New function.
8022         (grub_machine_init): Don't claim heap directly.  Call
8023         `grub_claim_heap'.
8024         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
8025         (grub_available_iterate): New function.
8027 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
8029         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
8030         * configure.ac: Use it for testing the HOST and TARGET compilers.
8032 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
8034         * Makefile.in (enable_grub_emu): New variable.
8035         * configure.ac (--enable-grub-emu): New option.
8036         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
8037         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
8038         * conf/i386-pc.rmk: Likewise.
8039         * conf/powerpc-ieee1275.rmk: Likewise.
8040         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
8042 2006-12-12  Marco Gerards  <marco@gnu.org>
8044         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
8046         * kern/env.c (grub_env_unset): Don't free the member `value' when
8047         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
8048         pointer.
8050         * normal/main.c (current_menu): Removed.
8051         (free_menu): Unset the `menu' environment variable.
8052         (grub_normal_menu_addentry): Make use of the environment variable
8053         `menu', instead of using the global `current_menu'.  Allocate
8054         memory for the sourcecode of this entry.
8055         (read_config_file): New argument `nested', changed all callers.
8056         Only in the case of a new context, initialize a new menu.  Set the
8057         `menu' environment variable.
8058         (grub_normal_execute): Don't set and unset the environment
8059         variable `menu' here anymore.  Only free the menu when leaving the
8060         context.
8062         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
8063         leak.
8065 2006-12-11  Marco Gerards  <marco@gnu.org>
8067         * normal/menu_entry.c (run): Fix off by one bug so the last line
8068         is executed.  Move the loader check to outside the loop.
8070 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
8072         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
8074 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
8076         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
8077         the number of sectors.  Reported by Andrey Shuvikov
8078         <mr_hyro@yahoo.com>.
8080 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
8082         * kern/disk.c (grub_disk_read): When there is a read error, always
8083         try to read only the necessary data.
8085         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
8086         disk/raid.c.
8087         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
8088         prototype.
8089         [GRUB_UTIL] (grub_raid_fini): Likewise.
8090         [GRUB_UTIL] (grub_lvm_init): Likewise.
8091         [GRUB_UTIL] (grub_lvm_fini): Likewise.
8092         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
8093         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
8094         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
8095         and grub_raid_fini().
8097 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
8099         * include/grub/types.h (__unused): Rename to UNUSED.
8100         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
8101         (grub_elf64_size): Likewise.
8103 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
8105         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
8106         grub_error_push and grub_error_pop in the error-handling path.
8107         (grub_elf32_load_segment): Only call grub_file_read with non-zero
8108         length.
8110 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
8112         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
8113         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8114         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8115         (kernel_elf_SOURCES): Likewise.
8116         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
8117         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
8118         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8119         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8120         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
8121         (elf_mod_SOURCES): New variable.
8122         (elf_mod_CFLAGS): Likewise.
8123         (elf_mod_LDFLAGS): Likewise.
8124         * include/grub/types.h (__unused): New macro.
8125         * include/grub/elfload.h: New file.
8126         * kern/elf.c: Likewise.
8127         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
8128         (ELF32_LOADMASK): New macro.
8129         (ELF64_LOADMASK): Likewise.
8130         (vmlinux): Removed.
8131         (grub_linux_load32): New function.
8132         (grub_linux_load64): Likewise.
8133         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
8134         Use grub_elf_t instead of grub_file_t.
8136 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
8138         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
8139         `catch_result' to struct set_color_args.
8141 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
8143         * normal/menu.c: Include grub/script.h.
8144         * normal/menu_entry.c: Likewise.
8145         * include/grub/normal.h: Do not include grub/script.h.
8147 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
8149         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
8151 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
8153         * kern/disk.c (grub_disk_open): Print debug messages when opening a
8154         disk.
8155         (grub_disk_close): Print debug messages when closing a disk.
8156         (grub_disk_read): Print debug messages when disk read fails.
8157         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
8158         filesystem type.
8159         * kern/partition.c: Include misc.h.
8160         (grub_partition_iterate): Print debug messages when detecting
8161         partition type.
8163 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
8165         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
8166         is negative.
8167         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
8169 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
8171         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8172         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
8174 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
8176         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
8177         instead of sizeof(lv). Patch by Michael Guntsche.
8179 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
8181         * disk/lvm.c: Rename VGS to VG_LIST.
8182         (grub_lvm_iterate): Change VGS->LV to VG-LV.
8183         (grub_lvm_open): Likewise.
8184         Thanks to Michael Guntsche for finding this bug.
8186 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
8188         * configure.ac (AC_INIT): Bumped to 1.95.
8190 2006-10-14  Robert Millan  <rmh@aybabtu.com>
8192         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
8193         with "/dev/.static/dev/md".
8195 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
8197         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
8198         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
8199         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
8200         DRIVE_NAME are always freed.
8202         * util/i386/pc/biosdisk.c (make_device_name): Add one into
8203         DOS_PART, as a DOS partition is counted from one instead of zero
8204         now. Reported by Robert Millan.
8206 2006-10-14  Robert Millan  <rmh@aybabtu.com>
8208         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
8209         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
8210         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
8211         string returned by grub_guess_root_device.
8212         * util/i386/pc/grub-setup.c: Likewise.
8213         * util/i386/pc/grub-probefs.c: Likewise.
8215         * util/i386/pc/grub-probefs.c: Rename to ...
8216         * util/i386/pc/grub-probe.c: ... this.
8217         * DISTLIST: Remove grub-probefs, add grub-probe.
8218         * conf/i386-efi.rmk: Likewise.
8219         * conf/i386-pc.rmk: Likewise.
8220         * util/i386/pc/grub-install.in: Likewise.
8222         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
8223         choose which information we want to print.
8225 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
8227         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
8228         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
8229         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
8230         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
8231         video/readers/tga.c and video/i386/pc/vbeutil.c.
8233 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
8235         Added support for RAID and LVM.
8237         * disk/lvm.c: New file.
8238         * disk/raid.c: Likewise.
8239         * include/grub/lvm.h: Likewise.
8240         * include/grub/raid.h: Likewise.
8241         * include/grub/util/lvm.h: Likewise.
8242         * include/grub/util/raid.h: Likewise.
8243         * util/lvm.c: Likewise.
8244         * util/raid.c: Likewise.
8246         * include/grub/disk.h (grub_disk_dev_id): Add
8247         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
8248         (grub_disk_get_size): New prototype.
8249         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
8250         returns a partition.
8251         (grub_disk_get_size): New function.
8253         * kern/i386/pc/init.c (make_install_device): Copy the prefix
8254         verbatim if grub_install_dos_part is -2.
8256         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
8257         and LVM devices.
8259         * util/i386/pc/grub-setup.c (setup): New argument
8260         MUST_EMBED. Force embedding of GRUB when the argument is
8261         true. Close FILE before returning.
8262         (main): Add support for RAID and LVM.
8264         * conf/common.rmk: Add RAID and LVM modules.
8265         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
8266         util/lvm.c.
8267         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
8269         * kern/misc.c (grub_strstr): New function.
8270         * include/grub/misc.h (grub_strstr): New prototype.
8272 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
8274         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
8276 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
8278         * kern/misc.c (grub_strtoull): Guess the base only if not
8279         specified.
8281 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
8283         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
8284         PowerMac support.
8286 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
8288         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
8290         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
8291         Remove `flags' argument.  All callers changed.
8292         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
8293         (IEEE1275_IHANDLE_INVALID): New variable.
8294         (IEEE1275_CELL_INVALID): New variable.
8295         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
8296         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
8297         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
8298         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
8299         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
8300         codes from Open Firmware.  All callers updated.
8301         (grub_ieee1275_next_property): Directly return Open Firmware return
8302         code.
8303         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8304         Standardize error checking from `grub_ieee1275_get_property'.
8305         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
8306         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
8308 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
8310         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
8311         `instance_to_package_args' to `instance_to_path_args'.
8313         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
8314         `grub_ieee1275_chosen'.
8316         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
8317         `grub_ieee1275_interpret'.
8319 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
8321         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
8323 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
8325         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
8326         (__cmpdi): Likewise.
8328         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
8329         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
8330         `grub_ssize_t'.
8332         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
8334         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
8335         to type `grub_ssize_t'.
8336         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
8338 2006-09-22  Marco Gerards  <marco@gnu.org>
8340         * normal/script.c (grub_script_create_cmdmenu): Skip leading
8341         newlines.
8343 2006-09-22  Marco Gerards  <marco@gnu.org>
8345         * commands/echo.c: New file.
8347         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
8349         * conf/common.rmk (echo_mod_SOURCES): New variable.
8350         (echo_mod_CFLAGS): Likewise.
8351         (echo_mod_LDFLAGS): Likewise.
8353 2006-09-22  Marco Gerards  <marco@gnu.org>
8355         * normal/main.c (get_line): Malloc memory instead of using
8356         preallocated memory.  Removed the arguments `cmdline' and
8357         `max_len'.  Updated all callers.
8359 2006-09-22  Marco Gerards  <marco@gnu.org>
8361         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
8362         (normal_mod_DEPENDENCIES): Likewise.
8364         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
8365         (normal_mod_DEPENDENCIES): Likewise.
8367         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
8369 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
8371         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
8372         programs.
8373         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
8374         (normal_mod_DEPENDENCIES): Likewise.
8375         * conf/i386-pc.mk: Regenerate.
8376         * conf/i386-efi.mk: Likewise
8377         * conf/common.mk: Likewise.
8378         * conf/powerpc-ieee1275.mk: Likewise.
8379         * conf/sparc64-ieee1275.mk: Likewise.
8381 2006-09-22  Robert Millan  <rmh@aybabtu.com>
8383         Sync with i386 version.
8384         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
8385         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
8387 2006-09-21  Robert Millan  <rmh@aybabtu.com>
8389         Import from GRUB Legacy (lib/device.c):
8390         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
8391         (init_device_map) [__linux__]: Add support for I2O devices.
8393 2006-09-14  Marco Gerards  <marco@gnu.org>
8395         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
8396         `-melf_i386'.
8398 2006-09-14  Robert Millan  <rmh@aybabtu.com>
8400         * util/i386/pc/grub-install.in: Skip menu.lst when removing
8401         /boot/grub/*.lst.
8403         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
8405         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
8406         before adding it to device.map.
8408 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
8410         * genmk.rb: Let GCC generate dependencies the first time it
8411         compiles a file; using the -MD option.
8412         * conf/common.mk: Regenerate.
8413         * conf/i386-pc.mk: Likewise.
8414         * conf/i386-efi.mk: Likewise.
8415         * conf/powerpc-ieee1275.mk: Likewise.
8416         * conf/sparc64-ieee1275.mk: Likewise.
8418 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
8420         Move the prototypes of grub_setjmp and grub_longjmp to
8421         cpu/setjmp.h, so that each architecture may specify different
8422         attributes.
8424         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
8425         (grub_longjmp): Likewise.
8426         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
8427         (grub_longjmp): Likewise.
8428         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
8429         (grub_longjmp): Likewise.
8431         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
8432         [!GRUB_UTIL] (grub_longjmp): Removed.
8434 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
8436         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
8437         "color!" method does not return any value.
8439 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
8441         * include/grub/bitmap.h: New file.
8443         * include/grub/i386/pc/vbeutil.h: Likewise.
8445         * video/bitmap.c: Likewise.
8447         * video/readers/tga.c: Likewise.
8449         * video/i386/pc/vbeutil.c: Likewise.
8451         * commands/videotest.c: Code cleanup and updated to reflect to new
8452         video API.
8454         * term/gfxterm.c: Likewise.
8456         * video/video.c: Likewise.
8458         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
8459         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
8460         (bitmap_mod_SOURCES): New entry.
8461         (bitmap_mod_CFLAGS): Likewise.
8462         (bitmap_mod_LDFLAGS): Likewise.
8463         (tga_mod_SOURCES): Likewise.
8464         (tga_mod_CFLAGS): Likewise.
8465         (tga_mod_LDFLAGS): Likewise.
8467         * include/grub/video.h (grub_video_blit_operators): New enum type.
8468         (grub_video_render_target): Changed as forward declaration and moved
8469         actual definition to be video driver specific.
8470         (grub_video_adapter.blit_bitmap): Added blitting operator.
8471         (grub_video_adapter.blit_render_target): Likewise.
8472         (grub_video_blit_bitmap): Likewise.
8473         (grub_video_blit_render_target): Likewise.
8475         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
8476         driver specific render target definition.
8477         (grub_video_vbe_map_rgba): Added driver internal helper.
8478         (grub_video_vbe_unmap_color): Updated to use
8479         grub_video_i386_vbeblit_info.
8480         (grub_video_vbe_get_video_ptr): Likewise.
8482         * include/grub/i386/pc/vbeblit.h
8483         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
8484         grub_video_i386_vbeblit_info.
8485         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
8486         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
8487         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
8488         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
8489         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
8490         (grub_video_i386_vbeblit_index_index): Likewise.
8491         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
8492         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
8493         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
8494         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
8495         operator.
8496         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
8497         operator.
8499         * video/i386/pc/vbeblit.c: Updated to reflect changes on
8500         include/grub/i386/pc/vbeblit.h.
8502         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
8503         Updated to use grub_video_i386_vbeblit_info.
8504         (grub_video_i386_vbefill_R8G8B8): Likewise.
8505         (grub_video_i386_vbefill_index): Likewise.
8506         (grub_video_i386_vbefill): Added generic filler.
8508         * video/i386/pc/vbefill.c: Updated to reflect changes on
8509         include/grub/i386/pc/vbefill.h.
8511         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
8512         grub_video_i386_vbeblit_info.
8513         (grub_video_vbe_unmap_color): Likewise.
8514         (grub_video_vbe_blit_glyph): Likewise.
8515         (grub_video_vbe_scroll): Likewise.
8516         (grub_video_vbe_draw_pixel): Removed function.
8517         (grub_video_vbe_get_pixel): Likewise.
8518         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
8519         updated code to use it.
8520         (common_blitter): Added common blitter for render target and bitmap.
8521         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
8522         (grub_video_vbe_blit_render_target): Likewise.
8524 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
8526         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
8527         is in text mode if there is no console control protocol instance
8528         available.
8530 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
8532         * include/grub/video.h: Code cleanup.
8534         * include/grub/i386/pc/vbe.h: Likewise.
8536         * video/i386/pc/vbe.c: Likewise.
8538         * video/i386/pc/vbeblit.c: Likewise.
8540         * video/i386/pc/vbefill.c: Likewise.
8542         * video/video.c: Likewise.  Also added more comments.
8544 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
8546         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
8547         (struct grub_biosdisk_dap): Likewise.
8549         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
8550         linkage settings for all functions.
8552 2006-07-12  Marco Gerards  <marco@gnu.org>
8554         * configure.ac (--enable-mm-debug): Fix typo.
8556         * genkernsyms.sh.in: Use proper quoting for `CC'.
8558 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
8560         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
8561         (normal_mod_ASFLAGS): Remove "-m32".
8563 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
8565         * util/misc.c: Include config.h.
8566         [!HAVE_MEMALIGN]: Do not include malloc.h.
8567         (grub_memalign): Use posix_memalign, if present. Then, use
8568         memalign, if present. Otherwise, emit an error.
8570         * util/grub-emu.c: Do not include malloc.h.
8572         * include/grub/util/misc.h: Include unistd.h. This is required for
8573         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
8574         D. Eades III <hde@foobar-qux.org>.
8576         * configure.ac (AC_GNU_SOURCE): Added.
8577         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
8578         type.
8580 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
8582         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
8583         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
8585 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
8587         * include/grub/types.h (grub_host_addr_t): Rename to
8588         grub_target_addr_t.
8589         (grub_host_off_t): Rename to grub_target_off_t.
8590         (grub_host_size_t): Rename to grub_target_size_t.
8591         (grub_host_ssize_t): Rename to grub_target_ssize_t.
8592         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
8594         * include/grub/kernel.h (struct grub_module_header): Change type
8595         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
8596         (grub_module_info): Likewise.
8598 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
8600         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
8601         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
8602         Velazquez <jesus.velazquez@gmail.com>.
8604 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
8606         Count partitions from 1 instead of 0 in the string representation
8607         of partitions. Still use 0-based internally.
8609         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
8610         (sun_partition_map_iterate): Use grub_partition_t instead of
8611         struct grub_partition *. Cast DESC->START_CYLINDER to
8612         grub_uint64_t after converting the endian.
8613         (sun_partition_map_probe): Subtract 1 for PARTNUM.
8614         (sun_partition_map_get_name): Add 1 to P->INDEX.
8616         * partmap/pc.c (grub_partition_parse): Subtract 1 for
8617         PCDATA->DOS_PART.
8618         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
8620         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
8621         zero instead of one.
8622         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
8623         (gpt_partition_map_get_name): Add 1 into P->INDEX.
8625         * partmap/apple.c (apple_partition_map_iterate): Change the type
8626         of POS to unsigned.
8627         (apple_partition_map_probe): Subtract 1 for PARTNUM.
8628         (apple_partition_map_get_name): Add 1 into P->INDEX.
8630         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
8631         of POS to unsigned.
8632         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
8633         calculate the offset of a partition.
8634         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
8635         (amiga_partition_map_get_name): Add 1 into P->INDEX.
8637         * partmap/acorn.c (acorn_partition_map_find): Change the type of
8638         SECTOR to grub_disk_addr_t.
8639         (acorn_partition_map_iterate): Likewise.
8640         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
8641         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
8642         top.
8643         (acorn_partition_map_get_name): Add 1 into P->INDEX.
8645         * kern/i386/pc/init.c (make_install_device): Add 1 into
8646         GRUB_INSTALL_DOS_PART.
8648         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
8649         conditional.
8651 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
8653         Clean up the code to support 64-bit addressing in disks and
8654         files. This change is not enough for filesystems yet.
8656         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
8657         type of "start" to grub_uint64_t.
8658         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
8659         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
8660         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
8661         convert addresses.
8663         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
8664         to grub_disk_addr_t.
8666         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
8667         string.
8669         * partmap/pc.c (pc_partition_map_iterate): Likewise.
8671         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
8672         to char *.
8674         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
8676         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
8678         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
8680         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
8681         to grub_off_t, to detect an error from grub_file_seek.
8682         (grub_multiboot_load_elf32): Likewise.
8684         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
8685         maximum unsigned long value when an overflow is detected.
8686         (grub_strtoull): New function.
8687         (grub_divmod64): Likewise.
8688         (grub_lltoa): use grub_divmod64.
8690         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
8691         grub_disk_addr_t.
8692         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
8693         the pointer to next character. Use grub_strtoull instead of
8694         grub_strtoul.
8695         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
8696         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
8697         respectively.
8699         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
8700         return value is signed.
8701         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
8702         test if OFFSET is less than zero, as OFFSET is unsigned now.
8704         * kern/disk.c (struct grub_disk_cache): Change the type of
8705         "sector" to grub_disk_addr_t.
8706         (grub_disk_cache_get_index): Change the type of SECTOR to
8707         grub_disk_addr_t. Calculate the hash with SECTOR casted to
8708         unsigned after shifting.
8709         (grub_disk_cache_invalidate): Change the type of SECTOR to
8710         grub_disk_addr_t.
8711         (grub_disk_cache_unlock): Likewise.
8712         (grub_disk_cache_store): Likewise.
8713         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
8714         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
8715         grub_disk_addr_t and grub_uint64_t, respectively.
8716         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
8717         body, as the value of OFFSET is tweaked by
8718         grub_disk_check_range. Change the types of START_SECTOR, LEN and
8719         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
8720         respectively.
8721         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
8722         body, as the value of OFFSET is tweaked by
8723         grub_disk_check_range. Change the types of LEN and N to
8724         grub_size_t.
8726         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
8727         and "saved_offset" to grub_off_t.
8728         (test_header): Cast BUF to char *.
8729         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
8730         to char *.
8731         (grub_gzio_read): Change the types of OFFSET and SIZE to
8732         grub_off_t and grub_size_t, respectively.
8734         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
8735         Removed.
8736         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
8737         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
8738         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
8739         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
8740         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
8742         * include/grub/types.h (grub_off_t): Unconditionally set to
8743         grub_uint64_t.
8744         (grub_disk_addr_t): Changed to grub_uint64_t.
8746         * include/grub/partition.h (struct grub_partition): Change the
8747         types of "start", "len" and "offset" to grub_disk_addr_t,
8748         grub_uint64_t and grub_disk_addr_t, respectively.
8749         (grub_partition_get_start): Return grub_disk_addr_t.
8750         (grub_partition_get_len): Return grub_uint64_t.
8752         * include/grub/misc.h (grub_strtoull): New prototype.
8753         (grub_divmod64): Likewise.
8755         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
8756         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
8757         grub_off_t, respectively.
8758         All callers and references changed.
8760         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
8761         grub_size_t in "read".
8762         All callers and references changed.
8764         * include/grub/file.h (struct grub_file): Change the types of
8765         "offset" and "size" to grub_off_t and grub_off_t,
8766         respectively. Change the type of SECTOR to grub_disk_addr_t in
8767         "read_hook".
8768         (grub_file_read): Change the type of LEN to grub_size_t.
8769         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
8770         grub_off_t.
8771         (grub_file_size): Return grub_off_t.
8772         (grub_file_tell): Likewise.
8773         All callers and references changed.
8775         * include/grub/disk.h (struct grub_disk_dev): Change the types of
8776         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
8777         "write".
8778         (struct grub_disk): Change the type of "total_sectors" to
8779         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
8780         "read_hook".
8781         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
8782         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
8783         (grub_disk_write): Likewise.
8784         All callers and references changed.
8786         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
8787         char * for grub_strncmp to silence gcc.
8788         (grub_iso9660_mount): Likewise.
8789         (grub_iso9660_mount): Likewise.
8790         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
8791         return statement.
8792         (grub_iso9660_iterate_dir): Likewise.
8793         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
8795         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
8796         LEN to grub_disk_addr_t and grub_size_t, respectively.
8798         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8800         * fs/jfs.c (grub_jfs_read_file): Likewise.
8802         * fs/minix.c (grub_jfs_read_file): Likewise.
8804         * fs/sfs.c (grub_jfs_read_file): Likewise.
8806         * fs/ufs.c (grub_jfs_read_file): Likewise.
8808         * fs/xfs.c (grub_jfs_read_file): Likewise.
8810         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
8811         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
8812         respectively.
8814         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
8815         BLKNR to -1 instead of returning GRUB_ERRNO.
8816         (grub_ext2_read_file): Change the types of SECTOR and
8817         LEN to grub_disk_addr_t and grub_size_t, respectively.
8819         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
8820         LEN to grub_disk_addr_t and grub_size_t, respectively.
8822         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
8823         grub_file_read.
8825         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
8826         string. Do not cast SECTOR explicitly.
8828         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
8829         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
8830         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
8831         grub_disk_addr_t and grub_size_t, respectively. If the sector is
8832         over 2TB and LBA mode is not supported, raise an error.
8833         (get_safe_sectors): New function.
8834         (grub_biosdisk_read): Use get_safe_sectors.
8835         (grub_biosdisk_write): Likewise.
8837         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
8838         (grub_efidisk_write): Likewise.
8840         * disk/loopback.c (delete_loopback): Cosmetic changes.
8841         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
8842         correctly.
8843         (grub_loopback_open): Likewise.
8844         (grub_loopback_read): Likewise. Also, change the type of POS to
8845         grub_off_t, and fix the usage of grub_memset.
8847         * commands/i386/pc/play.c: Include grub/machine/time.h.
8849         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
8850         print FILE->SIZE.
8852         * commands/configfile.c: Include grub/env.h.
8854         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
8855         GRUB_ERRNO directly instead. Change the type of POS to
8856         grub_off_t. Follow the coding standard.
8858         * commands/blocklist.c: Include grub/partition.h.
8859         (grub_cmd_blocklist): Return an error if the underlying device is
8860         not a disk. Take the starting sector of a partition into account,
8861         if a partition is used.
8863         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
8864         a length field.
8865         (lba_mode): Support 64-bit addresses.
8866         (chs_mode): Likewise.
8867         (copy_buffer): Adapted to the new offsets of a length field and a
8868         segment field.
8869         (blocklist_default_start): Allocate 64-bit space.
8871         * boot/i386/pc/boot.S (force_lba): Removed.
8872         (boot_drive): Moved to under KERNEL_SECTOR.
8873         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
8874         space.
8875         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
8876         is useless.
8877         (lba_mode): Refactored to support a 64-bit address. More size
8878         optimization.
8879         (setup_sectors): Likewise.
8881 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
8883         * DISTLIST: Added include/grub/i386/linux.h. Removed
8884         include/grub/i386/pc/linux.h
8886         * configure.ac (AC_INIT): Bumped to 1.94.
8888         * config.guess: Updated from gnulib.
8889         * config.sub: Likewise.
8890         * install-sh: Likewise.
8891         * mkinstalldirs: Likewise.
8893 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
8895         * conf/common.rmk (grub_modules_init.lst): Depended on
8896         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
8897         MODSRCFILES.
8899         * genmk.rb (PModule::rule): Reverted the previous change.
8901 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
8903         * conf/common.rmk (grub_modules_init.lst): Depends on
8904         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
8905         that the target does not exist before producing.
8906         (grub_modules_init.h): Remove the target before generating.
8907         (grub_emu_init.c): Likewise.
8909         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
8911 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
8913         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
8914         for the target-specific tests. Make sure that we also have the
8915         up-to-date target variables for those tests.
8917 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
8919         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
8920         (PModule::rule): Likewise.
8922 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
8924         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
8925         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
8926         target-specific flags should be prefixed.
8927         (PModule::rule): Likewise.
8929 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
8931         * configure.ac (CMP): Check if cmp is available explicitly.
8933 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
8935         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
8936         (target_cpu): New variable.
8937         (pkglibdir): Use target_cpu instead of host_cpu.
8939         * util/i386/pc/grub-install.in (host_cpu): Removed.
8940         (target_cpu): New variable.
8941         (pkglibdir): Use target_cpu instead of host_cpu.
8943         * util/genmoddep.c: Removed.
8945         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
8946         instead of GRUB_HOST_SIZEOF_VOID_P.
8947         * kern/dl.c: Likewise.
8949         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
8950         ...
8951         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8952         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8953         (GRUB_TARGET_SIZEOF_LONG): ... this.
8954         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8955         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8956         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8957         to ...
8958         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8959         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8960         (GRUB_TARGET_SIZEOF_LONG): ... this.
8961         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8962         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8963         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8964         to ...
8965         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8966         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8967         (GRUB_TARGET_SIZEOF_LONG): ... this.
8968         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8969         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8971         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
8972         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
8973         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
8974         instead of GRUB_HOST_SIZEOF_LONG.
8975         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
8976         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
8977         GRUB_CPU_WORDS_BIGENDIAN.
8978         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
8979         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
8980         grub_host_ssize_t.
8982         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
8983         (genmoddep_SOURCES): Likewise.
8984         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
8985         (genmoddep_SOURCES): Likewise.
8986         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
8987         (genmoddep_SOURCES): Likewise.
8988         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
8989         Likewise.
8990         (genmoddep_SOURCES): Likewise.
8992         * genmoddep.awk: New file.
8994         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
8995         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
8996         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
8997         (PModule::rule): Likewise.
8998         (Program::rule): Likewise.
8999         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
9000         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
9001         respectively.
9003         * configure.ac: Rewritten intensively to use host and target
9004         instead of build and host, respectively.
9006         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
9007         (host_cpu): Removed.
9008         (target_cpu): New variable.
9009         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
9010         (BUILD_CC): Removed.
9011         (BUILD_CFLAGS): Likewise.
9012         (BUILD_CPPFLAGS): Likewise.
9013         (TARGET_CC): New variable.
9014         (TARGET_CFLAGS): Likewise.
9015         (TARGET_CPPFLAGS): Likewise.
9016         (TARGET_LDFLAGS): Likewise.
9017         (AWK): Likewise.
9018         (include): Use target_cpu instead of host_cpu.
9019         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
9021         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
9023 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
9025         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
9026         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
9027         field 'false' to 'exec_on_false'.
9028         (grub_script_create_cmdif): Renamed argument names to reflect above
9029         changes.
9031         * normal/execute.c (grub_script_execute_cmdif): Likewise.
9033         * normal/script.c (grub_script_create_cmdif): Likewise.
9035 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
9037         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
9038         top.
9039         (grub_hfsplus_btree_recptr): Likewise.
9040         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
9041         FILEBLOCK both to pass a block number and store next block
9042         number.
9043         (grub_hfsplus_read_block): Rewritten heavily to support an extent
9044         overflow file correctly. Specify errors appropriately, because
9045         fshelp expects that GRUB_ERRNO is set when fails. Reuse
9046         grub_hfsplus_btree_recptr to get the pointer to a found key.
9047         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
9048         is found.
9050         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
9051         linux.mod.
9052         (_linux_mod_SOURCES): New variable.
9053         (_linux_mod_CFLAGS): Likewise.
9054         (_linux_mod_LDFLAGS): Likewise.
9055         (linux_mod_SOURCES): Likewise.
9056         (linux_mod_CFLAGS): Likewise.
9057         (linux_mod_LDFLAGS): Likewise.
9059         * DISTLIST: Added loader/i386/efi/linux.c,
9060         loader/i386/efi/linux_normal.c and
9061         include/grub/i386/efi/loader.h.
9063         * loader/i386/efi/linux.c: New file.
9064         * loader/i386/efi/linux_normal.c: Likewise.
9065         * include/grub/i386/efi/loader.h: Likewise.
9067 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
9069         * commands/blocklist.c: New file.
9071         * DISTLIST: Added commands/blocklist.c.
9073         * term/efi/console.c (grub_console_highlight_color): Use a lighter
9074         color for the background, and a darker color for the foreground.
9075         (grub_console_checkkey): Return READ_KEY.
9076         (grub_console_cls): Set the background to
9077         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
9079         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
9081         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
9082         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
9084         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
9085         prototype.
9087         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
9088         BG. The spec is wrong again.
9090         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
9091         prototype.
9092         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
9094         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9095         commands/blocklist.c.
9096         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9098         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
9099         (blocklist_mod_SOURCES): New variable.
9100         (blocklist_mod_CFLAGS): Likewise.
9101         (blocklist_mod_LDFLAGS): Likewise.
9103 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
9105         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
9106         duplication.
9107         (lba_mode): Use %eax more intensively to reduce the code size.
9109 2006-05-20  Marco Gerards  <marco@gnu.org>
9111         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
9113         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
9114         for `menuentry'.
9115         (script): Accept leading newlines.
9116         (newlines): New rule to describe 0 or more newlines.
9117         (commands): Accept `command' with trailing newline.  Fixed the
9118         order in which arguments were passed to `grub_script_add_cmd'.
9119         Accept commands separated by newlines.
9120         (function): Changed to accept newlines.
9121         (menuentry) Rewritten.
9123         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
9124         front of the list, instead of to the end.
9126 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
9128         * util/i386/pc/grub-install.in (bindir): New variable.
9129         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
9130         Shaver <lbgwjl@gmail.com>.
9132 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
9134         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
9135         grub/machine/linux.h
9136         * loader/i386/pc/linux.c: Likewise.
9138         * include/grub/i386/pc/linux.h: Moved to ...
9139         * include/grub/i386/linux.h: ... here.
9141         * include/grub/i386/linux.h (struct linux_kernel_params): New
9142         struct.
9144 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
9146         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
9147         checking.
9148         (grub_video_vbe_blit_glyph): Likewise.
9149         (grub_video_vbe_blit_bitmap): Likewise.
9150         (grub_video_vbe_blit_render_target): Likewise.
9152 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
9154         * configure.ac (--with-platform): Properly quote the square
9155         brackets.
9157 2006-05-08  Marco Gerards  <marco@gnu.org>
9159         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
9160         this...
9161         (kernel_elf_HEADERS): ...to this.  Updated all users.
9162         (grubof_symlist.c): Renamed from this...
9163         (kernel_elf_symlist.c): ...to this.  Updated all users.
9164         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9165         (grubof_SOURCES): Renamed from this...
9166         (kernel_elf_SOURCES): ...to this.
9167         (grubof_HEADERS): Renamed from this...
9168         (kernel_elf_HEADERS): ...to this.
9169         (grubof_CFLAGS): Renamed from this...
9170         (kernel_elf_CFLAGS): ...to this.
9171         (grubof_ASFLAGS): Renamed from this...
9172         (kernel_elf_ASFLAGS): ...to this.
9173         (grubof_LDFLAGS): Renamed from this...
9174         (kernel_elf_LDFLAGS): ...to this.
9176         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
9177         this...
9178         (kernel_elf_HEADERS): ...to this.  Updated all users.
9179         (grubof_symlist.c): Renamed from this...
9180         (kernel_elf_symlist.c): ...to this.  Updated all users.
9181         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9182         (grubof_SOURCES): Renamed from this...
9183         (kernel_elf_SOURCES): ...to this.
9184         (grubof_HEADERS): Renamed from this...
9185         (kernel_elf_HEADERS): ...to this.
9186         (grubof_CFLAGS): Renamed from this...
9187         (kernel_elf_CFLAGS): ...to this.
9188         (grubof_ASFLAGS): Renamed from this...
9189         (kernel_elf_ASFLAGS): ...to this.
9190         (grubof_LDFLAGS): Renamed from this...
9191         (kernel_elf_LDFLAGS): ...to this.
9193         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
9194         `kernel.elf' instead of `grubof'.
9196 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
9198         Add --with-platform to configure. Use pkglibdir instead of
9199         pkgdatadir. This is reported by Roger Leigh.
9201         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
9202         (host_vendor): Likewise.
9203         (host_os): Likewise.
9204         (pkgdatadir): Likewise.
9205         (platform): New variable.
9206         (pkglibdir): Likewise.
9207         Use PKGLIBDIR instead of PKGDATADIR.
9209         * util/i386/pc/grub-install.in (datadir): Removed.
9210         (host_vendor): Likewise.
9211         (host_os): Likewise.
9212         (pkgdatadir): Likewise.
9213         (platform): New variable.
9214         (pkglibdir): Likewise.
9215         Use PKGLIBDIR instead of PKGDATADIR.
9217         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
9218         instead of GRUB_DATADIR.
9219         (main): Likewise.
9220         * util/i386/pc/grub-mkimage.c (usage): Likewise.
9221         (main): Likewise.
9222         * util/i386/efi/grub-mkimage.c (usage): Likewise.
9223         (main): Likewise.
9225         * configure.ac (--with-platform): New option.
9226         Use PLATFORM instead of HOST_VENDOR to specify a platform.
9228         * Makefile.in: Include a makefile based on PLATFORM instead of
9229         HOST_VENDOR.
9230         (pkgdatadir): Not appended by the machine type.
9231         (pkglibdir): Appended by the machine type.
9232         (host_vendor): Removed.
9233         (platform): New variable.
9234         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
9235         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
9236         (uninstall): Likewise.
9238 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
9240         Use the environment context in the menu. Remove the commands
9241         "default" and "timeout", and use variables instead.
9243         * normal/menu.c: Include grub/env.h.
9244         (print_entry): Cast TITLE to silence gcc.
9245         (get_timeout): New function.
9246         (set_timeout): Likewise.
9247         (get_entry_number): Likewise.
9248         (run_menu): Use a default entry, a fallback entry and a timeout
9249         in the environment variables "default", "fallback" and
9250         "timeout". Also, tweak the default entry if it is not within the
9251         current menu entries.
9252         (grub_menu_run): Use a fallback entry in the environment variable
9253         "fallback".
9255         * normal/main.c (read_config_file): Do not initialize
9256         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
9257         NEWMENU->TIMEOUT.
9258         (grub_normal_execute): Use a data slot to store the menu.
9260         * include/grub/normal.h (struct grub_menu): Removed default_entry,
9261         fallback_entry and timeout.
9262         (struct grub_menu_list): Removed.
9263         (grub_menu_list_t): Likewise.
9264         (struct grub_context): Likewise.
9265         (grub_context_t): Likewise.
9266         (grub_context_get): Likewise.
9267         (grub_context_get_current_menu): Likewise.
9268         (grub_context_push_menu): Likewise.
9269         (grub_context_pop_menu): Likewise.
9270         (grub_default_init): Likewise.
9271         (grub_default_fini): Likewise.
9272         (grub_timeout_init): Likewise.
9273         (grub_timeout_fini): Likewise.
9275         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
9276         and timeout.mod.
9277         (normal_mod_SOURCES): Removed normal/context.c.
9279         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
9280         commands/default.c, commands/timeout.c and normal/context.c.
9281         (normal_mod_SOURCES): Removed normal/context.c.
9283         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
9284         commands/timeout.c and normal/context.c.
9285         (normal_mod_SOURCES): Removed normal/context.c.
9287         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
9288         commands/default.c, commands/timeout.c and normal/context.c.
9289         (normal_mod_SOURCES): Removed normal/context.c.
9291         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
9292         timeout.mod.
9293         (default_mod_SOURCES): Removed.
9294         (default_mod_CFLAGS): Likewise.
9295         (default_mod_LDFLAGS): Likewise.
9296         (timeout_mod_SOURCES): Removed.
9297         (timeout_mod_CFLAGS): Likewise.
9298         (timeout_mod_LDFLAGS): Likewise.
9300         * DISTLIST: Removed commands/default.c, commands/timeout.c and
9301         normal/context.c.
9303         * commands/default.c: Removed.
9304         * commands/timeout.c: Likewise.
9305         * normal/context.c: Likewise.
9307 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
9309         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
9311 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
9313         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
9314         "next" to "prev" for readability.
9315         (struct grub_env_sorted_var): New struct.
9316         (grub_env_context): Renamed to ...
9317         (initial_context): ... this.
9318         (grub_env_var_context): Renamed to ...
9319         (current_context): ... this.
9320         (grub_env_find): Look only at CURRENT_CONTEXT.
9321         (grub_env_context_open): Rewritten to copy exported variables from
9322         previous context.
9323         (grub_env_context_close): Rewritten according to the new
9324         scheme. Also, add an assertion to prevent the initial context from
9325         removed.
9326         (grub_env_insert): Removed the code for the sorted list.
9327         (grub_env_remove): Likewise.
9328         (grub_env_export): Simply mark the variable with
9329         GRUB_ENV_VAR_GLOBAL.
9330         (grub_env_set): A cosmetic change for naming consistency.
9331         (grub_env_get): Likewise.
9332         (grub_env_unset): Likewise.
9333         (grub_env_iterate): Rewritten to sort variables within this
9334         function.
9335         (grub_register_variable_hook): Fixed for naming consistency. Call
9336         grub_env_find again, only if NAME is not found at the first time.
9337         (mangle_data_slot_name): New function.
9338         (grub_env_set_data_slot): Likewise.
9339         (grub_env_get_data_slot): Likewise.
9340         (grub_env_unset_data_slot): Likewise.
9342         * include/grub/env.h (grub_env_var_type): New enum.
9343         (GRUB_ENV_VAR_LOCAL): New constant.
9344         (GRUB_ENV_VAR_GLOBAL): Likewise.
9345         (GRUB_ENV_VAR_DATA): Likewise.
9346         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
9347         "type".
9348         (grub_env_set): Replace VAR with NAME for consistency.
9349         (grub_register_variable_hook): Likewise.
9350         (grub_env_export): Specify the name of the argument.
9351         (grub_env_set_data_slot): New prototype.
9352         (grub_env_get_data_slot): Likewise.
9353         (grub_env_unset_data_slot): Likewise.
9355 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
9357         Extend the loader so that GRUB can accept a loader which comes
9358         back to GRUB when a loaded image exits. Also, this change adds
9359         support for a chainloader on EFI.
9361         * term/efi/console.c: Include grub/misc.h.
9362         (grub_console_checkkey): Display a scan code on the top for
9363         debugging. This will be removed once the EFI port gets stable.
9364         Correct the scan code mapping.
9366         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
9367         allocate memory from larger regions, in order to reduce the number
9368         of allocated regions. Otherwise, the MacOSX loader panics.
9369         (filter_memory_map): Avoid less than 1MB for compatibility with
9370         other loaders.
9371         (add_memory_regions): Allocate from the tail of a region, if
9372         possible, to avoid allocating a region near to 1MB, for the MacOSX
9373         loader.
9375         * kern/efi/init.c (grub_efi_set_prefix): Specify
9376         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
9378         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
9379         argument IMAGE_HANDLE and specify it to get a loaded image.
9380         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
9381         grub_efi_get_loaded_image.
9382         (grub_efi_get_filename): Divide the length by the size of
9383         grub_efi_char16_t.
9384         (grub_efi_get_device_path): New function.
9385         (grub_efi_print_device_path): Print End Device Path nodes. Divide
9386         the length by the size of grub_efi_char16_t for a file path device
9387         path node.
9389         * kern/loader.c (grub_loader_noreturn): New variable.
9390         (grub_loader_set): Accept a new argument NORETURN. Set
9391         GRUB_LOADER_NORETURN to NORETURN.
9392         All callers changed.
9393         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
9394         grub_machine_fini.
9396         * include/grub/efi/efi.h (grub_efi_get_device_path): New
9397         prototype.
9398         (grub_efi_get_loaded_image): Take an argument to specify an image
9399         handle.
9401         * include/grub/loader.h (grub_loader_set): Added one more argument
9402         NORETURN.
9404         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
9405         instead of grub_efi_open_protocol.
9406         (grub_efidisk_get_device_name): Likewise.
9407         (grub_efidisk_close): Print a newline.
9408         (grub_efidisk_get_device_handle): Fixed to use
9409         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
9410         GRUB_EFI_DEVICE_PATH_TYPE.
9412         * disk/efi/efidisk.c (device_path_guid): Moved to ...
9413         * kern/efi/efi.c (device_path_guid): ... here.
9415         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
9416         chain.mod.
9417         (kernel_mod_HEADERS): Added efi/disk.h.
9418         (_chain_mod_SOURCES): New variable.
9419         (_chain_mod_CFLAGS): Likewise.
9420         (_chain_mod_LDFLAGS): Likewise.
9421         (chain_mod_SOURCES): Likewise.
9422         (chain_mod_CFLAGS): Likewise.
9423         (chain_mod_LDFLAGS): Likewise.
9425         * DISTLIST: Added include/grub/efi/chainloader.h,
9426         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
9428         * include/grub/efi/chainloader.h: New file.
9429         * loader/efi/chainloader.c: Likewise.
9430         * loader/efi/chainloader_normal.c: Likewise.
9432 2006-04-30  Marco Gerards  <marco@gnu.org>
9434         * commands/configfile.c (grub_cmd_source): New function.
9435         (GRUB_MOD_INIT): Register the commands `source' and `.'.
9436         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
9438 2006-04-30  Marco Gerards  <marco@gnu.org>
9440         * normal/execute.c (grub_script_execute_cmd): Change the return
9441         type to `grub_err_t'.  Correctly return the error.
9442         (grub_script_execute_cmdline): In case a command line is not a
9443         command or a function, try to interpret it as an assignment.
9445 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
9447         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
9448         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
9449         skip a node whose name is obviously invalid as UTF-16,
9450         i.e. contains a NUL character. Stop the iteration when the last
9451         directory entry is found. Instead of using the return value of
9452         grub_hfsplus_btree_iterate_node, store the value in RET and use
9453         it, because the iterator can be stopped by the last directory
9454         entry.
9456 2006-04-30  Marco Gerards  <marco@gnu.org>
9458         * include/grub/env.h (grub_env_export): New prototype.  Reported
9459         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
9461 2006-04-30  Marco Gerards  <marco@gnu.org>
9463         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
9464         size of the extents in a catalog file record.
9466 2006-04-29  Marco Gerards  <marco@gnu.org>
9468         * commands/configfile.c (grub_cmd_configfile): Execute the
9469         configfile within its own context.
9471         * include/grub/env.h (grub_env_context_open): New prototype.
9472         (grub_env_context_close): Likewise.
9474         * kern/env.c (grub_env): Removed.
9475         (grub_env_sorted): Likewise.
9476         (grub_env_context): New variable.
9477         (grub_env_var_context): Likewise.
9478         (grub_env_find): Search both the active context and the global
9479         context.
9480         (grub_env_context_open): New function.
9481         (grub_env_context_close): Likewise.
9482         (grub_env_insert): Likewise.
9483         (grub_env_remove): Likewise.
9484         (grub_env_export): Likewise.
9485         (grub_env_set): Changed to use helper functions to avoid code
9486         duplication.
9487         (grub_env_iterate): Rewritten so both the current context and the
9488         global context are being used.
9490         * normal/command.c (export_command): New function.
9491         (grub_command_init): Register the `export' function.
9493 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
9495         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
9496         explicitly to suppress gcc's warnings.
9497         * fs/fat.c (grub_fat_find_dir): Likewise.
9498         (grub_fat_label): Likewise.
9499         * fs/xfs.c (grub_xfs_read_inode): Likewise.
9500         (grub_xfs_mount): Likewise.
9501         (grub_xfs_label): Likewise.
9502         * fs/affs.c (grub_affs_mount): Likewise.
9503         (grub_affs_label): Likewise.
9504         (grub_affs_iterate_dir): Likewise.
9505         * fs/sfs.c (grub_sfs_mount): Likewise.
9506         (grub_sfs_iterate_dir): Likewise.
9507         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
9508         * fs/hfs.c (grub_hfs_mount): Likewise.
9509         (grub_hfs_cmp_catkeys): Likewise.
9510         (grub_hfs_find_dir): Likewise.
9511         (grub_hfs_dir): Likewise.
9512         (grub_hfs_label): Likewise.
9513         * fs/jfs.c (grub_jfs_mount): Likewise.
9514         (grub_jfs_opendir): Likewise.
9515         (grub_jfs_getent): Likewise.
9516         (grub_jfs_lookup_symlink): Likewise.
9517         (grub_jfs_label): Likewise.
9518         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
9519         (grub_hfsplus_iterate_dir): Likewise.
9520         (grub_hfsplus_btree_iterate_node): Made static.
9522         * util/grub-emu.c (prefix): New variable.
9523         (grub_machine_set_prefix): New function.
9524         (main): Do not set the environment variable "prefix" here. Only
9525         set PREFIX, which is used later by grub_machine_set_prefix.
9527         * include/grub/video.h: Do not include grub/symbol.h.
9528         (grub_video_register): Not exported. This symbol is not defined in
9529         the kernel.
9530         (grub_video_unregister): Likewise.
9531         (grub_video_iterate): Likewise.
9532         (grub_video_setup): Likewise.
9533         (grub_video_restore): Likewise.
9534         (grub_video_get_info): Likewise.
9535         (grub_video_get_blit_format): Likewise.
9536         (grub_video_set_palette): Likewise.
9537         (grub_video_get_palette): Likewise.
9538         (grub_video_set_viewport): Likewise.
9539         (grub_video_get_viewport): Likewise.
9540         (grub_video_map_color): Likewise.
9541         (grub_video_map_rgb): Likewise.
9542         (grub_video_map_rgba): Likewise.
9543         (grub_video_fill_rect): Likewise.
9544         (grub_video_blit_glyph): Likewise.
9545         (grub_video_blit_bitmap): Likewise.
9546         (grub_video_blit_render_target): Likewise.
9547         (grub_video_scroll): Likewise.
9548         (grub_video_swap_buffers): Likewise.
9549         (grub_video_create_render_target): Likewise.
9550         (grub_video_delete_render_target): Likewise.
9551         (grub_video_set_active_render_target): Likewise.
9553         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
9554         Undefined.
9555         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
9557         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
9558         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9559         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9560         instead of $(srcdir)/genkernsyms.sh.
9562         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
9563         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9564         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9565         instead of $(srcdir)/genkernsyms.sh.
9567         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
9568         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9569         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9570         instead of $(srcdir)/genkernsyms.sh.
9572         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
9573         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9574         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9575         instead of $(srcdir)/genkernsyms.sh.
9577         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
9578         genkernsyms.sh.
9580         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
9581         genkernsyms.sh.
9582         (gensymlist.sh): New target.
9583         (genkernsyms.sh): Likewise.
9585         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
9586         genkernsyms.sh.in and gensymlist.sh.in.
9588         * genkernsyms.sh: Removed.
9589         * gensymlist.sh: Likewise.
9591         * genkernsyms.sh.in: New file.
9592         * gensymlist.sh.in: Likewise.
9594 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
9596         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
9597         clobber "prefix", since we may have already set it manually.
9599 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
9601         * kern/misc.c (abort): New alias for grub_abort.
9603 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
9605         A new machine-specific function "grub_machine_set_prefix" is
9606         defined. This is called after loading modules, so that a prefix
9607         initialization can use modules. Also, this change adds an
9608         intensive debugging feature for the memory manager via the
9609         configure option "--enable-mm-debug".
9611         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
9612         PART.LEN.
9614         * kern/sparc64/ieee1275/init.c (abort): Removed.
9615         (grub_stop): Likewise.
9616         (grub_exit): New function.
9617         (grub_set_prefix): Renamed to ...
9618         (grub_machine_set_prefix): ... this.
9619         (grub_machine_init): Do not call grub_set_prefix.
9621         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
9622         (grub_machine_set_prefix): ... this.
9623         (grub_machine_init): Do not call grub_set_prefix.
9625         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
9626         (grub_machine_init): Do not set the prefix here.
9628         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
9630         * kern/efi/init.c: Include grub/mm.h.
9631         (grub_efi_set_prefix): New function.
9633         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
9634         (grub_efi_get_filename): New function.
9635         (grub_print_device_path): Renamed to ...
9636         (grub_efi_print_device_path): ... this.
9638         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
9639         [MM_DEBUG] (grub_realloc): Likewise.
9640         [MM_DEBUG] (grub_free): Likewise.
9641         [MM_DEBUG] (grub_memalign): Likewise.
9642         [MM_DEBUG] (grub_mm_debug): New variable.
9643         [MM_DEBUG] (grub_debug_malloc): New function.
9644         [MM_DEBUG] (grub_debug_free): New function.
9645         [MM_DEBUG] (grub_debug_realloc): New function.
9646         [MM_DEBUG] (grub_debug_memalign): New function.
9648         * kern/misc.c (grub_abort): Print a newline to distinguish
9649         the message.
9651         * kern/main.c (grub_main): Call grub_machine_set_prefix and
9652         grub_set_root_dev after loading modules. This is necessary when
9653         setting a prefix depends on modules.
9655         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
9656         (grub_efi_print_device_path): ... this.
9657         (grub_efi_get_filename): New prototype.
9658         (grub_efi_set_prefix): Likewise.
9660         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
9661         and grub/disk.h.
9662         (grub_efidisk_get_device_handle): New prototype.
9663         (grub_efidisk_get_device_name): Likewise.
9665         * include/grub/mm.h: Include config.h.
9666         (MM_DEBUG): Removed.
9667         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
9668         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
9669         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
9670         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
9671         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
9672         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
9673         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
9674         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
9675         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
9677         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
9679         * disk/efi/efidisk.c: Include grub/partition.h.
9680         (iterate_child_devices): New function.
9681         (add_device): First, compare only last device path nodes, so that
9682         devices are sorted by the types.
9683         (grub_efidisk_get_device_handle): New function.
9684         (grub_efidisk_get_device_name): Likewise.
9686         * configure.ac (--enable-mm-debug): New option to enable the
9687         memory manager debugging feature. This makes the binary much
9688         bigger, so is disabled by default.
9690 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
9692         Use grub_abort instead of grub_stop, and grub_exit must be
9693         define in each architecture now. Also, this change adds support
9694         for EFI disks.
9696         * util/i386/pc/grub-probefs.c: Include grub/term.h.
9697         (grub_getkey): New function.
9698         (grub_term_get_current): Likewise.
9700         * util/i386/pc/grub-setup.c: Include grub/term.h.
9701         (grub_getkey): New function.
9702         (grub_term_get_current): Likewise.
9704         * util/misc.c (grub_stop): Renamed to ...
9705         (grub_exit): ... this.
9707         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
9708         (grub_exit): ... this.
9709         (grub_machine_init): Use grub_abort instead of abort.
9710         (grub_stop): Removed.
9712         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
9713         abort.
9715         * kern/i386/pc/startup.S (grub_exit): New function.
9716         (cold_reboot): New label.
9718         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
9719         (grub_efi_init): Call grub_efidisk_init.
9720         (grub_efi_fini): Call grub_efidisk_fini.
9722         * kern/efi/efi.c: Include grub/mm.h.
9723         (grub_efi_console_control_guid): Renamed to ...
9724         (console_control_guid): ... this.
9725         (grub_efi_loaded_image_guid): Renamed to ...
9726         (loaded_image_guid): ... this.
9727         (grub_efi_locate_handle): New function.
9728         (grub_efi_open_protocol): Likewise.
9729         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
9730         GRUB_EFI_CONSOLE_CONTROL_GUID.
9731         (grub_efi_exit): Removed.
9732         (grub_stop): Likewise.
9733         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
9734         (grub_exit): New function.
9735         (grub_print_device_path): Likewise.
9737         * kern/rescue.c (grub_rescue_cmd_exit): New function.
9738         (grub_enter_rescue_mode): Register "exit".
9740         * kern/misc.c (grub_real_dprintf): A cosmetic change.
9741         (grub_abort): New function.
9743         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
9745         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
9747         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
9749         * include/grub/efi/efi.h (grub_efi_exit): Removed.
9750         (grub_print_device_path): New prototype.
9751         (grub_efi_locate_handle): Likewise.
9752         (grub_efi_open_protocol): Likewise.
9754         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
9755         * disk/efi/efidisk.c: Likewise.
9757         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
9759         * include/grub/efi/console_control.h
9760         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
9762         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
9763         last 8 bytes as an array.
9764         (GRUB_EFI_DISK_IO_GUID): New macro.
9765         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
9766         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
9767         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
9768         grub_uint8_t.
9769         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
9770         (struct grub_efi_device_path): Rename the member "sub_type" to
9771         "subtype".
9772         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
9773         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
9774         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
9775         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
9776         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
9777         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
9778         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
9779         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
9780         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
9781         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
9782         (struct grub_efi_pci_device_path): New structure.
9783         (grub_efi_pci_device_path_t): New type.
9784         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
9785         (struct grub_efi_pccard_device_path): New structure.
9786         (grub_efi_pccard_device_path_t): New type.
9787         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
9788         (struct grub_efi_memory_mapped_device_path): New structure.
9789         (grub_efi_memory_mapped_device_path_t): New type.
9790         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
9791         (struct grub_efi_vendor_device_path): New structure.
9792         (grub_efi_vendor_device_path_t): New type.
9793         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
9794         (struct grub_efi_controller_device_path): New structure.
9795         (grub_efi_controller_device_path_t): New type.
9796         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
9797         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
9798         (struct grub_efi_acpi_device_path): New structure.
9799         (grub_efi_acpi_device_path_t): New type.
9800         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
9801         (struct grub_efi_expanded_acpi_device_path): New structure.
9802         (grub_efi_expanded_acpi_device_path_t): New type.
9803         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
9804         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
9805         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
9806         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
9807         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
9808         (struct grub_efi_atapi_device_path): New structure.
9809         (grub_efi_atapi_device_path_t): New type.
9810         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
9811         (struct grub_efi_fibre_channel_device_path): New structure.
9812         (grub_efi_fibre_channel_device_path_t): New type.
9813         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
9814         (struct grub_efi_1394_device_path): New structure.
9815         (grub_efi_1394_device_path_t): New type.
9816         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
9817         (struct grub_efi_usb_device_path): New structure.
9818         (grub_efi_usb_device_path_t): New type.
9819         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
9820         (struct grub_efi_usb_class_device_path): New structure.
9821         (grub_efi_usb_class_device_path_t): New type.
9822         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
9823         (struct grub_efi_i2o_device_path): New structure.
9824         (grub_efi_i2o_device_path_t): New type.
9825         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
9826         (struct grub_efi_mac_address_device_path): New structure.
9827         (grub_efi_mac_address_device_path_t): New type.
9828         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
9829         (struct grub_efi_ipv4_device_path): New structure.
9830         (grub_efi_ipv4_device_path_t): New type.
9831         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
9832         (struct grub_efi_ipv6_device_path): New structure.
9833         (grub_efi_ipv6_device_path_t): New type.
9834         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
9835         (struct grub_efi_infiniband_device_path): New structure.
9836         (grub_efi_infiniband_device_path_t): New type.
9837         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
9838         (struct grub_efi_uart_device_path): New structure.
9839         (grub_efi_uart_device_path_t): New type.
9840         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
9841         (struct grub_efi_vendor_messaging_device_path): New structure.
9842         (grub_efi_vendor_messaging_device_path_t): New type.
9843         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
9844         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
9845         (struct grub_efi_hard_drive_device_path): New structure.
9846         (grub_efi_hard_drive_device_path_t): New type.
9847         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
9848         (struct grub_efi_cdrom_device_path): New structure.
9849         (grub_efi_cdrom_device_path_t): New type.
9850         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
9851         (struct grub_efi_vendor_media_device_path): New structure.
9852         (grub_efi_vendor_media_device_path_t): New type.
9853         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
9854         (struct grub_efi_file_path_device_path): New structure.
9855         (grub_efi_file_path_device_path_t): New type.
9856         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
9857         (struct grub_efi_protocol_device_path): New structure.
9858         (grub_efi_protocol_device_path_t): New type.
9859         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
9860         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
9861         (struct grub_efi_bios_device_path): New structure.
9862         (grub_efi_bios_device_path_t): New type.
9863         (struct grub_efi_disk_io): New structure.
9864         (grub_efi_disk_io_t): New type.
9865         (struct grub_efi_block_io_media): New structure.
9866         (grub_efi_block_io_media_t): New type.
9867         (struct grub_efi_block_io): New structure.
9868         (grub_efi_block_io_t): New type.
9870         * include/grub/misc.h (grub_stop): Removed.
9871         (grub_exit): New prototype.
9872         (grub_abort): Likewise.
9874         * include/grub/disk.h (enum grub_disk_dev_id): Added
9875         GRUB_DISK_DEVICE_EFIDISK_ID.
9877         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
9878         disk/efi/efidisk.c.
9879         (kernel_syms.lst): Remove the target if an error occurs.
9881 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
9883         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
9884         as it was simply too buggy.
9886 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
9888         * kern/misc.c (grub_lltoa): New function.
9889         (grub_vsprintf): Added support for the long long suffix,
9890         i.e. "ll".
9892 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
9894         * Makefile.in (LDFLAGS): Add variable.
9895         (LD): Remove variable.
9896         * configure.ac: Add -m32 to LDFLAGS.
9897         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
9898         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
9899         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
9900         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
9901         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
9902         variables.
9903         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
9904         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
9905         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
9907 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
9909         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
9910         length for unknown glyph.
9912 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
9914         Add support for pre-loaded modules into the EFI port.
9916         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
9917         completely. Accept one more argument DIR. The caller has changed.
9919         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
9921         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
9922         (grub_efi_loaded_image_guid): New variable.
9923         (grub_efi_get_loaded_image): New function.
9924         (grub_arch_modules_addr): Likewise.
9926         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
9927         prototype.
9929         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
9930         (struct grub_efi_loaded_image): New structure.
9931         (grub_efi_loaded_image_t): New type.
9933 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
9935         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
9936         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
9937         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
9939 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
9941         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
9943 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
9945         * DISTLIST: Added include/grub/efi/console.h,
9946         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
9947         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9949         * include/grub/efi/console.h: New file.
9950         * include/grub/efi/time.h: Likewise.
9951         * include/grub/i386/efi/kernel.h: Likewise.
9952         * kern/efi/init.c: Likewise.
9953         * kern/efi/mm.c: Likewise.
9954         * term/efi/console.c: Likewise.
9956         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
9957         (grub_stop): Removed.
9958         (grub_get_rtc): Likewise.
9959         (grub_machine_init): Simply call grub_efi_init.
9960         (grub_machine_fini): Call grub_efi_fini.
9962         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
9963         (grub_efi_output_string): Removed.
9964         (grub_efi_stall): New function.
9965         (grub_stop): Likewise.
9966         (grub_get_rtc): Likewise.
9968         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
9969         (grub_efi_stall): New prototype.
9970         (grub_efi_allocate_pages): Likewise.
9971         (grub_efi_free_pages): Likewise.
9972         (grub_efi_get_memory_map): Likewise.
9973         (grub_efi_mm_init): Likewise.
9974         (grub_efi_mm_fini): Likewise.
9975         (grub_efi_init): Likewise.
9976         (grub_efi_fini): Likewise.
9978         * include/grub/i386/efi/time.h: Do not include
9979         grub/symbol.h. Include grub/efi/time.h.
9980         (GRUB_TICKS_PER_SECOND): Removed.
9981         (grub_get_rtc): Likewise.
9983         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
9984         Added padding. The EFI spec is buggy.
9985         (GRUB_EFI_BLACK): New macro.
9986         (GRUB_EFI_BLUE): Likewise.
9987         (GRUB_EFI_GREEN): Likewise.
9988         (GRUB_EFI_CYAN): Likewise.
9989         (GRUB_EFI_RED): Likewise.
9990         (GRUB_EFI_MAGENTA): Likewise.
9991         (GRUB_EFI_BROWN): Likewise.
9992         (GRUB_EFI_LIGHTGRAY): Likewise.
9993         (GRUB_EFI_BRIGHT): Likewise.
9994         (GRUB_EFI_DARKGRAY): Likewise.
9995         (GRUB_EFI_LIGHTBLUE): Likewise.
9996         (GRUB_EFI_LIGHTGREEN): Likewise.
9997         (GRUB_EFI_LIGHTCYAN): Likewise.
9998         (GRUB_EFI_LIGHTRED): Likewise.
9999         (GRUB_EFI_LIGHTMAGENTA): Likewise.
10000         (GRUB_EFI_YELLOW): Likewise.
10001         (GRUB_EFI_WHITE): Likewise.
10002         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
10003         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
10004         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
10005         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
10006         (GRUB_EFI_BACKGROUND_RED): Likewise.
10007         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
10008         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
10009         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
10010         (GRUB_EFI_TEXT_ATTR): Likewise.
10012         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
10013         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10014         (kernel_mod_HEADERS): Added efi/time.h.
10016 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
10018         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
10019         include/grub/efi/api.h, include/grub/efi/console_control.h,
10020         include/grub/efi/efi.h, include/grub/efi/pe32.h,
10021         include/grub/i386/efi/time.h, kern/efi/efi.c,
10022         kern/i386/efi/init.c, kern/i386/efi/startup.S,
10023         and util/i386/efi/grub-mkimage.c.
10025         * Makefile.in (RMKFILES): Added i386-efi.rmk.
10027         * genmk.rb (PModule#rule): Do not export symbols if
10028         #{prefix}_EXPORTS is set to "no".
10030         * conf/i386-efi.mk: New file.
10031         * conf/i386-efi.rmk: Likewise.
10032         * include/grub/efi/api.h: Likewise.
10033         * include/grub/efi/console_control.h: Likewise.
10034         * include/grub/efi/efi.h: Likewise.
10035         * include/grub/efi/pe32.h: Likewise.
10036         * include/grub/i386/efi/time.h: Likewise.
10037         * kern/efi/efi.c: Likewise.
10038         * kern/i386/efi/init.c: Likewise.
10039         * kern/i386/efi/startup.S: Likewise.
10040         * util/i386/efi/grub-mkimage.c: Likewise.
10042 2006-04-17  Marco Gerards  <marco@gnu.org>
10044         * include/grub/script.h: Include <grub/parser.h> and
10045         "grub_script.tab.h".
10046         (struct grub_lexer_param): New struct.
10047         (struct grub_parser_param): Likewise.
10048         (grub_script_create_arglist): Pass the state in an argument.
10049         (grub_script_add_arglist): Likewise.
10050         (grub_script_create_cmdline): Likewise.
10051         (grub_script_create_cmdblock): Likewise.
10052         (grub_script_create_cmdif): Likewise.
10053         (grub_script_create_cmdmenu): Likewise.
10054         (grub_script_add_cmd): Likewise.
10055         (grub_script_arg_add): Likewise.
10056         (grub_script_lexer_ref): Likewise.
10057         (grub_script_lexer_deref): Likewise.
10058         (grub_script_lexer_record_start): Likewise.
10059         (grub_script_lexer_record_stop): Likewise.
10060         (grub_script_mem_record): Likewise.
10061         (grub_script_mem_record_stop): Likewise.
10062         (grub_script_malloc): Likewise.
10063         (grub_script_yylex): Likewise.
10064         (grub_script_yyparse): Likewise.
10065         (grub_script_yyerror): Likewise.
10066         (grub_script_yylex): Likewise.
10067         (grub_script_lexer_init): Return the state.
10069         * normal/lexer.c (grub_script_lexer_state): Removed variable.
10070         (grub_script_lexer_done): Likewise.
10071         (grub_script_lexer_getline): Likewise.
10072         (grub_script_lexer_refs): Likewise.
10073         (script): Likewise.
10074         (newscript): Likewise.
10075         (record): Likewise.
10076         (recording): Likewise.
10077         (recordpos): Likewise.
10078         (recordlen): Likewise.
10079         (grub_script_lexer_init): Return the state instead of setting
10080         global variables.
10081         (grub_script_lexer_ref): Use the newly added argument for state
10082         instead of globals.
10083         (grub_script_lexer_deref): Likewise.
10084         (grub_script_lexer_record_start): Likewise.
10085         (grub_script_lexer_record_stop): Likewise.
10086         (recordchar): Likewise.
10087         (nextchar): Likewise.
10088         (grub_script_yylex2): Likewise.
10089         (grub_script_yylex): Likewise.
10090         (grub_script_yyerror): Likewise.
10092         * normal/parser.y (func_mem): Removed variable.
10093         (menu_entry): Likewise.
10094         (err): Likewise.
10095         (%lex-param): New parser option.
10096         (%parse-param): Likewise.
10097         (script): Always return the AST.
10098         (argument): Pass the state around.
10099         (arguments): Likewise.
10100         (grubcmd): Likewise.
10101         (commands): Likewise.
10102         (function): Likewise.
10103         (menuentry): Likewise.
10104         (if_statement): Likewise.
10105         (if): Likewise.
10107         * normal/script.c (grub_script_memused): Removed variable.
10108         (grub_script_parsed): Likewise.
10109         (grub_script_malloc): Added a state argument.  Use that instead of
10110         global variables.
10111         (grub_script_mem_record): Likewise.
10112         (grub_script_mem_record_stop): Likewise.
10113         (grub_script_arg_add): Likewise.
10114         (grub_script_add_arglist): Likewise.
10115         (grub_script_create_cmdline): Likewise.
10116         (grub_script_create_cmdif): Likewise.
10117         (grub_script_create_cmdmenu): Likewise.
10118         (grub_script_add_cmd): Likewise.
10119         (grub_script_parse): Setup the state before calling the parser.
10121 2006-04-16  Marco Gerards  <marco@gnu.org>
10123         * normal/command.c (grub_command_init): Remove the title command.
10125         * normal/lexer.c (grub_script_yylex): Renamed from this...
10126         (grub_script_yylex2): ... to this.
10127         (grub_script_yylex): New function.  Temporary
10128         introduced to filter some tokens.
10129         (grub_script_yyerror): Print a newline.
10131         * normal/main.c (read_config_file): Output information about the
10132         lines that contain errors.  Wait for a key after all lines have
10133         been processed.  Don't return an empty menu.
10135         * normal/parser.y (func_mem): Don't initialize.
10136         (menu_entry): Likewise.
10137         (err): New variable.
10138         (script): Don't return anything when an error was encountered.
10139         (ws, returns): Removed rules.
10140         (argument): Disabled concatenated variable support.
10141         (arguments): Remove explicit separators.
10142         (grubcmd): Likewise.
10143         (function): Likewise.
10144         (menuentry): Likewise.
10145         (if): Likewise.
10146         (commands): Likewise.  Add error handling.
10148         * normal/script.c (grub_script_create_cmdline): If
10149         `grub_script_parsed' is 0, assume the parser encountered an error.
10151 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
10153         * configure.ac: Add support for EFI. Fix the typo
10154         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
10156 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
10158         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
10159         foreign multibyte characters should be shown correctly.
10161 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
10163         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
10164         calculation.
10165         (read_config_file): Made it to close file before returning.
10167 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
10169         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
10170         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
10171         video/i386/pc/vbefill.c.
10173         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
10174         video/i386/pc/vbefill.c.
10176         * include/grub/video.h (grub_video_blit_format): New enum.
10177         (grub_video_mode_info): Added new member blit_format.
10178         (grub_video_get_blit_format): New function prototype.
10180         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
10181         function prototype.
10182         (grub_video_vbe_map_rgb): Likewise.
10183         (grub_video_vbe_unmap_color): Likewise.
10185         * include/grub/i386/pc/vbeblit.h: New file.
10187         * include/grub/i386/pc/vbefill.h: New file.
10189         * video/video.c (grub_video_get_blit_format): New function.
10190         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
10191         (grub_video_vbe_map_rgb): Likewise.
10192         (grub_video_vbe_unmap_color): Likewise.
10194         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
10195         optimized fills.
10196         (grub_video_vbe_blit_render_target): Changed to use more optimized
10197         blits.
10198         (grub_video_vbe_setup): Added detection for optimized settings.
10199         (grub_video_vbe_create_render_target): Likewise.
10201         * video/i386/pc/vbeblit.c: New file.
10203         * video/i386/pc/vbefill.c: New file.
10205 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
10207         * font/manager.c (grub_font_get_glyph): Removed font fixup from
10208         here...
10210         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
10211         parsing to support both hex and dec ranges.  If filename was missing
10212         show usage information.
10214 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
10216         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
10217         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
10219         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
10220         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
10221         (video_mod_SOURCES): Added.
10222         (video_mod_CFLAGS): Likewise.
10223         (video_mod_LDFLAGS): Likewise.
10224         (gfxterm_mod_SOURCES): Likewise.
10225         (gfxterm_mod_CFLAGS): Likewise.
10226         (gfxterm_mod_LDFLAGS): Likewise.
10227         (videotest_mod_SOURCES): Likewise.
10228         (videotest_mod_CFLAGS): Likewise.
10229         (videotest_mod_LDFLAGS): Likewise.
10230         (vesafb_mod_SOURCES): Removed.
10231         (vesafb_mod_CFLAGS): Likewise.
10232         (vesafb_mod_LDFLAGS): Likewise.
10233         (vga_mod_SOURCES): Likewise.
10234         (vga_mod_CFLAGS): Likewise.
10235         (vga_mod_LDFLAGS): Likewise.
10237         * commands/videotest.c: New file.
10239         * font/manager.c (fill_with_default_glyph): Modified to use
10240         grub_font_glyph.
10241         (grub_font_get_glyph): Likewise.
10242         (fontmanager): Renamed from this...
10243         (font_manager): ... to this.
10245         * include/grub/font.h (grub_font_glyph): Added new structure.
10246         (grub_font_get_glyph): Modified to use grub_font_glyph.
10248         * include/grub/misc.h (grub_abs): Added as inline function.
10250         * include/grub/video.h: New file.
10252         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
10253         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
10254         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
10255         (grub_vbe_get_controller_info): Renamed from this...
10256         (grub_vbe_bios_get_controller_info): ... to this.
10257         (grub_vbe_get_mode_info): Renamed from this...
10258         (grub_vbe_bios_get_mode_info): ... to this.
10259         (grub_vbe_set_mode): Renamed from this...
10260         (grub_vbe_bios_set_mode): ... to this.
10261         (grub_vbe_get_mode): Renamed from this...
10262         (grub_vbe_bios_get_mode): ... to this.
10263         (grub_vbe_set_memory_window): Renamed from this...
10264         (grub_vbe_bios_set_memory_window): ... to this.
10265         (grub_vbe_get_memory_window): Renamed from this...
10266         (grub_vbe_bios_get_memory_window): ... to this.
10267         (grub_vbe_set_scanline_length): Renamed from this...
10268         (grub_vbe_set_scanline_length): ... to this.
10269         (grub_vbe_get_scanline_length): Renamed from this...
10270         (grub_vbe_bios_get_scanline_length): ... to this.
10271         (grub_vbe_set_display_start): Renamed from this...
10272         (grub_vbe_bios_set_display_start): ... to this.
10273         (grub_vbe_get_display_start): Renamed from this...
10274         (grub_vbe_bios_get_display_start): ... to this.
10275         (grub_vbe_set_palette_data): Renamed from this...
10276         (grub_vbe_bios_set_palette_data): ... to this.
10277         (grub_vbe_set_pixel_rgb): Removed.
10278         (grub_vbe_set_pixel_index): Likewise.
10280         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
10281         from this...
10282         (grub_vbe_bios_get_controller_info): ... to this.
10283         (grub_vbe_get_mode_info): Renamed from this...
10284         (grub_vbe_bios_get_mode_info): ... to this.
10285         (grub_vbe_set_mode): Renamed from this...
10286         (grub_vbe_bios_set_mode): ... to this.
10287         (grub_vbe_get_mode): Renamed from this...
10288         (grub_vbe_bios_get_mode): ... to this.
10289         (grub_vbe_set_memory_window): Renamed from this...
10290         (grub_vbe_bios_set_memory_window): ... to this.
10291         (grub_vbe_get_memory_window): Renamed from this...
10292         (grub_vbe_bios_get_memory_window): ... to this.
10293         (grub_vbe_set_scanline_length): Renamed from this...
10294         (grub_vbe_set_scanline_length): ... to this.
10295         (grub_vbe_get_scanline_length): Renamed from this...
10296         (grub_vbe_bios_get_scanline_length): ... to this.
10297         (grub_vbe_set_display_start): Renamed from this...
10298         (grub_vbe_bios_set_display_start): ... to this.
10299         (grub_vbe_get_display_start): Renamed from this...
10300         (grub_vbe_bios_get_display_start): ... to this.
10301         (grub_vbe_set_palette_data): Renamed from this...
10302         (grub_vbe_bios_set_palette_data): ... to this.
10303         (grub_vbe_bios_get_controller_info): Fixed problem with registers
10304         getting corrupted after calling it.  Added more pushes and pops.
10305         (grub_vbe_bios_set_mode): Likewise.
10306         (grub_vbe_bios_get_mode): Likewise.
10307         (grub_vbe_bios_get_memory_window): Likewise.
10308         (grub_vbe_bios_set_scanline_length): Likewise.
10309         (grub_vbe_bios_get_scanline_length): Likewise.
10310         (grub_vbe_bios_get_display_start): Likewise.
10311         (grub_vbe_bios_set_palette_data): Likewise.
10313         * normal/cmdline.c (cl_set_pos): Refresh the screen.
10314         (cl_insert): Likewise.
10315         (cl_delete): Likewise.
10317         * term/gfxterm.c: New file.
10319         * term/i386/pc/vesafb.c: Removed file.
10321         * video/video.c: New file.
10323         * video/i386/pc/vbe.c (real2pm): Added new function.
10324         (grub_video_vbe_draw_pixel): Likewise.
10325         (grub_video_vbe_get_video_ptr): Likewise.
10326         (grub_video_vbe_get_pixel): Likewise
10327         (grub_video_vbe_init): Likewise.
10328         (grub_video_vbe_fini): Likewise.
10329         (grub_video_vbe_setup): Likewise.
10330         (grub_video_vbe_get_info): Likewise.
10331         (grub_video_vbe_set_palette): Likewise.
10332         (grub_video_vbe_get_palette): Likewise.
10333         (grub_video_vbe_set_viewport): Likewise.
10334         (grub_video_vbe_get_viewport): Likewise.
10335         (grub_video_vbe_map_color): Likewise.
10336         (grub_video_vbe_map_rgb): Likewise.
10337         (grub_video_vbe_map_rgba): Likewise.
10338         (grub_video_vbe_unmap_color): Likewise.
10339         (grub_video_vbe_fill_rect): Likewise.
10340         (grub_video_vbe_blit_glyph): Likewise.
10341         (grub_video_vbe_blit_bitmap): Likewise.
10342         (grub_video_vbe_blit_render_target): Likewise.
10343         (grub_video_vbe_scroll): Likewise.
10344         (grub_video_vbe_swap_buffers): Likewise.
10345         (grub_video_vbe_create_render_target): Likewise.
10346         (grub_video_vbe_delete_render_target): Likewise.
10347         (grub_video_vbe_set_active_render_target): Likewise.
10348         (grub_vbe_set_pixel_rgb): Remove function.
10349         (grub_vbe_set_pixel_index): Likewise.
10350         (index_color_mode): Remove static variable.
10351         (active_mode): Likewise.
10352         (framebuffer): Likewise.
10353         (bytes_per_scan_line): Likewise.
10354         (grub_video_vbe_adapter): Added new static variable.
10355         (framebuffer): Likewise.
10356         (render_target): Likewise.
10357         (initial_mode): Likewise.
10358         (mode_in_use): Likewise.
10359         (mode_list): Likewise.
10361 2006-03-10  Marco Gerards  <marco@gnu.org>
10363         * configure.ac (AC_INIT): Bumped to 1.93.
10365         * DISTLIST: Added `include/grub/hfs.h'.
10367 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
10369         * boot/i386/pc/boot.S (general_error): Before looping, try INT
10370         18H, which might help the BIOS falling back to next boot media.
10372 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
10374         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
10375         Poe Chen <poe.poechen@gmail.com>.
10377 2006-01-17  Marco Gerards  <marco@gnu.org>
10379         * include/grub/normal.h: Include <grub/script.h>.
10380         (grub_command_list): Removed struct.
10381         (grub_command_list_t): Removed type.
10382         (grub_menu_entry): Remove members `num' and `command_list'.  Add
10383         members `commands' and `sourcecode'.
10384         * include/grub/script.h: Add inclusion guards.
10385         (grub_script_cmd_menuentry): New struct.
10386         (grub_script_execute_menuentry): New prototype.
10387         (grub_script_lexer_record_start): Likewise.
10388         (grub_script_lexer_record_stop): Likewise.
10389         * normal/execute.c (grub_script_execute_menuentry): New function.
10390         * normal/lexer.c (record, recording, recordpos, recordlen): New
10391         variables.
10392         (grub_script_lexer_record_start): New function.
10393         (grub_script_lexer_record_stop): Likewise.
10394         (recordchar): Likewise.
10395         (nextchar): Likewise.
10396         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
10397         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
10398         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
10399         (current_menu): New variable.
10400         (free_menu): Mainly rewritten.
10401         (grub_normal_menu_addentry): New function.
10402         (read_config_file): Rewritten.
10403         * normal/menu.c (run_menu_entry): Mainly rewritten.
10404         * normal/menu_entry.c (make_screen): Rewritten the code to insert
10405         the menu entry.
10406         (run): Mainly rewritten.
10407         * normal/parser.y (menu_entry): New variable.
10408         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
10409         (menuentry): New rule.
10410         (command): Add `menuentry'.
10411         (if_statement): Allow additional returns before `fi'.
10412         * normal/script.c (grub_script_create_cmdmenu): New function.
10414 2006-01-03  Marco Gerards  <marco@gnu.org>
10416         * INSTALL: GNU Bison is required.
10417         * configure.ac: Rewritten the test to detect Bison.
10418         * Makefile.in (YACC): New variable.  Reported by Xun Sun
10419         <xun.sun.cn@gmail.com>.
10421 2006-01-03  Marco Gerards  <marco@gnu.org>
10423         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
10424         the HFS+ filesystem to filesystem blocks.
10425         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
10426         GCC warning is silenced.
10428 2006-01-03  Marco Gerards  <marco@gnu.org>
10430         * partmap/apple.c (apple_partition_map_iterate): Convert the data
10431         read from disk from big endian to host byte order.
10433 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
10435         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
10436         documentation.
10437         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
10438         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
10439         embedded HFS+ filesystem.
10440         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
10441         (grub_hfs_sblock): Move from here...
10442         * include/grub/hfs.h: To here...  New file.
10443         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
10444         documentation.
10445         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
10446         New macros.
10447         (grub_hfsplus_volheader): Change type of member `magic' to
10448         `grub_uint16_t'.
10449         (grub_hfsplus_data): Add new member `embedded_offset'.
10450         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
10451         returned block.
10452         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
10453         Calculate the offset.
10455 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
10457         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
10458         Removed.
10459         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
10461 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
10463         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
10464         ENV->NAME is NULL after allocating ENV->VALUE.
10466 2005-12-25  Marco Gerards  <marco@gnu.org>
10468         * kern/env.c (grub_env_set): Rewritten the error handling code.
10470 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
10472         * geninit.sh: Made more robust, and more portable.
10474 2005-12-25  Marco Gerards  <marco@gnu.org>
10476         Add support for Apple HFS+ filesystems.
10478         * fs/hfsplus.c: New file.
10480         * DISTLIST: Added `fs/hfsplus.c'.
10482         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
10483         (hfsplus_mod_SOURCES): New variable.
10484         (hfsplus_mod_CFLAGS): Likewise.
10485         (hfsplus_mod_LDFLAGS): Likewise.
10486         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
10487         (grub_setup_SOURCES): Likewise.
10488         (grub_mkdevicemap_SOURCES): Likewise.
10489         (grub_emu_SOURCES): Likewise.
10490         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10492         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
10494         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
10496 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
10498         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
10499         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
10500         include/grub/parser.h, include/grub/script.h, kern/parser.c,
10501         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
10502         normal/lexer.c, normal/parser.y, normal/script.c, and
10503         partmap/gpt.c.
10504         Removed kern/sparc64/cache.c.
10506         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
10507         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
10508         grub_emu_init.c.
10510         * configure.ac (AC_INIT): Bumped to 1.92.
10512 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
10514         * kern/err.c (grub_error_push): Added new function to support error
10515         stacks.
10516         (grub_error_pop): Likewise.
10517         (grub_error_stack_items): New local variable to support error stacks.
10518         (grub_error_stack_pos): Likewise.
10519         (grub_error_stack_assert): Likewise.
10520         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
10521         stack depth.
10522         (grub_print_error): Added support to print errors from error stack.
10524         * include/grub/err.h (grub_error_push): Added function prototype.
10525         (grub_error_pop): Likewise.
10527 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
10529         * configure.ac: Accept `powerpc64' as host_cpu.
10530         (amd64): Rename to `biarch32'.
10532         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
10533         non-cacheline-aligned addresses.
10535         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
10536         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
10537         if `size' is non-zero.
10539 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
10541         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
10542         and `cd' to make sure the filename is not prefixed with a
10543         directory name.
10544         (pkgdata_MODULES): Add `gpt.mod'.
10545         (gpt_mod_SOURCES): New variable.
10546         (gpt_mod_CFLAGS): Likewise.
10547         (gpt_mod_LDFLAGS): Likewise.
10549         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
10551         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
10552         New macro.
10554         * partmap/gpt.c: New file.
10556         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
10557         GPT partition map is detected.
10559 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
10561         * commands/i386/pc/play.c: New file.
10562         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
10563         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
10564         macros.
10566 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
10568         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
10569         ((unused))' to silence gcc warning.
10571 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
10573         * configure.ac: Correct `AC_PROG_YACC' test.
10575 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
10577         * util/powerpc/ieee1275/grub-install.in: Run the mount point
10578         check before installing files.
10580 2005-11-22  Mike Small  <smallm@panix.com>
10582         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
10583         number regex so multidigit numbers are recognized correctly.
10585 2005-11-22  Mike Small  <smallm@panix.com>
10587         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
10588         debugging message before attempting to claim memory.
10589         (grub_rescue_cmd_initrd): Add a claim debugging message and try
10590         multiple addresses in case of failure.
10592 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
10594         * term/tparm.c (get_space): Remove empty `if' statement.
10596         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
10598         * kern/parser.c (check_varstate): Rename `state' to 's'.
10600 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
10602         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
10603         variable definitions to the beginning of each function.  Sort stack
10604         variables by size.
10605         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
10606         `buf' argument to `char *'.
10608 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
10610         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
10611         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10612         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10613         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10614         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10615         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10616         configfile.mod, search.mod, gzio.mod and test.mod.
10617         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10618         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10619         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10620         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10621         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10622         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10623         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10624         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10625         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10626         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10627         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10628         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10629         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10630         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10631         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10632         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10633         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10634         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10635         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10636         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10637         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10638         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10639         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
10641         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
10642         `grep --include'.
10643         (pkgdata_MODULES): Add test.mod.
10645 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
10647         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
10648         appending to variables with "+=".
10649         (PModule): Use full pathname to generate *.lst filenames.
10651         * Makefile.in: Fixed list rules moved from genmk.rb.
10652         (.DELETE_ON_ERROR): New special target.
10653         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
10655         * conf/i386-pc.rmk: Include conf/common.mk.
10656         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
10657         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
10658         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10659         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10660         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10661         configfile.mod, search.mod, gzio.mod and test.mod.
10662         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10663         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10664         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10665         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10666         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10667         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10668         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10669         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10670         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10671         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10672         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10673         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10674         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10675         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10676         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10677         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10678         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10679         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10680         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10681         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10682         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10683         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10684         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
10685         here...
10686         * conf/common.rmk: ... to here.  New file.
10688         * conf/common.mk: New file.
10690 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
10692         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
10693         (grub_script.tab.c): ... here.
10695         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
10696         (grub_script.tab.c): ... here.
10698         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
10699         (grub_script.tab.c): ... here.
10701         * normal/command.c (grub_command_find): Fixed a memory leak of
10702         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
10704 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
10706         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
10707         "@" which marks the start of a comment on ARM.
10708         (VARIABLE): Likewise.
10710 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
10712         Add support for Linux/ADFS partition tables.
10714         * partmap/acorn.c: New file.
10716         * include/grub/acorn_filecore.h: Likewise.
10718         * DISTLIST: Added `partmap/acorn.c' and
10719         `include/grub/acorn_filecore.h'.
10721         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10722         `partmap/acorn.c'.
10723         (pkgdata_MODULES): Add `acorn.mod'.
10724         (acorn_mod_SOURCES): New variable.
10725         (acorn_mod_CFLAGS): Likewise.
10727         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10728         `partmap/acorn.c'.
10729         (pkgdata_MODULES): Add `acorn.mod'.
10730         (acorn_mod_SOURCES): New variable.
10731         (acorn_mod_CFLAGS): Likewise.
10733         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
10734         (pkgdata_MODULES): Add `acorn.mod'.
10735         (acorn_mod_SOURCES): New variable.
10736         (acorn_mod_CFLAGS): Likewise.
10737         (acorn_mod_LDFLAGS): Likewise.
10739         * include/types.h (grub_disk_addr_t): New typedef.
10741 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
10743         * geninit.sh: New file.
10745         * geninitheader.sh: Likewise.
10747         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
10748         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
10749         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
10750         * commands/configfile.c (grub_configfile_init)
10751         (grub_configfile_fini): Likewise.
10752         * commands/default.c (grub_default_init, grub_default_fini):
10753         Likewise.
10754         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
10755         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
10756         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
10757         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
10758         Likewise.
10759         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
10760         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
10761         Likewise.
10762         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
10763         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
10764         Likewise.
10765         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
10766         Likewise.
10767         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
10768         Likewise.
10769         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
10770         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
10771         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
10772         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
10773         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
10774         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
10775         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
10776         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
10777         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
10778         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
10779         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
10780         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
10781         * partmap/amiga.c (grub_amiga_partition_map_init)
10782         (grub_amiga_partition_map_fini): Likewise.
10783         * partmap/apple.c (grub_apple_partition_map_init)
10784         (grub_apple_partition_map_fini): Likewise.
10785         * partmap/pc.c (grub_pc_partition_map_init)
10786         (grub_pc_partition_map_fini): Likewise.
10787         * partmap/sun.c (grub_sun_partition_map_init,
10788         grub_sun_partition_map_fini): Likewise.
10789         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
10790         Likewise.
10792         * util/grub-emu.c: Include <grub_modules_init.h>.
10793         (main): Don't initialize and de-initialize any modules directly,
10794         use `grub_init_all' and `grub_fini_all' instead.
10796         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
10797         `grub_vesafb_mod_init'.
10798         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
10799         all users.
10800         * term/i386/pc/vga.c (grub_vga_init): Renamed to
10801         `grub_vga_mod_init'.  Updated all users.
10802         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
10804         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
10805         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
10806         rules.
10808         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
10809         Generate a function to initialize the module in utilities.
10810         Updated all callers.
10811         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
10812         initialize the module in utilities.  Updated all callers.
10814 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
10816         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
10817         escape sequence and a literal ^L to clear the screen.
10819         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
10820         when returning from Open Firmware.
10822 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
10824         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
10825         (grub_ofconsole_height): Likewise.
10826         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
10827         manually insert a '\n'.
10828         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
10829         `grub_ofconsole_height'.  Return early if these are already set.
10831 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
10833         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10834         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
10835         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
10836         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
10837         and `normal/script.c'.
10838         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10839         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10840         (test_mod_SOURCES): New variable.
10841         (test_mod_CFLAGS): Likewise.
10842         (test_mod_LDFLAGS): Likewise.
10843         (pkgdata_MODULES): Add `test.mod'.
10844         (grub_script.tab.c): New rule.
10845         (grub_script.tab.h): Likewise.
10847 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
10849         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10850         `commands/test.c', `normal/execute.c', `normal/lexer.c',
10851         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10852         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10853         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10854         (test_mod_SOURCES): New variable.
10855         (test_mod_CFLAGS): Likewise.
10856         (pkgdata_MODULES): Add `test.mod'.
10857         (grub_script.tab.c): New rule.
10858         (grub_script.tab.h): Likewise.
10860 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
10862         Add initial scripting support.
10864         * commands/test.c: New file.
10865         * include/grub/script.h: Likewise.
10866         * normal/execute.c: Likewise.
10867         * normal/function.c: Likewise.
10868         * normal/lexer.c: Likewise.
10869         * normal/parser.y: Likewise.
10870         * normal/script.c: Likewise.
10872         * configure.ac: Add `AC_PROG_YACC' test.
10874         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
10875         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
10876         `normal/function.c' and `normal/script.c'.
10877         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10878         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10879         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
10880         variables.
10881         (pkgdata_MODULES): Add `test.mod'.
10882         (grub_script.tab.c): New rule.
10883         (grub_script.tab.h): Likewise.
10885         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
10887         * include/grub/normal.h (grub_test_init): New prototype.
10888         (grub_test_fini): Likewise.
10890         * normal/command.c: Include <grub/script.h>.
10891         (grub_command_execute): Rewritten.
10893         * util/grub-emu.c (main): Call `grub_test_init' and
10894         `grub_test_fini'.
10896 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10898         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
10899         to 0.
10900         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
10901         there are no pending characters.
10903 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10905         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
10906         `grub_strndup' to drop device arguments. Replace unnecessary
10907         `grub_strndup' with `grub_strdup'.
10909 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10911         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
10912         `debug' environment variable has been set.
10914 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
10916         * Makefile.in (install-local): Use $(DATA).
10917         (uninstall): Likewise.
10918         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
10919         (sbin_UTILITIES): ... to here.
10920         (sbin_SCRIPTS): New variable.
10921         (grub_install_SOURCES): New variable.
10922         * util/powerpc/ieee1275/grub-install.in: New file.
10923         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
10924         variable.
10925         (add_segments): Call `grub_util_get_path'.
10927 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
10929         From Timothy Baldwin:
10930         * commands/ls.c (grub_ls_list_files): Close FILE with
10931         grub_file_close.
10932         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
10934 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
10936         * include/grub/parser.h: New file.
10938         * kern/parser.c: Likewise.
10940         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
10941         (grub_setup_SOURCES): Likewise.
10942         (grub_probefs_SOURCES): Likewise.
10943         (grub_emu_SOURCES): Likewise.
10944         (kernel_img_HEADERS): Add `parser.h'.
10946         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10947         (grub_emu_SOURCES): Add `kern/parser.c'.
10948         (grubof_SOURCES): Likewise.
10950         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10951         (grubof_SOURCES): Add `kern/parser.c'.
10953         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
10955         * kern/misc.c (grub_split_cmdline): Removed function.
10957         * kern/rescue.c: Include <grub/parser.h>.
10958         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
10959         of `grub_split_cmdline'.
10961         * normal/command.c: Include <grub/parser.h>.
10962         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
10963         of `grub_split_cmdline'.
10965         * normal/completion.c: Include <grub/parser.h>.
10966         (cmdline_state): New variable.
10967         (iterate_dir): End the filename with a quote depending on the
10968         command line state.
10969         (get_state): new function.
10970         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
10971         split the arguments and determine the current argument.  When the
10972         argument string is not quoted, escape all spaces.
10974 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
10976         * normal/sparc64/setjmp.S: New file.
10978 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
10980         * include/grub/sparc64/libgcc.h: New file.
10981         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
10982         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
10983         normal/sparc64/setjmp.c.
10985 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
10987         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
10988         * kern/sparc64/cache.S: New file.
10989         * kern/sparc64/cache.c: Removed.
10990         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
10991         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
10992         -mtune=ultrasparc.
10993         (COMMON_LDFLAGS): Add -melf64_sparc.
10994         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
10995         (grubof_SOURCES): Use cache.S instead of cache.c.
10996         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
10997         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
10998         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
10999         commented though.
11000         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
11001         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
11002         (linux_mod_CFLAGS): Commented out.
11003         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
11004         out because module isn't built.
11005         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
11006         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
11007         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
11008         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
11009         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
11010         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11011         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11012         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
11013         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
11014         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
11015         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11016         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11017         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
11018         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
11020 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
11022         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
11023         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
11024         longer, because HFS should not be used on PC.
11026 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
11028         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
11029         consistently within the loop.
11031 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
11033         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
11034         directory can not be read.
11036 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11038         * configure.ac (AC_INIT): Increase the version number to 1.91.
11040         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
11041         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
11042         term/i386/pc/serial.c.
11044 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11046         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
11047         file size must be permitted.
11049         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
11050         between %ah and %al.
11052 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11054         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
11055         grub_uint64_t.
11056         Call the hook with a NUL-terminated filename.
11057         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
11058         grub_cpu_to_be32.
11060         * kern/term.c (cursor_state): New variable.
11061         (grub_term_set_current): Reset the cursor state on a new
11062         terminal.
11063         (grub_setcursor): Rewritten to use CURSOR_STATE.
11064         (grub_getcursor): New function.
11066         * include/grub/term.h (grub_getcursor): New prototype.
11068         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
11069         integers on ARM. Reported by Timothy Baldwin
11070         <T.E.Baldwin99@members.leeds.ac.uk>.
11072 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
11074         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
11075         allocated.
11076         (grub_sfs_dir): Likewise.
11078 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
11080         Add support for the SFS filesystem.
11082         * fs/sfs.c: New file.
11084         * DISTLIST: Added `fs/sfs.c'.
11086         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
11087         (grub_probefs_SOURCES): Likewise.
11088         (grub_emu_SOURCES): Likewise.
11089         (pkgdata_MODULES): Add `sfs.mod'.
11090         (sfs_mod_SOURCES): New variable.
11091         (sfs_mod_CFLAGS): Likewise.
11092         (sfs_mod_LDFLAGS): Likewise.
11094         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
11095         (pkgdata_MODULES): Add `sfs.mod'.
11096         (sfs_mod_SOURCES): New variable.
11097         (sfs_mod_CFLAGS): Likewise.
11099         * util/grub-emu.c (main): Call `grub_sfs_init' and
11100         `grub_sfs_fini'.
11102         * include/grub/fs.h (grub_sfs_init): New prototype.
11103         (grub_sfs_fini): Likewise.
11105 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
11107         Add support for the AFFS filesystem.
11109         * fs/affs.c: New file.
11111         * DISTLIST: Added `fs/affs.c'.
11113         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
11114         (grub_probefs_SOURCES): Likewise.
11115         (grub_emu_SOURCES): Likewise.
11116         (pkgdata_MODULES): Add `affs.mod'.
11117         (affs_mod_SOURCES): New variable.
11118         (affs_mod_CFLAGS): Likewise.
11119         (affs_mod_LDFLAGS): Likewise.
11121         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
11122         (pkgdata_MODULES): Add `affs.mod'.
11123         (affs_mod_SOURCES): New variable.
11124         (affs_mod_CFLAGS): Likewise.
11126         * util/grub-emu.c (main): Call `grub_affs_init' and
11127         `grub_affs_fini'.
11129         * include/grub/fs.h (grub_affs_init): New prototype.
11130         (grub_affs_fini): Likewise.
11132 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
11134         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
11136 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
11138         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
11139         `-m32' to CFLAGS.
11141         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
11142         linking.
11144         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
11145         (COMMON_LDFLAGS): New variable.
11146         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
11147         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
11148         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
11149         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
11150         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
11151         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
11152         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
11153         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
11154         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
11155         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
11156         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11157         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11158         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
11159         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
11160         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
11161         variables.
11162         (normal_mod_ASFLAGS): Add `-m32'.
11164         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
11165         (grub_host_size_t, grub_host_ssize_t): New types.
11166         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
11167         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
11168         `GRUB_HOST_SIZEOF_VOID_P'.
11170         * include/grub/kernel.h (struct grub_module_header): Type of
11171         member offset changed to `grub_host_off_t'.  Type of member size
11172         changed to `grub_host_size_t'.
11173         (struct grub_module_info): Type of member offset changed to
11174         `grub_host_off_t'.  Type of member size changed to
11175         `grub_host_size_t'.
11177 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
11179         Make GRUB's kernel compliant to Multiboot Specification.
11181         * kern/i386/pc/startup.S (multiboot_header): New label.
11182         (multiboot_entry): Likewise.
11183         (multiboot_trampoline): Likewise.
11185         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11186         Increased to 0x4A0.
11188         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
11189         put parentheses after a question mark.
11190         [!GRUB_UTIL] (my_mod): New variable.
11192         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
11194 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
11196         Adds support for the XFS filesystem.  Btrees are not supported
11197         yet.
11199         * fs/xfs.c: New file.
11201         * DISTLIST: Added `fs/xfs.c'.
11203         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
11204         (grub_probefs_SOURCES): Likewise.
11205         (grub_emu_SOURCES): Likewise.
11206         (pkgdata_MODULES): Add `xfs.mod'.
11207         (xfs_mod_SOURCES): New variable.
11208         (xfs_mod_CFLAGS): Likewise.
11210         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
11211         (pkgdata_MODULES): Add `xfs.mod'.
11212         (xfs_mod_SOURCES): New variable.
11213         (xfs_mod_CFLAGS): Likewise.
11215         * util/grub-emu.c (main): Call `grub_xfs_init' and
11216         `grub_xfs_fini'.
11218         * include/grub/fs.h (grub_xfs_init): New prototype.
11219         (grub_xfs_fini): Likewise.
11222 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
11224         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
11225         color modes, allow greater than 16 colors to be configured as
11226         a default palette.
11228 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
11230         * normal/completion.c (complete_arguments): Add the qualifier
11231         const into OPTIONS.
11233         From Omniflux <omniflux+lists@omniflux.com>:
11234         * include/grub/terminfo.h: New file.
11235         * include/grub/tparm.h: Likewise.
11236         * include/grub/i386/pc/serial.h: Likewise.
11237         * term/terminfo.c: Likewise.
11238         * term/tparm.c: Likewise.
11239         * term/i386/pc/serial.c: Likewise.
11240         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
11241         serial.mod.
11242         (terminfo_mod_SOURCES): New variable.
11243         (terminfo_mod_CFLAGS): Likewise.
11244         (serial_mod_SOURCES): Likewise.
11245         (serial_mod_CFLAGS): Likewise.
11247 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
11249         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
11250         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
11251         and kern/powerpc/ieee1275/cmain.c, respectively.
11253         * boot/powerpc/ieee1275/crt0.S: Moved to ...
11254         * kern/powerpc/ieee1275/crt0.S: ... here.
11256         * boot/powerpc/ieee1275/cmain.c: Moved to ...
11257         * kern/powerpc/ieee1275/cmain.c: ... here.
11259         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
11260         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
11261         instead of boot/powerpc/ieee1275/crt0.S and
11262         boot/powerpc/ieee1275/cmain.c, respectively.
11264         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
11265         sectors. It was not used anyway.
11267 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
11269         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
11270         `unused parameter' warning.
11272 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
11274         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
11275         function.
11276         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
11277         getcharwidth.
11279 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
11281         * include/grub/normal.h (enum grub_completion_type): Added
11282         `GRUB_COMPLETION_TYPE_ARGUMENT'.
11284         * normal/cmdline.c (print_completion): Handle
11285         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
11286         * normal/menu_entry.c (store_completion): Likewise.
11288         * normal/completion.c (complete_arguments): New function.
11289         (grub_normal_do_completion): Call `complete_arguments' when the
11290         current words start with a dash.
11292 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
11294         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
11295         `gzio.mod' instead of `io.mod').
11297 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
11299         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
11300         (DISTDIRS): Added io and video.
11301         Rewrite the search routine to make an output consistently.
11303         * DISTLIST: Added conf/sparc64-ieee1275.mk,
11304         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
11305         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
11306         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
11307         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
11308         util/powerpc/ieee1275/misc.c.
11310         * include/grub/gzio.h: New file.
11311         * io/gzio.c: Likewise.
11313         * kern/file.c (grub_file_close): Call grub_device_close only if
11314         FILE->DEVICE is not NULL.
11316         * include/grub/mm.h [!NULL] (NULL): New macro.
11318         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
11320         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
11321         (pkgdata_MODULES): Added gzio.mod.
11322         (gzio_mod_SOURCES): New variable.
11323         (gzio_mod_CFLAGS): Likewise.
11325         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
11326         (pkgdata_MODULES): Added gzio.mod.
11327         (gzio_mod_SOURCES): New variable.
11328         (gzio_mod_CFLAGS): Likewise.
11330         * commands/cat.c: Include grub/gzio.h.
11331         (grub_cmd_cat): Use grub_gzfile_open instead of
11332         grub_file_open.
11334         * commands/cmp.c: Include grub/gzio.h.
11335         (grub_cmd_cmp): Use grub_gzfile_open instead of
11336         grub_file_open.
11338         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
11339         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
11340         grub_file_open.
11341         (grub_rescue_cmd_module): Likewise.
11343 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
11345         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
11346         kern/sparc64/ieee1275/init.c because it contains _start.
11347         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
11349 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
11351         * configure.ac: Add support for sparc64 host with ieee1275
11352         firmware.
11353         * configure: Generated from configure.ac.
11354         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
11355         instead of int.
11356         (grub_ofdisk_read): Likewise.
11357         (grub_ofdisk_open): Use %p to print pointer values, and cast the
11358         pointers as (void *) to remove a warning.
11359         (grub_ofdisk_close): Likewise.
11360         (grub_ofdisk_read): Likewise.
11361         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
11362         returns, so make it return void to remove a warning.
11363         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
11364         Corresponding prototype change.
11365         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
11366         values, and cast the pointers as (void *) to remove a warning.
11367         (grub_mm_dump): Likewise.
11368         * conf/sparc64-ieee1275.mk: New file.
11369         * conf/sparc64-ieee1275.rmk: Likewise.
11370         * include/grub/sparc64/setjmp.h: Likewise.
11371         * include/grub/sparc64/types.h: Likewise.
11372         * include/grub/sparc64/ieee1275/console.h: Likewise.
11373         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11374         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11375         * include/grub/sparc64/ieee1275/time.h: Likewise.
11376         * kern/sparc64/cache.c: Likewise.
11377         * kern/sparc64/dl.c: Likewise.
11378         * kern/sparc64/ieee1275/init.c: Likewise.
11379         * kern/sparc64/ieee1275/openfw.c: Likewise.
11381 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
11383         * util/console.c (grub_ncurses_putchar): If C is greater than
11384         0x7f, set C to a question mark.
11385         (grub_ncurses_getcharwidth): New function.
11386         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
11387         getcharwidth.
11389         * normal/menu.c (print_entry): Made aware of Unicode. First,
11390         convert TITLE to UCS-4, and predict the cursor position by
11391         grub_getcharwidth.
11393         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
11394         const to SRC.
11395         * kern/misc.c (grub_utf16_to_utf8): Likewise.
11397 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
11399         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
11400         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11401         grub_strcat.
11403         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
11404         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11405         grub_strcpy and grub_strlen. Take it into account that a space
11406         character is inserted as a delimiter.
11408 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
11410         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
11411         invalid magic in the error.
11413         * commands/search.c: New file.
11415         * util/grub-emu.c (main): Call grub_search_init and
11416         grub_search_fini.
11418         * kern/rescue.c (grub_rescue_print_disks): Removed.
11419         (grub_rescue_print_devices): New function.
11420         (grub_rescue_cmd_ls): Use grub_device_iterate with
11421         grub_rescue_print_devices instead of grub_disk_dev_iterate with
11422         grub_rescue_print_disks.
11424         * kern/partition.c (grub_partition_iterate): Return the result of
11425         PARTMAP->ITERATE instead of GRUB_ERRNO.
11427         * kern/device.c: Include grub/partition.h.
11428         (grub_device_iterate): New function.
11430         * include/grub/partition.h (grub_partition_iterate): Return int
11431         instead of grub_err_t.
11433         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
11434         prototype.
11435         [GRUB_UTIL] (grub_search_fini): Likewise.
11437         * include/grub/device.h (grub_device_iterate): New prototype.
11439         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11440         commands/search.c.
11441         (pkgdata_MODULES): Added search.mod.
11442         (search_mod_SOURCES): New variable.
11443         (search_mod_CFLAGS): Likewise.
11445         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
11446         (pkgdata_MODULES): Added search.mod.
11447         (search_mod_SOURCES): New variable.
11448         (search_mod_CFLAGS): Likewise.
11450         * commands/ls.c (grub_ls_list_disks): Renamed to ...
11451         (grub_ls_list_devices): ... this, and use grub_device_iterate.
11452         All callers changed.
11454         * DISTLIST: Added commands/search.c.
11456 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
11458         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
11459         conversion.
11460         (grub_getcharwidth): New function.
11462         * kern/misc.c (grub_utf8_to_ucs4): New function.
11464         * include/grub/term.h (struct grub_term): Added a new member
11465         "getcharwidth".
11466         (grub_getcharwidth): New prototype.
11468         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
11470         * term/i386/pc/console.c (map_char): New function. Segregated from
11471         grub_console_putchar.
11472         (grub_console_putchar): Use map_char.
11473         (grub_console_getcharwidth): New function.
11474         (grub_console_term): Specified grub_console_getcharwidth as
11475         getcharwidth.
11477         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
11478         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
11480         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
11481         GRUB_ERRNO.
11482         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
11483         on grub_strtoul completely.
11484         (write_char): Declare local variables in the beginning of the
11485         function.
11486         (grub_vesafb_getcharwidth): New function.
11487         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
11488         getcharwidth.
11490 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
11492         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
11493         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
11494         commands/i386/pc/vbetest.c.
11496         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
11497         call grub_vbe_get_controller_info again, because the returned
11498         information is volatile.
11499         (grub_vbe_set_video_mode): Mostly rewritten.
11500         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
11501         grub_vbe_status_t correctly.
11502         (grub_vbe_get_video_mode_info): Likewise.
11503         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
11504         several if statements.
11506         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
11507         * commands/i386/pc/vbeinfo.c: ... this.
11509         * commands/i386/pc/vbe_test.c: Renamed to ...
11510         * commands/i386/pc/vbetest.c: ... this.
11512         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
11513         ...
11514         (grub_cmd_vbeinfo): ... this. Save video modes before
11515         iterating. Skip a video mode, if it is not available, not enough
11516         information is given or it is monochrome. Show the memory
11517         model. Leave the interpretation of MODEVAR to grub_strtoul
11518         completely.
11519         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
11520         (GRUB_MOD_FINI): Likewise.
11522         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
11523         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
11524         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
11525         duplicated grub_env_get. Leave the interpretation of MODEVAR to
11526         grub_strtoul completely.
11527         (real2pm): Removed.
11528         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
11529         (GRUB_MOD_FINI): Likewise.
11531         * normal/misc.c: Include grub/mm.h.
11533         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
11534         vbe_list_modes with vbetest.mod and vbeinfo.mod.
11535         (vbe_list_modes_mod_SOURCES): Removed.
11536         (vbe_list_modes_mod_CFLAGS): Likewise.
11537         (vbe_test_mod_SOURCES): Likewise.
11538         (vbe_test_mod_CFLAGS): Likewise.
11539         (vbeinfo_mod_SOURCES): New variable.
11540         (vbeinfo_mod_CFLAGS): Likewise.
11541         (vbetest_mod_SOURCES): Likewise.
11542         (vbetest_mod_CFLAGS): Likewise.
11544 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
11546         * normal/misc.c: New file.
11548         * DISTLIST: Added normal/misc.c.
11550         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
11551         DISK to HOOK. Call HOOK with DISK.
11552         * partmap/apple.c (apple_partition_map_iterate): Likewise.
11553         * partmap/pc.c (pc_partition_map_iterate): Likewise.
11554         * partmap/sun.c (sun_partition_map_iterate): Likewise.
11556         * normal/menu_entry.c (struct screen): Added a new member
11557         "completion_shown".
11558         (completion_buffer): New global variable.
11559         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
11560         (store_completion): New function.
11561         (complete): Likewise.
11562         (clear_completions): Likewise.
11563         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
11564         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
11565         a tab, call complete.
11567         * normal/completion.c (disk_dev): Removed.
11568         (print_simple_completion): Likewise.
11569         (print_partition_completion): Likewise.
11570         (print_func): New global variable.
11571         (add_completion): Do not take the arguments WHAT or PRINT any
11572         longer. Added a new argument TYPE. Instead of printing directly,
11573         call PRINT_FUNC if not NULL.
11574         All callers changed.
11575         (complete_device): Use a local variable DEV instead of
11576         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
11577         (grub_normal_do_completion): Take a new argument HOOK. Do not
11578         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
11579         empty string, return NULL instead.
11580         All callers changed.
11582         * normal/cmdline.c (print_completion): New function.
11584         * kern/partition.c (grub_partition_iterate): Add an argument DISK
11585         to HOOK.
11586         All callers changed.
11588         * kern/disk.c (grub_print_partinfo): Removed.
11590         * include/grub/partition.h (struct grub_partition_map): Add a new
11591         argument DISK into HOOK of ITERATE.
11592         (grub_partition_iterate): Add a new argument DISK to HOOK.
11594         * include/grub/normal.h (enum grub_completion_type): New enum.
11595         (grub_completion_type_t): New type.
11596         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
11597         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
11598         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
11599         (GRUB_COMPLETION_TYPE_FILE): Likewise.
11600         (grub_normal_do_completion): Added a new argument HOOK.
11601         (grub_normal_print_device_info): New prototype.
11603         * include/grub/disk.h (grub_print_partinfo): Removed.
11605         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
11606         (normal_mod_SOURCES): Likewise.
11607         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11608         (normal_mod_SOURCES): Likewise.
11610         * commands/ls.c (grub_ls_list_disks): Use
11611         grub_normal_print_device_info instead of grub_print_partinfo. Free
11612         PNAME.
11613         (grub_ls_list_files): Use grub_normal_print_device_info instead of
11614         duplicating the code.
11616 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
11618         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
11619         follow GCS more precisely.
11620         * commands/i386/pc/vbe_test.c: Likewise.
11621         * include/grub/i386/pc/vbe.h: Likewise.
11622         * term/i386/pc/vesafb.c: Likewise.
11623         * video/i386/pc/vbe.c: Likewise.
11625 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
11627         * DISTLIST: Added term/i386/pc/vesafb.c
11628         DISTLIST: Added video/i386/pc/vbe.c
11629         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
11630         DISTLIST: Added commands/i386/pc/vbe_test.c.
11631         * commands/i386/pc/vbe_list_modes.c: New file.
11632         * commands/i386/pc/vbe_test.c: Likewise.
11633         * term/i386/pc/vesafb.c: Likewise.
11634         * video/i386/pc/vbe.c: Likewise.
11635         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
11636         (grub_vbe_probe) Added prototype.
11637         (grub_vbe_set_video_mode) Likewise.
11638         (grub_vbe_get_video_mode) Likewise.
11639         (grub_vbe_get_video_mode_info) Likewise.
11640         (grub_vbe_set_pixel_rgb) Likewise.
11641         (grub_vbe_set_pixel_index) Likewise.
11642         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
11643         (pkgdata_MODULES): Added vesafb.mod.
11644         (pkgdata_MODULES): Added vbe_list_modes.mod.
11645         (pkgdata_MODULES): Added vbe_test.mod.
11646         (vbe_mod_SOURCES): Added.
11647         (vbe_mod_CFLAGS): Likewise.
11648         (vesafb_mod_SOURCES): Likewise.
11649         (vesafb_mod_CFLAGS): Likewise.
11650         (vbe_list_modes_mod_SOURCES): Likewise.
11651         (vbe_list_modes_mod_CFLAGS): Likewise.
11652         (vbe_test_mod_SOURCES): Likewise.
11653         (vbe_test_mod_CFLAGS): Likewise.
11655 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
11657         * normal/command.c (grub_command_execute): If INTERACTIVE is
11658         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
11659         CMDLINE. Disable the pager if INTERACTIVE is true.
11660         All callers are changed.
11662         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
11663         before reading a config file.
11664         * normal/main.c (read_config_file): Even if a command is not
11665         found, register it if it is within an entry.
11667         * util/grub-emu.c: Include sys/types.h and unistd.h.
11668         (options): Added --hold.
11669         (struct arguments): Added a new member "hold".
11670         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
11671         missing.
11672         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
11673         cleared by a debugger, if it is not zero.
11675         * include/grub/normal.h (grub_command_execute): Add an argument
11676         INTERACTIVE.
11678 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
11680         * DISTLIST: Added include/grub/i386/pc/vbe.h.
11682 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
11684         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
11685         program with another one, because the old one didn't detect a bug
11686         in gcc-3.4. Always use regparm 2, because the new test is still
11687         not enough for gcc-4.0. Someone must investigate a simple test
11688         case which detects a bug in gcc-4.0.
11690 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
11692         * DISTLIST: Added normal/completion.c.
11694         * normal/completion.c: New file.
11696         * term/i386/pc/console.c (grub_console_getwh): New function.
11697         (grub_console_term): Assign grub_console_getwh to getwh.
11699         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
11700         function is defined in normal/completion.c as
11701         grub_normal_do_completion.
11702         (grub_cmdline_get): Use grub_normal_do_completion instead of
11703         grub_tab_complete.
11705         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
11706         returns non-zero, otherwise return 0.
11707         (grub_partition_iterate): First, probe the partition map. Then,
11708         call ITERATE only for this partition map.
11710         * kern/misc.c (grub_strncmp): Rewritten.
11712         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
11713         returns non-zero. Otherwise return 0.
11715         * include/grub/partition.h (grub_partition_map_iterate): Return
11716         int instead of void.
11718         * include/grub/normal.h (grub_normal_do_completion): New prototype.
11720         * include/grub/misc.h (grub_strncmp): Change the type of N to
11721         grub_size_t.
11723         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
11724         of void.
11726         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
11727         unsigned explicitly before comparing it with I.
11729         * kern/main.c (grub_env_write_root): Add the attribute unused into
11730         VAR.
11732         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11733         normal/completion.c.
11734         (normal_mod_SOURCES): Likewise.
11735         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11736         (normal_mod_SOURCES): Likewise.
11738         * normal/command.c (grub_iterate_commands): If ITERATE returns
11739         non-zero, return one immediately.
11741 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
11743         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
11744         * kern/i386/pc/startup.S: Updated Global Descriptor table's
11745         descriptions.
11746         (grub_vbe_get_controller_info): New function.
11747         (grub_vbe_get_mode_info): Likewise.
11748         (grub_vbe_set_mode): Likewise.
11749         (grub_vbe_get_mode): Likewise.
11750         (grub_vbe_set_memory_window): Likewise.
11751         (grub_vbe_get_memory_window): Likewise.
11752         (grub_vbe_set_scanline_length): Likewise.
11753         (grub_vbe_get_scanline_length): Likewise.
11754         (grub_vbe_set_display_start): Likewise.
11755         (grub_vbe_get_display_start): Likewise.
11756         (grub_vbe_set_palette_data): Likewise.
11757         * include/grub/i386/pc/vbe.h: New file.
11759 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
11761         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11762         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
11763         * DISTLIST: Likewise.
11764         * kern/ieee1275/of.c: Moved to ...
11765         * kern/ieee1275/ieee1275.c: ... here.
11767 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
11769         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
11770         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
11771         Pass 0 as `end' parameter to grub_strtoul().
11773 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
11775         * include/grub/powerpc/ieee1275/console.h: Do not include
11776         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
11777         ifdef.
11778         (grub_console_cur_color): Remove i386-specific prototype.
11779         (grub_console_real_putchar): Likewise.
11780         (grub_console_checkkey): Likewise.
11781         (grub_console_getkey): Likewise.
11782         (grub_console_getxy): Likewise.
11783         (grub_console_gotoxy): Likewise.
11784         (grub_console_cls): Likewise.
11785         (grub_console_setcursor): Likewise.
11786         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
11787         Include <grub/machine/console.h>.
11788         * term/ieee1275/ofconsole.c: Likewise.
11790 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
11792         * Makefile.in (LIBLZO): New variable.
11794         * configure.ac: Check for LZO version 2.
11796         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
11797         lzo/lzo1x.h instead of lzo1x.h.
11799         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
11800         of -llzo.
11802         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
11803         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
11805         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
11806         copying the data from PARTITION to P.
11808 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
11810         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
11811         negative, unload the module.
11813         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
11814         map is "pc_partition_map" but not "pc".
11815         (usage): Fix the description. The options are --boot-image and
11816         --core-image but not --boot-file or --core-file.
11817         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
11818         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
11819         DEFAULT_DIRECTORY.
11821         * util/i386/pc/grub-install.in: Do not specify --boot-file or
11822         --core-file. Specify INSTALL_DEVICE as an argument.
11824         * util/console.c: Include config.h.
11825         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
11826         [HAVE_NCURSES_H]: Include ncurses.h.
11827         [HAVE_CURSES_H]: Include curses.h.
11828         [!A_NORMAL] (A_NORMAL): Defined as zero.
11829         [!A_STANDOUT] (A_STANDOUT): Likewise.
11831         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
11832         -lncurses.
11833         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
11835         * configure.ac: Check for curses libraries and headers.
11837         * Makefile.in (LIBCURSES): New variable.
11839         * genmk.rb (Script::rule): Set the executable bits.
11841         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
11842         name of the PC partition map is "pc_partition_map" but not "pc".
11844 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
11846         * util/i386/pc/grub-install.in (grub_probefs): New variable.
11847         (modules): Likewise.
11848         (usage): Added descriptions for --modules and --grub-probefs.
11849         Handle --modules and --grub-probefs. Save the arguments in MODULES
11850         and GRUB_PROBEFS, respectively.
11851         Auto-detect a filesystem module against GRUBDIR. If the result is
11852         empty and modules are not specified explicitly, abort the
11853         installation. Add the result to MODULES.
11855         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
11856         disk/powerpc/ieee1275/ofdisk.c,
11857         include/grub/powerpc/ieee1275/init.h and
11858         term/powerpc/ieee1275/ofconsole.c.
11859         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
11860         term/ieee1275/ofconsole.c.
11862         * include/grub/powerpc/ieee1275/console.h: Resurrected.
11864         * COPYING: Upgraded to the latest version. Only the address of the
11865         FSF office has changed.
11867 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
11869         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11870         kern/ieee1275.c with kern/ieee1275/of.c.
11872         * kern/ieee1275.c: Moved to ...
11873         * kern/ieee1275/of.c: ... here.
11875 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
11877         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
11878         readability.
11880         * config.guess: Updated to the latest version from gnulib.
11881         * config.sub: Likewise.
11882         * install.sh: Likewise.
11883         * mkinstalldirs: Likewise.
11885         * include/grub/console.h: Removed. This file is arch-specific. Do
11886         not put this in include/grub.
11888         * include/grub/i386/pc/console.h: Resurrected.
11890         * util/console.c: Include grub/machine/console.h instead of
11891         grub/console.h.
11892         * util/grub-emu.c: Likewise.
11894 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
11896         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
11897         hardcoded value.
11899         From Vincent Pelletier  <subdino2004@yahoo.fr>
11900         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
11901         Redefined to use grub_getwh.
11902         (grub_term): New member named getwh.
11903         (grub_getwh): New prototype.
11904         * kern/term.c (grub_getwh): New function.
11905         * term/i386/pc/console.c (grub_console_getwh): New function.
11906         (grub_console_term): New member `getwh'.
11907         * term/i386/pc/vga.c (grub_vga_getwh): New function.
11908         (grub_vga_term): New member `getwh'.
11909         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
11910         grub_ssize_t.
11911         (grub_ofconsole_getw): New function.
11912         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
11913         (grub_ofconsole_term): New field named getwh and new initial
11914         value.
11916 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
11918         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
11919         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
11920         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
11921         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
11922         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
11923         of <grub/machine/ieee1275.h>.
11924         * commands/ieee1275/reboot.c: Likewise.
11925         * boot/powerpc/ieee1275/ieee1275.c: Move ...
11926         * kern/ieee1275.c: ... to here.  All users updated.  Change all
11927         parameter structs to use new type `grub_ieee1275_cell_t'.
11928         * term/powerpc/ieee1275/ofconsole.c: Move ...
11929         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
11930         * disk/powerpc/ieee1275/ofdisk.c: Move ...
11931         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
11932         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
11933         to return int.
11934         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
11935         Remove unused prototypes.  All users updated.
11936         * include/grub/powerpc/ieee1275/console.h: Removed.
11937         * include/grub/powerpc/ieee1275/ieee1275.h: Define
11938         `grub_ieee1275_cell_t'.
11939         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
11940         Cast comparisons with -1 to the correct type.
11941         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
11942         type to match `grub_ieee1275_entry_fn'.
11944 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
11946         * DISTLIST: Added util/i386/pc/grub-probefs.c.
11948         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
11949         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
11950         partmap/sun.c.
11951         (grub_probefs_SOURCES): New variable.
11953         * util/i386/pc/grub-probefs.c: New file.
11955         * util/i386/pc/grub-setup.c (main): Call
11956         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
11957         grub_hfs_init and grub_jfs_init to initialize the system. Call
11958         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
11959         grub_pc_partition_map_fini to finish the system.
11961 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
11963         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
11964         function.
11965         (grub_multiboot_load_elf32): Likewise.
11966         (grub_multiboot_is_elf64): Likewise.
11967         (grub_multiboot_load_elf64): Likewise.
11968         (grub_multiboot_load_elf): Likewise.
11969         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
11970         an ELF32 or ELF64 file.
11971         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
11973         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
11974         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
11975         NULL before calling FS->LABEL.
11976         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
11977         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
11978         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
11979         before calling FS->LABEL.
11981 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
11983         * util/i386/pc/grub-install.in (datadir): New variable.
11984         (libdir): Removed.
11985         (pkgdatadir): New variable.
11986         (pkglibdir): Removed.
11988 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
11990         * DISTLIST: Added util/i386/pc/grub-install.in.
11992         * util/i386/pc/grub-install.in: New file.
11994         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
11995         (grub_install_SOURCES): Likewise.
11997         * genmk.rb: Added support for scripts.
11998         (Script): New class.
11999         (scripts): New variable.
12001         * Makefile.in (install-local): Install sbin_SCRIPTS by
12002         INSTALL_SCRIPT.
12003         (uninstall): Remove sbin_SCRIPTS.
12005         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
12006         device, try to get a GRUB device by
12007         grub_util_biosdisk_get_grub_dev.
12008         Free DEST_DEV.
12010         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
12011         description for --device-map.
12013 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
12015         Change the semantics of variable hooks. They now return strings
12016         instead of error values.
12018         * util/i386/pc/grub-setup.c: Include grub/env.h.
12019         (setup): Use grub_device_set_root instead of grub_env_set.
12021         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
12022         grub_env_get instead of grub_device_set_root and
12023         grub_device_get_root, respectively.
12025         * kern/main.c (grub_env_write_root): New function.
12026         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
12027         grub_env_set instead of grub_device_set_root.
12029         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
12030         many variables.
12031         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
12032         rather than calling ENV->WRITE_HOOK afterwards.
12033         (grub_env_get): Return the result of ENV->READ_HOOK rather than
12034         passing a pointer of a pointer.
12035         (grub_register_variable_hook): Change the types of "read_hook" and
12036         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
12037         respectively.
12038         Allocate the default empty string on the heap, because this string
12039         may be freed later.
12041         * kern/device.c: Include grub/env.h.
12042         (grub_device_set_root): Removed.
12043         (grub_device_get_root): Likewise.
12044         (grub_device_open): Use grub_env_get instead of
12045         grub_device_get_root.
12047         * include/grub/env.h (grub_env_read_hook_t): New type.
12048         (grub_env_write_hook_t): Likewise.
12049         (grub_env_var): Change the types of "read_hook" and "write_hook"
12050         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
12051         (grub_register_variable_hook): Likewise.
12053         * include/grub/device.h (grub_device_set_root): Removed.
12054         (grub_device_set_root): Likewise.
12056         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
12057         make sure that DIRNAME terminates with '/', so that
12058         grub_fat_find_dir will fail if PATH is not a directory.
12060         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
12061         from DIRNAME.
12062         Use the qualifier auto for print_files and print_files_long.
12063         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
12064         as a regular file.
12065         Put a newline only if there is no error.
12066         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
12067         used.
12069 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
12071         * kern/partition.c (grub_partition_probe): Initialize PART to
12072         NULL. Otherwise, when no partition map is registered, this returns
12073         a garbage.
12075 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
12077         * partmap/apple.c (apple_partition_map_iterate): Check if POS
12078         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
12079         valid.
12081 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
12083         * commands/ls.c (grub_ls_list_disks): Print the filesystem
12084         information on each device, if it does not have partitions. Print
12085         "Device" instead of "Disk", because this function is not specific
12086         to disk devices.
12088         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
12089         static to ensure that it is put on the memory rather than a
12090         register.
12092 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
12094         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
12095         (grub_cat_init): Likewise.
12096         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
12097         (options): Likewise.
12098         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
12099         (grub_configfile_init): Likewise.
12100         * font/manager.c (GRUB_MOD_INIT): Likewise.
12101         * commands/help.c (GRUB_MOD_INIT): Likewise.
12102         (grub_help_init): Likewise.
12103         * normal/command.c (grub_command_init): Likewise.
12104         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
12105         * disk/loopback.c (grub_loop_init): Likewise.
12106         (GRUB_MOD_INIT): Likewise.
12107         * commands/ls.c (grub_ls_init): Likewise.
12108         (GRUB_MOD_INIT): Likewise.
12109         (options): Likewise.
12110         * commands/boot.c (grub_boot_init): Likewise.
12111         (GRUB_MOD_INIT): Likewise.
12112         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
12113         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
12114         (GRUB_MOD_INIT): Likewise.
12115         * commands/cmp.c (grub_cmp_init): Likewise.
12116         (GRUB_MOD_INIT): Likewise.
12118         * normal/arg.c: Use <> instead of "" to include header files.
12119         (SHORT_ARG_HELP): New macro.
12120         (SHORT_ARG_USAGE): Likewise.
12121         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
12122         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
12123         descriptions.
12124         (find_short): Check if C is 'h' or 'u' explicitly.
12125         (grub_arg_show_help): Use space characters instead of tabs. Treat
12126         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
12127         are shown with --help and --usage only if they are not used for
12128         the command itself.
12129         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
12130         'h' and 'u'.
12132         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
12133         const into "longarg". Change the type of "shortarg" to int.
12135 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
12137         * boot/i386/pc/boot.S (boot_drive_check): New label.
12139         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
12140         macro.
12142         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
12143         which do not pass a boot drive correctly. Copied from GRUB Legacy.
12145 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
12147         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
12148         When turning off Gate A20, skip the check and return immediately,
12149         because this is not fatal usually.
12151 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
12153         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
12154         be 0x7C00 instead of 0x8000.
12156         * boot/i386/pc/pxeboot.S: Rewritten.
12158         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
12159         EXT_C.
12160         (gate_a20_check_state): Read a byte from 0x108000. Invert the
12161         result.
12163 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
12165         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
12166         robustness. This routine now supports a BIOS call and System
12167         Control Port A to modify the gate A20.
12169         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12170         Increased to 0x440.
12172 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
12174         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
12175         device path and resulting ihandle.
12176         (grub_ofdisk_close): dprintf the ihandle being closed.
12177         (grub_ofdisk_read): dprintf function parameters.
12178         * kern/mm.c (grub_mm_init_region): Likewise.
12179         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
12180         (grub_linux_boot): dprintf the Linux entry point, initrd address and
12181         size, and boot arguments.
12182         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
12183         before loading into memory.
12184         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
12185         before loading into memory.
12187 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
12189         * kern/mm.c: Added much documentation.
12190         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
12191         8, set to 5 instead of 8.
12193 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
12195         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
12197         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
12198         (grub_mkdevicemap_SOURCES): New variable.
12200         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
12201         lib/device.c of GRUB Legacy.
12203 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
12205         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
12206         instead of PATH is NULL.
12208 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
12210         * commands/cmp.c (BUFFER_SIZE): New macro.
12211         (grub_cmd_cmp): Close the right file at the right time.  Compare
12212         only data just read.  Don't report files of different  size as
12213         identical.  Dynamically allocate buffers.  Move variable
12214         declarations at the beginning of function.
12216 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
12218         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
12219         reverse.
12221 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
12223         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
12224         when backspace is pressed at beginning of line.
12226 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
12228         * DISTLIST: Added genfslist.sh.
12230         * normal/main.c (fs_module_list): New variable.
12231         (autoload_fs_module): New function.
12232         (read_fs_list): Likewise.
12233         (grub_normal_execute): Call read_fs_list.
12235         * kern/fs.c (grub_fs_autoload_hook): New variable.
12236         (grub_fs_probe): Added support for auto-loading.
12238         * include/grub/normal.h (struct grub_fs_module_list): New struct.
12239         (grub_fs_module_list_t): New type.
12241         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
12242         (grub_fs_autoload_hook): New prototype.
12244         * genfslist.sh: New file.
12246         * genmk.rb: Added a rule to generate a filesystem list.
12248 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
12250         * configure.ac: Fix the test for cross-compiling.
12252         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
12253         define GRUB_UTIL anymore.
12255         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
12256         so this function works on other systems than just big endian.
12257         (load_modules): Likewise.
12258         (add_segments): Likewise.
12260 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
12262         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
12263         contains `l' modifier, get a long from va_arg().
12265 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
12267         * kern/mm.c (grub_free): If the next free block which is being
12268         merged is the first free block, set the first block to the block
12269         being freed.
12270         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
12272 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
12274         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
12275         `grub_ieee1275_chosen'.
12277 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
12279         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
12280         (grub_ieee1275_chosen): New variable.
12281         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
12282         `chosen'.
12283         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
12284         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12285         Rename first argument to `phandle' for consistency.
12286         (grub_ieee1275_get_property_length): Likewise.
12287         (grub_ieee1275_next_property): Likewise.  Change type of first argument
12288         to grub_ieee1275_phandle_t.
12289         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
12290         Move export next to declaration.
12291         (grub_ieee1275_chosen): New variable.
12292         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
12293         Correct cosmetic typo.
12294         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
12295         `grub_ieee1275_chosen'.
12296         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
12297         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
12298         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
12299         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
12300         `grub_ieee1275_chosen'.
12302 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
12304         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
12305         /chosen/bootargs.
12306         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
12307         /chosen/bootargs as "variable=value" pairs.
12309 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
12311         * include/grub/misc.h (grub_dprintf): New macro.
12312         (grub_real_dprintf): New prototype.
12313         (grub_strword): Likewise.
12314         (grub_iswordseparator): Likewise.
12315         * kern/misc.c (grub_real_dprintf): New function.
12316         (grub_strword): Likewise.
12317         (grub_iswordseparator): Likewise.
12319 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
12321         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
12322         (roundup): Remove macro.
12323         (grub_ieee1275_flags): Make static.
12324         (grub_ieee1275_realmode): Remove.
12325         (grub_ieee1275_test_flag): New function.
12326         (grub_ieee1275_set_flag): Likewise.
12327         (find_options): Rename to `grub_ieee1275_find_options'; update
12328         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
12329         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
12330         (cmain): New prototype.
12331         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
12332         `grub_ieee1275_flags' directly.
12333         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
12334         machine/biosdisk.h.
12335         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
12336         Don't include grub/machine/init.h.
12337         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
12338         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12339         Remove prototype.
12340         (grub_ieee1275_realmode): Likewise.
12341         (grub_ieee1275_flag): New enum.
12342         (grub_ieee1275_test_flag): New prototype.
12343         (grub_ieee1275_set_flag): New prototype.
12344         * include/grub/powerpc/ieee1275/init.h: Remove file.
12345         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
12346         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
12347         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
12348         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
12349         comment.
12350         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
12351         `grub_ieee1275_test_flag'.
12352         (grub_ieee1275_encode_devname): Likewise.
12354 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
12356         * include/grub/powerpc/ieee1275/ieee1275.h
12357         (grub_ieee1275_encode_devname): New prototype.
12358         (grub_ieee1275_get_filename): Likewise.
12359         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
12360         function.
12361         (grub_set_prefix): Likewise.
12362         (grub_machine_init): Call grub_set_prefix.
12363         * kern/powerpc/ieee1275/openfw.c: Fix typos.
12364         (grub_parse_type): New enum.
12365         (grub_ieee1275_get_devargs): New function.
12366         (grub_ieee1275_get_devname): Likewise.
12367         (grub_ieee1275_parse_args): Likewise.
12368         (grub_ieee1275_get_filename): Likewise.
12369         (grub_ieee1275_encode_devname): Likewise.
12371 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
12373         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
12374         `grub_loader_unset'.
12376 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
12378         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
12379         instead of grub_ieee1275_interpret.
12380         (grub_halt_init): New function.
12381         (grub_halt_fini): Likewise.
12382         (GRUB_MOD_INIT): Correct message grammar.
12383         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
12384         instead of grub_ieee1275_interpret.
12385         (grub_reboot_init): New function.
12386         (grub_reboot_fini): Likewise.
12387         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
12388         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
12389         util/i386/pc/misc.c with commands/ieee1275/halt.c,
12390         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
12391         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
12392         function.
12393         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
12394         Add prototype.
12395         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
12396         prototype.
12397         (grub_halt): Likewise.
12398         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
12399         (cmain): Remove __attribute__((unused)).
12400         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
12401         (grub_heap_len): Likewise.
12402         (grub_machine_fini): New function.
12403         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
12404         (grub_halt): Likewise.
12405         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
12406         function.
12407         * util/powerpc/ieee1275/misc.c: New file.
12409 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
12411         * DISTLIST: New file.
12412         * gendistlist.sh: Likewise.
12414         * Makefile.in (COMMON_DISTFILES): Removed.
12415         (BOOT_DISTFILES): Likewise.
12416         (CONF_DISTFILES): Likewise.
12417         (DISK_DISTFILES): Likewise.
12418         (FS_DISTFILES): Likewise.
12419         (INCLUDE_DISTFILES): Likewise.
12420         (KERN_DISTFILES): Likewise.
12421         (LOADER_DISTFILES): Likewise.
12422         (TERM_DISTFILES): Likewise.
12423         (UTIL_DISTFILES): Likewise.
12424         (DISTFILES): Likewise.
12425         (uninstall): Uninstall files in $(pkgdata_DATA).
12426         (DISTLIST): New target.
12427         (distdir): Use the contents of the file DISTLIST to get a list of
12428         distributed files.
12430 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
12432         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
12433         descriptor. This is ported from GRUB Legacy.
12435         * gencmdlist.sh: Added an extra semicolon to make it work with
12436         old sed versions. Reported by Robert Bihlmeyer
12437         <robbe@orcus.priv.at>.
12439 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
12441         Automatic loading of commands is supported.
12443         * normal/main.c (read_command_list): New function.
12444         (grub_normal_execute): Call read_command_list.
12446         * normal/command.c (grub_register_command): Return zero or CMD.
12447         Allocate CMD->NAME from the heap.
12448         Initialize CMD->MODULE_NAME to zero.
12449         Find the same name as well. If the same command is found and it is
12450         a dummy command, overwrite members. If it is not a dummy command,
12451         return zero.
12452         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
12453         (grub_command_find): If a dummy command is found, load a module
12454         and retry to find a command only once.
12456         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
12457         make sure that each command is loaded.
12459         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
12460         macro.
12461         (struct grub_command): Remove const from the member `name'.
12462         Add a new member `module_name'.
12463         (grub_register_command): Return grub_command_t.
12465         * commands/help.c (grub_cmd_help): Call grub_command_find to make
12466         sure that each command is loaded.
12468         * genmk.rb (PModule::rule): Specify a module name without the
12469         suffix ".mod" to gencmdlist.sh.
12471 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
12473         * gencmdlist.sh: New file.
12475         * genmk.rb (PModule::rule): Generate a rule for a command list.
12476         Clean command.lst.
12477         Generate command.lst from $(COMMANDFILES).
12479         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
12480         (DATA): Added $(pkgdata_DATA).
12481         (install-local): Install files in $(pkgdata_DATA).
12483 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
12485         * term/i386/pc/vga.c (debug_command): Removed.
12486         (GRUB_MOD_INIT): Do not register the command "debug".
12488         From Hollis Blanchard:
12489         * commands/configfile.c: New file.
12490         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12491         commands/configfile.c.
12492         (pkgdata_MODULES): Added configfile.mod.
12493         (configfile_mod_SOURCES): New variable.
12494         (configfile_mod_CFLAGS): Likewise.
12495         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12496         commands/configfile.c.
12497         (pkgdata_MODULES): Added configfile.mod.
12498         (configfile_mod_SOURCES): New variable.
12499         (configfile_mod_CFLAGS): Likewise.
12500         * util/grub-emu.c (main): Call grub_configfile_init and
12501         grub_configfile_fini.
12502         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
12503         prototype.
12504         [GRUB_UTIL] (grub_configfile_fini): Likewise.
12506 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
12508         * normal/arg.c (grub_arg_show_help): Do not show the bug report
12509         address.
12511         * commands/help.c (grub_cmd_help): Do not print newlines after
12512         the last command in print_command_help.
12514 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
12516         * commands/default.h: New file.
12517         * commands/timeout.h: Likewise.
12518         * normal/context.c: Likewise.
12520         * util/misc.c: Do not include sys/times.h.
12521         Include sys/time.h and grub/machine/time.h.
12522         (grub_get_rtc): Rewritten with gettimeofday.
12524         * util/grub-emu.c (main): Call grub_default_init and
12525         grub_timeout_init before grub_normal_init, and call
12526         grub_timeout_fini and grub_default_fini after grub_main.
12528         * util/console.c (grub_ncurses_checkkey): Return the read
12529         character or -1.
12531         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
12532         timeouts.
12534         * normal/main.c (read_config_file): Push MENU. If this fails,
12535         print an error and wait for a user input.
12536         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
12537         If a menu is empty or an error occurs, pop MENU.
12538         (grub_normal_execute): Pop and free MENU after grub_menu_run
12539         returns.
12541         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
12543         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
12544         include time.h.
12545         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12546         without GRUB_UTIL.
12547         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
12548         time.h.
12549         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12550         without GRUB_UTIL.
12552         * include/grub/normal.h (struct grub_menu_list): New struct.
12553         (grub_menu_list_t): New type.
12554         (struct grub_context): New struct.
12555         (grub_context_t): New type.
12556         (grub_register_command): Got rid of EXPORT_FUNC.
12557         (grub_unregister_command): Likewise.
12558         (grub_context_get): New prototype.
12559         (grub_context_get_current_menu): Likewise.
12560         (grub_context_push_menu): Likewise.
12561         (grub_context_pop_menu): Likewise.
12562         [GRUB_UTIL] (grub_default_init): Likewise.
12563         [GRUB_UTIL] (grub_default_fini): Likewise.
12564         [GRUB_UTIL] (grub_timeout_init): Likewise.
12565         [GRUB_UTIL] (grub_timeout_fini): Likewise.
12567         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
12568         commands/timeout.c and normal/context.c.
12569         (pkgdata_MODULES): Added default.mod and timeout.mod.
12570         (normal_mod_SOURCES): Added normal/context.c.
12571         (default_mod_SOURCES): New variable.
12572         (default_mod_CFLAGS): Likewise.
12573         (timeout_mod_SOURCES): Likewise.
12574         (timeout_mod_CFLAGS): Likewise.
12575         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
12576         conf/i386-pc.rmk.
12577         (pkgdata_MODULES): Added default.mod and timeout.mod.
12578         (normal_mod_SOURCES): Added normal/context.c.
12579         (default_mod_SOURCES): New variable.
12580         (default_mod_CFLAGS): Likewise.
12581         (timeout_mod_SOURCES): Likewise.
12582         (timeout_mod_CFLAGS): Likewise.
12584         * Makefile.in (all-local): Added $(MKFILES).
12586 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
12588         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
12589         (grub_emu_SOURCES): Likewise.
12590         (pkgdata_MODULES): Add `sun.mod'.
12591         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12592         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12593         `partmap/sun.c'.
12594         (pkgdata_MODULES): Add `sun.mod'.
12595         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12596         * include/grub/partition.h (grub_sun_partition_map_init): New
12597         prototype.
12598         (grub_sun_partition_map_fini): Likewise.
12599         * partmap/sun.c: New file.
12600         * util/grub-emu.c (main): Initialize and de-initialize the sun
12601         partitionmap support.
12603 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
12605         This implements an Emacs-like menu entry editor.
12607         * normal/menu_entry.c: New file.
12609         * util/console.c (grub_ncurses_putchar): Translate some Unicode
12610         characters to ASCII.
12611         (saved_char): New variable.
12612         (grub_ncurses_checkkey): Rewritten completely.
12613         (grub_ncurses_getkey): Likewise.
12614         (grub_ncurses_init): Call raw instead of cbreak.
12616         * normal/menu.c (print_entry): Do not put a space.
12617         (init_page): Renamed to ...
12618         (grub_menu_init_page): ... this. All callers changed.
12619         (edit_menu_entry): Removed.
12620         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
12622         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
12624         * kern/misc.c (grub_vprintf): Call grub_refresh.
12626         * normal/menu.c (DISP_LEFT): Renamed to ...
12627         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
12628         * normal/menu.c (DISP_UP): Renamed to ...
12629         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
12630         * normal/menu.c (DISP_RIGHT): Renamed to ...
12631         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
12632         * normal/menu.c (DISP_DOWN): Renamed to ...
12633         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
12634         * normal/menu.c (DISP_HLINE): Renamed to ...
12635         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
12636         * normal/menu.c (DISP_VLINE): Renamed to ...
12637         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
12638         * normal/menu.c (DISP_UL): Renamed to ...
12639         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
12640         * normal/menu.c (DISP_UR): Renamed to ...
12641         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
12642         * normal/menu.c (DISP_LL): Renamed to ...
12643         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
12644         * normal/menu.c (DISP_LR): Renamed to ...
12645         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
12646         * normal/menu.c (TERM_WIDTH): Renamed to ...
12647         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
12648         * normal/menu.c (TERM_HEIGHT): Renamed to ...
12649         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
12650         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
12651         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
12652         * normal/menu.c (TERM_MARGIN): Renamed to ...
12653         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
12654         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
12655         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
12656         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
12657         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
12658         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
12659         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
12660         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
12661         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
12662         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
12663         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
12664         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
12665         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
12666         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
12667         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
12668         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
12669         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
12670         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
12671         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
12672         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
12673         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
12674         All callers changed.
12676         * include/grub/normal.h: New prototype.
12678         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12679         normal/menu_entry.c.
12680         (normal_mod_SOURCES): Likewise.
12681         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12682         (normal_mod_SOURCES): Likewise.
12684 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
12686         * include/grub/normal.h (grub_halt_init): New prototype.
12687         (grub_halt_fini): Likewise.
12688         (grub_reboot_init): Likewise.
12689         (grub_reboot_fini): Likewise.
12691         * util/grub-emu.c: Include signal.h.
12692         (main_env): New global variable.
12693         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
12694         catch C-c.
12695         (grub_machine_fini): New function.
12696         (main): Call grub_halt_init and grub_reboot_init before
12697         grub_main, and grub_reboot_fini and grub_halt_fini after it.
12698         Call setjmp with MAIN_ENV to go back afterwards.
12699         Call grub_machine_fini right before return.
12701         * include/grub/util/misc.h: Include setjmp.h.
12702         (main_env): New prototype.
12704         * include/grub/kernel.h (grub_machine_fini): New prototype.
12705         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
12706         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
12708         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
12709         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
12710         * term/i386/pc/console.c (grub_console_fini): Likewise.
12712         * util/i386/pc/misc.c: New file.
12714         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12715         util/i386/pc/misc.c, commands/i386/pc/halt.c and
12716         commands/i386/pc/reboot.c.
12718 2005-02-14  Guillem Jover  <guillem@hadrons.org>
12720         * include/grub/dl.h (grub_dl_check_header): New prototype.
12721         (grub_arch_dl_check_header): Change return type to grub_err_t,
12722         remove size parameter and export function.  Update all callers.
12723         * kern/dl.c (grub_dl_check_header): New function.
12724         (grub_dl_load_core): Use `grub_dl_check_header' instead of
12725         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
12726         are inside the core.
12727         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
12728         independent ELF header checks.
12729         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12730         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
12731         `grub_dl_check_header' instead of explicit checks.  Check for the
12732         ELF type.
12733         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
12734         `grub_dl_check_header' instead of explicit checks.  Remove arch
12735         specific ELF header checks.
12737         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
12738         argument SIZE.
12740 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
12742         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
12743         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
12745 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
12747         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
12748         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
12749         (part_map_iterate): Clear `grub_errno' and return 0 if
12750         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
12751         * partmap/amiga.c (amiga_partition_map_iterate): Return
12752         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
12753         * partmap/apple.c (apple_partition_map_iterate): Likewise.
12755 2005-02-01  Guillem Jover  <guillem@hadrons.org>
12757         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
12758         help info.
12760 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
12762         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
12763         Removed prototype.
12764         (grub_rescue_cmd_linux): New prototype.
12765         (grub_rescue_cmd_initrd): Likewise.
12766         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
12767         `bi_rec'.
12768         (grub_linux_release_mem): Release the memory for the initrd.
12769         (grub_load_linux): Renamed from this...
12770         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
12771         Changed `entry' not to be static.  Loop over memory regions to
12772         find another one when the default fails.
12773         (grub_rescue_cmd_initrd): New function.
12774         (grub_linux_init): Remove function.
12775         (grub_linux_fini): Likewise.
12776         (GRUB_MOD_INIT): Register `initrd'.
12777         (GRUB_MOD_FINI): Unregister `initrd'.
12778         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
12779         Function removed.
12780         (grub_linux_normal_fini): Likewise.
12781         (GRUB_MOD_INIT): Register `initrd'.
12782         (GRUB_MOD_FINI): Unregister `initrd'.
12784 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
12786         * commands/help.c: New file.
12787         * normal/arg.c (show_help): Renamed to...
12788         (grub_arg_show_help): ... this.
12789         * commands/i386/pc/halt.c: New file.
12790         * commands/i386/pc/reboot.c: Likewise.
12791         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
12792         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
12793         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
12794         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
12795         variables.
12796         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12797         `commands/help.c'.
12798         (pkgdata_MODULES): Add `help.mod'.
12799         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
12800         * grub/i386/pc/init.h (grub_reboot): New prototype.
12801         (grub_halt): Likewise.
12802         * include/grub/normal.h (grub_arg_show_help): New prototype.
12803         (grub_help_init): Likewise.
12804         (grub_help_fini): Likewise.
12805         * util/grub-emu.c (main): Initialize and deinitialize the help
12806         command.
12808         * normal/cmdline.c (grub_cmdline_get): Doc fix.
12810         * normal/command.c (grub_command_init): Fixed the description of
12811         the `set' and `unset' commands.
12813 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
12815         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
12816         function.
12817         * commands/ieee1275/halt.c: New file.
12818         * commands/ieee1275/reboot.c: Likewise.
12819         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
12820         `__attribute__ ((unused))'.  Some GCS related fixed.
12821         (grub_suspend_init) [GRUB_UTIL]: Function removed.
12822         (grub_suspend_fini): Likewise.
12823         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
12824         and `halt.mod'.
12825         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
12826         (halt_mod_CFLAGS): New variables.
12827         * include/grub/powerpc/ieee1275/ieee1275.h
12828         (grub_ieee1275_interpret): New prototype.
12830 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
12832         * include/grub/misc.h (memmove): New prototype.
12833         (memcpy): Likewise.
12835 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
12837         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
12838         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
12840 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
12842         * kern/misc.c (grub_strndup): Function rewritten.
12844 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
12846         * normal/menu.c (TERM_WIDTH): Macro redefined.
12847         (TERM_TOP_BORDER_Y): Likewise.
12848         (draw_border): Replaced while-loop by a for-loop.  Make the number
12849         of lines consistent with the number of lines displayed in
12850         print_entries.  Added a margin below the rectangle.
12851         (print_entry): Make the entry fit in the rectangle.
12852         (print_entries): Display the scroll arrows next to the right
12853         border.
12855 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
12857         * fs/minix.c (grub_minix_find_file): Reserve more space for
12858         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
12859         `grub_strncpy' to copy `path' into it.
12861 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
12863         Add the loopback device, a device via which files can be accessed
12864         as devices.
12866         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
12867         (pkgdata_MODULES): Add loopback.mod.
12868         (loopback_mod_SOURCES): New variable.
12869         (loopback_mod_CFLAGS): Likewise.
12870         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12871         `disk/loopback.c'.
12872         (pkgdata_MODULES): Add loopback.mod.
12873         (loopback_mod_SOURCES): New variable.
12874         (loopback_mod_CFLAGS): Likewise.
12875         * disk/loopback.c: new file.
12876         * include/grub/normal.h (grub_loop_init): New prototype.
12877         (grub_loop_fini): New prototype.
12878         * util/grub-emu.c (main): Initialize and de-initialize loopback
12879         support.
12880         * include/grub/disk.h (grub_disk_dev_id): Add
12881         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
12883 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
12885         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
12886         function.
12887         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
12888         (suspend_mod_SOURCES): New variable.
12889         (suspend_mod_CFLAGS): Likewise.
12890         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
12891         New prototype.
12892         * commands/ieee1275/suspend.c: New file.
12894 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12896         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
12897         ((unused))' to `__attribute__ ((used))'.
12898         (GRUB_MOD_FINI): Likewise.
12899         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
12900         * genmk.rb (PModule): Assign space to common symbols when linking
12901         modules.
12903 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
12905         * include/grub/mm.h (grub_mm_init_region): Change the type of the
12906         `unsigned' arguments to `grub_size_t'.
12907         (grub_malloc): Likewise.
12908         (grub_realloc): Likewise.
12909         (grub_memalign): Likewise.
12910         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
12911         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12912         * util/misc.c (grub_malloc): Likewise.
12913         (grub_realloc): Likewise.
12914         * kern/mm.c (get_header_from_pointer): Change the casts to
12915         `unsigned' into a cast to `grub_size_t'.
12917         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
12918         point to `currnode' when `currnode' is changed.
12920         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
12921         Schottelius <nico-linux@schottelius.org>.
12923 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
12925         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
12926         (note_path): Remove variable.
12927         (GRUB_IEEE1275_NOTE_NAME): New macro.
12928         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
12929         (grub_ieee1275_note_hdr): New structure.
12930         (grub_ieee1275_note_desc): Likewise.
12931         (grub_ieee1275_note): Likewise.
12932         (load_note): Remove `dir' argument.  All callers updated.  Remove
12933         `note_img' and `path'.  Do not load a file from `note_path'.
12934         Initialize a struct grub_ieee1275_note and write that to `out'.
12935         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
12937 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
12939         * util/misc.c (grub_util_read_image): Revert last change.  It
12940         called `grub_util_read_at', which seeks from the beginning of the
12941         file.
12943 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
12945         * TODO: Add note about endianness in grub-mkimage.
12946         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
12947         section.
12948         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
12949         (grub_mkimage_SOURCES): New target.
12950         * include/grub/kernel.h (grub_start_addr): Remove variable.
12951         (grub_end_addr): Likewise.
12952         (grub_total_module_size): Likewise.
12953         (grub_kernel_image_size): Likewise.
12954         (GRUB_MODULE_MAGIC): New constant.
12955         (grub_module_info): New structure.
12956         (grub_arch_modules_addr): New prototype.
12957         (grub_get_end_addr): Remove prototype.
12958         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
12959         * include/grub/powerpc/ieee1275/kernel.h: New file.
12960         * include/grub/util/misc.h (grub_util_get_fp_size): New
12961         prototype.
12962         (grub_util_read_at): Likewise.
12963         (grub_util_write_image_at): Likewise.
12964         * kern/main.c (grub_get_end_addr): Remove function.
12965         (grub_load_modules): Call grub_arch_modules_addr instead of using
12966         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
12967         the grub_module_info fields instead of calling grub_get_end_addr
12968         as loop conditions.  Move grub_add_unused_region code here.
12969         (grub_add_unused_region): Remove function.
12970         * kern/i386/pc/init.c: Include grub/cache.h.
12971         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
12972         one call to add_mem_region.
12973         (grub_arch_modules_addr): New function.
12974         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
12975         (grub_total_module_size): Likewise.
12976         Include grub/machine/kernel.h.
12977         (grub_arch_modules_addr): New function.
12978         * util/grub-emu.c (grub_end_addr): Remove variable.
12979         (grub_total_module_size): Likewise.
12980         (grub_arch_modules_addr): New function.
12981         * util/misc.c: Include unistd.h.
12982         (grub_util_get_fp_size): New function.
12983         (grub_util_read_at): Likewise.
12984         (grub_util_write_image_at): Likewise.
12985         (grub_util_read_image): Call grub_util_read_at.
12986         (grub_util_write_image): Call grub_util_write_image_at.
12987         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
12988         additional memory in kernel_img for a struct grub_module_info.
12989         Fill in that grub_module_info.
12990         * util/powerpc/ieee1275/grub-mkimage.c: New file.
12992 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
12994         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
12995         New function.
12996         * include/grub/powerpc/ieee1275/ieee1275.h
12997         (grub_ieee1275_milliseconds): New prototype.
12998         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
12999         Change to 1000.
13000         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
13001         grub_ieee1275_milliseconds.
13003 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
13005         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
13006         variable.
13007         (find_options): New function.
13008         (cmain): Call find_options.
13009         * include/grub/powerpc/ieee1275/ieee1275.h
13010         (grub_ieee1275_realmode): New extern variable.
13011         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
13012         grub_map if grub_ieee1275_realmode is false.
13014 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
13016         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
13017         lines are inserted and make it work like readline.  Reported by
13018         Vincent Pelletier <subdino2004@yahoo.fr>.
13020 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
13022         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
13024         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
13025         `kern/powerpc/cache.S'.
13027 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
13029         * genmk.rb: Handle the `Program' class in the main loop.  Written
13030         by Johan Rydberg <jrydberg@gnu.org>.
13031         (Program): New class.
13032         (programs): New variable.
13033         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
13034         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
13035         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
13036         (help_arch): Function removed.
13037         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
13038         `powerpc/libgcc.h' and `loader.h'.
13039         (pkgdata_PROGRAMS): New variable.
13040         (sbin_UTILITIES): Variable removed.
13041         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
13042         (grubof_SOURCES): Variable re-defined so it only includes the
13043         core functionality.
13044         (grubof_CFLAGS): Remove `-DGRUBOF'.
13045         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
13046         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
13047         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
13048         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
13049         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
13050         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
13051         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
13052         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
13053         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
13054         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
13055         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13056         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
13057         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
13058         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
13059         (pc_mod_CFLAGS): New variables.
13060         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
13061         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
13062         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
13063         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
13064         Moved from here...
13065         * include/grub/i386/pc/init.h (grub_os_area_addr)
13066         (rub_os_area_size): ... to here.
13067         * include/grub/powerpc/ieee1275/ieee1275.h
13068         (grub_ieee1275_entry_fn): Export symbol.
13069         * include/grub/powerpc/ieee1275/init.h: New file.
13070         * include/grub/powerpc/libgcc.h: Likewise.
13071         * include/grub/cache.h: Likewise.
13072         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
13073         <hollis@penguinppc.org>.
13074         * kern/dl.c: Include <grub/cache.h>.
13075         (grub_dl_flush_cache): New function.
13076         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
13077         for this module.
13078         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
13079         (grub_console_init): Removed prototypes.
13080         (grub_machine_init): Don't initialize the modules anymore.
13081         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
13082         static.
13083         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
13084         Macro undef removed.
13085         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
13086         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
13087         relocation `R_PPC_REL32'.  Return an error when the relocation is
13088         unknown.
13089         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
13090         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
13091         * util/misc.c (grub_arch_sync_caches): Likewise.
13093 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
13095         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
13096         `symlist.c', add `grubof_symlist.c'.
13097         (symlist.c): Variable removed.
13098         (grubof_HEADERS): Variable added.
13099         (grubof_symlist.c): New target.
13100         (kernel_syms.lst): Use `grubof_HEADERS' instead of
13101         `kernel_img_HEADERS'.
13102         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
13103         * kern/powerpc/dl.c: New file.
13104         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
13105         Function removed.
13106         (grub_arch_dl_relocate_symbols): Likewise.
13107         (grub_register_exported_symbols): Likewise.
13109 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
13111         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
13112         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
13113         to fail instead.  Reported by Vincent Pelletier
13114         <subdino2004@yahoo.fr>.
13116         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
13117         it is not allocated.  Reported by Vincent Pelletier
13118         <subdino2004@yahoo.fr>.
13120         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
13121         output so the output looks better.
13123 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
13125         Modulize the partition map support and add support for the amiga
13126         partition map.
13128         * commands/ls.c: Include <grub/partition.h> instead of
13129         <grub/machine/partition.h>.
13130         * kern/disk.c: Likewise.
13131         * kern/rescue.c: Likewise.
13132         * loader/i386/pc/chainloader.c: Likewise.
13133         * normal/cmdline.c: Likewise.
13134         * kern/powerpc/ieee1275/init.c: Likewise.
13135         (grub_machine_init): Call `grub_pc_partition_map_init',
13136         `grub_amiga_partition_map_init' and
13137         `grub_apple_partition_map_init'.
13138         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
13139         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
13140         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
13141         `partition.h' and `pc_partition.h'.
13142         (grub_setup_SOURCES): Remove
13143         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
13144         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13145         (grub_emu_SOURCES): Likewise.
13146         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
13147         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
13148         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
13149         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13150         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
13151         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13152         (grubof_SOURCES): Likewise.
13153         * disk/i386/pc/partition.c: File removed.
13154         * disk/powerpc/ieee1275/partition.c: Likewise.
13155         * include/grub/powerpc/ieee1275/partition.h: Likewise.
13156         * include/grub/i386/pc/partition.h: Likewise.
13157         * kern/partition.c: New file.
13158         * partmap/amiga.c: Likewise.
13159         * partmap/apple.c: Likewise.
13160         * partmap/pc.c: Likewise.
13161         * include/grub/partition.h: Likewise..
13162         * include/grub/pc_partition.h: Likewise.
13163         * util/grub-emu.c: Include <grub/partition.h> instead of
13164         <grub/machine/partition.h>.
13165         (main): Call `grub_pc_partition_map_init',
13166         `grub_amiga_partition_map_init' and
13167         `grub_apple_partition_map_init' and deinitialize afterwards.
13168         * util/i386/pc/biosdisk.c: Include `#include
13169         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13170         `<grub/machine/partition.h>'.
13171         * util/i386/pc/grub-setup.c: Likewise.
13172         * util/i386/pc/biosdisk.c: Likewise.
13173         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
13174         partition information in case of a PC partition.
13175         * util/i386/pc/grub-setup.c: Include `#include
13176         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13177         `<grub/machine/partition.h>'.
13178         (setup): Only access the PC specific partition information in case
13179         of a PC partition.
13181 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
13183         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
13184         (grub_longjmp): Likewise.
13185         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
13186         20.
13187         * normal/powerpc/setjmp.S: New file.
13188         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13189         `normal/powerpc/setjmp.S'.
13190         (grubof_CFLAGS): Add `-DGRUBOF'.
13191         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
13192         [GRUB_UTIL && !GRUBOF].
13194 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
13196         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
13197         property named `name'.  Correctly handle the error returned by
13198         `grub_ieee1275_finddevice' if a device can not be opened.
13200 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13202         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
13203         `actual' for negativity.
13204         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13205         kern/fshelp.c.
13207 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
13209         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
13210         (PAGE_OFFSET): New macro.
13211         (CRTC_ADDR_PORT): Likewise.
13212         (CRTC_DATA_PORT): Likewise.
13213         (START_ADDR_HIGH_REGISTER): Likewise.
13214         (START_ADDR_LOW_REGISTER): Likewise.
13215         (GRAPHICS_ADDR_PORT): Likewise.
13216         (GRAPHICS_DATA_PORT): Likewise.
13217         (READ_MAP_REGISTER): Likewise.
13218         (INPUT_STATUS1_REGISTER): Likewise.
13219         (INPUT_STATUS1_VERTR_BIT): Likewise.
13220         (page): New variable.
13221         (wait_vretrace): New function.
13222         (set_read_map): Likewise.
13223         (set_start_address): Likewise.
13224         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
13225         the right page.
13226         (check_vga_mem): Take the page into account.
13227         (write_char): Likewise.
13228         (write_cursor): Likewise.
13229         (scroll_up): Likewise.  Copy the page to the page that is not
13230         shown and switch between both pages.
13231         (grub_vga_putchar): Fix off by one error.
13232         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
13233         account.
13235 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
13237         Add support for iso9660 (including rockridge).
13239         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13240         (iso9660_mod_SOURCES): New variable.
13241         (iso9660_mod_CFLAGS): Likewise.
13242         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13243         * include/grub/fs.h (grub_iso9660_init): New prototype.
13244         * util/grub-emu.c (main): Call `grub_iso9660_init'.
13245         * fs/iso9660.c: New file.
13247         * include/grub/misc.h (grub_strncat): New prototype.
13248         * kern/misc.c (grub_strncat): New function.
13250         * fs/hfs.c (grub_hfs_mount): Translate the error
13251         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
13252         * fs/jfs.c (grub_jfs_mount): Likewise.
13253         * fs/ufs.c (grub_ufs_mount): Likewise.
13255 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
13257         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
13258         which initialized BAT registers.
13259         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
13260         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13261         Move from here...
13262         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
13263         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13264         ... to here.
13265         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
13266         (grub_mapclaim): Likewise.
13267         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
13268         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
13269         hand.
13271 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
13273         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
13274         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
13275         -ffreestanding and -msoft-float.
13277 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
13279         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
13280         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
13281         set in grub_ieee1275_flags.
13283 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
13285         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
13286         prototype.
13287         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
13288         grub_console_init first.
13289         Change the memory range used for grub_ieee1275_claim and
13290         grub_mm_init_region.
13291         Print an error message if the claim fails.
13292         Include <grub/misc.h>.
13294 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
13296         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
13297         Call grub_children_iterate for device nodes of type `scsi',
13298         `ide', or `ata'.
13299         (grub_ofdisk_open): Remove manual device alias resolution.
13300         Fix memory leak when device cannot be opened.
13301         * include/grub/powerpc/ieee1275/ieee1275.h
13302         (grub_children_iterate): New prototype.
13303         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
13304         New function.
13305         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13306         Return -1 if args.size was -1.
13308 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
13310         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
13311         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
13312         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
13313         Open Firmware's memory for it; claim memory from _start to _end.
13314         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
13315         (_end): New extern.
13316         (_start): Zero BSS from __bss_start to _end.
13317         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13318         New extern.
13319         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
13321 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
13323         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
13324         -1 if args.base was -1.
13326 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
13328         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
13329         escape sequence instead of a literal ^L. Also call
13330         grub_ofconsole_gotoxy.
13332 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
13334         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
13335         void *  arguments to grub_addr_t.  All callers updated.  Also make
13336         the `result' argument optional.
13337         (grub_ieee1275_release): change void * arguments to grub_addr_t.
13338         All callers updated.
13340 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
13342         * commands/ls.c (grub_ls_list_files): Use the string following the
13343         initial ')', if present, as the filesystem path.
13344         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
13346         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
13348 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
13350         Make the source code of the menu interface more readable.
13352         * normal/menu.c: Include grub/mm.h.
13353         (TERM_WIDTH): New macro.
13354         (TERM_HEIGHT): Likewise.
13355         (TERM_INFO_HEIGHT): Likewise.
13356         (TERM_MARGIN): Likewise.
13357         (TERM_SCROLL_WIDTH): Likewise.
13358         (TERM_TOP_BORDER_Y): Likewise.
13359         (TERM_LEFT_BORDER_X): Likewise.
13360         (TERM_BORDER_WIDTH): Likewise.
13361         (TERM_MESSAGE_HEIGHT): Likewise.
13362         (TERM_BORDER_HEIGHT): Likewise.
13363         (TERM_NUM_ENTRIES): Likewise.
13364         (TERM_FIRST_ENTRY_Y): Likewise.
13365         (TERM_ENTRY_WIDTH): Likewise.
13366         (TERM_CURSOR_X): Likewise.
13367         (draw_border): Use macros instead of magic numbers.
13368         (print_entry): Likewise.
13369         (print_entries): Likewise.
13370         (run_menu): Likewise. Also, handle the key 'e'.
13371         (run_menu_entry): Ignore empty command lines.
13372         (print_message): Added a new argument EDIT. If EDIT is true,
13373         print a different message.
13374         (init_page): Likewise.
13375         (edit_menu_entry): New function. Not implemented yet.
13377 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
13379         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
13380         can be loaded from normal mode.
13382         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
13383         `multiboot.mod'.
13384         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
13385         (multiboot_mod_CFLAGS): New variables.
13386         * loader/i386/pc/linux_normal.c: New file.
13387         * loader/i386/pc/multiboot_normal.c: Likewise.
13389         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
13390         attribute `unused'.
13392         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
13393         `fdiro' to read the mode information from instead of `diro'.
13395         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
13396         looking up a symlink.
13398         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
13399         macro.
13400         * normal/command.c (grub_command_execute): Don't parse the
13401         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
13402         flags of the command.
13404         * normal/menu.c (grub_menu_run): Fix typo.
13406 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
13408         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
13410         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
13411         `y + 1' instead of `y - 1'.
13413         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
13415 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
13417         From Hollis Blanchard <hollis@penguinppc.org>:
13418         * kern/misc.c (memmove): New alias for grub_memmove.
13419         (memcmp): New alias for grub_memcmp.
13420         (memset): New alias for grub_memset.
13421         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13422         Change "int handle" to "grub_ieee1275_phandle_t handle".
13423         * include/grub/powerpc/ieee1275/ieee1275.h
13424         (grub_ieee1275_get_property): Likewise.
13426 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
13428         Added normal mode command `chainloader' as module chain.mod, which
13429         depends on normal.mod and _chain.mod.
13431         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
13432         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
13433         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
13434         Deleted prototype.
13435         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
13436         but arguments parsing moved to ...
13437         (grub_chainloader_cmd): ... here.  New function.
13438         * include/grub/i386/pc/chainloader.h: New file.
13439         * loader/i386/pc/chainloader_normal.c: Likewise.
13441 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
13443         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
13444         (grub_mkimage_LDFLAGS): Likewise.
13445         (grub_emu_SOURCES): Likewise.
13446         (kernel_img_HEADERS): Added fshelp.h.
13447         * fs/ext2.c: Include <grub/fshelp.h>.
13448         (FILETYPE_REG): New macro.
13449         (FILETYPE_INO_REG): Likewise.
13450         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
13451         Changed all users.
13452         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
13453         all users.
13454         (grub_fshelp_node): New struct.
13455         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
13456         to a pointer.
13457         (grub_ext2_get_file_block): Removed function.
13458         (grub_ext2_read_block): New function.
13459         (grub_ext2_read_file): Replaced parameter `data' by `node'.
13460         This function was written.
13461         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
13462         (grub_ext2_find_file): Removed function.
13463         (grub_ext2_read_symlink): New function.
13464         (grub_ext2_iterate_dir): Likewise.
13465         (grub_ext2_open): Rewritten.
13466         (grub_ext2_dir): Rewritten.
13467         * include/grub/fshelp.h: New file.
13468         * fs/fshelp.c: Likewise.
13470 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
13472         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
13473         (print_message): Add a missing newline.
13474         (run_menu): Added timeout support.
13475         (run_menu_entry): New local function.
13476         (grub_menu_run): Added support for booting.
13478         * kern/loader.c (grub_loader_is_loaded): New function.
13480         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
13481         (grub_get_rtc): Exported.
13483         * include/grub/i386/pc/time.h: Include grub/symbol.h.
13484         (grub_get_rtc): Exported.
13486         * include/grub/normal.h (struct grub_command_list): Remove
13487         constant from the member `command'.
13489         * include/grub/loader.h (grub_loader_is_loaded): Declared.
13491         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
13493         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
13495 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
13497         Add support for the JFS filesystem.
13499         * fs/jfs.c: New file.
13500         * include/grub/fs.h (grub_jfs_init): New prototype.
13501         (grub_jfs_fini): New prototype.
13502         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
13503         (grub_emu_SOURCES): Likewise.
13504         (pkgdata_MODULES): Add jfs.mod.
13505         (jfs_mod_SOURCES): New variable.
13506         (jfs_mod_CFLAGS): Likewise.
13507         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
13508         (grubof_SOURCES): Likewise.
13509         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
13511         * fs/fat.c (grub_fat_find_dir): Convert the filename little
13512         endian to the host endian.
13513         (grub_fat_utf16_to_utf8): Move function from there...
13514         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
13515         the endianness of the source string anymore.
13516         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
13518 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
13520         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
13521         (grub_boot_fini) [GRUB_UTIL]: Likewise.
13522         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
13523         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
13525         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
13526         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
13527         for `node_found' and `it_dir'.
13528         (grub_hfs_dir): Add prototype for `dir_hook'.
13530         * fs/minix.c (grub_minix_get_file_block): Add prototype for
13531         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
13532         and `indir32' to silence a gcc warning.
13534         * include/grub/fs.h (grub_hfs_init): New prototype.
13535         (grub_hfs_fini): Likewise.
13538 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
13540         Each disk device has its own id now. This is useful to make use
13541         of multiple disk devices.
13543         * include/grub/disk.h (grub_disk_dev_id): New enum.
13544         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
13545         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
13547         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
13548         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13550         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
13551         GRUB_DISK_DEVICE_OFDISK_ID as an id.
13553         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
13554         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13556         * include/grub/disk.h (struct grub_disk_dev): Added a new member
13557         "id" which is used by the cache manager.
13559         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
13560         of just "GRUB".
13562 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
13564         * fs/hfs.c: New file.
13565         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
13566         (grub_emu_SOURCES): Likewise.
13567         (pkgdata_MODULES): Add hfs.mod.
13568         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
13569         (grubof_SOURCES): Likewise.
13570         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
13572         * include/grub/misc.h (grub_strncasecmp): Add prototype.
13573         * kern/misc.c (grub_strncasecmp): Add function.
13575 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
13577         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
13578         with parentheses.
13580         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
13581         (grub_ext2_dir): In case the directory entry type is unknown, read
13582         it from the inode.
13584 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
13586         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
13587         grub_load_linux instead of grub_rescue_cmd_linux as second
13588         argument of grub_rescue_register_command.
13590         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
13592 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
13594         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
13595         function.
13596         * commands/boot.c: Remove the check for `GRUB_UTIL'.
13597         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13598         `loader/powerpc/ieee1275/linux.c',
13599         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
13600         * include/grub/powerpc/ieee1275/ieee1275.h
13601         (grub_ieee1275_release): New prototype.
13602         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
13603         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
13604         normal, boot, linux and linux_normal.
13605         * loader/powerpc/ieee1275/linux.c: New file.
13606         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13608 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
13610         * normal/arg.c (grub_arg_parse): Correct error handling after
13611         reallocating the argumentlist (check if `argl' is not null instead
13612         of checking if `args' is not null).
13613         * kern/mm.c (grub_realloc): Return the same pointer when using the
13614         same region, instead of returning the header address.
13616 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
13618         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
13619         one block instead of two when looking for the initial partition.
13620         (grub_partition_probe): Initialize the local variable `p' with 0.
13621         Use base 10 for the grub_strtoul call.
13622         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
13623         need for one local variable.
13624         (grub_strtoul): Don't add the new value to `num', instead of that
13625         just assign it.
13627 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
13629         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
13630         (pxeboot_img_SOURCES): New variable.
13631         (pxeboot_img_ASFLAGS): Likewise.
13632         (pxeboot_img_LDFLAGS): Likewise.
13633         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
13634         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
13635         <lode_leroy@hotmail.com>.
13637 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
13639         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
13640         there was no input.
13642 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
13644         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
13645         the history buffer logic.
13647 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
13649         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
13650         (FILETYPE_INO_SYMLINK): New macros.
13651         (grub_ext2_find_file): Check if the node is a directory using the
13652         inode stat information instead of using the filetype in the
13653         dirent.  Exclude the first character of an absolute symlink.
13654         (grub_ext2_dir): Mask out the filetype part of the mode member of
13655         the inode.
13657 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
13659         Add support for UFS version 1 and 2.  Add support for the minix
13660         filesystem version 1 and 2, both the variants with 14 and 30 long
13661         filenames.
13663         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
13664         fs/minix.c.
13665         (grub_emu_SOURCES): Likewise.
13666         (pkgdata_MODULES): Add ufs.mod and minix.mod.
13667         (ufs_mod_SOURCES): New variable.
13668         (ufs_mod_CFLAGS): Likewise.
13669         (minix_mod_SOURCES): Likewise.
13670         (minix_mod_CFLAGS): Likewise.
13671         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
13672         fs/minix.c.
13673         (grubof_SOURCES): Likewise.
13674         * fs/ufs.c: New file.
13675         * fs/minix.c: New file.
13676         * include/grub/fs.h (grub_ufs_init): New prototype.
13677         (grub_ufs_fini): Likewise.
13678         (grub_minix_init): Likewise.
13679         (grub_minix_fini): Likewise.
13680         * util/grub-emu.c (main): Initialize and deinitialize UFS and
13681         minix fs.
13683 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
13685         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
13686         commands/ls.c, commands/terminal.c, commands/boot.c,
13687         commands/cmp.c and commands/cat.c.
13688         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
13690         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
13691         "env.h"
13693 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
13695         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
13696         and grub_, respectively. Because the conversion is trivial and
13697         mechanical, I omit the details here. Please refer to the CVS
13698         if you need more information.
13700 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
13702         * include/pupa: Renamed to ...
13703         * include/grub: ... this.
13704         * util/i386/pc/pupa-mkimage.c: Renamed to ...
13705         * util/i386/pc/grub-mkimage.c: ... this.
13706         * util/i386/pc/pupa-setup.c: Renamed to ...
13707         * util/i386/pc/grub-setup.c: ... this.
13708         * util/pupa-emu.c: Renamed to ...
13709         * util/grub-emu.c: ... this.
13711 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
13713         Add support for the newworld apple macintosh (PPC).  This has been
13714         tested on the powerbook 2000 only.  It only adds support for
13715         generic ieee1275 functions, console and disk support.  This should
13716         be easy to port to other architectures with support for Open
13717         Firmware.
13719         * configure.ac: Accept the powerpc as host_cpu.  In the case of
13720         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
13721         specific tests are only executed while building for the i386.
13722         Inverse test for crosscompile.
13723         * genmk.rb (Utility): Allow assembler files.
13724         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
13725         * conf/powerpc-ieee1275.rmk: New file.
13726         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
13727         * disk/powerpc/ieee1275/partition.c: Likewise.
13728         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
13729         * include/pupa/powerpc/ieee1275/console.h: Likewise.
13730         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
13731         * include/pupa/powerpc/ieee1275/time.h: Likewise.
13732         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
13733         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
13734         * include/pupa/powerpc/ieee1275/loader.h
13735         * include/pupa/powerpc/setjmp.h: Likewise.
13736         * include/pupa/powerpc/types.h: Likewise.
13737         * kern/powerpc/ieee1275/init.c: Likewise.
13738         * kern/powerpc/ieee1275/openfw.c: Likewise.
13739         * term/powerpc/ieee1275/ofconsole.c: Likewise.
13741         These files were written by Johan Rydberg
13742         (jrydberg@night.trouble.net) and I only modified them slightly.
13744         * boot/powerpc/ieee1275/cmain.c: New file.
13745         * boot/powerpc/ieee1275/crt0.S: Likewise.
13746         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
13747         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
13749 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
13751         * Makefile.in: Update copyright.
13752         * genmodsrc.sh: Likewise.
13753         * gensymlist.sh: Likewise.
13754         * term/i386/pc/vga.c: Indent correctly.
13756         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
13757         bugreporting address.
13758         * util/i386/pc/pupa-setup.c (usage): Likewise,
13759         (main): Call pupa_ext2_init and pupa_ext2_fini.
13761         * fs/fat.c (log2): Renamed to ...
13762         (fat_log2): ... this.
13763         All callers changed.
13764         * kern/misc.c (memcpy): Alias to pupa_memmove.
13765         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
13766         lvalue cast.
13767         * util/console.c (pupa_ncurses_fini): Return 0.
13769         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
13770         Move fail label here.
13771         [__GNU__]: Don't warn when using stat.
13772         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
13773         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
13774         long int. Use strtol instead of strtoul.
13776 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
13778         * commands/boot.c: New file.
13779         * commands/cat.c: Likewise.
13780         * commands/cmp.c: Likewise.
13781         * commands/ls.c: Likewise.
13782         * commands/terminal.c: Likewise.
13783         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
13784         (pupa_register_command): Changed interface to match the new
13785         argument parser.
13786         (pupa_command_execute): Changed (almost rewritten) so it uses
13787         pupa_split_command.  Added support for setting variables using the
13788         syntax `foo=bar'.
13789         (rescue_command): Changed to work with the new argument parser.
13790         (terminal_command): Moved from here to commands/terminal.c.
13791         (set_command): New function.
13792         (unset_command): New function.
13793         (insmod_command): New function.
13794         (rmmod_command): New function.
13795         (lsmod_command): New function.
13796         (pupa_command_init): Don't initialize the command terminal
13797         anymore.  Initialize the commands set, unset, insmod, rmmod and
13798         lsmod.
13799         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
13800         (kernel_img_HEADERS): Add arg.h and env.h.
13801         (pupa_mkimage_LDFLAGS): Add kern/env.c.
13802         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
13803         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
13804         normal/arg.c.
13805         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
13806         terminal.mod.
13807         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
13808         (boot_mod_SOURCES): New variable.
13809         (terminal_mod_SOURCES): Likewise.
13810         (ls_mod_SOURCES): Likewise.
13811         (cmp_mod_SOURCES): Likewise.
13812         (cat_mod_SOURCES): Likewise.
13814         * normal/arg.c: New file.
13815         * kern/env.c: Likewise.
13816         * include/pupa/arg.h: Likewise.
13817         * include/pupa/env.h: Likewise.
13818         * font/manager.c (font_command): Changed to match argument parsing
13819         interface changes.
13820         (PUPA_MOD_INIT): Likewise.
13821         * hello/hello.c (pupa_cmd_hello): Likewise.
13822         (PUPA_MOD_INIT): Likewise.
13823         * include/pupa/disk.h: Include <pupa/device.h>.
13824         (pupa_print_partinfo): New prototype.
13825         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
13826         (pupa_dl_get_prefix): Likewise.
13827         * include/pupa/misc.h: Include <pupa/err.h>.
13828         (pupa_isgraph): New prototype.
13829         (pupa_isdigit): Likewise.
13830         (pupa_split_cmdline): Likewise.
13831         * include/pupa/normal.h: Include <pupa/arg.h>.
13832         (pupa_command): Changed the prototype of the member `func' to
13833         match the argument parsing interface.  Added member `options'.
13834         (pupa_register_command): Updated to match function.
13835         (pupa_arg_parse): New prototype.
13836         (pupa_hello_init) [PUPA_UTIL]: New prototype.
13837         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
13838         (pupa_ls_init) [PUPA_UTIL]: Likewise.
13839         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
13840         (pupa_cat_init) [PUPA_UTIL]: Likewise.
13841         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
13842         (pupa_boot_init) [PUPA_UTIL]: Likewise.
13843         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
13844         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
13845         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
13846         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
13847         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
13848         * kern/disk.c: Include <pupa/file.h>.
13849         (pupa_print_partinfo): New function.
13850         * kern/dl.c: Include <pupa/env.h>.
13851         (pupa_dl_dir): Variable removed.
13852         (pupa_dl_load): Use the environment variable `prefix' instead of
13853         the variable pupa_dl_dir.
13854         (pupa_dl_set_prefix): Function removed.
13855         (pupa_dl_get_prefix): Likewise.
13856         * kern/i386/pc/init.c: Include <pupa/env.h>.
13857         (pupa_machine_init): Use the environment variable `prefix' instead of
13858         using pupa_dl_set_prefix to set the prefix.
13859         * kern/main.c: Include <pupa/env.h>.
13860         (pupa_set_root_dev): Use the environment variable `prefix' instead of
13861         using pupa_dl_get_prefix to get the prefix.
13862         * kern/misc.c: Include <pupa/env.h>.
13863         (pupa_isdigit): New function.
13864         (pupa_isgraph): Likewise.
13865         (pupa_ftoa): Likewise.
13866         (pupa_vsprintf): Added support for printing values of the type
13867         `double'.  Make it possible to format variable output when using
13868         formatting like `%1.2%f'.
13869         (pupa_split_cmdline): New function.
13870         * kern/rescue.c: Include <pupa/env.h>.
13871         (next_word): Removed function.
13872         (pupa_rescue_cmd_prefix): Likewise.
13873         (pupa_rescue_cmd_set): New function.
13874         (pupa_rescue_cmd_unset): New function.
13875         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
13876         split the command line instead of splitting it here.  Added
13877         support for setting variables using the syntax `foo=bar'.  Don't
13878         initialize the prefix command anymore.  Initialized the set and
13879         unset commands.
13880         * normal/cmdline.c: Include <pupa/env.h>.
13881         (pupa_tab_complete): Added prototypes for print_simple_completion,
13882         print_partition_completion, add_completion, iterate_commands,
13883         iterate_dev, iterate_part and iterate_dir. Moved code to print
13884         partition information from here to kern/disk.c.
13885         (pupa_cmdline_run): Don't check if the function exists anymore.
13886         * normal/main.c: Include <pupa/env.h>.
13887         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
13888         instead of using pupa_dl_get_prefix to get the prefix.
13889         * term/i386/pc/vga.c: Include <pupa/arg.h>.
13890         (check_vga_mem): Cast pointers to `void *' to silence a gcc
13891         warning.
13892         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
13893         (pupa_vga_setcolor): Declare unused variables with `__attribute__
13894         ((unused))' to silence a gcc warning.
13895         (pupa_vga_setcolor): Likewise.
13896         (debug_command): Changed to match argument parsing
13897         interface changes.
13898         * util/pupa-emu.c: Include <pupa/env.h>.
13899         (options): Added 0's for unused fields to silence a gcc warning.
13900         (argp): Likewise.
13901         (main): Use the environment variable `prefix' instead of using
13902         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
13903         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
13904         and terminal.
13906         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
13907         * util/misc.c: Include <malloc.h>.
13908         (pupa_malloc): Rewritten so errors are correctly reported.
13909         (pupa_realloc): Likewise.
13910         (pupa_memalign): Likewise.
13911         (pupa_mm_init_region): Declare unused variables with
13912         `__attribute__ ((unused))' to silence a gcc warning.
13913         * normal/i386/setjmp.S: Remove tab at the end of the file to
13914         silence a gcc warning.
13915         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
13916         variables with `__attribute__ ((unused))' to silence a gcc
13917         warning.
13918         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
13919         local variable i unsigned to silence a gcc warning.
13921         * kern/term.c: Include <pupa/misc.h>.
13922         (pupa_more_lines): New variable.
13923         (pupa_more): Likewise.
13924         (pupa_putcode): When the pager is active pause at the end of every
13925         screen.
13926         (pupa_set_more): New function.
13927         * include/pupa/term.h (pupa_set_more): New prototype.
13930 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
13932         Now this project is GRUB 2 rather than PUPA. The location of
13933         the CVS repository was moved to GRUB's.
13935         * configure.ac: Use bug-grub as the reporting address.
13936         Use GRUB instead of PUPA.
13937         Change the version number to 1.90.
13939 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
13941         * genkernsyms.sh: Updated copyright information.
13942         * genmk.rb: Likewise.
13943         * genmodsrc.sh: Likewise.
13944         * gensymlist.sh: Likewise.
13945         * boot/i386/pc/boot.S: Likewise.
13946         * boot/i386/pc/diskboot.S: Likewise.
13947         * disk/i386/pc/biosdisk.c: Likewise.
13948         * disk/i386/pc/partition.c: Likewise.
13949         * font/manager.c: Likewise.
13950         * fs/ext2.c: Likewise.
13951         * fs/fat.c: Likewise.
13952         * include/pupa/boot.h: Likewise.
13953         * include/pupa/device.h: Likewise.
13954         * include/pupa/disk.h: Likewise.
13955         * include/pupa/dl.h: Likewise.
13956         * include/pupa/elf.h: Likewise.
13957         * include/pupa/err.h: Likewise.
13958         * include/pupa/file.h: Likewise.
13959         * include/pupa/font.h: Likewise.
13960         * include/pupa/fs.h: Likewise.
13961         * include/pupa/kernel.h: Likewise.
13962         * include/pupa/loader.h: Likewise.
13963         * include/pupa/misc.h: Likewise.
13964         * include/pupa/mm.h: Likewise.
13965         * include/pupa/net.h: Likewise.
13966         * include/pupa/normal.h: Likewise.
13967         * include/pupa/rescue.h: Likewise.
13968         * include/pupa/setjmp.h: Likewise.
13969         * include/pupa/symbol.h: Likewise.
13970         * include/pupa/term.h: Likewise.
13971         * include/pupa/types.h: Likewise.
13972         * include/pupa/i386/setjmp.h: Likewise.
13973         * include/pupa/i386/types.h: Likewise.
13974         * include/pupa/i386/pc/biosdisk.h: Likewise.
13975         * include/pupa/i386/pc/boot.h: Likewise.
13976         * include/pupa/i386/pc/console.h: Likewise.
13977         * include/pupa/i386/pc/init.h: Likewise.
13978         * include/pupa/i386/pc/kernel.h: Likewise.
13979         * include/pupa/i386/pc/linux.h: Likewise.
13980         * include/pupa/i386/pc/loader.h: Likewise.
13981         * include/pupa/i386/pc/memory.h: Likewise.
13982         * include/pupa/i386/pc/multiboot.h: Likewise.
13983         * include/pupa/i386/pc/partition.h: Likewise.
13984         * include/pupa/i386/pc/time.h: Likewise.
13985         * include/pupa/i386/pc/vga.h: Likewise.
13986         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
13987         * include/pupa/util/getroot.h: Likewise.
13988         * include/pupa/util/misc.h: Likewise.
13989         * include/pupa/util/resolve.h: Likewise.
13990         * kern/device.c: Likewise.
13991         * kern/disk.c: Likewise.
13992         * kern/dl.c: Likewise.
13993         * kern/err.c: Likewise.
13994         * kern/file.c: Likewise.
13995         * kern/fs.c: Likewise.
13996         * kern/loader.c: Likewise.
13997         * kern/main.c: Likewise.
13998         * kern/misc.c: Likewise.
13999         * kern/mm.c: Likewise.
14000         * kern/rescue.c: Likewise.
14001         * kern/term.c: Likewise.
14002         * kern/i386/dl.c: Likewise.
14003         * kern/i386/pc/init.c: Likewise.
14004         * kern/i386/pc/lzo1x.S: Likewise.
14005         * kern/i386/pc/startup.S: Likewise.
14006         * loader/i386/pc/chainloader.c: Likewise.
14007         * loader/i386/pc/linux.c: Likewise.
14008         * loader/i386/pc/multiboot.c: Likewise.
14009         * normal/cmdline.c: Likewise.
14010         * normal/command.c: Likewise.
14011         * normal/main.c: Likewise.
14012         * normal/menu.c: Likewise.
14013         * normal/i386/setjmp.S: Likewise.
14014         * term/i386/pc/console.c: Likewise.
14015         * term/i386/pc/vga.c: Likewise.
14016         * util/console.c: Likewise.
14017         * util/genmoddep.c: Likewise.
14018         * util/misc.c: Likewise.
14019         * util/pupa-emu.c: Likewise.
14020         * util/resolve.c: Likewise.
14021         * util/unifont2pff.rb: Likewise.
14022         * util/i386/pc/biosdisk.c: Likewise.
14023         * util/i386/pc/getroot.c: Likewise.
14024         * util/i386/pc/pupa-mkimage.c: Likewise.
14025         * util/i386/pc/pupa-setup.c: Likewise.
14027 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
14029         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
14030         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
14031         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
14032         reading and reset it after reading.
14033         (pupa_ext2_close): Return PUPA_ERR_NONE.
14035         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
14036         Correct value.
14037         (struct linux_kernel_header): Add kernel_version and
14038         initrd_addr_max.
14039         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
14040         pupa_file_read succeeds.
14041         (pupa_rescue_cmd_initrd): Implement.
14043 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
14045         * fs/ext2.c (pupa_ext2_label): New function.
14046         (pupa_ext2_fs): Added label.
14047         * fs/fat.c (pupa_fat_label): New function.
14048         (pupa_fat_fs): Added label.
14049         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
14051         * kern/misc.c (pupa_strndup): New function.
14052         * include/pupa/misc.h (pupa_strndup): New prototype.
14054         * include/pupa/normal.h: Include <pupa/err.h>.
14055         (pupa_set_history): New prototype.
14056         (pupa_iterate_commands): New prototype.
14057         * normal/cmdline.c: Include <pupa/machine/partition.h>,
14058         <pupa/disk.h>, <pupa/file.h>.
14059         (hist_size): New variable.
14060         (hist_lines): Likewise.
14061         (hist_end): Likewise.
14062         (hist_used): Likewise.
14063         (pupa_set_history): New function.
14064         (pupa_history_get): Likewise.
14065         (pupa_history_add): Likewise.
14066         (pupa_history_replace): Likewise.
14067         (pupa_tab_complete): Likewise.
14068         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
14069         completion shows partitionnames while completing partitions, this
14070         feature was suggested by Jeff Bailey.
14071         * normal/command.c (pupa_iterate_commands): New function.
14072         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
14073         (pupa_normal_init): Initialize history buffer.
14074         (PUPA_MOD_INIT): Likewise.
14075         (pupa_normal_fini): Free the history buffer.
14076         (PUPA_MOD_FINI): Likewise.
14078         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
14079         key.
14081         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
14082         * configure.ac [i386]: Check for regparam bug.
14083         (NESTED_FUNC_ATTR) [! i386]: Defined.
14085 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
14087         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
14088         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
14089         (pupa_emu_SOURCES): New variable.
14090         (pupa_emu_LDFLAGS): Likewise.
14091         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
14092         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
14093         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
14094         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14095         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
14096         (pupa_jmp_buf): New typedef.
14097         (pupa_setjmp) [PUPA_UTIL]: New macro.
14098         (pupa_longjmp) [PUPA_UTIL]: Likewise.
14099         * include/pupa/term.h (struct pupa_term): New member `refresh'.
14100         (pupa_refresh): New prototype.
14101         * include/pupa/util/getroot.h: New file.
14102         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
14103         it.
14104         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
14105         (pupa_rescue_cmd_cat): Likewise.
14106         (pupa_rescue_cmd_ls): Likewise.
14107         (pupa_rescue_cmd_testload): Likewise.
14108         (pupa_rescue_cmd_lsmod): Likewise.
14109         * normal/cmdline.c (pupa_cmdline_get): Likewise.
14110         * normal/menu.c (run_menu): Likewise.
14111         * kern/term.c (pupa_cls): Likewise.
14112         (pupa_refresh): New function.
14113         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
14114         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14115         * util/console.c: New file.
14117         * util/i386/pc/getroot.c: New file.
14118         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
14119         (pupa_putchar): New function.
14120         (pupa_refresh): Likewise.
14121         (xgetcwd): Function moved to ...
14122         (strip_extra_slashes): Likewise.
14123         (get_prefix): Likewise.
14124         * util/i386/pc/getroot.c: ... here.
14125         (find_root_device): Function moved and renamed to...
14126         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
14127         Changed all callers.
14128         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
14129         and renamed to...
14130         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
14131         Changed all callers.
14132         * util/misc.c (pupa_memalign): New function.
14133         (pupa_mm_init_region): Likewise.
14134         (pupa_register_exported_symbols): Likewise.
14135         (pupa_putchar): Function removed.
14136         * util/pupa-emu.c: New file.
14138 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
14140         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
14141         (_multiboot_mod_SOURCES): New variable.
14142         (_multiboot_mod_CFLAGS): Likewise.
14143         * loader/i386/pc/multiboot.c: New file.
14144         * include/pupa/i386/pc/multiboot.h: Likewise.
14145         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
14146         (pupa_multiboot_real_boot): New function.
14147         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
14148         (pupa_multiboot_real_boot): New prototype.
14149         (pupa_rescue_cmd_multiboot): Likewise
14150         (pupa_rescue_cmd_module): Likewise.
14152         * kern/loader.c (pupa_loader_set): Continue when
14153         pupa_loader_unload_func() fails.
14154         (pupa_loader_unset): New function.
14155         * include/pupa/loader.h (pupa_loader_unset): New prototype.
14157         * kern/misc.c (pupa_stpcpy): New function.
14158         * include/pupa/misc.h (pupa_stpcpy): New prototype.
14160 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
14162         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
14163         for available extensions.
14165         * include/pupa/i386/pc/time.h: New file.
14166         * kern/disk.c: Include <pupa/machine/time.h>.
14167         (PUPA_CACHE_TIMEOUT): New macro.
14168         (pupa_last_time): New variable.
14169         (pupa_disk_open): Flush the cache when there was a timeout.
14170         (pupa_disk_close): Reset the timer.
14171         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
14172         pupa_currticks.
14173         * util/misc.c: Include <sys/times.h>
14174         (pupa_get_rtc): New function.
14176 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
14178         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
14179         as blocks.
14180         (pupa_ext2_get_file_block): Use blocks member.
14182         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
14183         first block. Return -1 instead of pupa_errno on error.
14185 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
14187         * README: In the pupa-mkimage example use _chain instead of chain
14188         and ext2 instead of fat.
14189         * TODO: Replace ext2fs with jfs as an example.  Add an item for
14190         adding journal playback for ext2fs.
14191         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
14192         (pkgdata_MODULES): Added ext2.mod.
14193         (ext2_mod_SOURCES): New variable.
14194         (ext2_mod_CFLAGS): Likewise.
14195         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
14196         * include/pupa/misc.h (pupa_strncpy): New prototype.
14197         (pupa_strcat): Likewise.
14198         (pupa_strncmp): Likewise.
14199         * kern/misc.c (pupa_strcat): Enable function.
14200         (pupa_strncpy): New function.
14201         (pupa_strncmp): Likewise.
14202         * fs/ext2.c: New file.
14204         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
14205         when the read failed before retrying.
14206         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
14207         (_FILE_OFFSET_BITS): Likewise.
14208         * configure.ac: Added AC_SYS_LARGEFILE.
14210 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
14212         * genmk.rb (PModule#rule): Make sure to get only symbol names
14213         from the output of nm.
14214         Reported by Robert Millan <zeratul2@wanadoo.es>.
14216 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
14218         I forgot to check in these changes for a long time. This adds
14219         incomplete support for VGA console, and this is still very
14220         buggy. Also, a lot of consideration is required for I18N,
14221         UNICODE, and VGA font issues. Therefore, assume that this is
14222         such that "better than nothing".
14224         * font/manager.c: New file.
14225         * include/pupa/font.h: Likewise.
14226         * include/pupa/i386/pc/vga.h: Likewise.
14227         * term/i386/pc/vga.c: Likewise.
14228         * util/unifont2pff.rb: Likewise.
14230         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
14231         (pkgdata_MODULES): Added vga.mod and font.mod.
14232         (vga_mod_SOURCES): New variables.
14233         (vga_mod_CFLAGS): Likewise.
14234         (font_mod_SOURCES): Likewise.
14235         (font_mod_CFLAGS): Likewise.
14237         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
14239         * include/pupa/term.h: Include pupa/err.h.
14240         (struct pupa_term): Added init and fini.
14241         Changed the argument of putchar to pupa_uint32_t.
14243         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
14244         (pupa_console_real_putchar): New prototype.
14245         (pupa_console_putchar): Removed.
14246         (pupa_console_checkkey): Exported.
14247         (pupa_console_getkey): Likewise.
14249         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
14250         characters.
14252         * kern/term.c (pupa_term_set_current): Rewritten.
14253         (pupa_putchar): Likewise.
14254         (pupa_putcode): New function.
14256         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
14257         (pupa_console_real_putchar): ... this.
14258         (pupa_vga_set_mode): New function.
14259         (pupa_vga_get_font): Likewise.
14261         * normal/command.c: Include pupa/term.h.
14262         (terminal_command): New function.
14263         (pupa_command_init): Register the command "terminal".
14265         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
14266         (DISP_UP): Likewise.
14267         (DISP_RIGHT): Likewise.
14268         (DISP_DOWN): Likewise.
14269         (DISP_HLINE): Likewise.
14270         (DISP_VLINE): Likewise.
14271         (DISP_UL): Likewise.
14272         (DISP_UR): Likewise.
14273         (DISP_LL): Likewise.
14274         (DISP_LR): Likewise.
14276         * term/i386/pc/console.c (pupa_console_putchar): New function.
14278 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
14280         * util/resolve.c (pupa_util_resolve_dependencies): BUG
14281         FIX. Reverse the path_list.
14283         * include/pupa/normal.h: Export pupa_register_command and
14284         pupa_unregister_command.
14286         * hello/hello.c (pupa_cmd_hello): New module.
14287         * conf/i386-pc.rmk: Added hello.mod.
14289 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
14291         * kern/i386/pc/lzo1x.S: New file.
14293         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
14294         (compress_kernel): New variable.
14295         (generate_image): Heavily modified to support compressing a
14296         large part of the core image.
14298         * util/misc.c (pupa_util_read_image): Fix a file descriptor
14299         leak.
14300         (pupa_util_load_image): New function.
14302         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
14303         (pupa_compressed_size): New variable.
14304         (codestart): Enable Gate A20 here.
14305         Decompress the compressed part of the core image.
14306         Rearrange the code to put functions and variables which are
14307         required for initialization in the non-compressed part.
14308         Include lzo1x.S.
14310         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
14311         here.
14313         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
14315         * include/pupa/i386/pc/kernel.h
14316         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
14317         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
14318         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14319         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14320         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
14322         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
14324         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
14325         (Utility#rule): Likewise.
14327         * configure.ac: Check if LZO is available.
14329 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
14331         * include/pupa/normal.h: New file.
14332         * include/pupa/setjmp.h: Likewise.
14333         * include/pupa/i386/setjmp.h: Likewise.
14334         * normal/cmdline.c: Likewise.
14335         * normal/command.c: Likewise.
14336         * normal/main.c: Likewise.
14337         * normal/menu.c: Likewise.
14338         * normal/i386/setjmp.S: Likewise.
14340         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
14341         (pupa_rescue_cmd_initrd): Likewise.
14343         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
14344         Likewise.
14346         * kern/i386/pc/startup.S (translation_table): New variable.
14347         (translate_keycode): New function.
14348         (pupa_console_getkey): Call translate_keycode.
14350         * kern/rescue.c (attempt_normal_mode): New function.
14351         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
14352         it failed, print a message.
14354         * kern/mm.c (pupa_real_malloc): Print more information when a
14355         free magic is broken.
14356         (pupa_free): If the first free header is not free actually, set
14357         it to P.
14359         * kern/main.c (pupa_load_normal_mode): Just load the module
14360         "normal".
14361         (pupa_main): Don't print the message
14362         "Entering into rescue mode..." here.
14364         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
14365         Declared.
14366         (pupa_rescue_cmd_initrd): Likewise.
14367         (pupa_rescue_cmd_initrd): Likewise.
14369         * include/pupa/symbol.h (FUNCTION): Specify the type.
14370         (VARIABLE): Likewise.
14372         * include/pupa/err.h (pupa_err_t): Added
14373         PUPA_ERR_UNKNOWN_COMMAND.
14375         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
14376         (pupa_dl_get_prefix): Likewise.
14378         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
14379         Added _chain.mod and _linux.mod instead of chain.mod and
14380         linux.mod.
14381         (chain_mod_SOURCES): Renamed to ...
14382         (_chain_mod_SOURCES): ... this.
14383         (chain_mod_CFLAGS): Renamed to ...
14384         (_chain_mod_CFLAGS): ... this.
14385         (linux_mod_SOURCES): Renamed to ...
14386         (_linux_mod_SOURCES): ... this.
14387         (linux_mod_CFLAGS): Renamed to ...
14388         (_linux_mod_CFLAGS): ... this.
14389         (normal_mod_SOURCES): New variable.
14390         (normal_mod_CFLAGS): Likewise.
14391         (normal_mod_ASFLAGS): Likewise.
14393 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
14395         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
14396         possible.
14398         * kern/dl.c (pupa_dl_ref): Refer depending modules
14399         recursively.
14400         (pupa_dl_unref): Unrefer depending modules recursively.
14401         Don't call pupa_dl_unload implicitly, because PUPA can crash if
14402         a module is unloaded before one depending on that module is
14403         unloaded.
14404         (pupa_dl_unload): Unload depending modules explicitly,
14405         if possible.
14407 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
14409         * include/pupa/i386/pc/linux.h: New file.
14410         * loader/i386/pc/linux.c: Likewise.
14412         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
14413         Removed.
14414         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
14415         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
14416         of PUPA_CHAINLOADER_BOOT_SECTOR.
14418         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
14419         (pupa_linux_prot_size): New variable.
14420         (pupa_linux_tmp_addr): Likewise.
14421         (pupa_linux_real_addr): Likewise.
14422         (pupa_linux_boot_zimage): New function.
14423         (pupa_linux_boot_bzimage): Likewise.
14425         * kern/i386/pc/init.c (struct mem_region): New structure.
14426         (MAX_REGIONS): New macro.
14427         (mem_regions): New variable.
14428         (num_regions): Likewise.
14429         (pupa_os_area_addr): Likewise.
14430         (pupa_os_area_size): Likewise.
14431         (pupa_lower_mem): Likewise.
14432         (pupa_upper_mem): Likewise.
14433         (add_mem_region): New function.
14434         (compact_mem_regions): Likewise.
14435         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
14436         the size of the conventional memory and that of so-called upper
14437         memory (before the first memory hole).
14438         Instead of adding each found region to free memory, use
14439         add_mem_region and add them after removing overlaps.
14440         Also, add only 1/4 of the upper memory to free memory. The rest
14441         is used for loading OS images. Maybe this is ad hoc, but this
14442         makes it much easier to relocate OS images when booting.
14444         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
14445         (pupa_enter_rescue_mode): Don't register initrd and module.
14447         * kern/mm.c: Include pupa/dl.h.
14449         * kern/main.c: Include pupa/file.h and pupa/device.h.
14451         * kern/loader.c (pupa_loader_load_module_func): Removed.
14452         (pupa_loader_load_module): Likewise.
14454         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
14455         ``.o''.
14457         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
14458         (pupa_linux_tmp_addr): Likewise.
14459         (pupa_linux_real_addr): Likewise.
14460         (pupa_linux_boot_zimage): Likewise.
14461         (pupa_linux_boot_bzimage): Likewise.
14463         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
14464         (pupa_upper_mem): Likewise.
14465         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
14466         module is too dangerous.
14468         * include/pupa/loader.h (pupa_os_area_addr): Declared.
14469         (pupa_os_area_size): Likewise.
14470         (pupa_loader_set): Remove the first argument. Loader doesn't
14471         manage modules or initrd any longer.
14472         (pupa_loader_load_module): Removed.
14474         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
14475         (linux_mod_SOURCES): New variable.
14476         (linux_mod_CFLAGS): Likewise.
14478 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
14480         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
14481         the length of a blocklist correctly.
14483         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
14484         Use ioctl only if the OS file is a block device.
14485         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
14486         not very useful for normal files.
14488         * kern/main.c (pupa_set_root_dev): New function.
14489         (pupa_load_normal_mode): Likewise.
14490         (pupa_main): Call those above.
14492         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
14493         pupa_uint16_t.
14495         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
14497 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
14499         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
14500         (setup): Configure the installed partition information and the
14501         dl prefix.
14503         * loader/i386/pc/chainloader.c (my_mod): New variable.
14504         (pupa_chainloader_unload): New function.
14505         (pupa_rescue_cmd_chainloader): Refer itself.
14506         (PUPA_MOD_INIT): Save its own module in MY_MOD.
14508         * kern/i386/pc/startup.S (install_partition): Removed.
14509         (version_string): Likewise.
14510         (config_file): Likewise.
14511         (pupa_install_dos_part): New variable.
14512         (pupa_install_bsd_part): Likewise.
14513         (pupa_prefix): Likewise.
14514         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
14516         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
14517         and pupa/misc.h.
14518         (make_install_device): New function.
14519         (pupa_machine_init): Set the dl prefix.
14521         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
14522         (buf): Renamed to ...
14523         (linebuf): ... this.
14524         (pupa_rescue_cmd_prefix): New function.
14525         (pupa_rescue_cmd_insmod): Likewise.
14526         (pupa_rescue_cmd_rmmod): Likewise.
14527         (pupa_rescue_cmd_lsmod): Likewise.
14528         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
14529         rmmod and lsmod.
14531         * kern/mm.c (pupa_memalign): If failed even after invalidating
14532         disk caches, unload unneeded modules and retry.
14534         * kern/misc.c (pupa_memmove): New function.
14535         (pupa_memcpy): Removed.
14536         (pupa_strcpy): New function.
14537         (pupa_itoa): Made static.
14539         * kern/dl.c (pupa_dl_iterate): New function.
14540         (pupa_dl_ref): Likewise.
14541         (pupa_dl_unref): Likewise.
14542         (pupa_dl_unload): Return if succeeded or not.
14543         (pupa_dl_unload_unneeded): New function.
14544         (pupa_dl_unload_all): Likewise.
14545         (pupa_dl_init): Renamed to ...
14546         (pupa_dl_set_prefix): ... this.
14547         (pupa_dl_get_prefix): New function.
14549         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
14550         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
14551         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14552         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14553         (pupa_install_dos_part): Declared.
14554         (pupa_install_bsd_part): Likewise.
14555         (pupa_prefix): Likewise.
14556         (pupa_boot_drive): Likewise.
14558         * include/pupa/types.h: Fix a typo.
14560         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
14561         pupa_memmove.
14562         (pupa_memmove): Declared.
14563         (pupa_strcpy): Likewise.
14565         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
14566         pupa_mod_init takes one argument, its own module.
14567         (pupa_dl_unload_unneeded): Declared.
14568         (pupa_dl_unload_all): Likewise.
14569         (pupa_dl_ref): Likewise.
14570         (pupa_dl_unref): Likewise.
14571         (pupa_dl_iterate): Likewise.
14572         (pupa_dl_init): Renamed to ...
14573         (pupa_dl_set_prefix): ... this.
14574         (pupa_dl_get_prefix): Declared.
14576         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
14577         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
14578         unloaded.
14579         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
14580         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
14582         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
14583         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
14585 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
14587         * util/i386/pc/pupa-setup.c (setup): Define the internal
14588         function find_first_partition_start at the top level, because GCC
14589         3.0.x cannot compile internal functions in deeper scopes
14590         correctly.
14591         (find_root_device): Use lstat instead of stat.
14592         Don't follow symbolic links.
14593         Fix the path-constructing code.
14595         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
14596         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
14597         by a BLKGETSIZE ioctl first, because block devices don't fill
14598         the member st_mode of the structure stat on Linux.
14599         [__linux__] (linux_find_partition): Use a temporary buffer
14600         REAL_DEV for the working space. Copy it to DEV before returning.
14601         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
14602         buffer cache consistent.
14603         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
14604         strncmp. The previous value was merely wrong.
14605         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
14607         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
14608         FAT size is 12. The previous value was merely wrong.
14610         * kern/main.c (pupa_main): Don't split the starting message from
14611         newlines.
14613         * kern/term.c (pupa_putchar): Put CR after LF instead of before
14614         LF, because BIOS goes crazy about character attributes in this
14615         case.
14617 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
14619         * include/i386/pc/util/biosdisk.h: New file.
14620         * util/i386/pc/biosdisk.c: Likewise.
14621         * util/i386/pc/pupa-setup.c: Likewise.
14623         * Makefile.in (INCLUDE_DISTFILES): Added
14624         include/pupa/i386/pc/util/biosdisk.h.
14625         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
14626         directory util/i386/pc.
14627         (install-local): Added a rule for sbin_UTILITIES.
14628         (uninstall): Likewise.
14630         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
14632         * util/misc.c (xrealloc): New function.
14633         (pupa_malloc): Likewise.
14634         (pupa_free): Likewise.
14635         (pupa_realloc): Likewise.
14636         (pupa_stop): Likewise.
14637         (pupa_putchar): Likewise.
14639         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
14641         * include/pupa/util/misc.h (xrealloc): Declared.
14643         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
14644         macro.
14645         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
14646         (PUPA_BOOT_MACHINE_BPB_END): ... this.
14648         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
14649         [PUPA_UTIL] (pupa_fat_fini): Likewise.
14651         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
14652         way should be implemented.
14653         [PUPA_UTIL] (pupa_fat_fini): Likewise.
14655         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
14656         the size of NAME for safety.
14657         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
14658         0x88.
14660         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
14661         (pupa_setup_SOURCES): Likewise.
14663         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
14665 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
14667         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
14668         bunch of pushl's from pusha, because this destroys the return
14669         value.
14671 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
14673         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
14674         This means that any missing prototypes could be fatal. Also, you
14675         must take care when writing assembly code. See the comments at
14676         the beginning of startup.S, for more details.
14678         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
14679         compilation mechanism.
14680         (pupa_chainloader_real_boot): Likewise.
14681         (pupa_biosdisk_rw_int13_extensions): Likewise.
14682         (pupa_biosdisk_rw_standard): Likewise.
14683         (pupa_biosdisk_check_int13_extensions): Likewise.
14684         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
14685         (pupa_biosdisk_get_diskinfo_standard): Likewise.
14686         (pupa_get_memsize): Likewise.
14687         (pupa_get_mmap_entry): Likewise.
14688         (pupa_console_putchar): Likewise.
14689         (pupa_console_setcursor): Likewise.
14690         (pupa_getrtsecs): Use pushl instead of push.
14692         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
14693         memory instead of the stack for a mmap entry, because some
14694         BIOSes may ignore the maximum size and overflow.
14696         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
14698         * genmk.rb (PModule#rule): Compile automatically generated
14699         sources with module-specific CFLAGS as well as other sources.
14701 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
14703         * configure.ac: Check ld.
14704         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
14705         respectively, before checking endianness and sizes.
14707         * Makefile.in (LD): New variable.
14709 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
14711         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
14713 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
14715         * Changelog: New file.