2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
[grub2/phcoder.git] / ChangeLog
blobcd29ffcb7f4c461484e93441f721141833109c00
1 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
3         * font/font.c (find_glyph): Check whether a font is present to avoid
4         segmentation fault.
5         
6 2009-07-20  Joe Auricchio <jauricchio@gmail.com>
8         * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
10 2009-07-20  Pavel Roskin  <proski@gnu.org>
12         * configure.ac: Trim excessively wordy excuses.
14 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
16         Add symlink, mtime and label support to AtheFS.
18         * fs/afs.c (grub_afs_sblock): Declare `name' as char.
19         (grub_afs_iterate_dir): Handle symlinks.
20         (grub_afs_open): Use grub_afs_read_symlink.
21         (grub_afs_dir): Likewise.
22         Pass mtime.
23         (grub_afs_label): New function.
24         (grub_afs_fs): Add grub_afs_label.
25         (grub_afs_read_symlink): New function.
27 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
29         Fix AtheFS support.
31         * fs/afs.c: Fix comments style.
32         (grub_afs_blockrun): Declare as packed.
33         (grub_afs_datastream): Likewise.
34         (grub_afs_bnode): Likewise.
35         (grub_afs_btree): Likewise.
36         (grub_afs_sblock): Likewise.
37         Declare `name' as char.
38         (grub_afs_inode): Declare as packed.
39         Change void *vnode to grub_uint32_t unused.
40         (grub_afs_iterate_dir): Check that key_size is positive.
41         (grub_afs_mount): Don't read superblock twice.
42         (grub_afs_dir): Don't free node in case of errorx
43         grub_fshelp_find_file already handles this.
44         (grub_afs_open): Likewise.
46 2009-07-19  Pavel Roskin  <proski@gnu.org>
48         * Makefile.in: Remove LIBLZO and enable_lzo.
49         * conf/i386-pc.rmk: Remove lzo support.
50         * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
51         * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA.  Remove lzo
52         support.
53         * kern/i386/pc/lzo1x.S: Remove.
54         * kern/i386/pc/startup.S: Remove lzo support.
55         * util/i386/pc/grub-mkimage.c: Likewise.
57 2009-07-19  Vladimir Serbinenko  <phcoder@gmail.com>
59         * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
60         * fs/xfs.c (grub_xfs_dir): Likewise.
61         * fs/afs.c (grub_afs_dir): Likewise.
62         * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
63         (grub_iso9660_open): Likewise.
64         * fs/jfs.c (grub_jfs_open): Likewise.
65         * fs/ext2.c (grub_ext2_dir): Likewise.
66         * include/grub/macho.h (grub_macho_fat_arch): Likewise.
67         * script/sh/lexer.c (grub_script_yylex): Likewise.
68         
69 2009-07-16  Pavel Roskin  <proski@gnu.org>
71         * configure.ac: Never add "-c" to CFLAGS.
73         * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
75         * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
76         grub_cv_cc_efiemu should be used.
78         * configure.ac: Typo fixes.
80         * kern/mm.c (grub_zalloc): New function.
81         (grub_debug_zalloc): Likewise.
82         * include/grub/mm.h: Declare grub_zalloc() and
83         grub_debug_zalloc().
84         * util/misc.c (grub_zalloc): New function.
85         * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
86         instead of grub_malloc(), remove unneeded initializations.
87         * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
88         * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
89         * commands/parttool.c (grub_cmd_parttool): Likewise.
90         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
91         * disk/raid5_recover.c (grub_raid5_recover): Likewise.
92         * disk/raid6_recover.c (grub_raid6_recover): Likewise.
93         * disk/usbms.c (grub_usbms_finddevs): Likewise.
94         * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
95         * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
96         (grub_cmd_efiemu_pnvram): Likewise.
97         * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
98         * fs/iso9660.c (grub_iso9660_mount): Likewise.
99         (grub_iso9660_iterate_dir): Likewise.
100         * fs/jfs.c (grub_jfs_opendir): Likewise.
101         * fs/ntfs.c (list_file): Likewise.
102         (grub_ntfs_mount): Likewise.
103         * kern/disk.c (grub_disk_open): Likewise.
104         * kern/dl.c (grub_dl_load_core): Likewise.
105         * kern/elf.c (grub_elf_file): Likewise.
106         * kern/env.c (grub_env_context_open): Likewise.
107         (grub_env_set): Likewise.
108         (grub_env_set_data_slot): Likewise.
109         * kern/file.c (grub_file_open): Likewise.
110         * kern/fs.c (grub_fs_blocklist_open): Likewise.
111         * loader/i386/multiboot.c (grub_module): Likewise.
112         * loader/xnu.c (grub_xnu_create_key): Likewise.
113         (grub_xnu_create_value): Likewise.
114         * normal/main.c (grub_normal_add_menu_entry): Likewise.
115         (read_config_file): Likewise.
116         * normal/menu_entry.c (make_screen): Likewise.
117         * partmap/sun.c (sun_partition_map_iterate): Likewise.
118         * script/sh/lexer.c (grub_script_lexer_init): Likewise.
119         * script/sh/script.c (grub_script_parse): Likewise.
120         * video/bitmap.c (grub_video_bitmap_create): Likewise.
121         * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
122         * video/readers/png.c (grub_png_output_byte): Likewise.
123         (grub_video_reader_png): Likewise.
125 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
127         Enable all targets that can be built by default
129         * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
130         grub-mkfont and grub-fstest if they can be built
132 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
134         Fix hang and segmentation fault in grub-emu-usb
136         * disk/scsi.c (grub_scsi_open): return err and not grub_errno
137         * util/usb.c (grub_libusb_devices): likewise
138         (grub_libusb_init): rename to ...
139         (GRUB_MOD_INIT (libusb)):...this
140         (grub_libusb_fini): rename to ..
141         (GRUB_MOD_FINI (libusb)):...this
142         * disk/usbms.c (grub_usbms_transfer): fix retry logic
143         * include/grub/disk.h (grub_raid_init): removed, it's useless
144         (grub_raid_fini): likewise
145         (grub_lvm_init): likewise
146         (grub_lvm_fini): likewise
147         * util/grub-emu.c (main): don't call grub_libusb_init, it's done
148         by grub_init_all
150 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
152         Fix libusb
154         * Makefile.in (LIBUSB): new macro
155         * genmk.rb (Utility/print_tail): new method
156         (Utility/rule): use intermediary variable #{prefix}_OBJECTS
157         (top level): call util.print_tail at the end.
159 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
161         Make FreeBSD accept zpool.cache
163         * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
164         type is /boot/zfs/zpool.cache
166 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
168         Fix 64-bit efiemu
170         * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
171         correct wrong typedef
172         * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
174 2009-07-15  Pavel Roskin  <proski@gnu.org>
176         * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
177         * kern/disk.c (struct grub_disk_cache): Likewise.
179         * commands/probe.c (options): Typo fix.
181         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
182         Increase to 0x5a to accommodate FAT32.  Adjust other offsets
183         accordingly.
184         Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
186         * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
187         the end of "Error" to make the message more readable.
189         * boot/i386/pc/boot.S (kernel_segment): Remove.
190         (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
191         for destination.
193         * boot/i386/pc/boot.S (boot_version): Remove.
194         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
195         Remove.
197         * include/grub/i386/pc/boot.h: Sort all offsets.
198         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
199         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
200         * boot/i386/pc/boot.S: Assert location of every offset listed in
201         include/grub/i386/pc/boot.h.
203 2009-07-13  Pavel Roskin  <proski@gnu.org>
205         * include/grub/i386/coreboot/machine.h: Rename
206         GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
207         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
208         multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
210         * kern/dl.c: Force native word size to suppress warnings when
211         compiling grub-emu.
213         * kern/device.c (grub_device_iterate): Change struct part_ent to
214         hold the name, not a pointer to it.  Use one grub_malloc() per
215         partition, not two.  Free partition_name if grub_malloc() fails.
216         Set ents to NULL only before grub_partition_iterate() is called.
218 2009-07-11  Bean  <bean123ch@gmail.com>
220         * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
221         childname.
223 2009-07-10  Bean  <bean123ch@gmail.com>
224 2009-07-10  Robert Millan  <rmh.grub@aybabtu.com>
226         * kern/ieee1275/openfw.c (grub_children_iterate)
227         (grub_devalias_iterate): Fix size evaluation for property or path
228         strings, which was broken since r2132.
230 2009-07-07  Pavel Roskin  <proski@gnu.org>
232         * commands/search.c (search_file): Merge into ...
233         (search_fs): ... this.  Accept search type as argument.
234         (grub_cmd_search): Pass search type to search_fs().
236         * include/grub/util/console.h: New file.
237         * util/console.c: Use it instead of grub/machine/console.h.
238         * util/grub-emu.c: Likewise.
240         * lib/arg.c (find_long_option): Remove.
241         (find_long): Add `len' argument, make `s' const char *.
242         (grub_arg_parse): Parse long options in place, not in a
243         temporary buffer.
245 2009-07-06  Pavel Roskin  <proski@gnu.org>
247         * commands/search.c (search_fs): Fix potential NULL pointer
248         dereference.
250         * commands/search.c (search_fs): Replace QUID macro with quid_fn
251         function pointer.
253 2009-07-06  Daniel Mierswa  <impulze@impulze.org>
255         * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
256         comparison.
258 2009-07-05  Pavel Roskin  <proski@gnu.org>
260         * include/grub/i386/linux.h (struct linux_kernel_params):
261         Restore padding3, it's still needed.
263         * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
264         FreeBSD.
265         * util/osdetect.lua: Likewise.
267 2009-07-05  Bean  <bean123ch@gmail.com>
269         * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
271         * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
272         (grub_lua_getenv): Likewise.
273         (grub_lua_setenv): Likewise.
274         (save_errno): New function.
275         (push_result): Likewise.
276         (grub_lua_enum_device): Likewise.
277         (grub_lua_enum_file): Likewise.
278         (grub_lua_file_open): Likewise.
279         (grub_lua_file_close): Likewise.
280         (grub_lua_file_seek): Likewise.
281         (grub_lua_file_read): Likewise.
282         (grub_lua_file_getline): Likewise.
283         (grub_lua_file_getsize): Likewise.
284         (grub_lua_file_getpos): Likewise.
285         (grub_lua_file_eof): Likewise.
286         (grub_lua_file_exist): Likewise.
287         (grub_lua_add_menu): Likewise.
289         * script/lua/grub_lua.h (isupper): New inline function.
290         (islower): Likewise.
291         (ispunct): Likewise.
292         (isxdigit): Likewise.
293         (strcspn): Change to normal function.
294         (strpbkr): New function declaration.
295         (memchr): Likewise.
297         * script/lua/grub_main.c (scan_str): New function.
298         (strcspn): Likewise.
299         (strpbrk): Likewise.
300         (memchr): Likewise.
302         * script/lua/linit.c (lualibs): Enable the string library.
304         * util/osdetect.lua: New file.
306 2009-07-04  Robert Millan  <rmh.grub@aybabtu.com>
308         * include/grub/i386/linux.h (struct linux_kernel_params): Add
309         `capabilities' member.
311 2009-07-02  Pavel Roskin  <proski@gnu.org>
313         * genparttoollist.sh: Add missing newline at the end.
315 2009-07-01  Pavel Roskin  <proski@gnu.org>
317         * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
319         * util/hostdisk.c (open_device): Remove `const' from
320         `sysctl_size', as sysctlbyname() can change it (in this case it
321         doesn't actually happen).
323         * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
324         using signed long int constants.
326         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
327         constant to avoid a warning on FreeBSD.
329         * util/hostdisk.c (device_is_wholedisk): Compile only on systems
330         where it's needed.
332         * Makefile.in: Install include/grub/machine symlink.
334         * Makefile.in: When installing symlinks, use "cp -fR", which
335         works on FreeBSD and MacOSX.
336         From Yves Blusseau <cl7m42e02@sneakemail.com>
338         * kern/dl.c (grub_dl_resolve_symbol): Make static.
339         * include/grub/dl.h: Remove grub_dl_resolve_symbol().
341         * util/misc.c: Move grub_reboot() and grub_halt() ...
342         * util/grub-emu.c: ... here.  Make main_env static.
343         * include/grub/util/misc.h: Remove main_env.
345         * kern/mm.c: Use correct format to print size_t.
347         * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
348         * kern/i386/dl.c: Use ELF symbols without "32" or "64".
349         * kern/powerpc/dl.c: Likewise.
350         * kern/sparc64/dl.c: Likewise.
351         * kern/x86_64/dl.c: Likewise.
353 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
355         Fix grub-emu build on sparc64-ieee1275.
357         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Syncronize with ...
358         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
360 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
362         * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
363         (grub_reboot, grub_halt): New functions.
365         * util/i386/pc/misc.c: Delete.  Update all users.
366         * util/sparc64/ieee1275/misc.c: Likewise.
367         * util/powerpc/ieee1275/misc.c: Likewise.
369 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
371         * conf/i386.rmk (setjmp_mod_SOURCES)
372         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
373         * conf/common.rmk (setjmp_mod_SOURCES)
374         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
375         to use $(target_cpu).
376         * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
377         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
378         * conf/powerpc-ieee1275.rmk: Likewise.
379         * conf/sparc64-ieee1275.rmk: Likewise.
381         * conf/i386-pc.rmk (kernel_img_SOURCES): Use
382         $(target_cpu) for kern/$(target_cpu)/dl.c.
383         * conf/i386-efi.rmk: Likewise.
384         * conf/i386-ieee1275.rmk: Likewise.
385         * conf/x86_64-efi.rmk: Likewise.
386         * conf/i386-coreboot.rmk: Likewise.
387         * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
388         $(target_cpu) for kern/$(target_cpu)/dl.c and for
389         kern/$(target_cpu)/cache.S.
390         * conf/sparc64-ieee1275.rmk: Likewise.
392 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
394         * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
395         type to `grub_uint8_t', and adjust `padding9' accordingly.
397 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
399         * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
401         * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
402         assembly in final jump, using register constraints.
404         (grub_linux_boot): For text mode, initialize `have_vga' using
405         GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
407         Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
408         right before the final jump.
410         Set `video_mode' to 0x3.
412         Document initialization of `video_page', `video_mode' and
413         `video_ega_bx'.
415 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
417         * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
418         * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
419         and set GRUB_LINUX_FLAG_QUIET appropiately.
421 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
423         Fix build on Debian / sparc.
425         * configure.ac: Recognize `sparc' target_cpu (as sparc64).
427 2009-06-28  Pavel Roskin  <proski@gnu.org>
429         * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
430         fix a warning.
432         * util/grub.d/10_linux.in: Match SUSE style initrd names.
434 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
436         * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
437         `err'.
439 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
441         Revert r2338.
443         * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
444         file can't be opened.  grub_file_open() is already supposed to set
445         grub_errno / grub_errmsg appropiately.
446         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
448 2009-06-27  Pavel Roskin  <proski@gnu.org>
449 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
451         * include/grub/dl.h: Include grub/elf.h.
452         (struct grub_dl): Add symtab field.
453         * kern/dl.c [GRUB_MACHINE_QEMU]: Define
454         GRUB_MODULES_MACHINE_READONLY.
455         (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
456         of the header for read-only modules.
457         (grub_dl_unload): Free mod->symtab for read-only modules.
458         * kern/i386/dl.c: Use mod->symtab.
459         * kern/powerpc/dl.c: Likewise.
460         * kern/sparc64/dl.c: Likewise.
461         * kern/x86_64/dl.c: Likewise.
463         * conf/i386-qemu.rmk: New file.
464         * kern/i386/qemu/startup.S: Likewise.
465         * kern/i386/qemu/mmap.c: Likewise.
466         * boot/i386/qemu/boot.S: Likewise.
467         * include/grub/i386/qemu/time.h: Likewise.
468         * include/grub/i386/qemu/serial.h: Likewise.
469         * include/grub/i386/qemu/kernel.h: Likewise.
470         * include/grub/i386/qemu/console.h: Likewise.
471         * include/grub/i386/qemu/boot.h: Likewise.
472         * include/grub/i386/qemu/init.h: Likewise.
473         * include/grub/i386/qemu/machine.h: Likewise.
474         * include/grub/i386/qemu/loader.h: Likewise.
475         * include/grub/i386/qemu/memory.h: Likewise.
477         * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
478         (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
479         [qemu] (pkglib_IMAGES): Add `boot.img'.
480         [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
481         [qemu] (boot_img_FORMAT): New variables.
482         [qemu] (bin_UTILITIES): Add `grub-mkimage'.
483         [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
484         [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
485         [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
486         [qemu] (kernel_img_FORMAT): New variables.
488         * configure.ac: Recognise `i386-qemu'.
490         * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
491         (for no compression).
492         [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
493         a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
494         `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
495         `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
496         ifdefs).
498 2009-06-27  Pavel Roskin  <proski@gnu.org>
500         * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
501         read.
502         * efiemu/prepare32.c: Likewise.
503         * efiemu/prepare64.c: Likewise.
505 2009-06-26  Pavel Roskin  <proski@gnu.org>
507         * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
508         * include/grub/elf.h: Define symbols without "32" or "64" based
509         on GRUB_TARGET_WORDSIZE.
510         * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
511         * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
512         ELF definitions.
513         * efiemu/loadcore64.c: Likewise.
514         * loader/i386/bsd32.c: Likewise.
515         * loader/i386/bsd64.c: Likewise.
516         * kern/dl.c: Remove own ELF definitions.
517         * util/i386/efi/grub-mkimage.c: Likewise.
519 2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>
521         * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
522         segment 0x0 unconditionally, because the reference generated by
523         GAS is an absolute address.
525 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
527         * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
528         [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
530 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
532         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
533         indexes.  Check for -f explicitly.
534         (search_file): Improve error message.
535         (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
537 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
539         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
540         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
542 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
544         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
545         * conf/i386-ieee1275.rmk: Likewise.
546         * conf/i386-coreboot.rmk: Likewise.
548         * kern/i386/pc/startup.S (grub_stop): Remove function.
549         * kern/i386/ieee1275/startup.S: Likewise.
550         * kern/i386/coreboot/startup.S: Likewise.
551         * kern/i386/misc.S (grub_stop): New function.
553 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
555         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
556         * kern/i386/realmode.S (real_to_prot): ... to here.
558 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
560         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
561         with `kernel.img'.
562         (kernel_elf_SOURCES): Rename to ...
563         (kernel_img_SOURCES): ... this.
564         (kernel_elf_HEADERS): Rename to ...
565         (kernel_img_HEADERS): ... this.  Update all users.
566         (kernel_elf_ASFLAGS): Rename to ...
567         (kernel_img_ASFLAGS): ... this.
568         (kernel_elf_CFLAGS): Rename to ...
569         (kernel_img_CFLAGS): ... this.
570         (kernel_elf_LDFLAGS): Rename to ...
571         (kernel_img_LDFLAGS): ... this.
572         * conf/i386-coreboot.rmk: Likewise.
573         * conf/powerpc-ieee1275.rmk: Likewise.
575         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
576         with "kernel.img".
578 2009-06-21  Pavel Roskin  <proski@gnu.org>
580         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
581         to match nested functions.
582         * loader/sparc64/ieee1275/linux.c: Likewise.
584         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
586 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
588         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
589         all i386 platforms.
591 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
593         Fix asm file handling on ELF, and remove workarounds.
595         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
596         and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
597         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
598         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
600 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
602         Load BSD ELF modules
604         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
605         and loader/i386/bsd64.c
606         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
607         (FREEBSD_MODTYPE_ELF_MODULE): New definition
608         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
609         (grub_freebsd_load_elfmodule32): New declaration
610         (grub_freebsd_load_elfmoduleobj64): Likewise
611         (grub_freebsd_load_elf_meta32): Likewise
612         (grub_freebsd_load_elf_meta64): Likewise
613         (grub_freebsd_add_meta): Likewise
614         (grub_freebsd_add_meta_module): Likewise
615         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
616         (grub_freebsd_add_meta_module): Likewise and move module-specific
617         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
618         (grub_cmd_freebsd): Add elf-kernel specific parts
619         based on grub_freebsd_add_meta_module
620         (grub_cmd_freebsd_module): Add type parsing moved from
621         grub_freebsd_add_meta_module
622         (grub_cmd_freebsd_module_elf): New function
623         (cmd_freebsd_module_elf): New variable
624         (GRUB_MOD_INIT): Register freebsd_module_elf
625         * loader/i386/bsd32.c: New file
626         * loader/i386/bsd64.c: Likewise
627         * loader/i386/bsdXX.c: Likewise
628         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
629         (grub_elf64_load): Likewise
630         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
631         All users updated
632         (grub_elf64_load_hook_t): Likewise
634 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
636         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
637         variable.
638         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
639         don't write a menu entry for recovery mode.
641 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
643         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
644         after it's no longer needed.
646 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
648         * include/grub/i386/loader.h (grub_linux_prot_size)
649         (grub_linux_tmp_addr, grub_linux_real_addr)
650         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
651         GRUB_MACHINE_PCBIOS.
652         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
653         common grub_util_info() call to ...
654         (generate_image): ... here.
655         Fix use of uninitialized memory, comparison of signed with
656         unsigned integers and memory leak.
657         Remove bogus module address message.
659 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
661         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
662         grub_raid_register
663         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
665 2009-06-19  Pavel Roskin  <proski@gnu.org>
667         * configure.ac: Remove stray AC_MSG_CHECKING.
669 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
671         * disk/scsi.c (grub_scsi_open): use continue instead of big if
673 2009-06-18  Pavel Roskin  <proski@gnu.org>
675         * conf/common.rmk: Add fs_file.mod.
676         * disk/fs_file.c: New file.
677         * include/grub/disk.h (enum grub_disk_dev_id): Add
678         GRUB_DISK_DEVICE_FILE_ID.
680 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
682         Fix build with Apple's toolchain. Part 2
684         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
685         a fake start
687 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
689         Fix build with Apple's toolchain. Part 1
691         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
692         for long calls
693         * configure.ac: remove a leftover AC_MSG_RESULT
694         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
695         Apple's toolchain
697 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
699         Fix warnings
701         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
702         (decomp_block): initialize ch
703         use grub_memcpy instead of memcpy
705 2009-06-17  Pavel Roskin  <proski@gnu.org>
707         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
708         version, use declarations needed to use vga_text as the startup
709         console.
711         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
712         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
713         the kernel.
714         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
715         and grub_at_keyboard_fini(), it's done on module load and
716         unload.
718 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
720         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
721         file can't be found.
722         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
724 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
726         Fix newline handling
728         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
729         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
730         (grub_script_yylex): don't segfault on unterminated script
731         newline terminates command and variable
733 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
735         avoid double grub_adjust_range call. Bug reported by David Simner
737         * kern/disk.c (grub_disk_write): change to raw disk access before
738         calling disk_read
740 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
742         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
743         spaces, for the benefit of help2man.
744         * util/i386/efi/grub-mkimage.c (usage): Likewise.
746 2009-06-16  Pavel Roskin  <proski@gnu.org>
748         * kern/i386/halt.c: Include grub/machine/init.h.
749         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
751 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
753         * util/grub.d/30_os-prober.in: Use ${root} in the generated
754         drivemap menuentry.
756 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
758         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
759         `echo' command.
761 2009-06-16  Pavel Roskin  <proski@gnu.org>
763         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
764         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
765         save %dx, we only need %dl and we never change it.
766         * boot/i386/pc/cdboot.S: Don't set the root drive.
767         * boot/i386/pc/pxeboot.S: Likewise.
768         * include/grub/i386/pc/boot.h: Remove
769         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
770         GRUB_BOOT_MACHINE_DRIVE_CHECK.
771         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
772         * kern/i386/pc/init.c (make_install_device): Remove references
773         to grub_root_drive.
774         * kern/i386/pc/startup.S: Likewise.
775         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
777 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
779         xnu_uuid command
781         * commands/xnu_uuid.c: new file
782         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
783         (xnu_uuid_mod_SOURCES): new variable
784         (xnu_uuid_mod_CFLAGS): likewise
785         (xnu_uuid_mod_LDFLAGS): likewise
786         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
787         * conf/i386-ieee1275.rmk: likewise
788         * conf/i386-pc.rmk: likewise
789         * conf/powerpc-ieee1275.rmk: likewise
790         * conf/sparc64-ieee1275.rmk: likewise
791         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
793 2009-06-16  Pavel Roskin  <proski@gnu.org>
795         * configure.ac: Avoid '==' in test command, it's not portable.
797 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
799         Probe command
801         * commands/probe.c: new file
802         * conf/common.rmk (pkglib_MODULES): add probe.mod
803         (probe_mod_SOURCES): new variable
804         (probe_mod_CFLAGS): likewise
805         (probe_mod_LDFLAGS): likewise
806         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
807         * conf/i386-ieee1275.rmk: likewise
808         * conf/i386-pc.rmk: likewise
809         * conf/powerpc-ieee1275.rmk: likewise
810         * conf/sparc64-ieee1275.rmk: likewise
812 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
814         Fix handling of string like \"hello\" and "a
815         b"
817         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
818         (grub_script_yylex): fix parsing of quoting, escaping and newline
820 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
822         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
823         handling
825 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
827         * util/grub-mkconfig.in: Fix parsing of --output option.
829 2009-06-12  Pavel Roskin  <proski@gnu.org>
831         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
832         genmk.rb don't need to be generated or installed.
834 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
836         * commands/i386/pc/drivemap_int13h.S: add more comments
838 2009-06-11  Pavel Roskin  <proski@gnu.org>
840         * Makefile.in (uninstall): Uninstall manuals.
842         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
843         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
844         and update-grub_lib in two places.
845         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
847         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
848         a compiler warning.
850         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
851         `entry_lo' to fix variable shadowing.
853 2009-06-11  Christian Franke  <franke@computer.org>
855         * kern/misc.c (__enable_execute_stack): Add missing return type
856         to prevent gcc warning.
858 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
860         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
862 2009-06-11  Pavel Roskin  <proski@gnu.org>
864         * Makefile.in: Don't rely on any scripts being executable.
865         Always use $(SHELL) to run shell scripts.
867         * configure.ac: Always define ___main if using -nostdlib.  This
868         fixes tests on Cygwin.
870 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
872         UDF fix
874         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
875         is in bytes and not in blocks
877 2009-06-11  Pavel Roskin  <proski@gnu.org>
879         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
880         warning.
882 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
884         * util/grub.d/30_os-prober.in: Fix a comment. Source
885         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
886         to set the root device.  Place drivemap command in the generated
887         chain entry.
889 2009-06-11  Pavel Roskin  <proski@gnu.org>
891         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
892         have long been resolved.
894 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
896         * util/grub.d/10_linux.in: Capitalise "Linux".
898         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
900 2009-06-11  Pavel Roskin  <proski@gnu.org>
902         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
903         fix a gcc warning and ensure that the function won't ever exit.
905         * kern/i386/ieee1275/init.c: Add missing prototype for
906         grub_stop_floppy().
908         * loader/ieee1275/multiboot2.c [__i386__]: Include
909         grub/cpu/multiboot.h.
911         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
912         casts to short - they are not portable and cause warnings.  Fix
913         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
915 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
917         Drivemap fixes
919         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
920         new function
921         (grub_get_root_biosnumber_saved): new variable
922         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
923         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
924         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
925         %dx after the call if necessary
926         * conf/common.rmk (pkglib_MODULES): remove boot.mod
927         (boot_mod_SOURCES): remove
928         (boot_mod_CFLAGS): remove
929         (boot_mod_LDFLAGS): remove
930         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
931         (boot_mod_SOURCES): new variable
932         (boot_mod_CFLAGS): likewise
933         (boot_mod_LDFLAGS): likewise
934         * conf/i386-efi.rmk: likewise
935         * conf/i386-ieee1275.rmk: likewise
936         * conf/i386-pc.rmk: likewise
937         * conf/powerpc-ieee1275.rmk: likewise
938         * conf/sparc64-ieee1275.rmk: likewise
939         * conf/x86_64-efi.rmk: likewise
940         * include/grub/i386/pc/biosnum.h: new file
941         * lib/i386/pc/biosnum.c: likewise
942         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
943         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
944         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
946 2009-06-10  Pavel Roskin  <proski@gnu.org>
948         * io/gzio.c (test_header): Don't reuse one buffer for all data.
949         Use separate variables.  Read only the file size at the end, but
950         not the checksum that we don't use.
952         * kern/file.c (grub_file_read): Use void pointer for the buffer.
953         Adjust all callers.
955         * kern/ieee1275/openfw.c: Remove libc includes.
956         * kern/ieee1275/cmain.c: Likewise.
957         * include/grub/ieee1275/ieee1275.h: Likewise.
959         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
960         compiler warnings.
962 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
964         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
965         `genparttoollist.sh'.
966         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
967         Add `*.sh' to the list find searches for and change `mdate.sh'
968         to `mdate-sh'.
970 2009-06-10  Pavel Roskin  <proski@gnu.org>
972         * include/grub/multiboot2.h: Provide compatibility defines for
973         multiboot2.h.
974         * include/multiboot2.h: Include stdint.h only if needed, using
975         angle brackets.
976         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
977         grub/multiboot2.h.
978         * loader/ieee1275/multiboot2.c: Likewise.
979         * loader/multiboot2.c: Likewise.
980         * loader/multiboot_loader.c: Likewise.
982         * configure.ac: Use -nostdlib when probing for the target.  It
983         should not be required to have libc for the target.
985         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
986         they fail without libc headers for the target.
987         * include/grub/powerpc/libgcc.h: Use weak attribute for all
988         exports.
989         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
990         preprocessor conditionals.
992         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
993         build system doesn't need to be aware of the tar.c internals.
995 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
997         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
999 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
1001         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
1002         disk limit to 26 for IDE, Virtio, Xen and SCSI.
1004 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
1006         * util/i386/pc/grub-install.in: Change the error message if UUIDs
1007         aren't available if ata.mod gets used.
1009 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
1011         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
1012         initialising controller.
1013         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1015 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1017         * util/i386/pc/grub-install.in: Add a parameter --disk-module
1018         to choose between ata and biosdisk module on i386-pc.
1020 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
1022         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
1023         Subclass and Programming Interface fields in terms of the 3 byte
1024         Class Code register.
1025         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1027         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
1028         interface is OHCI.  Add grub_dprintf for symmetry with
1029         bus/usb/uhci.c.
1030         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
1031         interface is UHCI.  Add interf variable for programming
1032         interface.  Print interface with class/subclass.
1034         * bus/usb/ohci.c: Set interf with correct field.
1036         * bus/usb/uhci.c: Remove unneeded doubled lines.
1037         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
1038         Remove whitespace inside comment.
1040 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
1042         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
1043         as fallback an equivalent option without depth.
1045 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
1047         Not fail if unable to retrieve C/H/S on LBA disks
1049         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
1050         if unable to retrieve C/H/S on LBA disks
1052 2009-06-08  Pavel Roskin  <proski@gnu.org>
1054         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
1055         about aliasing.
1057 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1059         * Makefile.in (uninstall): Remove all $lib_DATA files.
1061 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
1063         Bugfix: install on partitionless device
1065         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
1066         is a whole disk
1068 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1070         * Makefile.in (uninstall): Remove all $include_DATA files.
1072 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1074         * commands/true.c: New file.  Implement the true and false commands.
1075         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
1076         (true_mod_SOURCES): New variable.
1077         (true_mod_CFLAGS): Likewise.
1078         (true_mod_LDFLAGS): Likewise.
1080 2009-06-05  Colin D Bennett  <colin@gibibit.com>
1082         Optimized font character lookup using binary search instead of linear
1083         search.  Fonts now are required to have the character index ordered by
1084         code point.
1086         * font/font.c (load_font_index): Verify that fonts have ordered
1087         character indices.
1088         (find_glyph): Use binary search instead of linear search to find a
1089         character in a font.
1091 2009-06-05  Michael Scherer  <misc@mandriva.org>
1093         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
1094         uses case sensitive btree.
1095         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
1096         only for case insensitive filesystems.
1098 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
1100         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
1101         * conf/common.rmk (search_mod_CFLAGS): likewise
1103 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1105         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
1106         compensate a compiler bug
1108 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1110         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
1111         instead of '\b'
1113 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1115         Definitions for creating asm symbols with Apple's CC
1117         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
1118         [APPLE_CC] (VARIABLE): likewise
1120 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1122         Disable lnxboot.img when compiled
1123         with Apple's CC
1125         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
1126         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
1127         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
1128         [! APPLE_CC] (CODE_LENG): skip
1129         [! APPLE_CC] (setup_sects): likewise
1130         [! APPLE_CC]: skip filling
1132 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1134         Address in trampolines based on 32-bit registers when compiled
1135         with Apple's CC
1137         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
1138         for addresses
1139         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
1141 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1143         Avoid aliases when compiling with Apple's CC for PCBIOS machine
1145         * kern/misc.c [APPLE_CC] (memcpy): new function
1146         [APPLE_CC] (memmove): likewise
1147         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
1148         (memcpy): define alias conditionally on !APPLE_CC
1149         (memset): likewise
1150         (abort): likewise
1151         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
1152         APPLE_CC are defined
1153         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
1154         (grub_assert_fail): make prototype conditional
1156 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1158         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
1160         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
1161         grub-macho2img
1162         (CLEANFILES): add grub-macho2img
1163         (grub_macho2img_SOURCES): new variable
1164         * kern/i386/pc/startup.S (bss_start): new variable
1165         (bss_end): likewise
1166         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
1167         * util/grub-macho2img.c: new file
1169 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1171         Use objconv when compiling with Apple's CC
1173         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
1174         (efiemu64.o): likewise
1175         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
1176         when compiling with Apple's CC
1177         (efiemu64_s.o): likewise
1178         * configure.ac: check for objconv when compiling with Apple's CC
1179         * genmk.rb: use objconv for modules when compiled with Apple's CC
1181 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1183         Define segment as well as section when compiling with
1184         Apple's CC
1186         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1187         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1188         (efiemu_convert_pointer): likewise
1189         (efiemu_set_virtual_address_map): likewise
1190         (efiemu_convert_pointer): likewise
1191         (efiemu_getcrc32): likewise
1192         (init_crc32_table): likewise
1193         (reflect): likewise
1194         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1195         (GRUB_MOD_DEP): likewise
1197 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1199         Allow a compilation without -mcmodel=large
1201         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1202         when compiled without -mcmodel=large
1203         (filter_memory_map): remove memory post 4 GiB when compiled
1204         without -mcmodel=large
1205         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
1206         TARGET_CFLAGS when -mcmodel=large isn't supported
1208 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1210         Remove nested functions in efiemu core
1212         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
1214 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1216         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1218         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1219         temporary storage
1220         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1221         using Apple's CC
1222         (grub_cpu_is_tsc_supported): likewise
1223         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
1225 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1227         Absolute addressing through constant with Apple's cc
1229         * kern/i386/pc/startup.S: Define necessary constants
1230         and address through it when using ABS with Apple's CC
1231         * boot/i386/pc/diskboot.S: likewise
1232         * boot/i386/pc/boot.S: likewise
1233         * boot/i386/pc/lnxboot.S: likewise
1234         * boot/i386/pc/cdboot.S: likewise
1235         * mmap/i386/pc/mmap_helper.S: likewise
1236         * commands/i386/pc/drivemap_int13h.S: likewise
1238 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1240         Check if compiler is apple cc
1242         * Makefile.in (ASFLAGS): new variable
1243         (TARGET_ASFLAGS): likewise
1244         (TARGET_MODULE_FORMAT): likewise
1245         (TARGET_APPLE_CC): likewise
1246         (OBJCONV): likewise
1247         (TARGET_IMG_CFLAGS): likewise
1248         (TARGET_CPPFLAGS): add includedir
1249         * configure.ac: call grub_apple_cc and grub_apple_target_cc
1250         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1251         Check for linker script only if compiler isn't Apple's CC
1252         (TARGET_MODULE_FORMAT): set
1253         (TARGET_APPLE_CC): likewise
1254         (TARGET_ASFLAGS): likewise
1255         (ASFLAGS): likewise
1256         Check for objcopy only if compiler isn't Apple's CC
1257         Check for BSS symbol only if compiler isn't Apple's CC
1258         * genmk.rb: adapt nm options if we use Apple's utils
1259         * aclocal.m4 (grub_apple_cc): new test
1260         (grub_apple_target_cc): likewise
1262 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1264         Simplify sed expressions and improve awk
1266         * Makefile.in (install-local): simplify sed expression
1267         * gencmdlist.sh: likewise
1268         * genmoddep.awk: avoid adding module as a dependency of itself
1270 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1272         Add missing start symbols
1274         * boot/i386/pc/boot.S: add start
1275         * boot/i386/pc/pxeboot.S: likewise
1277 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1279         Fix wrong assumptions with grub-mkimage on EFI
1281         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
1282         (relocate_addresses): consider both r_addend and value at offset
1283         (make_mods_section): zerofill modinfo and header
1284         (convert_elf): write prefix here
1286 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1288         Use .asciz instead of .string
1290         * i386/pc/diskboot.S: use .asciz instead of .string
1291         * i386/pc/boot.S: likewise
1292         * include/grub/dl.h (GRUB_MOD_DEP): likewise
1293         (GRUB_MOD_NAME): likewise
1295 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1297         gfxpayload support
1299         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1300         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1301         (grub_video_setup): remove
1302         (grub_video_set_mode): new prototype
1303         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1304         (vid_mode): remove
1305         (linux_vesafb_res): compile only on PCBIOS
1306         (grub_linux_boot): support gfxpayload
1307         * loader/i386/pc/xnu.c (video_hook): new function
1308         (grub_xnu_set_video): support gfxpayload
1309         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1310         (DEFAULT_VIDEO_HEIGHT): likewise
1311         (DEFAULT_VIDEO_FLAGS): likewise
1312         (DEFAULT_VIDEO_MODE): new definition
1313         (video_hook): new function
1314         (grub_gfxterm_init): use grub_video_set_mode
1315         * util/grub.d/30_os-prober.in: remove explicit modesetting before
1316         loading xnu
1317         * video/video.c (grub_video_setup): removed
1318         (grub_video_set_mode): new function based on grub_gfxterm_init and
1319         grub_video_setup
1321 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1323         Avoid calling biosdisk in drivemap
1325         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1326         (revparse_biosdisk): likewise
1327         (list_mappings): derive name from id directly
1328         (grub_cmd_drivemap): use tryparse_diskstring
1330 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1332         Script fixes
1334         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1335         (grub_lexer_param): add tokenonhold
1336         (grub_script_create_cmdline): remove cmdline. All callers updated
1337         (grub_script_function_create): make functionname
1338         grub_script_arg. All callers updated
1339         (grub_script_execute_argument_to_string): new prototype
1340         * kern/parser.c (state_transitions): reorder
1341         (grub_parser_cmdline_state): fix a bug and make more compact
1342         * script/sh/execute.c (grub_script_execute_argument_to_string):
1343         make global
1344         (grub_script_execute_cmdline): use new format
1345         * script/sh/function.c (grub_script_function_create): make functionname
1346         grub_script_arg. All callers updated
1347         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
1348         (grub_script_yylex): remove
1349         (grub_script_yylex2): renamed to ...
1350         (grub_script_yylex): ...renamed
1351         parse the expressions like a${b}c
1352         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1353         (GRUB_PARSER_TOKEN_VAR): remove
1354         (GRUB_PARSER_TOKEN_NAME): likewise
1355         ("if"): declare as typeless
1356         ("while"): likewise
1357         ("function"): likewise
1358         ("else"): likewise
1359         ("then"): likewise
1360         ("fi"): likewise
1361         (text): remove
1362         (argument): likewise
1363         (script): accept empty scripts and make exit on error
1364         (arguments): use GRUB_PARSER_TOKEN_ARG
1365         (function): likewise
1366         (command): move error handling to script
1367         (menuentry): move grub_script_lexer_ref before
1368         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
1369         argument. All callers updated
1371 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1373         Prevent GRUB from probing floppies during boot.
1375         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1376         * commands/search.c (options): Add --no-floppy.
1377         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1378         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1379         --no-floppy when searching for UUIDs.
1381 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1383         Simplify the code duplication in commands/search.c.
1385         * commands/search.c (search_label, search_fs_uuid): Merge into ...
1386         (search_fs): ... this.  Update all users.
1388 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
1390         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1392 2009-05-28  Pavel Roskin  <proski@gnu.org>
1394         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1395         Remove the original symlink explicitly.
1397         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1398         just one slash.  That's how grub_fshelp_find_file() does it.
1400 2009-05-26  Pavel Roskin  <proski@gnu.org>
1402         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1403         to `str'.
1405         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1406         possibly unused.
1408 2009-05-25  Christian Franke  <franke@computer.org>
1410         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1411         register.
1412         (grub_atapi_identify): Add wait after drive select.
1413         (grub_ata_identify): Do more strict status register check before
1414         calling grub_atapi_identify ().  Suppress error message if status
1415         register is 0x00 after command failure.  Add status register
1416         check after PIO read to avoid bogus identify due to stuck DRQ.
1417         Thanks to Pavel Roskin for testing.
1418         (grub_device_initialize): Remove unsafe status register check.
1419         Thanks to 'phcoder' for problem report and patch.
1420         Prevent sign extension in debug message.
1422 2009-05-23  Colin D Bennett  <colin@gibibit.com>
1424         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
1425         definition file, and functions defined in `normal/menu.c' have had
1426         their prototypes moved to `include/grub/menu.h' for consistency.
1428         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1429         from normal.h.
1430         (grub_menu_get_entry): Likewise.
1431         (grub_menu_get_timeout): Likewise.
1432         (grub_menu_set_timeout): Likewise.
1433         (grub_menu_execute_entry): Likewise.
1434         (grub_menu_execute_with_fallback): Likewise.
1435         (grub_menu_entry_run): Likewise.
1437         * include/grub/normal.h: Re-ordered and grouped function
1438         prototypes by file that the function is defined in.
1439         (grub_menu_execute_callback): Removed; moved to menu.h.
1440         (grub_menu_get_entry): Likewise.
1441         (grub_menu_get_timeout): Likewise.
1442         (grub_menu_set_timeout): Likewise.
1443         (grub_menu_execute_entry): Likewise.
1444         (grub_menu_execute_with_fallback): Likewise.
1445         (grub_menu_entry_run): Likewise.
1446         (grub_menu_addentry): Renamed from this ...
1447         (grub_normal_add_menu_entry): ... to this.
1449         * normal/main.c (grub_menu_addentry): Renamed from this ...
1450         (grub_normal_add_menu_entry): ... to this.
1452         * script/sh/execute.c (grub_script_execute_menuentry): Update
1453         reference to renamed grub_menu_addentry function.
1455 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
1457         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1459 2009-05-22  Pavel Roskin  <proski@gnu.org>
1461         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1462         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
1463         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
1464         compiling for the i386 targets, but not for the utilities.
1466         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1467         to grub_uint8_t.
1468         (grub_root_drive): Likewise.
1469         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1470         remove alignment.
1471         (grub_root_drive): Change size to byte.
1472         (grub_start_addr): Remove.
1473         (grub_end_addr): Likewise.
1474         (grub_apm_bios_info): Likewise.
1476 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
1478         * normal/i386: Remove.
1479         * normal/powerpc: Likewise.
1480         * normal/sparc64: Likewise.
1481         * normal/x86_64: Likewise.
1483 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
1485         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
1486         * loader/i386/linux_trampoline.S: Fix indentation
1487         * loader/i386/xnu_helper.S: Likewise
1489 2009-05-18  Colin D Bennett  <colin@gibibit.com>
1491         Display error messages when parsing a Lua statement fails.
1492         Previously, executing a syntactically invalid statement like
1493         ")foo" or "bar;" would silently fail.
1495         * script/lua/grub_main.c (handle_lua_error): New function.
1496         (grub_lua_parse_line): Improved reporting of Lua parser and
1497         execution errors.
1499 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1501         Remove -Werror which causes build to fail on some systems
1503         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1504         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1505         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
1507 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1509         trampoline for linux on 64-bit platform
1511         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1512         loader/i386/efi/linux_trampoline.S
1513         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
1514         declaration
1515         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1516         here
1517         * loader/i386/linux_trampoline.S: moved here
1518         * loader/i386/efi/linux.c (allocate_pages): reserve space for
1519         trampoline
1520         (jumpvector): removed
1521         (grub_linux_trampoline_start): new declaration
1522         (grub_linux_trampoline_end): likewise
1523         (grub_linux_boot): use trampoline when on 64-bit platform
1524         * loader/i386/linux.c: likewise
1526 2009-05-16  Pavel Roskin  <proski@gnu.org>
1528         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1529         const to avoid a warning.
1530         (grub_lua_setenv): Likewise.
1531         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1532         lmsg to fix a warning.
1534 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1536         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1537         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1538         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1539         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1540         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1541         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1542         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1543         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1545 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1547         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1549 2009-05-16  Bean  <bean123ch@gmail.com>
1551         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1552         (lua_mod_SOURCES): New variable.
1553         (lua_mod_CFLAGS): Likewise.
1554         (lua_mod_LDFLAGS): Likewise.
1556         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1557         (setjmp_mod_SOURCES): New variable.
1558         (setjmp_mod_CFLAGS): Likewise.
1559         (setjmp_LDFLAGS): Likewise.
1561         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1562         (setjmp_mod_SOURCES): New variable.
1563         (setjmp_mod_CFLAGS): Likewise.
1564         (setjmp_LDFLAGS): Likewise.
1566         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1567         (setjmp_mod_SOURCES): New variable.
1568         (setjmp_mod_CFLAGS): Likewise.
1569         (setjmp_LDFLAGS): Likewise.
1571         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1572         (setjmp_mod_SOURCES): New variable.
1573         (setjmp_mod_CFLAGS): Likewise.
1574         (setjmp_LDFLAGS): Likewise.
1576         * normal/i386/setjmp.S: Moved from here ...
1577         * lib/i386/setjmp.S: ... Moved here
1578         * normal/x86_64/setjmp.S: Moved from here ...
1579         * lib/x86_64/setjmp.S: ... Moved here
1580         * normal/powerpc/setjmp.S: Moved from here ...
1581         * lib/powerpc/setjmp.S: ... Moved here
1582         * normal/sparc64/setjmp.S: Moved from here ...
1583         * lib/sparc64/setjmp.S: ... Moved here
1585         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1586         returns_twice in mingw.
1588         * script/lua/grub_lib.c: New file.
1589         * script/lua/grub_lib.h: Likewise.
1590         * script/lua/grub_lua.h: Likewise.
1591         * script/lua/grub_main.c: Likewise.
1592         * script/lua/lapi.c: Likewise.
1593         * script/lua/lapi.h: Likewise.
1594         * script/lua/lauxlib.c: Likewise.
1595         * script/lua/lauxlib.h: Likewise.
1596         * script/lua/lbaselib.c: Likewise.
1597         * script/lua/lcode.c: Likewise.
1598         * script/lua/lcode.h: Likewise.
1599         * script/lua/ldblib.c: Likewise.
1600         * script/lua/ldebug.c: Likewise.
1601         * script/lua/ldebug.h: Likewise.
1602         * script/lua/ldo.c: Likewise.
1603         * script/lua/ldo.h: Likewise.
1604         * script/lua/ldump.c: Likewise.
1605         * script/lua/lfunc.c: Likewise.
1606         * script/lua/lfunc.h: Likewise.
1607         * script/lua/lgc.c: Likewise.
1608         * script/lua/lgc.h: Likewise.
1609         * script/lua/linit.c: Likewise.
1610         * script/lua/liolib.c: Likewise.
1611         * script/lua/llex.c: Likewise.
1612         * script/lua/llex.h: Likewise.
1613         * script/lua/llimits.h: Likewise.
1614         * script/lua/lmathlib.c: Likewise.
1615         * script/lua/lmem.c: Likewise.
1616         * script/lua/lmem.h: Likewise.
1617         * script/lua/loadlib.c: Likewise.
1618         * script/lua/lobject.c: Likewise.
1619         * script/lua/lobject.h: Likewise.
1620         * script/lua/lopcodes.c: Likewise.
1621         * script/lua/lopcodes.h: Likewise.
1622         * script/lua/loslib.c: Likewise.
1623         * script/lua/lparser.c: Likewise.
1624         * script/lua/lparser.h: Likewise.
1625         * script/lua/lstate.c: Likewise.
1626         * script/lua/lstate.h: Likewise.
1627         * script/lua/lstring.c: Likewise.
1628         * script/lua/lstring.h: Likewise.
1629         * script/lua/lstrlib.c: Likewise.
1630         * script/lua/ltable.c: Likewise.
1631         * script/lua/ltable.h: Likewise.
1632         * script/lua/ltablib.c: Likewise.
1633         * script/lua/ltm.c: Likewise.
1634         * script/lua/ltm.h: Likewise.
1635         * script/lua/lua.h: Likewise.
1636         * script/lua/luaconf.h: Likewise.
1637         * script/lua/lualib.h: Likewise.
1638         * script/lua/lundump.c: Likewise.
1639         * script/lua/lundump.h: Likewise.
1640         * script/lua/lvm.c: Likewise.
1641         * script/lua/lvm.h: Likewise.
1642         * script/lua/lzio.c: Likewise.
1643         * script/lua/lzio.h: Likewise.
1645 2009-05-16  Bean  <bean123ch@gmail.com>
1647         * include/grub/kernel.h (grub_module_header_types): Add type
1648         OBJ_TYPE_CONFIG.
1650         * kern/main.c (grub_load_config): New function.
1651         (grub_main): Call grub_load_config to read boot config.
1653         * grub-mkimage (generate_image): New parameter config_path.
1654         (options): New option --config.
1655         (main): Parse --config option, and pass it to generate_image.
1657 2009-05-14  Christian Franke  <franke@computer.org>
1659         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1660         This fixes build on Cygwin.
1662 2009-05-14  Pavel Roskin  <proski@gnu.org>
1664         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1665         jump.  This saves two bytes, so the typical case of 2 swapped
1666         drives would fit 32 bytes.
1668 2009-05-13  Pavel Roskin  <proski@gnu.org>
1670         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1671         grub_uint32_t to avoid a warning.
1673         * loader/i386/linux.c (allocate_pages): When assigning
1674         real_mode_mem, cast through grub_size_t to fix a warning.  The
1675         code already makes sure that the value would fit a pointer.
1676         (grub_linux_setup_video): Cast render_target->data to
1677         grub_size_t to fix a warning.
1679 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
1681         * commands/i386/pc/drivemap.c: New file - implement drivemap
1682         command.
1683         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1684         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1686 2009-05-13  Pavel Roskin  <proski@gnu.org>
1688         * util/i386/pc/grub-setup.c (setup): Remove unused variable
1689         embedding_area_exists.
1691 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
1693         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1694         it easier to understand / work with.
1695         Improve warning messages for cases where there's no embedding area,
1696         or when it is too small (or core.img too large).
1698 2009-05-13  Pavel Roskin  <proski@gnu.org>
1700         * loader/i386/pc/multiboot2.c: Add necessary includes for
1701         grub_multiboot2_real_boot().
1703         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1704         PX record is always little-endian.  We only need the lower 2
1705         bytes of the mode.
1707         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1708         facilitate code reuse.
1709         (grub_cpio_mount): Use "struct head", not a char buffer.  This
1710         fixes a warning reported by gcc 4.4.
1712         * kernel/disk.c (grub_disk_read): Use void pointer for the
1713         buffer.
1714         (grub_disk_write): Use const void pointer for the buffer.
1715         Adjust all callers.  Remove unnecessary casts.
1717 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
1719         * util/i386/pc/grub-install.in: Update copyright year.
1721 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1723         gptsync
1725         * commands/gptsync.c: new file
1726         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1727         (gptsync_mod_SOURCES): new variable
1728         (gptsync_mod_CFLAGS): likewise
1729         (gptsync_mod_LDFLAGS): likewise
1730         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1731         new definition
1732         (GRUB_PC_PARTITION_TYPE_HFS): likewise
1733         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1734         * conf/i386-ieee1275.rmk: likewise
1735         * conf/i386-pc.rmk: likewise
1736         * conf/powerpc-ieee1275.rmk: likewise
1738 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1740         Fixed grub-emu
1742         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1743         (grub_dl_ref): likewise
1745 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
1747         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1748         split in two functions (one for msdos and one for gpt).
1750 2009-05-08  Pavel Roskin  <proski@gnu.org>
1752         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1753         not modified.
1755         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1756         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
1757         Initialize them with -1.  Add sanity check for bad1.  Eliminate
1758         nerr variable.
1760 2009-05-08  David S. Miller  <davem@davemloft.net>
1762         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1764 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
1766         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1767         existence.
1769 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
1771         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1772         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1774 2009-05-05  David S. Miller  <davem@davemloft.net>
1776         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1778 2009-05-05  Pavel Roskin  <proski@gnu.org>
1780         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1781         of grub_dl_ref() and grub_dl_unref().
1782         * commands/parttool.c: Remove preprocessor conditionals around
1783         grub_dl_ref() and grub_dl_unref().
1784         * fs/affs.c: Likewise.
1785         * fs/afs.c: Likewise.
1786         * fs/cpio.c: Likewise.
1787         * fs/ext2.c: Likewise.
1788         * fs/fat.c: Likewise.
1789         * fs/hfs.c: Likewise.
1790         * fs/hfsplus.c: Likewise.
1791         * fs/iso9660.c: Likewise.
1792         * fs/jfs.c: Likewise.
1793         * fs/minix.c: Likewise.
1794         * fs/ntfs.c: Likewise.
1795         * fs/reiserfs.c: Likewise.
1796         * fs/sfs.c: Likewise.
1797         * fs/udf.c: Likewise.
1798         * fs/ufs.c: Likewise.
1799         * fs/xfs.c: Likewise.
1800         * include/grub/dl.h: Likewise.
1801         * loader/xnu.c: Likewise.
1803 2009-05-04  Pavel Roskin  <proski@gnu.org>
1805         * commands/acpi.c: Remove unused variable my_mod.
1806         * partmap/amiga.c: Likewise.
1807         * partmap/apple.c: Likewise.
1808         * partmap/gpt.c: Likewise.
1809         * partmap/pc.c: Likewise.
1810         * partmap/sun.c: Likewise.
1811         * term/gfxterm.c: Likewise.
1812         * term/i386/pc/vesafb.c: Likewise.
1813         * term/i386/pc/vga.c: Likewise.
1815 2009-05-04  David S. Miller  <davem@davemloft.net>
1817         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1818         pointer args to grub_ieee1275_get_property().
1820         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1822         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1823         devices, and do not traverse down under controller nodes.
1825         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1826         (grub_ofdisk_open): Use it to un-escape "," characters.
1827         * kern/disk.c (find_part_sep): New.
1828         (grub_disk_open): Use it to find the first non-escaped ','
1829         character in the disk name.
1830         * util/ieee1275/devicemap.c (escape_of_path): New.
1831         (grub_util_emit_devicemap_entry): Use it.
1832         * util/sparc64/ieee1275/grub-install.in: Update script to
1833         strip partition specifiers properly by not triggering on
1834         '\' escaped ',' characters.
1836 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1838         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1839         to 0x300.
1840         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1841         resolutions.
1842         (linux_vesafb_modes): Add a lot of additional modes to the list (based
1843         on documentation from Wikipedia).
1845 2009-05-04  Pavel Roskin  <proski@gnu.org>
1847         * disk/ata.c: Spelling fixes.
1848         * disk/raid.c: Likewise.
1849         * disk/usbms.c: Likewise.
1850         * disk/dmraid_nvidia.c: Likewise.
1851         * kern/ieee1275/openfw.c: Likewise.
1852         * kern/ieee1275/init.c: Likewise.
1853         * kern/ieee1275/cmain.c: Likewise.
1854         * boot/i386/pc/cdboot.S: Likewise.
1855         * video/readers/png.c: Likewise.
1856         * video/i386/pc/vbe.c: Likewise.
1857         * fs/udf.c: Likewise.
1858         * fs/hfs.c: Likewise.
1859         * fs/reiserfs.c: Likewise.
1860         * efiemu/runtime/efiemu.c: Likewise.
1861         * efiemu/main.c: Likewise.
1862         * efiemu/mm.c: Likewise.
1863         * include/grub/elf.h: Likewise.
1864         * include/grub/xnu.h: Likewise.
1865         * include/grub/usbdesc.h: Likewise.
1866         * include/grub/usb.h: Likewise.
1867         * include/grub/script_sh.h: Likewise.
1868         * include/grub/lib/LzmaEnc.h: Likewise.
1869         * include/grub/efiemu/efiemu.h: Likewise.
1870         * include/grub/command.h: Likewise.
1871         * normal/menu.c: Likewise.
1872         * normal/main.c: Likewise.
1873         * normal/datetime.c: Likewise.
1874         * bus/usb/uhci.c: Likewise.
1875         * mmap/i386/uppermem.c: Likewise.
1876         * mmap/mmap.c: Likewise.
1877         * commands/acpi.c: Likewise.
1878         * commands/test.c: Likewise.
1879         * partmap/apple.c: Likewise.
1880         * font/font.c: Likewise.
1881         * loader/sparc64/ieee1275/linux.c: Likewise.
1882         * loader/macho.c: Likewise.
1883         * loader/i386/bsd_trampoline.S: Likewise.
1884         * loader/i386/bsd.c: Likewise.
1885         * loader/xnu.c: Likewise.
1886         * term/i386/pc/vesafb.c: Likewise.
1887         * term/usb_keyboard.c: Likewise.
1888         * util/resolve.c: Likewise.
1889         * util/getroot.c: Likewise.
1891 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1893         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1895 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1897         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1898         build error.
1900 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1902         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1903         parameter only available on BIOS.
1905 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1907         Removed wrong semicolon in declaration
1909         * grub/misc.h (grub_dprintf): remove semicolon
1911 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1913         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1914         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1915         is done by grub_cmd_linux() now).
1916         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1917         restore video to text mode.
1918         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1919         indicates lack of "vga=" parameter.  "vga=0" is mapped to
1920         `GRUB_LINUX_VID_MODE_NORMAL'.
1922 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1924         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1925         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1926         and `normal/script.c'.  Add `kern/rescue_reader.c',
1927         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1928         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1929         `grub_script.tab.c'.
1931         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1932         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1933         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1934         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1935         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1937         * Makefile.in: Remove duplicated 2008 in Copyright line.
1939 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1941         * util/misc.c (grub_util_warn): New function.  Emits a warning
1942         unconditionally.
1943         * include/grub/util/misc.h (grub_util_warn): New declaration.
1945         * util/i386/pc/grub-install.in: Understand --force and pass it down
1946         to grub-setup.
1948         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1949         down to setup().
1950         (setup): Improve error messages and add warnings when requested to
1951         install in odd layouts.  Refuse to install using blocklists unless
1952         --force was set.
1954 2009-05-04  martin f. krafft  <madduck@madduck.net>
1956         * disk/raid.c (grub_raid_scan_device): Improve debug message.
1958 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1960         Updated copyright year
1962         * fs/hfsplus.c: updated copyright year
1964 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1966         HFS+ UUID
1968         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1969         in the space previously used by unused3
1970         (grub_hfsplus_uuid): new function
1971         (grub_hfsplus_fs): added uuid field
1973 2009-05-03  Pavel Roskin  <proski@gnu.org>
1975         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1976         suppress warnings.  It's no longer needed.
1977         * disk/host.c: Likewise.
1978         * disk/ata_pthru.c: Likewise.
1979         * disk/loopback.c: Likewise.
1980         * hook/datehook.c: Likewise.
1981         * parttool/pcpart.c: Likewise.
1982         * fs/i386/pc/pxe.c: Likewise.
1983         * fs/ntfscomp.c: Likewise.
1984         * efiemu/main.c: Likewise.
1985         * mmap/mmap.c: Likewise.
1986         * commands/crc.c: Likewise.
1987         * commands/hexdump.c: Likewise.
1988         * commands/hdparm.c: Likewise.
1989         * commands/acpi.c: Likewise.
1990         * commands/echo.c: Likewise.
1991         * commands/minicmd.c: Likewise.
1992         * commands/blocklist.c: Likewise.
1993         * commands/memrw.c: Likewise.
1994         * commands/loadenv.c: Likewise.
1995         * commands/usbtest.c: Likewise.
1996         * commands/lsmmap.c: Likewise.
1997         * commands/boot.c: Likewise.
1998         * commands/parttool.c: Likewise.
1999         * commands/configfile.c: Likewise.
2000         * commands/search.c: Likewise.
2001         * commands/ieee1275/suspend.c: Likewise.
2002         * commands/cat.c: Likewise.
2003         * commands/i386/pc/pxecmd.c: Likewise.
2004         * commands/i386/pc/play.c: Likewise.
2005         * commands/i386/pc/halt.c: Likewise.
2006         * commands/i386/pc/vbeinfo.c: Likewise.
2007         * commands/i386/pc/vbetest.c: Likewise.
2008         * commands/lspci.c: Likewise.
2009         * commands/date.c: Likewise.
2010         * commands/handler.c: Likewise.
2011         * commands/ls.c: Likewise.
2012         * commands/test.c: Likewise.
2013         * commands/cmp.c: Likewise.
2014         * commands/efi/loadbios.c: Likewise.
2015         * commands/efi/fixvideo.c: Likewise.
2016         * commands/halt.c: Likewise.
2017         * commands/help.c: Likewise.
2018         * commands/reboot.c: Likewise.
2019         * hello/hello.c: Likewise.
2020         * script/sh/main.c: Likewise.
2021         * loader/xnu.c: Likewise.
2022         * term/terminfo.c: Likewise.
2023         * term/i386/pc/serial.c: Likewise.
2024         * term/usb_keyboard.c: Likewise.
2026 2009-05-03  David S. Miller  <davem@davemloft.net>
2028         * normal/menu.c: Include grub/parser.h
2030 2009-05-03  Pavel Roskin  <proski@gnu.org>
2032         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
2033         not char*.
2034         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
2035         Suggested by Javier Martín <lordhabbit@gmail.com>
2037         * util/i386/pc/grub-mkrescue.in: Allow for the case when
2038         efiemu??.o doesn't exist.
2039         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
2040         copying.
2042 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
2044         FreeBSD 64-bit support
2046         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
2047         and loader/i386/bsd_trampoline.S
2048         (bsd_mod_ASFLAGS): new variable
2049         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
2050         (FREEBSD_MODTYPE_KERNEL64): likewise
2051         (grub_bsd64_trampoline_start): likewise
2052         (grub_bsd64_trampoline_end): likewise
2053         (grub_bsd64_trampoline_selfjump): likewise
2054         (grub_bsd64_trampoline_gdt): likewise
2055         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
2056         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
2057         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
2058         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
2059         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2060         of "attrib" member
2061         * loader/i386/bsd_pagetable.c: new file
2062         * loader/i386/bsd_trampoline.S: likewise
2063         * loader/i386/bsd.c (ALIGN_QWORD): new macro
2064         (ALIGN_VAR): likewise
2065         (entry_hi): new variable
2066         (kern_end_mdofs): likewise
2067         (is_64bit): likewise
2068         (grub_freebsd_add_meta): use ALIGN_VAR
2069         (grub_e820_mmap): new declaration
2070         (grub_freebsd_add_mmap): new function
2071         (grub_freebsd_add_meta_module): support 64 bit kernels
2072         (grub_freebsd_list_modules): use ALIGN_VAR
2073         (gdt_descriptor): new declaration
2074         (grub_freebsd_boot): support 64 bit kernels
2075         (grub_bsd_elf64_hook): new function
2076         (grub_bsd_load_elf): support elf64
2078 2009-05-03  Bean  <bean123ch@gmail.com>
2080         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
2081         after we get the result of if statement.
2083 2009-05-03  Bean  <bean123ch@gmail.com>
2085         * Makefile.in (enable_efiemu): New variable.
2087         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
2088         set.
2089         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
2090         path.
2091         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
2092         path, add -mno-red-zone option.
2093         (efiemu64_s.o): Likewise.
2094         (efiemu64.o): Use macro $^ for source file.
2096         * configure.ac (--enable-efiemu): New option.
2098 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
2100         xnu support
2102         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
2103         (pkglib_MODULES): add xnu.mod
2104         (xnu_mod_SOURCES): new variable
2105         (xnu_mod_CFLAGS): likewise
2106         (xnu_mod_LDFLAGS): likewise
2107         (xnu_mod_ASFLAGS): likewise
2108         * conf/i386-pc.rmk: likewise
2109         * conf/x86_64-efi.rmk: likewise
2110         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
2111         new declaration
2112         * include/grub/i386/macho.h: new file
2113         * include/grub/i386/xnu.h: likewise
2114         * include/grub/macho.h: likewise
2115         * include/grub/machoload.h: likewise
2116         * include/grub/x86_64/macho.h: likewise
2117         * include/grub/x86_64/xnu.h: likewise
2118         * include/grub/xnu.h: likewise
2119         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
2120         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
2121         * loader/i386/efi/xnu.c: new file
2122         * loader/i386/pc/xnu.c: likewise
2123         * loader/i386/xnu.c: likewise
2124         * loader/i386/xnu_helper.S: likewise
2125         * loader/macho.c: likewise
2126         * loader/xnu.c: likewise
2127         * loader/xnu_resume.c: likewise
2128         * util/grub-dumpdevtree: likewise
2129         * include/grub/i386/pit.h: include grub/err.h
2130         (grub_pit_wait): export
2131         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
2133 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2135         Efiemu
2137         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
2138         _linux_efi, linux_efi.
2139         new files in grub-emu
2140         new targets efiemu32.o and efiemu64.o
2141         * loader/linux_normal_efiemu.c: likewise
2142         * loader/i386/efi/linux.c: added preliminary efiemu support
2143         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
2144         files to copy
2145         * include/grub/autoefi.h: new file
2146         * include/grub/i386/efiemu.h: likewise
2147         * include/grub/i386/pc/efiemu.h: likewise
2148         * include/grub/efi/api.h: add LL suffix when necessary
2149         new definitions relating to tables
2150         * include/grub/efiemu/efiemu.h: new file
2151         * include/grub/efiemu/runtime.h: likewise
2152         * efiemu/prepare.c: likewise
2153         * efiemu/loadcore_common.c: likewise
2154         * efiemu/loadcore64.c: likewise
2155         * efiemu/runtime/efiemu.sh: likewise
2156         * efiemu/runtime/efiemu.S: likewise
2157         * efiemu/runtime/efiemu.c: likewise
2158         * efiemu/runtime/config.h: likewise
2159         * efiemu/prepare32.c: likewise
2160         * efiemu/main.c: likewise
2161         * efiemu/modules/pnvram.c: likewise
2162         * efiemu/modules/i386: likewise
2163         * efiemu/modules/i386/pc: likewise
2164         * efiemu/modules/acpi.c: likewise
2165         * efiemu/i386/pc/cfgtables.c: likewise
2166         * efiemu/i386/loadcore64.c: likewise
2167         * efiemu/i386/loadcore32.c: likewise
2168         * efiemu/prepare64.c: likewise
2169         * efiemu/loadcore.c: likewise
2170         * efiemu/symbols.c: likewise
2171         * efiemu/mm.c: likewise
2172         * efiemu/loadcore32.c: likewise
2174 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2176         ACPI spoofing
2178         * commands/acpi.c: new file
2179         * commands/i386/pc/acpi.c: likewise
2180         * commands/efi/acpi.c: likewise
2181         * include/grub/acpi.h: likewise
2182         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2183         (acpi_mod_SOURCES): new variable
2184         (acpi_mod_CFLAGS): likewise
2185         (acpi_mod_LDFLAGS): likewise
2186         * conf/i386-efi.rmk: likewise
2187         * conf/x86_64-efi.rmk: likewise
2189 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2191         Missing part from mmap patch
2193         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2194         (grub_mmap_unregister)
2195         (grub_mmap_free_and_unregister): use grub_mmap_register
2197 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2199         Mmap services
2201         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2202         * loader/i386/linux.c (find_mmap_size): likewise
2203         (allocate_pages): likewise
2204         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2205         (grub_fill_multiboot_mmap): likewise
2206         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2207         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2208         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2209         (OPENBSD_MMAP_RESERVED): likewise
2210         * include/grub/i386/pc/memory.h: include grub/memory.h
2211         (grub_lower_mem): removed
2212         (grub_upper_mem): likewise
2213         (GRUB_MACHINE_MEMORY_ACPI): new definition
2214         (GRUB_MACHINE_MEMORY_NVS): likewise
2215         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2216         (GRUB_MACHINE_MEMORY_HOLE): likewise
2217         (grub_machine_mmap_register): likewise
2218         (grub_machine_mmap_unregister): likewise
2219         (grub_machine_get_upper): likewise
2220         (grub_machine_get_lower): likewise
2221         (grub_machine_get_post64): likewise
2222         * include/grub/i386/efi/memory.h: new file
2223         * include/grub/x86_64/efi/memory.h: likewise
2224         * include/grub/efi/memory.h: likewise
2225         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2226         (mmap_mod_SOURCES): new variable
2227         (mmap_mod_LDFLAGS): likewise
2228         (mmap_mod_ASFLAGS): likewise
2229         * conf/i386-coreboot.rmk: likewise
2230         * conf/i386-ieee1275.rmk: likewise
2231         * conf/i386-efi.rmk: likewise
2232         * conf/x86_64-efi.rmk: likewise
2233         * include/grub/types.h (UINT_TO_PTR): new macro
2234         (PTR_TO_UINT32): likewise
2235         (PTR_TO_UINT64): likewise
2236         * include/grub/memory.h: new file
2237         * mmap/i386/pc/mmap.c: likewise
2238         * mmap/i386/pc/mmap_helper.S: likewise
2239         * mmap/i386/uppermem.c: likewise
2240         * mmap/mmap.c: likewise
2241         * mmap/efi/mmap.c: likewise
2242         * kern/i386/coreboot/init.c (grub_machine_init): don't use
2243         grub_upper_mem
2244         * kern/i386/pc/init.c (grub_lower_mem): removed variable
2245         (grub_upper_mem): likewise
2246         (grub_machine_init): don't use grub_upper_mem,
2247         make grub_lower_mem local
2248         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2249         grub_mmap_iterate and grub_mmap_get_upper
2250         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2252 2009-05-02  Bean  <bean123ch@gmail.com>
2254         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2255         script/sh/parser.y.
2256         (pkglib_MODULES): Add normal.mod and sh.mod.
2257         (normal_SOURCES): New variable.
2258         (normal_mod_CFLAGS): Likewise.
2259         (normal_mod_LDFLAGS): Likewise.
2260         (sh_mod_SOURCES): Likewise.
2261         (sh_mod_CFLAGS): Likewise.
2262         (sh_mod_LDFLAGS): Likewise.
2264         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2265         script/sh/lexer.c_DEPENDENCIES.
2266         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2267         kern/rescue_reader.c and kern/rescue_parser.c.
2268         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2269         (grub_emu_SOURCES): Change source files.
2270         (pkglib_MODULES): Remove normal.mod.
2271         (normal_SOURCES): Removed.
2272         (normal_mod_CFLAGS): Likewise.
2273         (normal_mod_LDFLAGS): Likewise.
2274         * conf/i386-coreboot.rmk: Likewise.
2275         * conf/i386-efi.rmk: Likewise.
2276         * conf/i386-ieee1276.rmk: Likewise.
2277         * conf/powerpc-ieee1275.rmk: Likewise.
2278         * conf/sparc64-ieee1275.rmk: Likewise.
2279         * conf/x86_64-efi.rmk: Likewise.
2281         * include/grub/command.h (grub_command_execute): New inline function.
2283         * include/grub/menu.h (grub_menu_entry): Removed commands field.
2285         * include/grub/normal.h: Remove <grub/setjmp.h>.
2286         (grub_fs_module_list): Moved to normal/autofs.c.
2287         (grub_exit_env): Removed.
2288         (grub_command_execute): Likewise.
2289         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2290         parameter script.
2291         (read_command_list): New function declaration.
2292         (read_fs_list): Likewise.
2294         * include/parser.h: Include <grub/reader.h>.
2295         (grub_parser_split_cmdline): Change type of getline parameter.
2296         (grub_parser): New structure.
2297         (grub_parser_class): New variable.
2298         (grub_parser_execute): New function declaration.
2299         (grub_register_rescue_parser): Likewise.
2300         (grub_parser_register): New inline function.
2301         (grub_parser_unregister): Likewise.
2302         (grub_parser_get_current): Likewise.
2303         (grub_parser_set_current): Likewise.
2305         * include/grub/reader.h: New file.
2306         * kern/reader.c: Likewise.
2307         * kern/rescue_parser.c: Likewise.
2308         * kern/rescue_reader.c: Likewise.
2309         * normal/autofs.c: Likewise.
2310         * normal/dyncmd.c: Likewise.
2312         * include/grub/rescue.h: Removed.
2313         * normal/command.h: Likewise.
2315         * include/grub/script.h: Moved to ...
2316         * include/grub/script_sh.h: ... Moved here.
2317         * normal/execute.c: Moved to ...
2318         * script/sh/execute.c: ... Moved here.
2319         * normal/function.c: Moved to ...
2320         * script/sh/function.c: ... Moved here.
2321         * normal/lexer.c: Moved to ...
2322         * script/sh/lexer.c: ... Moved here.
2323         * normal/parser.y: Moved to ...
2324         * script/sh/parser.y: ... Moved here.
2325         * normal/script.c: Moved to ...
2326         * script/sh/script.c: ... Moved here.
2328         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2329         <grub/reader.h>.
2330         (grub_exit_env): Removed.
2331         (fs_module_list): Moved to normal/autofs.c.
2332         (grub_file_getline): Don't handle comment here.
2333         (free_menu): Skip removed field entry->commands.
2334         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2335         script parameter.
2336         (read_config_file): Removed nested parameter, change getline function.
2337         (grub_enter_normal_mode): Removed.
2338         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2339         (read_command_list): Likewise.
2340         (autoload_fs_module): Moved to normal/autofs.c.
2341         (read_fs_list): Likewise.
2342         (reader_nested): New variable.
2343         (grub_normal_execute): Run parser.sh to switch to sh parser.
2344         (grub_cmd_rescue): Removed.
2345         (cmd_normal): Removed.
2346         (grub_cmd_normal): Unregister itself at the beginning. Don't register
2347         rescue command.
2348         (grub_cmdline_run): New function.
2349         (grub_normal_reader_init): Likewise.
2350         (grub_normal_read_line): Likewise.
2351         (grub_env_write_pager): Likewise.
2352         (cmdline): New variable.
2353         (grub_normal_reader): Likewise.
2354         (GRUB_MOD_INIT): Register normal reader and set as current, register
2355         pager hook, register normal command with grub_register_command_prio,
2356         so that it won't show up in command.lst.
2357         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2358         grub_fs_autoload_hook.
2360         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2361         (grub_menu_execute_entry): Replace grub_script_execute with
2362         grub_parser_execute, change parameter to grub_command_execute.
2364         * normal/menu_text.c: Remove <grub/script.h>.
2366         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2367         and <grub/parser.h>.
2368         (run): Change editor_getline to use new parser interface. Change
2369         parameter to grub_command_execute.
2371         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2372         <grub/reader.h> and <grub/parser.h>.
2373         (grub_load_normal_mode): Execute normal command.
2374         (grub_main): Call grub_register_core_commands,
2375         grub_register_rescue_parser and grub_register_rescue_reader, use
2376         grub_reader_loop to enter input loop.
2378         * kern/parser.c (grub_parser_split_cmdline): Change type of
2379         getline parameter.
2380         (grub_parser_class): New variable.
2381         (grub_parser_execute): New function.
2383         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2384         * loader/multiboot2.c: Likewise.
2385         * loader/sparc64/ieee1275/linux.c: Likewise.
2387         * util/grub-emu.c (read_command_list): New dummy function.
2389 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2391         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2392         count to 16 for CCISS and IDA.
2394 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2396         * normal/menu_text.c  (grub_wait_after_message): Print a newline
2397         after waiting for user input.
2399         * loader/i386/linux.c: Include `<grub/normal.h>'.
2400         (grub_cmd_linux): Improve the error message about `ask' mode, by
2401         waiting for user input so it's not missed (we can do this, since
2402         user requested interaction).
2404 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2406         Added missing lst to grub-mkrescue
2408         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2409         and ${input_dir}/parttool.lst
2411 2009-04-30  David S. Miller  <davem@davemloft.net>
2413         * util/hostdisk.c (device_is_wholedisk): New function.
2414         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2415         zero only if device_is_wholedisk() returns true.
2417         * util/hostdisk.c (convert_system_partition_to_system_disk):
2418         Handle virtual disk devices named /dev/vdiskX as found on sparc
2419         and powerpc.
2421         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2422         lettered partition specifier is found, convert to numbered.
2424 2009-04-29  David S. Miller  <davem@davemloft.net>
2426         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2427         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2429         * normal/command.c: Add missing newline at end of file.
2431         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2432         warnings.
2433         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2434         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2435         grub_ofdisk_read): Likewise, and deal similarly with the fact that
2436         ihandles have a 32-bit type but need to be stored in a "void *".
2438 2009-04-28  Pavel Roskin  <proski@gnu.org>
2440         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2441         not disk.  Adjust all dependencies.
2442         (grub_fs_uuid_close): Use grub_device_close(), not
2443         grub_disk_close().
2445         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2446         parent's partition, don't copy it by reference, as it gets freed
2447         on close.
2449 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2451         Preboot hooks support
2453         * commands/boot.c (struct grub_preboot_t): new declaration
2454         (preboots_head): new variable
2455         (preboots_tail): likewise
2456         (grub_loader_register_preboot_hook): new function
2457         (grub_loader_unregister_preboot_hook): likewise
2458         (grub_loader_set): launch preboot hooks
2459         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2460         (grub_loader_register_preboot_hook): new declaration
2461         (grub_loader_unregister_preboot_hook): likewise
2463 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2465         Warning fix
2467         * disk/scsi.c (grub_scsi_open): added missing cast when
2468         calling grub_dprintf
2470 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
2472         Bug and warning fixes
2474         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2475         declaration
2476         * commands/test.c (test_parse): fixed bug with file tests and corrected
2477         declaration of find_file
2479 2009-04-26  Pavel Roskin  <proski@gnu.org>
2481         * Makefile.in: Don't install empty manual pages if help2man is
2482         missing.  Use help2man option for output, not shell redirection.
2484 2009-04-26  David S. Miller  <davem@davemloft.net>
2486         * util/grub-mkdevicemap.c (make_device_map): Add missing
2487         NESTED_FUNC_ATTR to process_device().
2489 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2491         Test command
2493         * commands/test.c: rewritten to use bash-like test
2495 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2497         Parttool autoloading and improvements
2499         * Makefile.in (pkglib_DATA): add parttool.lst
2500         (parttool.lst): new target
2501         * genmk.rb: generate parttool-*
2502         (CLEANFILES): add #{parttool}
2503         (PARTTOOLFILES): new variable
2504         * genparttoollist.sh: new file
2505         * parttool/pcpart.c (grub_pcpart_boot): more feedback
2506         (grub_pcpart_type): likewise
2507         * commands/parttool.c (helpmsg): new variable
2508         (grub_cmd_parttool): output help if not enough arguments are supplied
2509         autoload modules
2510         (GRUB_MOD_INIT(parttool)): use helpmsg
2512 2009-04-24  David S. Miller  <davem@davemloft.net>
2514         Avoiding opening same device multiple times in device iterator.
2516         * kern/device.c: (grub_device_iterate): Define struct part_ent,
2517         and use it to build a list of partitions in iterate_disk() and
2518         iterate_partition().
2520         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2521         on disk->data.
2523         * disk/ieee1275/nand.c (grub_nand_iterate): Return
2524         grub_devalias_iterate() result instead of unconditional 0.
2525         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2526         Also, capture hook return value, either directly or via
2527         grub_children_iterate(), and propagate to caller.
2528         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2529         grub_children_iterate): Return value is now 'int' instead of
2530         'grub_err_t'.
2531         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2532         like a proper iterator, stopping when hooks return non-zero.
2533         (grub_devalias_iterate): Likewise.
2535 2009-04-23  David S. Miller  <davem@davemloft.net>
2537         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2539 2009-04-22  David S. Miller  <davem@davemloft.net>
2541         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2542         is larger than address_cells, use that value for address_cells too.
2544         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2545         IEEE1275_MAX_PATH_LEN): Define.
2546         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2547         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2548         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2549         'devtype'.  Explicitly NULL terminate devalias expansion.
2551         * util/sparc64/ieee1275/misc.c: New file.
2552         * util/sparc64/ieee1275/grub-setup.c: New file.
2553         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2554         * util/sparc64/ieee1275/grub-mkimage.c: New file.
2555         * util/sparc64/ieee1275/grub-install.in: New file.
2556         * util/ieee1275/ofpath.c: New file.
2557         * util/ieee1275/devicemap.c: New file.
2558         * util/devicemap.c: New file.
2559         * util/deviceiter.c: New file.
2560         * kern/sparc64/ieee1275/init.c: New file.
2561         * include/grub/util/ofpath.h: New file.
2562         * include/grub/util/deviceiter.h: New file.
2563         * util/grub-mkdevicemap.c: Include deviceiter.h.
2564         Implement using grub_util_emit_devicemap_entry and
2565         grub_util_iterate_devices.
2566         * conf/i386-corebook.rmk: Build util/deviceiter.c and
2567         util/devicemap.c into grub-mkdevicemap
2568         * conf/i386-efi.rmk: Likewise.
2569         * conf/i386-ieee1275.rmk: Likewise.
2570         * conf/i386-pc.rmk: Likewise.
2571         * conf/powerpc-ieee1275.rmk: Likewise.
2572         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2573         images and installation utilities.  Build kernel as image
2574         instead of as elf binary.  Use common rules as much as possible.
2576 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
2578         Correct GPT definition
2580         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2581         of "attrib" member
2583 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
2585         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2587 2009-04-19  David S. Miller  <davem@davemloft.net>
2589         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2590         (grub_rescue_cmd_linux): Rename to...
2591         (grub_cmd_linux): and fix prototype.
2592         (grub_rescue_cmd_initrd): Rename to...
2593         (grub_cmd_initrd): and fix prototype.
2594         (cmd_linux, cmd_initrd): New.
2595         (GRUB_MOD_INIT(linux)): Use grub_register_command().
2596         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2598 2009-04-17  Pavel Roskin  <proski@gnu.org>
2600         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2601         format.
2602         (grub_ohci_transfer): Likewise.
2604         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2606         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2607         return without a value.  Fix inconsistent indentation.
2609         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2610         match struct grub_fs.
2612         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2613         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2614         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2615         * commands/lspci.c (grub_lspci_iter): Likewise.
2617 2009-04-16  Bean  <bean123ch@gmail.com>
2619         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2620         value.
2622 2009-04-15  Pavel Roskin  <proski@gnu.org>
2624         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2625         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
2626         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2627         definitions.
2629 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2631         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2632         that no multiple data or metadata areas are supported and `Unknown
2633         metadata header'.
2635 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2637         Move loader out of the kernel
2639         * kern/loader.c: moved to ...
2640         * commands/boot.c: ... moved here
2641         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2642         * commands/boot.c (grub_cmd_boot): moved here. All users updated
2643         * include/grub/kernel.h (grub_machine_fini): export
2644         * include/grub/loader.h (grub_loader_is_loaded): update declaration
2645         (grub_loader_set): likewise
2646         (grub_loader_unset): likewise
2647         (grub_loader_boot): likewise
2648         * conf/common.rmk: new module boot.mod
2649         (pkglib_MODULES): add boot.mod
2650         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2651         (grub_emu_SOURCES): likewise
2652         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2653         (grub_emu_SOURCES): likewise
2654         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2655         (grub_emu_SOURCES): likewise
2656         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2657         (grub_emu_SOURCES): likewise
2658         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2659         (grub_emu_SOURCES): likewise
2660         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2661         (grub_emu_SOURCES): likewise
2662         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2663         (grub_emu_SOURCES): likewise
2665 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2667         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2669         * kern/misc.c (grub_itoa): Removed function
2670         (grub_ltoa): likewise
2671         (grub_vsprintf): use grub_lltoa
2673 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2675         Restore grub-emu
2677         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2678         * conf/i386-coreboot.rmk: likewise
2679         * conf/i386-ieee1275.rmk: likewise
2680         * conf/powerpc-ieee1275.rmk: likewise
2682 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2684         * INSTALL: Add that `./autogen.sh' needs to be run before
2685         `./configure.'.
2687 2009-04-14  Bean  <bean123ch@gmail.com>
2689         * Makefile.in (pkglib_DATA): Add handler.lst.
2690         (handler.lst): New rule.
2692         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2693         * conf/i386-coreboot.rmk: Likewise.
2694         * conf/i386-ieee1275.rmk: Likewise.
2695         * conf/i386-efi.rmk: Likewise.
2696         * conf/x86_64-efi.rmk: Likewise.
2697         * conf/powerpc-ieee1275.rmk: Likewise.
2698         * conf/sparc64-ieee1275.rmk: Likewise.
2700         * genhandlerlist.sh: New file.
2702         * genmk.rb: Add rules to generate handler.lst.
2704         * include/grub/normal.h (grub_file_getline): New function definition.
2705         (read_handler_list): Likewise.
2706         (free_handler_list): Likewise.
2708         * include/grub/term.h (grub_term_register_input): Add name parameter
2709         for auto generation of handler.lst.
2710         (grub_term_register_output): Likewise.
2712         * normal/handler.c: New file.
2714         * normal/main.c (get_line): Renamed to grub_file_getline.
2715         (read_config_file): Use the newly renamed grub_file_getline.
2716         (read_command_list): Likewise.
2717         (read_fs_list): Likewise.
2718         (grub_normal_execute): Call read_handler_list to parse handler.lst.
2719         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2721         * term/efi/console.c (grub_console_init): Add name parameter for auto
2722         generation of handler.lst.
2723         * term/gfxterm.c: Likewise.
2724         * term/i386/pc/at_keyboard.c: Likewise.
2725         * term/i386/pc/console.c: Likewise.
2726         * term/i386/pc/serial.c: Likewise.
2727         * term/i386/pc/vesafb.c: Likewise.
2728         * term/i386/pc/vga.c: Likewise.
2729         * term/i386/pc/vga_text.c: Likewise.
2730         * term/ieee1275/ofconsole.c: Likewise.
2731         * term/usb_keyboard.c: Likewise.
2733 2009-04-14  Bean  <bean123ch@gmail.com>
2735         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2736         properly with null character.
2738 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2740         * configure: Remove.
2741         * config.h.in: Likewise.
2742         * stamp-h.in: Likewise.
2743         * DISTLIST: Likewise.
2744         * conf/common.mk: Likewise.
2745         * conf/i386-coreboot.mk: Likewise.
2746         * conf/i386-efi.mk: Likewise.
2747         * conf/i386-ieee1275.mk: Likewise.
2748         * conf/i386.mk: Likewise.
2749         * conf/i386-pc.mk: Likewise.
2750         * conf/powerpc-ieee1275.mk: Likewise.
2751         * conf/sparc64-ieee1275.mk: Likewise.
2752         * conf/x86_64-efi.mk: Likewise.
2754         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2755         develop on GRUB.
2757 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
2758             David S. Miller  <davem@davemloft.net>
2760         * util/hostdisk.c (make_device_name): Fix buffer length
2761         calculations.
2763 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2765         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2766         <sys/param.h> and <sys/sysctl.h>.
2767         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2768         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2769         opening the device and reset them afterwards.
2771 2009-04-13  Pavel Roskin  <proski@gnu.org>
2773         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2774         Reported by John Stanley <jpsinthemix@verizon.net>
2776 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2778         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2779         that name for menuentries when appropriate.
2781 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2783         * util/grub.d/10_freebsd.in: Add a missing `fi'.
2785 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2787         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2788         to Linux, simply abort telling the user it's no longer supported.
2790 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2792         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2793         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
2794         `freebsd_loadenv' only when devices.hints exist.
2796 2009-04-13  Pavel Roskin  <proski@gnu.org>
2798         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2800 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2802         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2803         partition number.
2804         (grub_drive): Likewise.
2806 2009-04-13  David S. Miller  <davem@davemloft.net>
2808         * kern/sparc64/ieee1275/ieee1275.c: New file.
2809         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2810         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2811         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2812         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2813         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2814         grub_ieee1275_alloc_physmem): Declare new exported functions.
2816         * include/grub/sparc64/ieee1275/loader.h: New file.
2817         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2818         * include/grub/sparc64/kernel.h: Likewise.
2819         * loader/sparc64/ieee1275/linux.c: Likewise.
2821         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2822         (grub_fstest_SOURCES): Likewise.
2824         * util/hostdisk.c (make_device_name): Do not make any assumptions
2825         about the length of drive names.
2827         * kern/dl.c (grub_dl_load_file): Close file immediately when
2828         we are done using it.
2830 2009-04-12  David S. Miller  <davem@davemloft.net>
2832         * kern/misc.c (grub_ltoa): Fix cast when handling negative
2833         values.  Noticed by Pavel Roskin.
2835         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2836         target compiler.
2838         * genmk.rb: Add more flexible image type specification, also
2839         pass --strip-unneeded to objcopy.
2840         * conf/i386-pc.rmk: Use *_FORMAT.
2841         * conf/i386-pc.mk: Rebuilt.
2843         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2844         (OFDISK_HASH_SZ): Define.
2845         (ofdisk_hash): New hash table.
2846         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2847         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2848         instead of device phandle which is not unique.
2850         * kern/sparc64/ieee1275/init.c: Delete, replace with...
2851         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2852         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2853         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2854         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2855         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2856         GRUB_KERNEL_MACHINE_DATA_END): Define.
2857         (grub_kernel_image_size, grub_total_module_size): Declare.
2859 2009-04-12  Pavel Roskin  <proski@gnu.org>
2861          * configure.ac: Change the logic when we check for target tools.
2862          Do it when the target is specified and it's different from the
2863          specified value of the host.
2865 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
2867         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2868         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2869         GNU/kFreeBSD. Check if a device is a character device. Use
2870         DIOCGMEDIASIZE to get the size.
2871         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2872         support for GNU/kFreeBSD.
2873         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2874         is a character device instead of a block device. Add support for
2875         FreeBSD device names.
2877         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2878         is a character device instead of a block device.
2880         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2881         is a character device instead of a block device.
2883 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
2885         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2886         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2887         FreeBSD. Check if a device is a character device. Use
2888         DIOCGMEDIASIZE to get the size.
2889         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2890         support for FreeBSD.
2891         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2892         is a character device instead of a block device. Add support for
2893         FreeBSD device names.
2895         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2896         a character device instead of a block device.
2897         (grub_util_check_char_device): New function.
2899         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2900         a character device instead of a block device.
2902         * include/grub/util/getroot.h (grub_util_check_char_device): New
2903         prototype.
2905 2009-04-11  David S. Miller  <davem@davemloft.net>
2907         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2908         static libgcc.
2909         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2910         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2911         function, if present.
2912         (__bswapdi2): Likewise.
2914         * include/grub/sparc64/ieee1275/boot.h: New file.
2915         * boot/sparc64/ieee1275/boot.S: Likewise.
2916         * boot/sparc64/ieee1275/diskboot.S: Likewise.
2918         * kern/misc.c (grub_ltoa): New function.
2919         (grub_vsprintf): Use it to format 'long' integers.
2921 2009-04-10  David S. Miller  <davem@davemloft.net>
2923         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2924         slots are of type grub_ieee1275_cell_t.
2925         (grub_nand_read): Likewise.
2926         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2927         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2928         macros are used to compare values in arg/ret block of the call.
2929         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2930         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2931         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2932         grub_ieee1275_instance_to_path, grub_ieee1275_write,
2933         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2934         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2935         grub_ieee1275_close, grub_ieee1275_set_property,
2936         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2937         grub_ieee1275_cell_t.
2938         * kern/ieee1275/openfw.c (grub_map): Likewise.
2939         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2940         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2942         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2943         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2944         (grub_devalias_iterate): Likewise.
2946 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
2948         UFS improvements
2950         * fs/ufs.c (INODE_NBLOCKS): new definition
2951         (struct grub_ufs_dirent): added fields for non-BSD dirents
2952         (grub_ufs_get_file_block): fixed double indirect handling
2953         (grub_ufs_lookup_symlink): use more robust way to determine whether
2954         symlink is inline
2955         (grub_ufs_find_file): support for non-BSD dirents
2956         (grub_ufs_dir): support for non-BSD dirents
2958 2009-04-10  Bean  <bean123ch@gnail.com>
2960         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2961         attribute, otherwise the size would be wrong for i386 platform.
2963         * include/grub/pci.h (grub_pci_read_word): New inline function.
2964         (grub_pci_read_byte): Likewise.
2965         (grub_pci_write): Likewise.
2966         (grub_pci_write_word): Likewise.
2967         (grub_pci_write_byte): Likewise.
2969         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2971         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2972         (find_framebuf): Scan pci to locate the frame buffer address.
2974         * commands/efi/fixvideo.c: New file.
2976         * commands/efi/loadbios.c: Likewise.
2978         * commands/memrw.c: Likewise.
2980         * util/grub-dumpbios.in: Likewise.
2982         * conf/common.rmk (grub-dumpbios): New utility.
2983         (pkglib_MODULES): New module memrw.mod.
2984         (memrw_mod_SOURCE): New macro.
2985         (memrw_mod_CFLAGS): Likewise.
2986         (memrw_mod_LDFLAGS): Likewise.
2988         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2989         fixvideo.mod.
2990         (loadbios_mod_SOURCE): New macro.
2991         (loadbios_mod_CFLAGS): Likewise.
2992         (loadbios_mod_LDFLAGS): Likewise.
2993         (fixvideo_mod_SOURCE): Likewise.
2994         (fixvideo_mod_CFLAGS): Likewise.
2995         (fixvideo_mod_LDFLAGS): Likewise.
2997         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2998         fixvideo.mod.
2999         (loadbios_mod_SOURCE): New macro.
3000         (loadbios_mod_CFLAGS): Likewise.
3001         (loadbios_mod_LDFLAGS): Likewise.
3002         (fixvideo_mod_SOURCE): Likewise.
3003         (fixvideo_mod_CFLAGS): Likewise.
3004         (fixvideo_mod_LDFLAGS): Likewise.
3006 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
3008         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
3010 2009-04-07  David S. Miller  <davem@davemloft.net>
3012         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
3013         support for R_SPARC_OLO10 relocations.  Fix compile warning for
3014         R_SPARC_WDISP30 case.
3015         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
3017 2009-04-06  Pavel Roskin  <proski@gnu.org>
3019         * include/grub/misc.h (ARRAY_SIZE): New macro.
3020         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
3021         New macro.
3022         * loader/i386/linux.c (allocate_pages): Use free_pages().
3023         (grub_linux_unload): Don't use free_pages().
3024         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
3025         wrong index.  Treat all other modes as text modes.
3026         (grub_cmd_linux): Initialize vid_mode unconditionally to
3027         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
3029         * commands/help.c (print_command_help): Use cmd->prio, not
3030         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
3032 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
3034         Parttool
3036         * parttool/pcpart.c: new file
3037         * commands/parttool.c: likewise
3038         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
3039         (parttool_mod_SOURCES): new variable
3040         (parttool_mod_CFLAGS): likewise
3041         (parttool_mod_LDFLAGS): likewise
3042         (pcpart_mod_SOURCES): likewise
3043         (pcpart_mod_CFLAGS): likewise
3044         (pcpart_mod_LDFLAGS): likewise
3045         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
3046         and parttool/pcpart.c
3047         * conf/i386-efi.rmk: likewise
3048         * conf/i386-ieee1275.rmk: likewise
3049         * conf/i386-pc.rmk: likewise
3050         * conf/powerpc-ieee1275.rmk: likewise
3051         * conf/sparc64-ieee1275.rmk: likewise
3052         * conf/x86_64-ieee1275.rmk: likewise
3054 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
3056         Support for mtime and further expandability of dir command
3058         * include/grub/lib/datetime.h: moved to ...
3059         * include/grub/datetime.h: ... moved here and added
3060         declaration of grub_unixtime2datetime. All users updated
3061         * include/grub/fs.h: new syntax for dir and mtime functions in
3062         struct grub_fs
3063         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
3064         and GRUB_FSHELP_FLAGS_MASK
3065         * commands/ls.c (grub_ls_list_files): Write mtime in long format
3066         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
3067         (grub_ext2_mtime): new function
3068         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
3069         (grub_hfsplus_mtime): new function
3070         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
3071         (GRUB_UFS_ATTR_FILE): likewise
3072         (GRUB_UFS_ATTR_LNK): likewise
3073         (struct grub_ufs_sblock): new fields mtime
3074         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
3075         all users updated
3076         (grub_ufs_dir): mtime support
3077         (grub_ufs_mtime): new function
3078         * fs/affs.c (grub_affs_dir): use new dir syntax
3079         * fs/afs.c (grub_afs_dir): likewise
3080         * fs/cpio.c (grub_cpio_dir): likewise
3081         * fs/fat.c (grub_fat_find_dir): likewise
3082         * fs/hfs.c (grub_hfs_dir): likewise
3083         * fs/iso9660.c (grub_iso9660_dir): likewise
3084         * fs/jfs.c (grub_jfs_dir): likewise
3085         * fs/minix.c (grub_minix_dir): likewise
3086         * fs/ntfs.c (grub_ntfs_dir): likewise
3087         * fs/reiserfs.c (grub_reiserfs_dir): likewise
3088         * fs/sfs.c (grub_sfs_dir): likewise
3089         * fs/xfs.c (grub_xfs_dir): likewise
3090         * util/hostfs.c (grub_hostfs_dir): likewise
3091         * lib/datetime.c: moved to ...
3092         * normal/datetime.c: ... moved here
3093         (grub_unixtime2datetime): new function
3094         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
3095         * normal/completion.c (iterate_dir): use new dir syntax
3096         * normal/misc.c (grub_normal_print_device_info): tell the
3097         last modification time of a volume
3098         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
3099         * conf/common.rmk: added lib/datetime.c to ls.mod
3100         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
3101         (normal_mod_SOURCES): likewise
3102         (datetime_mod_SOURCES): Removed lib/datetime.c
3103         * conf/i386-efi.rmk: likewise
3104         * conf/i386-ieee1275.rmk: likewise
3105         * conf/i386-pc.rmk: likewise
3106         * conf/powerpc-ieee1275.rmk: likewise
3107         * conf/sparc64-ieee1275.rmk: likewise
3108         * conf/x86_64-efi.rmk: likewise
3110 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
3112         Trim trailing spaces in FAT label and support mtools-like labels
3114         * fs/fat.c (grub_fat_iterate_dir): New function based
3115         on grub_fat_find_dir
3116         (grub_fat_find_dir): use grub_fat_iterate_dir
3117         (grub_fat_label): likewise
3119 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
3121         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
3122         and command.h
3123         remove extraneous kernel_elf_HEADERS
3125 2009-04-04  Bean  <bean123ch@gnail.com>
3127         * include/grub/util/misc.h: Add dummy function fsync for mingw.
3129         * util/misc.c: Likewise.
3131 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
3133         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
3134         instead of grub_printf.
3136 2009-04-03  Robert Millan  <rmh@aybabtu.com>
3138         * loader/i386/linux.c (grub_linux_setup_video): Fill
3139         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
3140         values from `mode info' structure instead of hardcoded
3141         values.
3143 2009-04-01  Pavel Roskin  <proski@gnu.org>
3145         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
3146         unused now.
3147         * genmk.rb: Likewise.
3148         * configure.ac: Likewise.
3150 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
3152         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
3153         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
3155 2009-04-01  David S. Miller  <davem@davemloft.net>
3157         * normal/sparc64/setjmp.S: Fix setjmp implementation.
3158         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
3159         (grub_setjmp): Mark with 'returns_twice' attribute.
3160         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
3161         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
3162         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
3164 2009-04-01  Robert Millan  <rmh@aybabtu.com>
3166         Reapply fix from 2008-07-28 which was accidentally reverted; also
3167         perform the same fix to a similar check in same function.
3169         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3170         with the same number are found, just use issue a warning with
3171         grub_dprintf(), as this error has been reported to be non-fatal.
3173 2009-03-31  Pavel Roskin  <proski@gnu.org>
3175         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
3176         for cross-compilation.
3178 2009-03-30  Robert Millan  <rmh@aybabtu.com>
3180         Fix i386-ieee1275 build.
3182         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3183         Remove declaration.
3185 2009-03-30  Pavel Roskin  <proski@gnu.org>
3187         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3188         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
3189         zero-terminated, rely only on the strlen value.  Fix comparison
3190         of strings differing in length.
3192 2009-03-30  Robert Millan  <rmh@aybabtu.com>
3194         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3195         checking for abi version.  Improve error messages on BIOS to notify
3196         user about `linux16' command.
3198 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
3200         Leak fixes
3202         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3203         in case of collision
3204         * disk/scsi.c (grub_scsi_open): free scsi in case of error
3206 2009-03-29  Robert Millan  <rmh@aybabtu.com>
3208         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3209         set `vid_mode' accordingly.
3210         (grub_linux_boot): Process `vid_mode' and set video mode.
3212 2009-03-29  Robert Millan  <rmh@aybabtu.com>
3214         * util/grub.d/10_linux.in (linux_entry): New function.
3215         Factorize generation of Linux boot entries.
3217 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
3219         Make the format of Environment Block plain text. The boot loader
3220         part is not tested well yet.
3222         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3223         (buffer): Removed.
3224         (envblk): Likewise.
3225         (usage): Remove "info" and "clear". Add "unset". Update the
3226         description of "set", as this does not delete variables any
3227         longer.
3228         (create_envblk_file): Complete rewrite.
3229         (open_envblk_file): Likewise.
3230         (cmd_info): Removed.
3231         (cmd_list): Likewise.
3232         (cmd_set): Likewise.
3233         (cmd_clear): Likewise.
3234         (list_variables): New function.
3235         (write_envblk): Likewise.
3236         (set_variables): Likewise.
3237         (unset_variables): Likewise.
3238         (main): Complete rewrite.
3240         * commands/loadenv.c (buffer): Removed.
3241         (envblk): Likewise.
3242         (open_envblk_file): New function.
3243         (read_envblk_file): Complete rewrite.
3244         (grub_cmd_load_env): Likewise.
3245         (grub_cmd_list_env): Likewise.
3246         (struct blocklist): New struct.
3247         (free_blocklists): New function.
3248         (check_blocklists): Likewise.
3249         (write_blocklists): Likewise.
3250         (grub_cmd_save_env): Complete rewrite.
3252         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3253         a plain text signature.
3254         (GRUB_ENVBLK_MAXLEN): Removed.
3255         (struct grub_envblk): Complete rewrite.
3256         (grub_envblk_find): Removed.
3257         (grub_envblk_insert): Likewise.
3258         (grub_envblk_open): New prototype.
3259         (grub_envblk_set): Likewise.
3260         (grub_envblk_delete): Put const to VALUE.
3261         (grub_envblk_iterate): Put const to NAME and VALUE.
3262         (grub_envblk_close): New prototype.
3263         (grub_envblk_buffer): New inline function.
3264         (grub_envblk_size): Likewise.
3266         * lib/envblk.c: Include grub/mm.h.
3267         (grub_env_find): Removed.
3268         (grub_envblk_open): New function.
3269         (grub_envblk_close): Likewise.
3270         (escaped_value_len): Likewise.
3271         (find_next_line): Likewise.
3272         (grub_envblk_insert): Removed.
3273         (grub_envblk_set): New function.
3274         (grub_envblk_delete): Complete rewrite.
3275         (grub_envblk_iterate): Likewise.
3277 2009-03-28  Robert Millan  <rmh@aybabtu.com>
3279         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3280         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3281         variables.  Use 16-bit loader.
3282         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3283         loader.
3284         * kern/i386/loader.S (grub_linux_boot): Rename to ...
3285         (grub_linux16_boot): ... this.  Update all users.
3286         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3287         (grub_linux_boot): ... this.  Update all users.
3289         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3290         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
3291         commands to `linux16' and `initrd16'.
3292         (GRUB_MOD_FINI(linux)): Rename to ...
3293         (GRUB_MOD_FINI(linux16)): ... this.
3295 2009-03-24  Pavel Roskin  <proski@gnu.org>
3297         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3298         not just for compilation.
3300 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
3302         Move multiboot helper out of kernel
3304         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3305         `loader/i386/multiboot_helper.S'.
3306         * conf/i386-coreboot.rmk: Likewise
3307         * conf/i386-ieee1275.rmk: Likewise
3309         * kern/i386/loader.S: Move multiboot helpers from here...
3310         * loader/i386/multiboot_helper.S: ...moved here
3311         * include/grub/i386/loader.h: Move declarations of multiboot
3312         helpers from here...
3313         * include/grub/i386/multiboot.h: ...moved here
3314         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3316 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3318         * kern/env.c (grub_env_context_open): Added an argument to specify
3319         whether a new context inherits exported variables from current
3320         one. This is useful when making a sandbox to interpret a config
3321         file.
3322         All callers updated.
3324         * include/grub/env.h (grub_env_context_open): Updated the prototype.
3326 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3328         * kern/env.c (grub_env_context_close): Fix memory leaks.
3330 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3332         * normal/main.c (grub_normal_execute): Added an argument
3333         BATCH to specify if an interactive interface should be provided
3334         after reading a config file.
3335         All callers updated.
3336         (read_command_list): Prevent being executed twice.
3337         (read_fs_list): Likewise.
3339         * include/grub/normal.h (grub_normal_execute): Updated the
3340         prototype.
3342 2009-03-22  Pavel Roskin  <proski@gno.org>
3344         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3345         _start.
3346         * kern/i386/pc/startup.S: Likewise.
3347         * kern/i386/efi/startup.S: Likewise.
3348         * kern/i386/ieee1275/startup.S: Likewise.
3349         * kern/i386/coreboot/startup.S: Likewise.
3350         * kern/x86_64/efi/startup.S: Likewise.
3352         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3353         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3354         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3356 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
3358         Bugfixes in multiboot for bugs uncovered by solaris kernel.
3360         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3361         limit detection.
3362         Use vaddr of correct segment for entry_point.
3364 2009-03-21  Bean  <bean123ch@gmail.com>
3366         * commands/blocklist.c: Add include file <grub/command.h>, remove
3367         <grub/normal.h> and <grub/arg.h>.
3368         (grub_cmd_blocklist): Use the new command interface.
3369         (GRUB_MOD_INIT): Likewise.
3370         (GRUB_MOD_FINI): Likewise.
3371         * commands/boot.c: Likewise.
3372         * commands/cat.c: Likewise.
3373         * commands/cmp.c: Likewise.
3374         * commands/configfile.c: Likewise.
3375         * commands/crc.c: Likewise.
3376         * commands/echo.c: Likewise.
3377         * commands/halt.c: Likewise.
3378         * commands/handler.c: Likewise.
3379         * commands/hdparm.c: Likewise.
3380         * commands/help.c: Likewise.
3381         * commands/hexdump.c: Likewise.
3382         * commands/loadenv.c: Likewise.
3383         * commands/ls.c: Likewise.
3384         * commands/lsmmap.c: Likewise.
3385         * commands/lspci.c: Likewise.
3386         * commands/loadenv.c: Likewise.
3387         * commands/read.c: Likewise.
3388         * commands/reboot.c: Likewise.
3389         * commands/search.c: Likewise.
3390         * commands/sleep.c: Likewise.
3391         * commands/test.c: Likewise.
3392         * commands/usbtest.c: Likewise.
3393         * commands/videotest.c: Likewise.
3394         * commands/i386/cpuid.c: Likewise.
3395         * commands/i386/pc/halt.c: Likewise.
3396         * commands/i386/pc/play.c: Likewise.
3397         * commands/i386/pc/pxecmd.c: Likewise.
3398         * commands/i386/pc/vbeinfo.c: Likewise.
3399         * commands/i386/pc/vbetest.c: Likewise.
3400         * commands/ieee1275/suspend.c: Likewise.
3401         * disk/loopback.c: Likewise.
3402         * font/font_cmd.c: Likewise.
3403         * hello/hello.c: Likewise.
3404         * loader/efi/appleloader.c: Likewise.
3405         * loader/efi/chainloader.c: Likewise.
3406         * loader/i386/bsd.c: Likewise.
3407         * loader/i386/efi/linux.c: Likewise.
3408         * loader/i386/ieee1275/linux.c: Likewise.
3409         * loader/i386/linux.c: Likewise.
3410         * loader/i386/pc/chainloader.c: Likewise.
3411         * loader/i386/pc/linux.c: Likewise.
3412         * loader/powerpc/ieee1275/linux.c: Likewise.
3413         * loader/multiboot_loader.c: Likewise.
3414         * term/gfxterm.c: Likewise.
3415         * term/i386/pc/serial.c: Likewise.
3416         * term/terminfo.c: Likewise.
3418         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3419         * term/i386/pc/vga.c: Likewise.
3420         * video/readers/jpeg.c: Likewise.
3421         * video/readers/png.c: Likewise.
3422         * video/readers/tga.c: Likewise.
3424         * util/grub-fstest (cmd_loopback): Removed.
3425         (cmd_blocklist): Likewise.
3426         (cmd_ls): Likewise.
3427         (grub_register_command): Likewise.
3428         (grub_unregister_command): Likewise.
3429         (execute_command): Use grub_command_find to locate command and execute
3430         it.
3432         * include/grub/efi/chainloader.h: Removed.
3433         * loader/efi/chainloader_normal.c: Likewise.
3434         * loader/i386/bsd_normal.c: Likewise.
3435         * loader/i386/pc/chainloader_normal.c: Likewise.
3436         * loader/i386/pc/multiboot_normal.c: Likewise.
3437         * loader/linux_normal.c: Likewise.
3438         * loader/multiboot_loader_normal.c: Likewise.
3439         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3441         * gencmdlist.sh: Scan new registration command grub_register_extcmd
3442         and grub_register_command_p1.
3444         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3445         kern/command.c, lib/arg.c and commands/extcmd.c.
3446         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3447         (minicmd_mod_SOURCES): New variable.
3448         (minicmd_mod_CFLAGS): Likewise.
3449         (minicmd_mod_LDFLAGS): Likewise.
3450         (extcmd_mod_SOURCES): Likewise.
3451         (extcmd_mod_CFLAGS): Likewise.
3452         (extcmd_mod_LDFLAGS): Likewise.
3453         (boot_mod_SOURCES): Removed.
3454         (boot_mod_CFLAGS): Likewise.
3455         (boot_mod_LDFLAGS): Likewise.
3457         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3458         kern/corecmd.c.
3459         (kernel_img_HEADERS): Add command.h.
3460         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3461         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3462         and lib/arg.c.
3463         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3464         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3465         remove the corresponding normal mode command.
3466         (normal_mod_SOURCES): Remove normal/arg.c.
3467         * conf/i386-coreboot.rmk: Likewise.
3468         * conf/i386-efi.rmk: Likewise.
3469         * conf/i386-ieee1275.rmk: Likewise.
3470         * conf/powerpc-ieee1275.rmk: Likewise.
3471         * conf/x86_64-efi.rmk: Likewise.
3473         * include/grub/arg.h: Move from here ...
3474         * include/grub/lib/arg.h: ... to here.
3476         * normal/arg.c: Move from here ...
3477         * lib/arg.c: ... to here.
3479         * commands/extcmd.c: New file.
3480         * commands/minicmd.c: Likewise.
3481         * include/grub/command.h: Likewise.
3482         * include/grub/extcmd.h: Likewise.
3483         * kern/command.c: Likewise.
3484         * kern/corecmd.c: Likewise.
3486         * kern/list.c (grub_list_iterate): Return int instead of void.
3487         (grub_list_insert): New function.
3488         (grub_prio_list_insert): Likewise.
3490         * kern/rescue.c (grub_rescue_command): Removed.
3491         (grub_rescue_command_list): Likewise.
3492         (grub_rescue_register_command): Likewise.
3493         (grub_rescue_unregister_command): Likewise.
3494         (grub_rescue_cmd_boot): Move to minicmd.c
3495         (grub_rescue_cmd_help): Likewise.
3496         (grub_rescue_cmd_info): Likewise.
3497         (grub_rescue_cmd_boot): Likewise.
3498         (grub_rescue_cmd_testload): Likewise.
3499         (grub_rescue_cmd_dump): Likewise.
3500         (grub_rescue_cmd_rmmod): Likewise.
3501         (grub_rescue_cmd_lsmod): Likewise.
3502         (grub_rescue_cmd_exit): Likewise.
3503         (grub_rescue_print_devices): Moved to corecmd.c.
3504         (grub_rescue_print_files): Likewise.
3505         (grub_rescue_cmd_ls): Likewise.
3506         (grub_rescue_cmd_insmod): Likewise.
3507         (grub_rescue_cmd_set): Likewise.
3508         (grub_rescue_cmd_unset): Likewise.
3509         (attempt_normal_mode): Use grub_command_find to get normal module.
3510         (grub_enter_rescue_mode): Use grub_register_core_commands to register
3511         commands, remove grub_rescue_register_command calls.
3513         * normal/command.c (grub_register_command): Removed.
3514         (grub_unregister_command): Likewise.
3515         (grub_command_find): Likewise.
3516         (grub_iterate_commands): Likewise.
3517         (rescue_command): Likewise.
3518         (export_command): Moved to corecmd.c.
3519         (set_command): Removed.
3520         (unset_command): Likewise.
3521         (insmod_command): Likewise.
3522         (rmmod_command): Likewise.
3523         (lsmod_command): Likewise.
3524         (grub_command_init): Likewise.
3526         * normal/completion.c (iterate_command): Use cmd->prio to check for
3527         active command.
3528         (complete_arguments): Use grub_extcmd_t structure to find options.
3529         (grub_normal_do_completion): Change function grub_iterate_commands to
3530         grub_command_iterate.
3532         * normal/execute.c (grub_script_execute_cmd): No need to parse
3533         argument here.
3535         * normal/main.c (grub_dyncmd_dispatcher): New function.
3536         (read_command_list): Register unload commands as dyncmd.
3537         (grub_cmd_normal): Use new command interface, register rescue,
3538         unregister normal at entry, register normal, unregister rescue at exit.
3540         * include/grub/list.h (grub_list_test_t): New type.
3541         (grub_list_iterate): Return int instead of void.
3542         (grub_list_insert): New function.
3543         (GRUB_AS_NAMED_LIST_P): New macro.
3544         (GRUB_AS_PRIO_LIST): Likewise.
3545         (GRUB_AS_PRIO_LIST_P): Likewise.
3546         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3547         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3548         (grub_prio_list): New structure.
3549         (grub_prio_list_insert): New function.
3550         (grub_prio_list_remove): New inline function.
3552         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3553         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3554         (GRUB_COMMAND_FLAG_MENU): Likewise.
3555         (GRUB_COMMAND_FLAG_BOTH): Likewise.
3556         (GRUB_COMMAND_FLAG_TITLE): Likewise.
3557         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3558         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3559         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3560         (grub_command): Likewise.
3561         (grub_register_command): Likewise.
3562         (grub_command_find): Likewise.
3563         (grub_iterate_commands): Likewise.
3564         (grub_command_init): Likewise.
3565         (grub_arg_parse): Likewise.
3566         (grub_arg_show_help): Likewise.
3568         * include/grub/rescue.h (grub_rescue_register_command): Removed.
3569         (grub_rescue_unregister_command): Likewise.
3571         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3572         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3573         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3575         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3576         grub_rescue_cmd_initrd.
3577         * include/grub/i386/loader.h: Likewise.
3578         * include/grub/x86_64/loader.h: Likewise.
3580         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3582 2009-03-21  Bean  <bean123ch@gmail.com>
3584         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3585         instead of stat in mingw environment.
3587         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3589         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3591         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3592         AC_CONFIG_LINKS.
3594 2009-03-21  Bean  <bean123ch@gmail.com>
3596         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3597         out of range error.
3599 2009-03-18  Michel Dänzer  <michel@daenzer.net>
3601         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3602         checking inode flags for EXT4_EXTENTS_FLAG.
3604 2009-03-18  Robert Millan  <rmh@aybabtu.com>
3606         * loader/i386/linux.c: Include `<grub/video.h>' and
3607         `<grub/i386/pc/vbe.h>'..
3608         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
3609         (grub_linux32_boot): Attempt to configure video settings with
3610         grub_linux_setup_video().
3611         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3612         to avoid grub_console_fini() which would step out of graphical mode
3613         unconditionally.
3615 2009-03-14  Robert Millan  <rmh@aybabtu.com>
3617         Fix build on powerpc.
3618         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3620 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
3622         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3623         background image command.
3625 2009-03-12  Colin D Bennett  <colin@gibibit.com>
3627         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3628         (grub_gfxterm_putchar): Extract pairs of identical calls to
3629         draw_cursor out of conditional blocks.
3631 2009-03-11  Pavel Roskin  <proski@gnu.org>
3633         * fs/hfs.c (grub_hfs_strncasecmp): New function.
3634         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3636 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3638         * loader/i386/multiboot_elfxx.c
3639         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3641 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
3643         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3644         `kern/handler.c'.
3646 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3648         * loader/i386/multiboot.c (code_size): New variable.
3649         (grub_multiboot): Define offsets by adding to `code_size' rather
3650         than subtracting from `grub_multiboot_payload_size'.  Provide
3651         4-byte alignment to MBI and others by increasing
3652         `boot_loader_name_length' appropriately.
3654         * loader/i386/multiboot_elfxx.c
3655         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3657 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
3659         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3660         `fs/ext2.c'.
3662 2009-03-08  Robert Millan  <rmh@aybabtu.com>
3664         Make loader/i386/linux.c usable on i386-pc again.
3666         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3667         memory to heap.
3668         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3669         `#error' stanza.
3671 2009-03-07  Bean  <bean123ch@gmail.com>
3673         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3674         allocation.
3676 2009-03-06  Robert Millan  <rmh@aybabtu.com>
3678         Fix display issue on terminals with screen size other than 80x25
3679         (e.g. gfxterm with resolution higher than 640x480).
3681         * normal/main.c (grub_normal_init_page): Display title text in a
3682         position relative to the center of the terminal instead of relying
3683         on a hardcoded offset.
3685 2009-03-04  Robert Millan  <rmh@aybabtu.com>
3687         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3688         installed.
3690         * Makefile.in (host_kernel): New variable.
3691         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3692         scripts instead of just the windows one.
3693         * configure.ac: Initialize and AC_SUBST `host_kernel'.
3695 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3697         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3698         `kern/handler.c'.
3699         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3700         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3701         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3702         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3703         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3704         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3706 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3708         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3709         or if there's no space for the disk label and print the partition number on a
3710         invalid magic.
3712 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3714         * util/misc.c: Include <time.h>.
3715         (grub_millisleep): New function.
3717 2009-03-04  Bean  <bean123ch@gmail.com>
3719         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3720         another option -mno-red-zone.
3722         * commands/handler.c: Change module description.
3724         * kern/handler.c: Add missing space at the end of description line.
3726         * kern/list.c: Likewise.
3728 2009-03-03  Robert Millan  <rmh@aybabtu.com>
3730         Move more components to the relocation area, and fix mbi pointer
3731         handling to use the destination rather than the origin (thanks to
3732         Vladimir Serbinenko for spotting).
3734         * loader/i386/multiboot.c (mbi_dest): New variable.
3735         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3736         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3737         relocation area.
3739 2009-03-01  Bean  <bean123ch@gmail.com>
3741         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3742         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3743         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3744         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3746         * loader/i386/efi/linux.c (acpi_guid): New variable.
3747         (acpi_guid): Likewise.
3748         (EBDA_SEG_ADDR): New constant.
3749         (LOW_MEM_ADDR): Likewise.
3750         (FAKE_EBDA_SEG): Likewise.
3751         (fake_bios_data): New function.
3752         (grub_linux_boot): Call fake_bios_data.
3754 2009-03-01  Bean  <bean123ch@gmail.com>
3756         * commands/terminal.c: Removed.
3758         * commands/handler.c: New file.
3760         * include/grub/list.h: Likewise.
3762         * include/grub/handler.h: Likewise.
3764         * kern/list.c: Likewise.
3766         * kern/handler.c: Likewise.
3768         * kern/term.h: Include header file <grub/handler.h>.
3769         (grub_term_input): Move next field to the beginning.
3770         (grub_term_output): Likewise.
3771         (grub_term_input_class): New variable.
3772         (grub_term_output_class): Likewise.
3773         (grub_term_register_input): Changed to inline function.
3774         (grub_term_register_output): Likewise.
3775         (grub_term_unregister_input): Likewise.
3776         (grub_term_unregister_output): Likewise.
3777         (grub_term_set_current_input): Likewise.
3778         (grub_term_set_current_output): Likewise.
3779         (grub_term_get_current_input): Likewise.
3780         (grub_term_get_current_output): Likewise.
3781         (grub_term_iterate_input): Removed.
3782         (grub_term_iterate_output): Likewise.
3784         * kern/term.c (grub_term_list_input): Removed.
3785         (grub_term_list_output): Likewise.
3786         (grub_term_input_class): New variable.
3787         (grub_term_output_class): Likewise.
3788         (grub_cur_term_input): Change variable as macro.
3789         (grub_cur_term_output): Likewise.
3790         (grub_term_register_input): Removed.
3791         (grub_term_register_output): Likewise.
3792         (grub_term_unregister_input): Likewise.
3793         (grub_term_unregister_output): Likewise.
3794         (grub_term_set_current_input): Likewise.
3795         (grub_term_set_current_output): Likewise.
3796         (grub_term_iterate_input): Likewise.
3797         (grub_term_iterate_output): Likewise.
3798         (grub_term_get_current_input): Likewise.
3799         (grub_term_get_current_output): Likewise.
3801         * util/grub-editenv.c: Include header file <grub/handler.h>.
3802         (grub_term_get_current_input): Removed.
3803         (grub_term_get_current_output): Likewise.
3804         (grub_term_input_class): New variable.
3805         (grub_term_output_class): Likewise.
3807         * util/grub-fstest.c (grub_term_get_current_input): Removed.
3808         (grub_term_get_current_output): Likewise.
3809         (grub_term_input_class): New variable.
3810         (grub_term_output_class): Likewise.
3812         * util/grub-probe.c (grub_term_get_current_input): Removed.
3813         (grub_term_get_current_output): Likewise.
3814         (grub_term_input_class): New variable.
3815         (grub_term_output_class): Likewise.
3817         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3818         (grub_term_get_current_output): Likewise.
3819         (grub_term_input_class): New variable.
3820         (grub_term_output_class): Likewise.
3822         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3823         (terminal_mod_SOURCES): Likewise.
3824         (terminal_mod_CFLAGS): Likewise.
3825         (terminal_mod_LDFLAGS): Likewise.
3827         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3828         handler.c.
3829         (kernel_img_SOURCES): Add list.c and handler.c.
3830         (kernel_img_HEADERS): Add list.h and handler.h.
3832         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3833         handler.c.
3834         (kernel_mod_SOURCES): Add list.c and handler.c.
3835         (kernel_mod_HEADERS): Add list.h and handler.h.
3837         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3838         handler.c.
3839         (kernel_elf_SOURCES): Add list.c and handler.c.
3840         (kernel_elf_HEADERS): Add list.h and handler.h.
3842         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3843         handler.c.
3844         (kernel_elf_SOURCES): Add list.c and handler.c.
3845         (kernel_elf_HEADERS): Add list.h and handler.h.
3847         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3848         handler.c.
3849         (kernel_mod_SOURCES): Add list.c and handler.c.
3850         (kernel_mod_HEADERS): Add list.h and handler.h.
3852         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3853         handler.c.
3854         (kernel_elf_SOURCES): Add list.c and handler.c.
3855         (kernel_elf_HEADERS): Add list.h and handler.h.
3857 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3859         Factorize elf32 / elf64 code in Multiboot loader.  This will
3860         prevent it from getting out of sync again.
3862         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3863         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3864         grub_multiboot_load_elf64): Move from here ...
3865         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3866         grub_multiboot_load_elf): ... to here (new file).
3868 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3870         * util/grub.d/10_linux.in: Rename "single-user mode" to
3871         "recovery mode".
3873 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
3875         Don't leak in SCSI code.
3876         * disk/scsi.c (grub_scsi_close): free `scsi'.
3878 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3880         * loader/i386/pc/multiboot.c: Move from here ...
3881         * loader/i386/multiboot.c: ... to here.  Update all users.
3883 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3885         Patch from Alexandre Bique <bique.alexandre@gmail.com>
3886         * util/i386/pc/grub-setup.c (setup): Fix directory path.
3888 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
3890         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3891         b-tree.
3893 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3895         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3896         `0x' qualifier as 0 when base is specified as parameter).
3898 2009-02-24  Bean  <bean123ch@gmail.com>
3900         * configure.ac: Check for -mcmodel=large in x86_64 target.
3902         * include/grub/efi/api.h (efi_call_10): New macro.
3903         (efi_wrap_10): New function.
3905         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3906         (GRUB_PE32_REL_BASED_HIGH): Likewise.
3907         (GRUB_PE32_REL_BASED_LOW): Likewise.
3908         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3909         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3910         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3911         (GRUB_PE32_REL_BASED_SECTION): Likewise.
3912         (GRUB_PE32_REL_BASED_REL): Likewise.
3913         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3914         (GRUB_PE32_REL_BASED_DIR64): Likewise.
3915         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3917         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3918         issue.
3920         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3921         (efi_wrap_10): New function.
3923         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3925         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3926         MB/MBP model (NV chipset).
3927         (devdata_devs): Add devpath_5 to the list.
3929         * load/i386/efi/linux.c (video_base): Remove variable.
3930         (RGB_MASK): New macro.
3931         (RGB_MAGIC): Likewise.
3932         (LINE_MIN): Likewise.
3933         (LINE_MAX): Likewise.
3934         (FBTEST_STEP): Likewise.
3935         (FBTEST_COUNT): Likewise.
3936         (fb_list): New variable.
3937         (grub_find_video_card): Remove function.
3938         (find_framebuf): New function.
3939         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3940         line length.
3942         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3943         problem for x86_64.
3945 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
3947         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3949         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3950         coding tool name.
3952 2009-02-22  Robert Millan  <rmh@aybabtu.com>
3954         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3955         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3956         in our relocation, instead of using it directly from heap.  Also
3957         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3959 2009-02-21  Robert Millan  <rmh@aybabtu.com>
3961         Implement USB keyboard support (based on patch by Marco Gerards)
3963         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3964         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3965         (usb_keyboard_mod_LDFLAGS): New variables.
3967         * term/usb_keyboard.c: New file.
3969 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
3971         Corrected wrong declaration
3973         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3975 2009-02-14  Christian Franke  <franke@computer.org>
3977         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3978         (grub_lspci_iter): Print class code and programming interface byte.
3980 2009-02-14  Christian Franke  <franke@computer.org>
3982         * gendistlist.sh: Ignore `.svn' directories.
3984 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
3986         * fs/fat.c: Add 2009 to Copyright line.
3988 2009-02-14  Christian Franke  <franke@computer.org>
3990         * commands/hdparm.c: New file.  Provides `hdparm' command
3991         which sends ATA commands via grub_disk_ata_pass_through ().
3993         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3995         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
3996         and <grub/cpu/io.h> to include/grub/ata.h.
3997         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3998         (GRUB_CDROM_SECTOR_SIZE): Remove.
3999         (GRUB_ATA_*): Move to include/grub/ata.h.
4000         (GRUB_ATAPI_*): Likewise.
4001         (enum grub_ata_commands): Likewise.
4002         (enum grub_ata_timeout_milliseconds): Likewise.
4003         (struct grub_ata_device): Likewise.
4004         (grub_ata_regset): Likewise.
4005         (grub_ata_regget): Likewise.
4006         (grub_ata_regset2): Likewise.
4007         (grub_ata_regget2): Likewise.
4008         (grub_ata_check_ready): Likewise.
4009         (grub_ata_wait_not_busy): Remove static, exported in
4010         include/grub/ata.h.
4011         (grub_ata_wait_drq): Likewise.
4012         (grub_ata_pio_read): Likewise.
4014         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
4015         function for hdparm.mod.
4017         * include/grub/ata.h: New file, contains declarations from
4018         disk/ata.c.
4019         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
4021         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
4022         (grub_disk_ata_pass_through): New exported variable.
4024         * kern/disk.c (grub_disk_ata_pass_through): New variable.
4026 2009-02-13  Colin D Bennett  <colin@gibibit.com>
4028         Support multiple fallback entries, and provide an API to support
4029         executing default+fallback menu entries.  Renamed the `terminal' menu
4030         viewer to `text'.
4032         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
4033         variable declaration.
4034         (grub_menu_execute_callback): New structure declaration.
4035         (grub_menu_execute_callback_t): New typedef.
4036         (grub_menu_execute_with_fallback): New function declaration.
4037         (grub_menu_get_entry): Likewise.
4038         (grub_menu_get_timeout): Likewise.
4039         (grub_menu_set_timeout): Likewise.
4041         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
4043         * normal/menu.c (grub_wait_after_message): Moved to
4044         `normal/menu_text.c'.
4045         (draw_border): Likewise.
4046         (print_message): Likewise.
4047         (print_entry): Likewise.
4048         (print_entries): Likewise.
4049         (grub_menu_init_page): Likewise.
4050         (get_entry_number): Likewise.
4051         (print_timeout): Likewise.
4052         (run_menu): Likewise.
4053         (grub_menu_execute_entry): Likewise.
4054         (show_text_menu): Likewise.
4055         (get_and_remove_first_entry_number): New function.
4056         (grub_menu_execute_with_fallback): Likewise.
4057         (get_entry): Renamed to ...
4058         (grub_menu_get_entry): .. this and made it global.
4059         (get_timeout): Renamed to ...
4060         (grub_menu_get_timeout): ... this and made it global.
4061         (set_timeout): Renamed to ...
4062         (grub_menu_set_timeout): ... this and made it global.
4063         (grub_normal_terminal_menu_viewer): Renamed to ...
4064         (grub_normal_text_menu_viewer): ... this.
4066         * normal/menu_text.c: New file.  Extracted text-menu-specific code
4067         from normal/menu.c.
4069         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
4070         (normal_mod_SOURCES): Likewise.
4072         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4073         (normal_mod_SOURCES): Likewise.
4075         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4076         (normal_mod_SOURCES): Likewise.
4078         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
4079         (normal_mod_SOURCES): Likewise.
4081         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4082         (normal_mod_SOURCES): Likewise.
4084         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4085         (normal_mod_SOURCES): Likewise.
4087         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4088         (normal_mod_SOURCES): Likewise.
4090 2009-02-11  Robert Millan  <rmh@aybabtu.com>
4092         * util/grub.d/00_header.in: Update old reference to `font' command.
4094 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
4096         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
4098         Based on patch from Javier Martín.
4100 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
4102         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
4103         to avoid false positives with FAT.
4104         (grub_fstest_SOURCES): Likewise.
4105         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4106         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4107         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4108         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4109         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4110         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4112 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
4114         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
4115         bpb.version_specific.fat12_or_fat16.fstype and
4116         bpb.version_specific.fat32.fstype.
4118 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4120         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
4122 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4124         * Makefile.in (host_os, host_cpu): New variables.
4125         (target_os): Remove.  Update all users.
4127 2009-02-08  Marco Gerards  <marco@gnu.org>
4129         * Makefile.in (enable_grub_emu_usb): New variable.
4130         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
4131         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
4132         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
4133         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
4134         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
4135         `usbtest.mod' and `usbms.mod'.
4136         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
4137         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
4138         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
4139         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
4140         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
4141         variables.
4143         * disk/usbms.c: New file.
4145         * include/grub/usb.h: Likewise.
4147         * include/grub/usbtrans.h: Likewise.
4149         * include/grub/usbdesc.h: Likewise.
4151         * bus/usb/usbtrans.c: Likewise.
4153         * bus/usb/ohci.c: Likewise.
4155         * bus/usb/uhci.c: Likewise.
4157         * bus/usb/usbhub.c: Likewise.
4159         * bus/usb/usb.c: Likewise.
4161         * commands/usbtest.c: Likewise.
4163         * util/usb.c: Likewise.
4165         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
4167         * configure.ac: Test for libusb presence.
4169         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
4171 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
4173         * kern/mm.c: Add more comments.
4175 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4177         Patch from Javier Martín.
4178         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
4179         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
4181 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4183         * fs/cpio.c: Split tar functionality to ...
4184         * fs/tar.c: ... here (new file).  Update all users.
4186 2009-02-07  Robert Millan  <rmh@aybabtu.com>
4188         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4189         backward-incompatible features.
4191         Based on patch from Javier Martín, with some adjustments.
4193 2009-02-07  Michael Scherer  <misc@mandriva.org>
4195         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4197 2009-02-07  Robert Millan  <rmh@aybabtu.com>
4199         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4200         position of `disk/lvm.c' to ensure grub_init_all() always picks it
4201         after the RAID stuff.
4203 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
4205         Fixes problem when running vbetest command as reported by
4206         Vladimir Serbinenko <phcoder@gmail.com>.
4208         * (grub_vbe_set_video_mode): Fixed problem with text modes.
4210 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
4212         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4213         /dev/md/NpN style mdraid devices.
4215 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4217         * util/unifont2pff.rb: Remove.
4219 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4221         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4222         `#'.
4224 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4226         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4227         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4228         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4229         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4230         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4231         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4232         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4234 2009-02-02  Christian Franke  <franke@computer.org>
4236         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4238 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
4240         * INSTALL: Note that we now require at least autoconf 2.59 and
4241         that LZO is optional.
4243 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
4245         Base on patch on bug #24154 created by Tomas Tintera
4246         <trosos@seznam.cz>.
4248         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4250 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
4252         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
4253         <bero@arklinux.org>.
4255         * normal/parser.y (script_init): Add missing semicolon.
4257 2009-01-31  Colin D Bennett  <colin@gibibit.com>
4259         * normal/main.c: Add include to grub/menu_viewer.h.
4260         (free_menu_entry_classes): Added.
4261         (grub_normal_menu_addentry): Added class property handling.
4262         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4263         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4265         * normal/menu_viewer.c: New file.
4267         * normal/menu.c (run_menu_entry): Renamed to ...
4268         (grub_menu_execute_entry): ... this and made it as global.
4269         (grub_menu_run): Renamed to ...
4270         (show_text_menu): ... this and made it local.
4271         (show_text_menu): Adapt to new function names.
4272         (grub_normal_terminal_menu_viewer): New global variable.
4274         * include/grub/menu.h: New file.
4276         * include/grub/menu_viewer.h: New file.
4278         * include/grub/normal.h: Added include to grub/menu.h.
4279         (grub_menu_entry): Moved to include/grub/menu.h.
4280         (grub_menu_entry_t): Likewise.
4281         (grub_menu): Likewise.
4282         (grub_menu_t): Likewise.
4283         (grub_normal_terminal_menu_viewer): Added.
4284         (grub_menu_execute_entry): Likewise.
4285         (grub_menu_run): Removed.
4287         * DISTLIST: Added include/grub/menu.h.
4288         Added include/grub/menu_viewer.h.
4289         Added normal/menu_viewer.c.
4291 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
4293         * normal/execute.c (grub_script_execute_menuentry): Changed to use
4294         arglist for menutitle arguments.
4296         * normal/main.c (grub_normal_menu_addentry): Likewise.
4298         * normal/parser.y (menuentry): Likewise.
4300         * normal/script.c (grub_script_create_cmdmenu): Likewise.
4302         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4303         (grub_script_create_cmdmenu): Likewise.
4305         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4307         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4308         changes.
4310         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4312         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4314         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4316         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4318         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4320         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4322 2009-01-30  Christian Franke  <franke@computer.org>
4324         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4325         in option help text.
4327 2009-01-27  Pavel Roskin  <proski@gnu.org>
4329         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4331 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
4333         * commands/lsmmap.c: Add include to grub/machine/memory.h.
4335         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4337         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4338         unregister function.
4340 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
4342         * disk/scsi.c (grub_scsi_read): Fix sign problem.
4344         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4346         * util/grub-mkfont.c (usage): Fix typo.
4348         * util/elf/grub-mkimage.c (load_modules): Fix warning.
4350 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
4352         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4354         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4356         * kern/misc.c (grub_strcasecmp): New function.
4357         (grub_strcasecmp): Use grub_size_t instead of int for length.
4358         Fix return value.
4359         * include/grub/misc.h: Update function prototypes.
4361 2009-01-26  Robert Millan  <rmh@aybabtu.com>
4363         * configure.ac: Fix cross-compilation check.
4365 2009-01-22  Christian Franke  <franke@computer.org>
4367         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4368         (precision) digit string.  Allow `.format2' without `format1' (width).
4369         Limit input chars for `%s' output to `format2' if specified.  This is
4370         compatible with standard printf ().
4372 2009-01-22  Christian Franke  <franke@computer.org>
4374         * disk/ata.c (grub_ata_wait_status): Replace by ...
4375         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
4376         other status bits may be invalid while BSY is asserted.
4377         (grub_ata_check_ready): New function.
4378         (grub_ata_cmd): Removed.
4379         (grub_ata_wait_drq): New function.
4380         (grub_ata_strncpy): Remove inline.
4381         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
4382         and error check now done by grub_ata_wait_drq ().
4383         (grub_ata_pio_write): Likewise.
4384         (grub_atapi_identify): Set DEV before check for !BSY.  Use
4385         grub_ata_wait_drq () to wait for data.
4386         (grub_ata_device_initialize): Add status register check to
4387         detect missing SATA slave devices.  Add debug messages.
4388         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4389         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
4390         transfer loop by grub_ata_pio_write ().
4391         (grub_ata_identify): Set DEV before check for !BSY. Use
4392         grub_ata_wait_drq () to wait for data.
4393         (grub_ata_setaddress): Set DEV before check for !BSY.
4394         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4395         read/write in one loop.  Fix invalid command on write.  Fix incomplete
4396         command on (size % batch) == 0.  Add missing error check after write of
4397         last block.  Add debug messages.
4398         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
4400 2009-01-19  Christian Franke  <franke@computer.org>
4402         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4403         (GRUB_ATAPI_IREASON_*): Likewise.
4404         (grub_ata_pio_write): Fix timeout error return.
4405         (grub_atapi_identify): Add grub_ata_wait () after cmd.
4406         (grub_atapi_wait_drq): New function.
4407         (grub_atapi_packet): New parameter `size'.
4408         Use grub_atapi_wait_drq () and direct write instead of
4409         grub_ata_pio_write ().
4410         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4411         reads the number of bytes requested by the device for each DRQ
4412         assertion.
4413         (grub_atapi_write): Remove old implementation, return not
4414         implemented instead.
4416 2009-01-19  Christian Franke  <franke@computer.org>
4418         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4419         of 512 to calculate data size.
4420         (grub_scsi_read12): Likewise.
4421         (grub_scsi_write10): Likewise.
4422         (grub_scsi_write12): Likewise.
4423         (grub_scsi_read): Adjust size according to blocksize.
4424         Add checks for invalid blocksize and unaligned transfer.
4426 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
4428         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4430         * term/gfxterm.c (write_char): Fix background rendering for wide
4431         width glyphs.
4433 2009-01-19  Robert Millan  <rmh@aybabtu.com>
4435         * config.guess: Update to latest version from config git.
4436         * config.sub: Likewise.
4438 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
4440         * Makefile.in: Change font compilation to use new grub-mkfont instead
4441         of java version.
4443         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4444         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4445         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4446         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4447         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4448         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4449         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4450         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4451         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4453 2009-01-16  Christian Franke  <franke@computer.org>
4455         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4456         (enum grub_ata_timeout_milliseconds): New enum.
4457         (grub_ata_wait_status): Add parameter milliseconds.
4458         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
4459         recovery from timed-out commands.
4460         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
4461         return grub_errno instead of REG_ERROR.
4462         (grub_ata_pio_write): Add parameter milliseconds.
4463         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4464         Pass milliseconds to grub_ata_wait_status () and
4465         grub_ata_pio_read ().
4466         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4467         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
4468         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
4469         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4470         It is not suitable for device detection, because DEV bit is ignored,
4471         the command may run too long, and not all devices set the signature
4472         properly.
4473         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4474         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4475         Fix device selection, DEV bit must be set first to address the registers
4476         of the correct device.
4477         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4478         grub_ata_pio_read/write ().
4479         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4480         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4482 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
4484         * util/grub-editenv.c (main): Use fseeko(), not fseek().
4486 2009-01-13  Bean  <bean123ch@gmail.com>
4488         * util/grub-mkfont.c (write_font): forget to remove some debug code.
4490 2009-01-13  Bean  <bean123ch@gmail.com>
4492         * Makefile.in: (enable_grub_mkfont): New variable.
4493         (freetype_cflags): Likewise.
4494         (freetype_libs): Likewise.
4496         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4497         (grub_mkfont_SOURCES): New variable.
4498         (grub_mkfont_CFLAGS): Likewise.
4499         (grub_mkfont_LDFLAGS): Likewise.
4501         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4502         library if `--enable-grub-mkfont' is requested.
4503         (enable_grub_mkfont): New variable.
4504         (freetype_cflags): Likewise.
4505         (freetype_libs): Likewise.
4507         * util/grub-mkfont.c: New file.
4509 2009-01-12  Christian Franke  <franke@computer.org>
4511         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4512         mode check.  Fix setting of compat_use[].
4514 2009-01-10  Robert Millan  <rmh@aybabtu.com>
4516         Update a few copyright years which we forgot to do in 2008 (only for
4517         files whose changes made in 2008 were copyright-significant)
4519         * Makefile.in: Add 2008 to Copyright line.
4520         * disk/ieee1275/ofdisk.c: Likewise.
4521         * disk/efi/efidisk.c: Likewise.
4522         * kern/dl.c: Likewise.
4523         * kern/sparc64/ieee1275/init.c: Likewise.
4524         * kern/mm.c: Likewise.
4525         * kern/efi/mm.c: Likewise.
4526         * boot/i386/pc/boot.S: Likewise.
4527         * genfslist.sh: Likewise.
4528         * fs/iso9660.c: Likewise.
4529         * fs/hfs.c: Likewise.
4530         * fs/jfs.c: Likewise.
4531         * fs/minix.c: Likewise.
4532         * fs/ufs.c: Likewise.
4533         * gensymlist.sh.in: Likewise.
4534         * genkernsyms.sh.in: Likewise.
4535         * include/grub/misc.h: Likewise.
4536         * include/grub/types.h: Likewise.
4537         * include/grub/symbol.h: Likewise.
4538         * include/grub/elf.h: Likewise.
4539         * include/grub/kernel.h: Likewise.
4540         * include/grub/disk.h: Likewise.
4541         * include/grub/dl.h: Likewise.
4542         * include/grub/i386/linux.h: Likewise.
4543         * include/grub/i386/pc/biosdisk.h: Likewise.
4544         * include/grub/efi/api.h: Likewise.
4545         * include/grub/efi/pe32.h: Likewise.
4546         * include/grub/util/misc.h: Likewise.
4547         * normal/execute.c: Likewise.
4548         * normal/arg.c: Likewise.
4549         * normal/completion.c: Likewise.
4550         * normal/lexer.c: Likewise.
4551         * normal/parser.y: Likewise.
4552         * normal/misc.c: Likewise.
4553         * commands/i386/pc/vbeinfo.c: Likewise.
4554         * commands/hexdump.c: Likewise.
4555         * commands/terminal.c: Likewise.
4556         * commands/ls.c: Likewise.
4557         * commands/help.c: Likewise.
4558         * partmap/pc.c: Likewise.
4559         * loader/efi/chainloader.c: Likewise.
4560         * loader/multiboot_loader.c: Likewise.
4561         * loader/i386/pc/multiboot2.c: Likewise.
4562         * term/efi/console.c: Likewise.
4563         * term/i386/pc/serial.c: Likewise.
4564         * util/lvm.c: Likewise.
4565         * util/console.c: Likewise.
4566         * util/i386/efi/grub-mkimage.c: Likewise.
4567         * util/raid.c: Likewise.
4569 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
4571         * commands/videotest.c: Removed include to grub/machine/memory.h.
4573         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4574         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4575         (video_mod_SOURCES): Removed.
4576         (video_mod_CFLAGS): Likewise.
4577         (video_mod_LDFLAGS): Likewise.
4578         (gfxterm_mod_SOURCES): Likewise.
4579         (gfxterm_mod_CFLAGS): Likewise.
4580         (gfxterm_mod_LDFLAGS): Likewise.
4581         (videotest_mod_SOURCES): Likewise.
4582         (videotest_mod_CFLAGS): Likewise.
4583         (videotest_mod_LDFLAGS): Likewise.
4584         (bitmap_mod_SOURCES): Likewise.
4585         (bitmap_mod_CFLAGS): Likewise.
4586         (bitmap_mod_LDFLAGS): Likewise.
4587         (tga_mod_SOURCES): Likewise.
4588         (tga_mod_CFLAGS): Likewise.
4589         (tga_mod_LDFLAGS): Likewise.
4590         (jpeg_mod_SOURCES): Likewise.
4591         (jpeg_mod_CFLAGS): Likewise.
4592         (jpeg_mod_LDFLAGS): Likewise.
4593         (png_mod_SOURCES): Likewise.
4594         (png_mod_CFLAGS): Likewise.
4595         (png_mod_LDFLAGS): Likewise.
4597         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4598         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4599         (video_mod_SOURCES): Added.
4600         (video_mod_CFLAGS): Likewise.
4601         (video_mod_LDFLAGS): Likewise.
4602         (videotest_mod_SOURCES): Likewise.
4603         (videotest_mod_CFLAGS): Likewise.
4604         (videotest_mod_LDFLAGS): Likewise.
4605         (bitmap_mod_SOURCES): Likewise.
4606         (bitmap_mod_CFLAGS): Likewise.
4607         (bitmap_mod_LDFLAGS): Likewise.
4608         (tga_mod_SOURCES): Likewise.
4609         (tga_mod_CFLAGS): Likewise.
4610         (tga_mod_LDFLAGS): Likewise.
4611         (jpeg_mod_SOURCES): Likewise.
4612         (jpeg_mod_CFLAGS): Likewise.
4613         (jpeg_mod_LDFLAGS): Likewise.
4614         (png_mod_SOURCES): Likewise.
4615         (png_mod_CFLAGS): Likewise.
4616         (png_mod_LDFLAGS): Likewise.
4617         (gfxterm_mod_SOURCES): Likewise.
4618         (gfxterm_mod_CFLAGS): Likewise.
4619         (gfxterm_mod_LDFLAGS): Likewise.
4621         * term/gfxterm.c: Removed include to grub/machine/memory.h,
4622         grub/machine/console.h.
4624 2009-01-04  Jerone Young  <jerone@gmail.com>
4626         Make on screen instructions clearer
4628         Based on patch created by Jidanni <jidanni@jidanni.org>
4630         * normal/menu.c: print clearer instructions on the screen
4632 2009-01-02  Colin D Bennett  <colin@gibibit.com>
4634         New font engine.
4636         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4637         build system and fixed gfxterm.c to work with different sized fonts.
4639         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4641         * configure: Re-generated.
4643         * DISTLIST: Removed font/manager.c.
4644         Added font/font.c.
4645         Added font/font_cmd.c.
4647         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
4648         compilation.
4650         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
4652         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4654         * kern/term.c: Changed users of grub_utf8_to_ucs4.
4656         * normal/menu.c: Likewise.
4658         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4659         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4661         * include/grub/font.h: Replaced with new file.
4663         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4664         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4665         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4666         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4667         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4668         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4669         fg_red, fg_green, fg_blue, fg_alpha.
4670         (grub_video_adapter): Removed blit_glyph.
4671         (grub_video_blit_glyph): Removed.
4673         * font/manager.c: Removed file.
4675         * font/font.c: New file.
4677         * font/font_cmd.c: Likewise.
4679         * video/video.c (grub_video_blit_glyph): Removed.
4681         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4682         (grub_video_vbe_map_rgba): Likewise.
4683         (grub_video_vbe_unmap_color_int): Likewise.
4684         (grub_video_vbe_blit_glyph): Removed.
4685         (grub_video_vbe_adapter): Removed blit_glyph.
4687         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4688         (get_pixel): Likewise.
4689         (set_pixel): Likewise.
4691         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4693         * term/gfxterm.c: Adapted to new font engine.
4695         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
4697         * term/i386/pc/vga.c: Likewise.
4699         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4701         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4703         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4705         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4707         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4709         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4711         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4713         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4715         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4717         * util/grub.d/00_header.in: Changed to use new loadfont command.
4719         * util/grub-mkconfig_lib.in: Changed font extension.
4721 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
4723         * util/getroot.c (grub_util_get_grub_dev): Add support for
4724         /dev/md/dNNpNN style partitionable mdraid devices.
4726 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
4728         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4729         at a time limit of the PXE TFTP API correctly.
4730         (grub_pxefs_close): Likewise.
4732 2008-11-29  Robert Millan  <rmh@aybabtu.com>
4734         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4735         grub_ata_device_initialize() calls.
4737 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
4739         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4740         iteration failed.
4741         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4743 2008-11-28  Robert Millan  <rmh@aybabtu.com>
4745         Fix build on powerpc-ieee1275.  Based on patch created by
4746         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4747         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4748         `kern/ieee1275/mmap.c'.
4749         * include/grub/powerpc/ieee1275/memory.h: New file.
4751         Provide grub-install on coreboot.
4752         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4753         (grub_install_SOURCES): New variable.
4754         * util/i386/pc/grub-install.in: Add a few condition checks to make it
4755         usable on coreboot.
4757 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
4759         * util/grub-fstest.c (grub_term_get_current_input): Change return type
4760         to `grub_term_input_t'.
4761         (grub_term_get_current_output): Change return type to
4762         `grub_term_output_t'.
4764 2008-11-22  Robert Millan  <rmh@aybabtu.com>
4766         Fix breakage on coreboot due to declaration mismatch.
4767         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4768         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4769         grub_vga_text_cls().
4771         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4772         comments.  Avoid copying one more byte than necessary (just in case).
4774         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4775         to 0x200000 (avoids trouble with some OFW implementations, and matches
4776         with the one in Yaboot).
4777         Reported by Manoel Abranches
4779 2008-11-20  Robert Millan  <rmh@aybabtu.com>
4781         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4782         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4784         * util/grub-mkconfig_lib.in (grub_warn): New function.
4785         (convert_system_path_to_grub_path): Use grub_warn() when issuing
4786         warnings, to obtain consistent formatting.
4787         * util/grub.d/00_header.in: Likewise.
4788         * util/update-grub_lib.in: Likewise.
4790         * loader/i386/linux.c (allocate_pages): Fix a warning.
4791         Move comment text to `#error' stanza.
4793         Harmonize ieee1275's grub_available_iterate() with the generic
4794         grub_machine_mmap_iterate() interface (fixes a recently-introduced
4795         build problem on i386-ieee1275):
4796         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4797         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
4798         parameter `type'.  Update all users of this function.
4799         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4800         `kern/ieee1275/mmap.c'.
4801         * kern/ieee1275/init.c
4802         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4803         with ...
4804         (grub_machine_mmap_iterate): ... this.
4805         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4806         return type to `grub_err_t'.  Update all implementations of this
4807         function prototype.
4808         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4809         Likewise.
4811         Add `lsmmap' command (lists firmware-provided memory map):
4812         * commands/lsmmap.c: New file.
4813         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4814         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4815         variables.
4816         * conf/powerpc-ieee1275.rmk: Likewise.
4817         * conf/i386-coreboot.rmk: Likewise.
4818         * conf/i386-ieee1275.rmk: Likewise.
4820 2008-11-19  Robert Millan  <rmh@aybabtu.com>
4822         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4823         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4824         constraints to initrd allocation (based on code from
4825         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
4826         for Linux to find it.
4828 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4830         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4831         order to cope with duplicate slashes.
4833 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4835         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4836         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
4837         don't want to mess with lower memory, because it is used in the Linux
4838         loader.
4840         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4841         an appropriate place in lower memory, between 0x10000 and 0x90000,
4842         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
4843         is in our heap (probably as a result of it being corrupted during
4844         decompression).  Add #error instance with comment to explain why this
4845         loader isn't currently usable on PC/BIOS.
4847 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4849         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4850         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4852 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4854         Make loader/i386/linux.c buildable on i386-pc (although disabled).
4856         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4857         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4858         from here ...
4859         * include/grub/i386/pc/memory.h: ... to here.
4861 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4863         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4864         split).
4866         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4867         (grub_console_cur_color, grub_console_real_putchar)
4868         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4869         (grub_console_setcolorstate, grub_console_setcolor)
4870         (grub_console_getcolor): Move from here ...
4871         * include/grub/i386/vga_common.h: ... to here (new file).
4873         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4874         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4875         `<grub/i386/io.h>'.
4876         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4877         `<grub/i386/vga_common.h>'.
4879 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4881         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4882         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4883         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4884         variables.
4885         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4886         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4888         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4889         grub_console_init() with call to grub_vga_text_init().
4890         (grub_machine_fini): Replace call to
4891         grub_console_fini() with call to grub_vga_text_fini() and
4892         grub_at_keyboard_fini().
4894         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4895         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4896         (grub_console_setcolorstate, grub_console_setcolor)
4897         (grub_console_getcolor): New function prototypes.
4899         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4900         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4901         (grub_vga_text_setcursor): Static-ize.
4902         (grub_vga_text_term): New structure.
4903         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4905         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4906         (grub_console_cur_color, grub_console_standard_color)
4907         (grub_console_normal_color, grub_console_highlight_color)
4908         (map_char, grub_console_putchar, grub_console_getcharwidth)
4909         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4910         (grub_console_getcolor): Move from here ...
4911         * term/i386/vga_common.c: ... to here (same function names).
4913 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4915         Use newly-added Multiboot support in coreboot.
4917         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4918         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4920         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4921         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4922         (codestart): Store the MBI in `startup_multiboot_info' when we're
4923         being loaded using Multiboot.
4925         * kern/i386/coreboot/init.c (grub_machine_init): Move
4926         grub_at_keyboard_init() call to beginning of function (useful for
4927         debugging).  Call grub_machine_mmap_init() before attempting to use
4928         grub_machine_mmap_iterate().
4929         (grub_lower_mem, grub_upper_mem): Move from here ...
4930         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4931         here (new file).
4933         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4934         function prototype.
4936 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4938         Fix a regression introduced by the at_keyboard.mod split.  Because
4939         some terminals are default on some platforms and non-default on
4940         others, the first terminal being registered determines which is
4941         going to be default.
4943         * kern/term.c (grub_term_register_input): If this is the first
4944         terminal being registered, set it as the current one.
4945         (grub_term_register_output): Likewise.
4947         * term/efi/console.c (grub_console_init): Do not call
4948         grub_term_set_current_output() or grub_term_set_current_input().
4949         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4950         * term/i386/pc/console.c (grub_console_init): Likewise.
4951         (grub_console_fini): Do not call grub_term_set_current_input()
4952         (but leave grub_term_set_current_output() to restore text mode).
4954 2008-11-10  Robert Millan  <rmh@aybabtu.com>
4956         * util/grub.d/00_header.in: Add backward compatibility check for
4957         versions of terminal.mod that don't understand `terminal_input' or
4958         `terminal_output'.
4960 2008-11-09  Robert Millan  <rmh@aybabtu.com>
4962         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4963         `terminal_input' / `terminal_output', not `terminal'.
4965 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4967         * Makefile.in (include_DATA): Fix srcdir=. assumption.
4968         (DISTCLEANFILES): Add `build_env.mk'.
4970 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4972         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4973         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
4974         members.  Update all users.
4975         * util/console.c (grub_ncurses_term): Split in ...
4976         (grub_ncurses_term_input): ... this, and ...
4977         (grub_ncurses_term_output): ... this.  Update all users.
4978         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4980 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4982         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4983         (PKGDATA): Add $(pkgdata_SRCDIR).
4984         (pkglib_BUILDDIR): New variable.
4985         (pkgdata_SRCDIR): New variable.
4986         (build_env.mk): New target.
4987         (include_DATA): New variable.
4988         (install-local): Install $(include_DATA) files in $(includedir).
4990 2008-11-07  Pavel Roskin  <proski@gnu.org>
4992         * gendistlist.sh: Use C locale for sorting to ensure consistent
4993         output on all systems.
4995         * util/grub.d/00_header.in: Remove incorrect space before
4996         "serial".
4998 2008-11-07  Robert Millan  <rmh@aybabtu.com>
5000         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
5001         per specification.
5002         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
5003         * loader/multiboot_loader.c (find_multi_boot2_header): New function
5004         (based on find_multi_boot1_header).
5005         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
5006         using find_multi_boot2_header(), and abort if neither Multiboot or
5007         Multiboot headers were found.
5009 2008-11-07  Robert Millan  <rmh@aybabtu.com>
5011         Modularize at_keyboard.mod:
5013         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
5014         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
5015         (at_keyboard_mod_LDFLAGS): New variables.
5017         Actual terminal split:
5019         * include/grub/term.h (struct grub_term): Split in ...
5020         (struct grub_term_input): ... this, and ...
5021         (struct grub_term_output): ... this.  Update all users.
5022         (grub_term_set_current): Split in ...
5023         (grub_term_set_current_input): ... this, and ...
5024         (grub_term_set_current_output): ... this.
5025         (grub_term_get_current): Split in ...
5026         (grub_term_get_current_input): ... this, and ...
5027         (grub_term_get_current_output): ... this.
5028         (grub_term_register): Split in ...
5029         (grub_term_register_input): ... this, and ...
5030         (grub_term_register_output): ... this.
5031         (grub_term_unregister): Split in ...
5032         (grub_term_unregister_input): ... this, and ...
5033         (grub_term_unregister_output): ... this.
5034         (grub_term_iterate): Split in ...
5035         (grub_term_iterate_input): ... this, and ...
5036         (grub_term_iterate_output): ... this.
5038         * kern/term.c (grub_term_list): Split in ...
5039         (grub_term_list_input): ... this, and ...
5040         (grub_term_list_output): ... this.  Update all users.
5041         (grub_cur_term): Split in ...
5042         (grub_cur_term_input): ... this, and ...
5043         (grub_cur_term_output): ... this.  Update all users.
5044         (grub_term_set_current): Split in ...
5045         (grub_term_set_current_input): ... this, and ...
5046         (grub_term_set_current_output): ... this.
5047         (grub_term_get_current): Split in ...
5048         (grub_term_get_current_input): ... this, and ...
5049         (grub_term_get_current_output): ... this.
5050         (grub_term_register): Split in ...
5051         (grub_term_register_input): ... this, and ...
5052         (grub_term_register_output): ... this.
5053         (grub_term_unregister): Split in ...
5054         (grub_term_unregister_input): ... this, and ...
5055         (grub_term_unregister_output): ... this.
5056         (grub_term_iterate): Split in ...
5057         (grub_term_iterate_input): ... this, and ...
5058         (grub_term_iterate_output): ... this.
5060         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
5061         a check for input and one for output (and only attempt to get keys
5062         from user when input works).
5064         * util/grub-probe.c (grub_term_get_current): Split in ...
5065         (grub_term_get_current_input): ... this, and ...
5066         (grub_term_get_current_output): ... this.
5067         * util/grub-fstest.c: Likewise.
5068         * util/i386/pc/grub-setup.c: Likewise.
5069         * util/grub-editenv.c: Likewise.
5071         Portability adjustments:
5073         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
5074         `term/i386/pc/at_keyboard.c'.
5075         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
5076         grub_keyboard_controller_init() (now handled by terminal .init).
5077         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
5078         grub_at_keyboard_init().
5079         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
5080         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
5081         at_keyboard.mod via input terminal interface).
5082         * include/grub/i386/coreboot/console.h: Convert into a stub for
5083         `<grub/i386/pc/console.h>'.
5085         Migrate full terminals to new API:
5087         * term/efi/console.c (grub_console_term): Split into ...
5088         (grub_console_term_input): ... this, and ...
5089         (grub_console_term_output): ... this.  Update all users.
5090         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
5091         (grub_ofconsole_init): Split into ...
5092         (grub_ofconsole_init_input): ... this, and ...
5093         (grub_ofconsole_init_output): ... this.
5094         (grub_ofconsole_term): Split into ...
5095         (grub_ofconsole_term_input): ... this, and ...
5096         (grub_ofconsole_term_output): ... this.  Update all users.
5097         * term/i386/pc/serial.c (grub_serial_term): Split into ...
5098         (grub_serial_term_input): ... this, and ...
5099         (grub_serial_term_output): ... this.  Update all users.
5100         * term/i386/pc/console.c (grub_console_term): Split into ...
5101         (grub_console_term_input): ... this, and ...
5102         (grub_console_term_output): ... this.  Update all users.
5103         (grub_console_term_input): Only enable it on PC/BIOS platform.
5104         (grub_console_init): Remove grub_keyboard_controller_init() call.
5106         Migrate input terminals to new API:
5108         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
5109         `i386' and `i386/pc' to enable build on x86_64 (this driver is
5110         i386-specific anyway).
5111         (grub_console_checkkey): Rename to ...
5112         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
5113         users.
5114         (grub_keyboard_controller_orig): New variable.
5115         (grub_console_getkey): Rename to ...
5116         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
5117         users.
5118         (grub_keyboard_controller_init): Static-ize.  Save original
5119         controller value so that it can be restored ...
5120         (grub_keyboard_controller_fini): ... here (new function).
5121         (grub_at_keyboard_term): New structure.
5122         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
5123         functions.
5125         Migrate output terminals to new API:
5127         * term/i386/pc/vga.c (grub_vga_term): Change type to
5128         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
5129         members.  Update all users.
5130         * term/gfxterm.c (grub_video_term): Change type to
5131         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
5132         members.  Update all users.
5133         * include/grub/i386/pc/console.h (grub_console_checkkey)
5134         (grub_console_getkey): Do not export (no longer needed by gfxterm,
5135         etc).
5137         Migrate `terminal' command and userland tools to new API:
5139         * commands/terminal.c (grub_cmd_terminal): Split into ...
5140         (grub_cmd_terminal_input): ... this, and ...
5141         (grub_cmd_terminal_output): ... this.
5142         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
5143         `terminal_input' and `terminal_output'.
5144         * util/grub.d/00_header.in: Adjust `terminal' calls to new
5145         `terminal_input' / `terminal_output' API.
5146         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
5147         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
5148         provided ${GRUB_TERMINAL}, convert it).
5150 2008-11-04  Robert Millan  <rmh@aybabtu.com>
5152         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
5153         for FreeBSD.
5154         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
5156 2008-11-03  Bean  <bean123ch@gmail.com>
5158         * kern/elf.c (grub_elf32_load): Revert to previous code.
5159         (grub_elf64_load): Likewise.
5161         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
5163 2008-11-01  Robert Millan  <rmh@aybabtu.com>
5165         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
5166         (TARGET_CPPFLAGS): Likewise.
5167         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
5169 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
5171         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
5173 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
5175         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
5176         addition of objects until the code is not going to be able to fail.
5178 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
5180         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
5181         (add a missing NULL check, and correct them by moving the pointer
5182         operations after the actual check).
5184 2008-10-29  Robert Millan  <rmh@aybabtu.com>
5186         * util/i386/pc/grub-install.in: Handle empty string as output from
5187         make_system_path_relative_to_its_root().
5189 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
5191         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5192         circular metadata worst case scenario. If the metadata is circular
5193         then copy the wrap in place.
5194         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5195         project lib/format_text/layout.h
5196         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5198 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
5200         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
5202 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
5204         * util/update-grub_lib.in: Mention filename in warning message.
5206 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
5208         * NEWS: Update for rename of update-grub to grub-mkconfig.
5210 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
5212         * util/update-grub_lib.in: Copy to ...
5213         * util/grub-mkconfig_lib.in: ... this.  Update all users.
5214         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
5215         * util/update-grub.in: Rename to ...
5216         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
5217         option. Add `--output' option to allow users to specify the generated
5218         configuration file.  Default to stdout.
5219         (update_grub_dir): Rename to ...
5220         (grub_mkconfig_dir): ... this.
5221         (grub_cfg): Default to an empty string.
5222         * conf/common.rmk (update-grub): Rename to ...
5223         (grub-mkconfig): ... this.
5224         (update-grub_lib): Copy to ...
5225         (grub-mkconfig_lib): ... this.
5226         (update-grub_SCRIPTS): Copy to ...
5227         (grub-mkconfig_SCRIPTS): ... this. Update all users.
5228         (update-grub_DATA): Rename to ...
5229         (grub-mkconfig_DATA): ... this.
5231 2008-09-28  Robert Millan  <rmh@aybabtu.com>
5233         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5234         to `modified'.  Add the real `created' field.
5235         (grub_iso9660_uuid): Use `modified' rather than `created' for
5236         constructing the UUID.
5238 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
5240         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5241         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5243 2008-09-28  Bean  <bean123ch@gmail.com>
5245         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5246         Thanks to Christian Franke for finding this bug.
5248 2008-09-25  Robert Millan  <rmh@aybabtu.com>
5250         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5251         instances of grub_util_get_disk_name() (see previous commit).
5253 2008-09-25  Robert Millan  <rmh@aybabtu.com>
5255         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5256         `util/i386/get_disk_name.c'.
5257         * conf/i386-efi.rmk: Likewise.
5258         * conf/x86_64-efi.rmk: Likewise.
5259         * conf/i386-coreboot.rmk: Likewise.
5260         * conf/i386-ieee1275.rmk: Likewise.
5261         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5262         `util/ieee1275/get_disk_name.c'.
5263         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5264         * util/ieee1275/get_disk_name.c: Remove file.
5265         * util/i386/get_disk_name.c: Remove file.
5266         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5267         "hd%d" for device.map entries, rather than using
5268         grub_util_get_disk_name().
5270 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
5272         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5273         warning.
5274         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5276 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
5278         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5279         Changed to 0x5100.
5280         (GRUB_TERM_PPAGE): Changed to 0x4900.
5282 2008-09-24  Robert Millan  <rmh@aybabtu.com>
5284         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5285         macros (they were i386-pc specific).
5286         * include/grub/sparc64/ieee1275/console.h: Likewise.
5287         * include/grub/efi/console.h: Likewise.
5289 2008-09-22  Bean  <bean123ch@gmail.com>
5291         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5292         resident and in attribute list.
5294         * include/grub/ntfs.h (BMP_LEN): Removed.
5296 2008-09-22  Bean  <bean123ch@gmail.com>
5298         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
5299         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5301         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5302         error occurs, as grub_disk_open will call grub_disk_close, which will
5303         call p->close (scsi).
5305 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
5307         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5308         (AC_PREREQ): Bumped to 2.59.
5309         (AC_TRY_COMPILE): Replace obsolete macro with ...
5310         (AC_COMPILE_IFELSE): ... this.
5311         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5312         (AC_LINK_IFELSE): ... this.
5314 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
5316         * autogen.sh: Add a call to `gendistlist.sh'.
5318 2008-09-19  Christian Franke  <franke@computer.org>
5320         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5321         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5322         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5323         Export __enable_execute_stack() to modules.
5324         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5325         New function.
5327 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
5329         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5330         Sort the list.
5332 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
5334         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
5335         #include <grub/util/hostdisk.h>.
5337 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5339         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5340         segments when their filesz is zero (grub_file_read() interprets
5341         zero-size as "read until EOF", which results in memory corruption).
5342         Use `lowest_segment' rather than 0 for calculating the current
5343         segment load address.
5345 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5347         * util/hostdisk.c (open_device): Replace a grub_util_info() call
5348         with grub_dprintf("hostdisk", ...), as it was so verbose that it
5349         clobbered useful information.
5351 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5353         * include/grub/util/biosdisk.h: Move to ...
5354         * include/grub/util/hostdisk.h: ... here.  Update all users.
5355         * util/biosdisk.c: Move to ...
5356         * util/hostdisk.c: ... here.  Update all users.
5358 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5360         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5361         variables.
5362         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5363         and length can be stored directly in the `mbi->mmap_addr' and
5364         `mbi->mmap_length' struct fields.
5366 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5368         * conf/i386.rmk: New file.  Provides declaration for building
5369         `cpuid.mod'.
5370         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5371         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5372         variables.
5373         Include `conf/i386.mk'.
5374         * conf/i386-efi.rmk: Likewise.
5375         * conf/x86_64-efi.rmk: Likewise.
5376         * conf/i386-coreboot.rmk: Likewise.
5377         * conf/i386-ieee1275.rmk: Likewise.
5379 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
5381         Based on patch created by Colin D Bennett <colin@gibibit.com>.
5382         Adds optimization support for BGR based modes.
5384         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5385         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5386         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5387         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5388         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5389         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5390         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5391         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5392         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5393         (grub_video_i386_vbeblit_index_index): Likewise.
5394         (grub_video_i386_vbeblit_replace_directN): Added.
5395         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5396         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5397         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5398         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5399         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5400         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5401         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5402         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5403         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5404         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5405         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5406         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5407         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5409         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5410         (grub_video_i386_vbefill_R8G8B8): Likewise.
5411         (grub_video_i386_vbefill_index): Likewise.
5412         (grub_video_i386_vbefill_direct32): Added.
5413         (grub_video_i386_vbefill_direct24): Likewise.
5414         (grub_video_i386_vbefill_direct16): Likewise.
5415         (grub_video_i386_vbefill_direct8): Likewise.
5417         * include/grub/video.h (grub_video_blit_format): Removed
5418         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5419         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5420         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5421         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5422         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5424         * video/video.c (grub_video_get_blit_format): Updated to use new
5425         blit formats.  Added handling for 16 bit color modes.
5427         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5428         fillers.
5429         (common_blitter): Updated to use new blitters.
5431         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5432         Removed.
5433         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5434         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5435         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5436         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5437         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5438         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5439         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5440         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5441         (grub_video_i386_vbeblit_index_index): Likewise.
5442         (grub_video_i386_vbeblit_replace_directN): Added.
5443         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5444         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5445         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5446         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5447         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5448         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5449         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5450         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5451         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5452         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5453         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5454         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5455         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5457         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5458         (grub_video_i386_vbefill_R8G8B8): Likewise.
5459         (grub_video_i386_vbefill_index): Likewise.
5460         (grub_video_i386_vbefill_direct32): Added.
5461         (grub_video_i386_vbefill_direct24): Likewise.
5462         (grub_video_i386_vbefill_direct16): Likewise.
5463         (grub_video_i386_vbefill_direct8): Likewise.
5465         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5466         types.
5468         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5469         types.
5471         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5472         blitter types.
5474         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5475         types.
5477 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5479         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5480         RAID level 1.
5482 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5484         * fs/iso9660.c (grub_iso9660_date): New structure.
5485         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5486         (grub_iso9660_uuid): New function.
5488 2008-09-05  Bean  <bean123ch@gmail.com>
5490         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5492         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5493         insensitive bit for names in Win32 and Win32 & DOS namespace.
5495         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5497         * include/grub/types.h (LONG_MAX): Likewise.
5499 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5501         * util/getroot.c: Include <config.h>.
5502         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5503         add support for /dev/md/N devices and handle LVM double dash escaping.
5505 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5507         * config.guess: Update to latest version from config git.
5508         * config.sub: Likewise.
5510 2008-09-03  Robert Millan  <rmh@aybabtu.com>
5512         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5513         `disk->total_sectors'.
5515 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5517         * include/grub/normal.h: Fixed incorrect comment for
5518         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5520 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5522         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5523         values with defines.
5525         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5526         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5527         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5528         (GRUB_VBE_MODEATTR_COLOR): Likewise.
5529         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5530         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5531         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5532         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5533         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5534         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5535         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5536         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5537         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5538         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5539         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5540         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5541         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5542         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5543         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5545 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5547         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5548         declaration.
5549         (grub_multiboot): Fix a few warnings.
5551 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5553         * loader/i386/pc/multiboot.c: Update comment not to say that
5554         boot_device support is unimplemented.
5556 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5558         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5559         or memory map support are unimplemented.
5561 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5563         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5565 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5567         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5568         total video memory in 'vbeinfo' output; show color format details for
5569         each video mode.
5571 2008-08-30  Pavel Roskin  <proski@gnu.org>
5573         * util/genmoddep.c: Remove for real this time.
5574         * DISTLIST: Remove util/genmoddep.c.
5576 2008-08-30  Robert Millan  <rmh@aybabtu.com>
5578         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5579         as required by Multiboot spec (it was already 4-byte aligned, but
5580         only by chance).
5582 2008-08-29  Pavel Roskin  <proski@gnu.org>
5584         * kern/powerpc/ieee1275/crt0.S: Rename to ...
5585         * kern/powerpc/ieee1275/startup.S: ... this.
5586         * conf/powerpc-ieee1275.rmk: Adjust for the above.
5587         * DISTLIST: Likewise.
5589         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5590         grub/cpu/kernel.h.  Add start label for consistency with other
5591         platforms.  Add grub_prefix immediately after start.  Add jump
5592         to the code after grub_prefix.
5593         * include/grub/powerpc/kernel.h: Provide valid values for
5594         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5596 2008-08-29  Bean  <bean123ch@gmail.com>
5598         * configure.ac: Change host_os to cygwin for mingw.
5599         (asprintf): New check for function.
5601         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5602         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5604         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5605         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5606         sync, sleep and grub_util_get_disk_size for mingw.
5608         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5609         to get size in mingw.
5610         (open_device): Use flag O_BINARY if it's defined.
5611         (find_root_device): Add dummy code for mingw.
5613         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5614         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5615         (get_scsi_disk_name): Return 0 for mingw.
5617         * util/hostfs.c: #include <grub/util/misc.h>.
5618         (grub_hostfs_open): Use "rb" flag to open file, use
5619         grub_util_get_disk_size to get disk size for mingw.
5621         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5622         (asprintf): New function if HAVE_ASPRINTF is not set.
5623         (sync): New function for mingw.
5624         (sleep): Likewise.
5625         (grub_util_get_disk_size): Likewise.
5627 2008-08-28  Pavel Roskin  <proski@gnu.org>
5629         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5630         kern/time.c.
5632 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5634         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5636 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5638         Change find_grub_drive() syntax so it doesn't prevent it from
5639         detecting NULL names as errors.
5641         * util/biosdisk.c (find_grub_drive): Move free slot search code
5642         from here ...
5643         (find_free_slot): ... to here.
5644         (read_device_map): Use find_free_slot() to search for free slots.
5646 2008-08-27  Marco Gerards  <marco@gnu.org>
5648         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5649         (scsi_mod_SOURCES): New variable.
5650         (scsi_mod_CFLAGS): Likewise
5651         (scsi_mod_LDFLAGS): Likewise.
5653         * disk/scsi.c: New file.
5655         * include/grub/scsi.h: Likewise.
5657         * include/grub/scsicmd.h: Likewise.
5659         * disk/ata.c: Include <grub/scsi.h>.
5660         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5661         instead.
5662         (grub_ata_iterate): Skip ATAPI devices.
5663         (grub_ata_open): Only handle ATAPI devices.
5664         (struct grub_atapi_read): Removed.
5665         (grub_atapi_readsector): Likewise.
5666         (grub_ata_read): No longer handle ATAPI devices.
5667         (grub_ata_write): Likewise.
5668         (grub_atapi_iterate): New function.
5669         (grub_atapi_read): Likewise.
5670         (grub_atapi_write): Likewise.
5671         (grub_atapi_open): Likewise.
5672         (grub_atapi_close): Likewise.
5673         (grub_atapi_dev): New variable.
5674         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5675         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5677         * include/grub/disk.h (enum grub_disk_dev_id): Add
5678         `GRUB_DISK_DEVICE_SCSI_ID'.
5680 2008-08-26  Robert Millan  <rmh@aybabtu.com>
5682         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5683         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5684         descriptive.
5686 2008-08-23  Bean  <bean123ch@gmail.com>
5688         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5689         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5690         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5691         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5692         dm_nv.mod.
5693         (raid5rec_mod_SOURCES): New macro.
5694         (raid5rec_mod_CFLAGS): Likewise.
5695         (raid5rec_mod_LDFLAGS): Likewise.
5696         (raid6rec_mod_SOURCES): Likewise.
5697         (raid6rec_mod_CFLAGS): Likewise.
5698         (raid6rec_mod_LDFLAGS): Likewise.
5699         (mdraid_mod_SOURCES): Likewise.
5700         (mdraid_mod_CFLAGS): Likewise.
5701         (mdraid_mod_LDFLAGS): Likewise.
5702         (dm_nv_mod_SOURCES): Likewise.
5703         (dm_nv_mod_CFLAGS): Likewise.
5704         (dm_nv_mod_LDFLAGS): Likewise.
5706         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5707         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
5708         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5710         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5711         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5713         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5715         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5717         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5719         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5721         * disk/raid5_recover.c: New file.
5723         * disk/raid6_recover.c: Likewise.
5725         * disk/mdraid_linux.c: Likewise.
5727         * disk/dmraid_nvidia.c: Likewise.
5729         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5730         ULONG_MAX.
5732         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5733         calculate the size of raid device.
5734         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5735         different layout of raid5.
5736         (grub_raid_scan_device): Remove code specific to mdraid.
5737         (grub_raid_list): New variable.
5738         (free_array): New function.
5739         (grub_raid_register): Likewise.
5740         (grub_raid_unregister): Likewise.
5741         (grub_raid_rescan): Likewise.
5742         (GRUB_MOD_INIT): Don't iterate device here.
5743         (GRUB_MOD_FINI): Use free_array to release resource.
5745         * include/grub/raid.h: Remove macro and structure specific to mdraid.
5746         (grub_raid5_recover_func_t): New function variable type.
5747         (grub_raid6_recover_func_t): Likewise.
5748         (grub_raid5_recover_func): New variable.
5749         (grub_raid6_recover_func): Likewise.
5750         (grub_raid_register): New function.
5751         (grub_raid_unregister): Likewise.
5752         (grub_raid_rescan): Likewise.
5753         (grub_raid_block_xor): Likewise.
5755         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5756         (CMD_CRC): New macro.
5757         (part): Removed.
5758         (read_file): Handle device as well as file.
5759         (cmd_crc): New function.
5760         (fstest): Handle multiple disks.
5761         (options): Remove part, raw and long, add root and diskcount.
5762         (usage): Add crc, remove -p, -r, -l, add -r and -c.
5763         (main): Find the first non option entry and ignore subsequent options,
5764         add handling for the new options, support multiple disks.
5766         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5768 2008-08-23  Bean  <bean123ch@gmail.com>
5770         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5772         * genfslist.sh: Ignore kernel.mod.
5774         * genpartmaplist.sh: Likewise.
5776 2008-08-23  Robert Millan  <rmh@aybabtu.com>
5778         * util/getroot.c (find_root_device): Skip anything that starts with
5779         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
5781 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
5783         * util/update-grub.in (GRUB_GFXMODE): Export variable.
5784         * util/grub.d/00_header.in: Allow the administrator to change default
5785         gfxmode via ${GRUB_GFXMODE}.
5787 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
5789         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5791 2008-08-21  Robert Millan  <rmh@aybabtu.com>
5793         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
5794         loader.
5795         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5796         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5798 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
5800         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5801         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5803 2008-08-19  Robert Millan  <rmh@aybabtu.com>
5805         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5806         (struct grub_virtual_screen): Remove `cursor_color'.
5807         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5808         initialization.
5809         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5811 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5813         Unify (identical) linux_normal.c files.
5814         * loader/i386/efi/linux_normal.c: Move from here ...
5815         * loader/linux_normal.c: ... to here.  Update all users.
5816         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
5817         * loader/i386/ieee1275/linux_normal.c: Likewise.
5819 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5821         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5822         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5823         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5824         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5825         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5826         New macros.
5827         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5828         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5829         (GRUB_LINUX_CL_END_OFFSET): ... to here.
5830         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5831         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
5832         (GRUB_EFI_CL_END_OFFSET): Rename to ...
5833         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
5834         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5835         Initialize `params->video_cursor_x' and `params->video_cursor_y'
5836         portably using grub_getxy().
5837         Replace `-EFI' with `-bzImage' in boot message.
5839 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5841         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5843 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5845         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5847         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5848         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5849         (grub_machine_mmap_iterate): New function declaration.
5850         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5851         structure.
5852         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5853         macros.
5855         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5856         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5857         Move e820 parsing from here ...
5858         * kern/i386/pc/mmap.c: New file.
5859         (grub_machine_mmap_iterate): ... to here.
5861         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5862         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5863         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
5864         (grub_available_iterate): Redeclare to return `void', and redeclare
5865         its hook to use grub_uint64_t as addr and size parameters, and rename
5866         to ...
5867         (grub_machine_mmap_iterate): ... this.  Update all users.
5869         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5870         to make it more readable.  Rename to ...
5871         (grub_machine_mmap_iterate): ... this.
5873         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5874         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5875         (grub_multiboot): Allocate an extra region after the payload, and fill
5876         it with a Multiboot memory map.  Adjust a.out loader to calculate size
5877         with the extra space.
5878         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5879         with the extra space.
5881 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
5883         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5885 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
5887         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5888         mdate-sh to the list `find' searches for.
5889         * DISTLIST: Regenerated.
5891 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
5893         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5894         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5895         genmoddep.awk, gensymlist.sh.in.
5896         (DISTDIRS): Add bus, docs, hook, lib.
5897         * DISTLIST: Regenerated.
5898         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5900 2008-08-16  Robert Millan  <rmh@aybabtu.com>
5902         * disk/raid.c (grub_raid_init): Handle/report errors set by
5903         grub_device_iterate().
5904         * disk/lvm.c (grub_lvm_init): Likewise.
5906 2008-08-15  Bean  <bean123ch@gmail.com>
5908         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5909         and datehook.mod.
5910         (datetime_mod_SOURCES): New macro.
5911         (datetime_mod_CFLAGS): Likewise.
5912         (datetime_mod_LDFLAGS): Likewise.
5913         (date_mod_SOURCES): Likewise.
5914         (date_mod_CFLAGS): Likewise.
5915         (date_mod_LDFLAGS): Likewise.
5916         (datehook_mod_SOURCES): Likewise.
5917         (datehook_mod_CFLAGS): Likewise.
5918         (datehook_mod_LDFLAGS): Likewise.
5920         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5921         and datehook.mod.
5922         (datetime_mod_SOURCES): New macro.
5923         (datetime_mod_CFLAGS): Likewise.
5924         (datetime_mod_LDFLAGS): Likewise.
5925         (date_mod_SOURCES): Likewise.
5926         (date_mod_CFLAGS): Likewise.
5927         (date_mod_LDFLAGS): Likewise.
5928         (datehook_mod_SOURCES): Likewise.
5929         (datehook_mod_CFLAGS): Likewise.
5930         (datehook_mod_LDFLAGS): Likewise.
5932         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5933         and datehook.mod.
5934         (datetime_mod_SOURCES): New macro.
5935         (datetime_mod_CFLAGS): Likewise.
5936         (datetime_mod_LDFLAGS): Likewise.
5937         (date_mod_SOURCES): Likewise.
5938         (date_mod_CFLAGS): Likewise.
5939         (date_mod_LDFLAGS): Likewise.
5940         (datehook_mod_SOURCES): Likewise.
5941         (datehook_mod_CFLAGS): Likewise.
5942         (datehook_mod_LDFLAGS): Likewise.
5944         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5945         and datehook.mod.
5946         (datetime_mod_SOURCES): New macro.
5947         (datetime_mod_CFLAGS): Likewise.
5948         (datetime_mod_LDFLAGS): Likewise.
5949         (date_mod_SOURCES): Likewise.
5950         (date_mod_CFLAGS): Likewise.
5951         (date_mod_LDFLAGS): Likewise.
5952         (datehook_mod_SOURCES): Likewise.
5953         (datehook_mod_CFLAGS): Likewise.
5954         (datehook_mod_LDFLAGS): Likewise.
5956         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5957         and datehook.mod.
5958         (datetime_mod_SOURCES): New macro.
5959         (datetime_mod_CFLAGS): Likewise.
5960         (datetime_mod_LDFLAGS): Likewise.
5961         (date_mod_SOURCES): Likewise.
5962         (date_mod_CFLAGS): Likewise.
5963         (date_mod_LDFLAGS): Likewise.
5964         (datehook_mod_SOURCES): Likewise.
5965         (datehook_mod_CFLAGS): Likewise.
5966         (datehook_mod_LDFLAGS): Likewise.
5968         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5970         * commands/date.c: New file.
5972         * hook/datehook.c: Likewise.
5974         * include/grub/lib/datetime.h: Likewise.
5976         * include/grub/i386/cmos.h: Likewise.
5978         * lib/datetime.c: Likewise.
5980         * lib/i386/datetime.c: Likewise.
5982         * lib/efi/datetime.c: Likewise.
5984 2008-08-14  Robert Millan  <rmh@aybabtu.com>
5986         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5987         (grub_mkelfimage_SOURCES): New variable.
5988         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5990         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5991         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5992         * conf/powerpc-ieee1275.rmk: Likewise.
5993         * conf/i386-ieee1275.rmk: Likewise.
5995         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5996         * kern/i386/coreboot/init.c: Likewise.
5998         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5999         with `<grub/cpu/kernel.h>'.
6000         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
6001         to ...
6002         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
6003         * kern/i386/coreboot/startup.S: Likewise.
6005         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
6006         (GRUB_MOD_GAP): Remove.
6007         * include/grub/powerpc/kernel.h: New file.
6008         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
6009         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6010         * include/grub/i386/kernel.h: New file.
6011         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
6012         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
6013         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6015         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
6016         `grub-mkelfimage'.
6017         Use --directory when invoking grub_mkimage.
6019         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
6020         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
6021         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
6022         and GRUB_KERNEL_CPU_PREFIX.
6024 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
6026         * include/grub/err.h (grub_err_printf): New function prototype.
6027         * util/misc.c (grub_err_printf): New function.
6028         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
6029         grub_printf.
6030         * kern/err.c (grub_print_error): Use grub_err_printf.
6032 2008-08-13  Robert Millan  <rmh@aybabtu.com>
6034         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
6036 2008-08-13  Robert Millan  <rmh@aybabtu.com>
6038         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
6039         boot entry.
6041 2008-08-12  Robert Millan  <rmh@aybabtu.com>
6043         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
6044         of the relocation code from here ...
6045         (grub_multiboot): ... to here.
6046         (forward_relocator, backward_relocator): Move from here ...
6047         * kern/i386/loader.S (grub_multiboot_forward_relocator)
6048         (grub_multiboot_backward_relocator): ... to here.
6049         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
6050         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
6051         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
6052         (grub_multiboot_forward_relocator_end)
6053         (grub_multiboot_backward_relocator)
6054         (grub_multiboot_backward_relocator_end): New variables.
6056 2008-08-12  Bean  <bean123ch@gmail.com>
6058         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
6060 2008-08-11  Robert Millan  <rmh@aybabtu.com>
6062         * kern/i386/linuxbios/startup.S: Move from here ...
6063         * kern/i386/coreboot/startup.S: ... to here.
6065         * kern/i386/linuxbios/init.c: Move from here ...
6066         * kern/i386/coreboot/init.c: ... to here.
6068         * kern/i386/linuxbios/table.c: Move from here ...
6069         * kern/i386/coreboot/mmap.c: ... to here.
6071         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
6073 2008-08-11  Robert Millan  <rmh@aybabtu.com>
6075         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
6076         errors.  Leave it to the upper layer to handle them.
6078 2008-08-09  Christian Franke  <franke@computer.org>
6080         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
6081         * conf/common.rmk: Install `grub-pe2elf' only if requested.
6082         Install `grub.d/10_windows' only on Cygwin.
6083         * configure.ac: Add subst of `target_os'.
6084         Check `target_os' also before setting TARGET_OBJ2ELF.
6085         Add `--enable-grub-pe2elf'.
6087 2008-08-08  Robert Millan  <rmh@aybabtu.com>
6089         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6090         (grub_last_time): Change type to grub_uint64_t.
6091         (grub_disk_open): Migrate code from to using grub_get_time_ms().
6092         (grub_disk_close): Likewise.
6094         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6095         (run_menu): Migrate code from to using grub_get_time_ms().
6097         * util/misc.c (grub_get_time_ms): New function.
6099 2008-08-08  Marco Gerards  <marco@gnu.org>
6101         * disk/ata.c (grub_ata_regget): Change return type to
6102         `grub_uint8_t'.
6103         (grub_ata_regget2): Likewise.
6104         (grub_ata_wait_status): New function.
6105         (grub_ata_wait_busy): Removed function, updated all users to use
6106         `grub_ata_wait_status'.
6107         (grub_ata_wait_drq): Likewise.
6108         (grub_ata_cmd): New function.
6109         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
6110         error handling.
6111         (grub_ata_pio_write): Add error handling.
6112         (grub_atapi_identify): Likewise.
6113         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
6114         handling.
6115         (grub_ata_identify): Use `grub_ata_cmd' and improve error
6116         handling.  Actually use the detected registers.  Reorder the
6117         detection logic such that it is easier to read.
6118         (grub_ata_pciinit): Do not assign the same ID to each controller.
6119         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
6120         handling.
6121         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
6123         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
6125 2008-08-08  Marco Gerards  <marco@gnu.org>
6127         * NEWS: Update.
6129 2008-08-07  Bean  <bean123ch@gmail.com>
6131         * include/grub/x86_64/pci.h: New file.
6133 2008-08-07  Christian Franke  <franke@computer.org>
6135         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
6136         (TIMER2_GATE): Likewise.
6137         (grub_pit_wait): Add enable/disable of the timer2 gate
6138         bit of port 0x61.  This fixes a possible infinite loop.
6140 2008-08-07  Bean  <bean123ch@gmail.com>
6142         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
6143         kern/i386/tsc.c and kern/i386/pit.c.
6145         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
6146         x86_64 platform.
6148         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
6149         <grub/i386/tsc.h>.
6151         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
6153 2008-08-07  Bean  <bean123ch@gmail.com>
6155         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
6157         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
6159         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
6160         multiple inclusion. Add #include <grub/types.h>.
6162 2008-08-06  Christian Franke  <franke@computer.org>
6164         * conf/common.rmk: Build and install `10_windows'.
6165         * util/grub.d/10_windows.in: New script.
6167 2008-08-06  Pavel Roskin  <proski@gnu.org>
6169         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
6171 2008-08-06  Robert Millan  <rmh@aybabtu.com>
6173         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
6174         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
6176 2008-08-06  Bean  <bean123ch@gmail.com>
6178         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
6179         (grub_pxefs_fs_int): Remove dummy definition.
6180         (grub_pxefs_open): Use data->block_size to store the current block
6181         size setting.
6182         (grub_pxefs_read): Use block size stored in data->block_size. As the
6183         value of grub_pxe_blksize can be changed after the file is opened.
6185 2008-08-06  Bean  <bean123ch@gmail.com>
6187         * fs/i386/pc/pxe.c (curr_file): new variable.
6188         (grub_pxefs_open): Simply the handling of pxe file system. Don't
6189         require the dummy internal file system anymore.
6190         (grub_pxefs_read): Removed.
6191         (grub_pxefs_close): Likewise.
6192         (grub_pxefs_fs_int): Likewise.
6193         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6194         connection when we switch file.
6195         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6197 2008-08-06  Robert Millan  <rmh@aybabtu.com>
6199         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6200         `halt.mod'.
6201         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6202         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6204         * kern/i386/halt.c: New file.
6205         * kern/i386/reboot.c: Likewise.
6206         * include/grub/i386/reboot.h: Likewise.
6207         * include/grub/i386/halt.h: Likewise.
6209         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6210         Include `<grub/cpu/halt.h>'.
6211         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6212         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6214         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6215         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6216         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6217         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6218         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6219         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6220         from here ...
6221         * include/grub/i386/at_keyboard.h: ... to here.
6223 2008-08-05  Robert Millan  <rmh@aybabtu.com>
6225         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6226         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6227         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6228         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6229         `kern/generic/millisleep.c'.
6231         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6232         instead of grub_get_rtc().
6233         (grub_tsc_init): Initialize `tsc_boot_time'.
6235         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6236         (grub_machine_init): Use grub_tsc_init() rather than
6237         installing an RTC-based handler via grub_install_get_time_ms().
6239         * kern/i386/pit.c: New file.
6240         * include/grub/i386/pit.h: Likewise.
6242 2008-08-05  Bean  <bean123ch@gmail.com>
6244         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6246         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6247         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6248         (pxe_mod_SOURCES): New macro.
6249         (pxe_mod_CFLAGS): Likewise.
6250         (pxe_mod_LDFLAGS): Likewise.
6251         (pxecmd_mod_SOURCES): Likewise.
6252         (pxecmd_mod_CFLAGS): Likewise.
6253         (pxecmd_mod_LDFLAGS): Likewise.
6255         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6256         (grub_pxe_call): Likewise.
6258         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6260         * commands/i386/pc/pxecmd.c: New file.
6262         * fs/i386/pc/pxe.c: Likewise.
6264         * include/grub/i386/pc/pxe.h: Likewise.
6266 2008-08-05  Bean  <bean123ch@gmail.com>
6268         * util/console.c (grub_console_cur_color): New variable.
6269         (grub_console_standard_color): Likewise.
6270         (grub_console_normal_color): Likewise.
6271         (grub_console_highlight_color): Likewise.
6272         (color_map): Likewise.
6273         (use_color): Likewise.
6274         (NUM_COLORS): New macro.
6275         (grub_ncurses_setcolorstate): Handle color properly.
6276         (grub_ncurses_setcolor): Don't change color here, just remember the
6277         settings, color will be set in grub_ncurses_setcolorstate.
6278         (grub_ncurses_getcolor): New function.
6279         (grub_ncurses_init): Initialize color pairs.
6280         (grub_ncurses_term): New member grub_ncurses_getcolor.
6282 2008-08-05  Colin D Bennett  <colin@gibibit.com>
6284         High resolution timer support.  Implemented for x86 CPUs using TSC.
6285         Extracted generic grub_millisleep() so it's linked in only as needed.
6286         This requires a Pentium compatible CPU; if the RDTSC instruction is
6287         not supported, then it falls back on the generic grub_get_time_ms()
6288         implementation that uses the machine's RTC.
6290         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6291         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6292         `kern/generic/millisleep.c'.
6294         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6295         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6297         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6298         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6300         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6302         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6303         `kern/generic/millisleep.c'.
6305         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6307         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6309         * kern/generic/rtc_get_time_ms.c: New file.
6311         * kern/generic/millisleep.c: New file.
6313         * kern/misc.c: Don't include
6314         <kern/time.h> anymore.
6315         (grub_millisleep_generic): Removed.
6317         * commands/sleep.c (grub_interruptible_millisleep): Uses
6318         grub_get_time_ms() instead of grub_get_rtc().
6320         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
6321         function.
6322         (grub_cpu_is_cpuid_supported): New inline function.
6323         (grub_cpu_is_tsc_supported): New inline function.
6324         (grub_tsc_init): New function prototype.
6325         (grub_tsc_get_time_ms): New function prototype.
6327         * kern/i386/tsc.c (grub_get_time_ms): New file.
6329         * include/grub/time.h: Include <grub/types.h.
6330         (grub_millisleep_generic): Removed.
6331         (grub_get_time_ms): New prototype.
6332         (grub_install_get_time_ms): New prototype.
6333         (grub_rtc_get_time_ms): New prototype.
6335         * kern/time.c (grub_get_time_ms): New function.
6336         (grub_install_get_time_ms): New function.
6338         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
6339         <grub/time.h> anymore.
6340         (grub_millisleep): Removed.
6341         (grub_machine_init): Call grub_tsc_init.
6343         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6344         get_time_ms() implementation.
6346         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6347         (ieee1275_get_time_ms): New function.
6348         (grub_machine_init): Install get_time_ms() implementation.
6350         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6351         (grub_machine_init): Call grub_tsc_init().
6352         (grub_millisleep): Removed.
6354         * kern/ieee1275/init.c (grub_millisleep): Removed.
6355         (grub_machine_init): Install ieee1275_get_time_ms()
6356         implementation.
6357         (ieee1275_get_time_ms): New function.
6358         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6359         real work.
6361 2008-08-05  Marco Gerards  <marco@gnu.org>
6363         * disk/ata.c: Include <grub/pci.h>.
6364         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6365         (grub_ata_initialize): Rewritten.
6366         (grub_ata_device_initialize): New function.
6368 2008-08-04  Pavel Roskin  <proski@gnu.org>
6370         * kern/main.c: Include grub/mm.h.
6372 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6374         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6375         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6376         corruption problem).
6378 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6380         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6381         warnings introduced in my last commit.
6383 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6385         Make PCI available on all i386 architectures.
6387         * include/grub/i386/pc/pci.h: Move from here ...
6388         * include/grub/i386/pci.h: ... to here.
6390         * include/grub/i386/pc/pci.h: Remove.
6391         * include/grub/i386/efi/pci.h: Remove.
6392         * include/grub/x86_64/efi/pci.h: Remove.
6394         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6395         `<grub/cpu/pci.h>'.
6397         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6398         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6399         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6401         * conf/i386-ieee1275.rmk: Likewise.
6403 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6405         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6406         (grub_console_setcursor): Make it possible to set cursor off.
6408 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6410         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
6411         of modules instead of assuming which platform provides what.
6412         * util/update-grub.in: Likewise.
6414 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6416         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6417         instead of `grub_install_dos_part' to determine whether a drive needs
6418         to be prepended to prefix (`grub_install_dos_part' is not reliable,
6419         because it can be overridden when loading GRUB via Multiboot).
6421 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6423         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6425 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6427         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6428         of informational grub_dprintf() calls.
6430 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6432         * disk/memdisk.c (memdisk_size): Don't initialize.
6433         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6435         * include/grub/i386/pc/kernel.h
6436         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6437         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6438         (grub_memdisk_image_size, grub_arch_memdisk_addr)
6439         (grub_arch_memdisk_size): Remove.
6441         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6442         field (was only used to transfer a constant).  Add `type' field to
6443         support multiple module types.
6444         (grub_module_iterate): New function.
6446         * kern/device.c (grub_device_open): Do not hide error messages
6447         when grub_disk_open() fails.  Use grub_print_error() instead.
6449         * kern/i386/pc/init.c (grub_arch_modules_addr)
6450         (grub_arch_memdisk_size): Remove functions.
6451         (grub_arch_modules_addr): Return the module address in high memory
6452         (now that it isn't copied anymore).
6454         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6455         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6456         decompression routine (grub_total_module_size already includes that
6457         now).  Don't copy modules back to low memory.
6459         * kern/main.c: Include `<grub/mm.h>'.
6460         (grub_load_modules): Split out (and use) ...
6461         (grub_module_iterate): ... this function, which iterates through
6462         module objects and runs a hook.
6463         Comment out grub_mm_init_region() call, as it would cause non-ELF
6464         modules to be overwritten.
6466         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6467         the memdisk image in its own region, make it part of the module list.
6468         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6469         (main): Parse --memdisk|-m option, and pass user-provided path as
6470         parameter to generate_image().
6471         (add_segments): Pass `memdisk_path' down to load_modules().
6472         (load_modules): Embed memdisk image in module section when requested.
6473         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6474         `header.type' instead of `header.offset'.
6476         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6477         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6478         (memdisk_mod_LDFLAGS): New variables.
6479         * conf/i386-coreboot.rmk: Likewise.
6480         * conf/i386-ieee1275.rmk: Likewise.
6482 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6484         * loader/i386/pc/multiboot.c (playground, forward_relocator)
6485         (backward_relocator): New variables.  Used to allocate and relocate
6486         the payload, respectively.
6487         (grub_multiboot_load_elf32): Load into heap instead of requested
6488         address, install the appropriate relocator code in each bound of
6489         the payload, and set the entry point such that
6490         grub_multiboot_real_boot() will jump to one of them.
6492         * kern/i386/loader.S (grub_multiboot_payload_size)
6493         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6494         (grub_multiboot_payload_entry_offset): New variables.
6495         (grub_multiboot_real_boot): Set cpu context to what the relocator
6496         expects, and jump to the relocator instead of the payload.
6498         * include/grub/i386/loader.h (grub_multiboot_payload_size)
6499         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6500         (grub_multiboot_payload_entry_offset): Export.
6502 2008-08-01  Bean  <bean123ch@gmail.com>
6504         * normal/menu_entry.c (editor_getline): Don't return the original
6505         string as result, as it will be released by lexer once it has done
6506         using it.
6508 2008-08-01  Robert Millan  <rmh@aybabtu.com>
6510         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6511         within menuentries, not before them.
6512         util/grub.d/10_hurd.in: Likewise.
6514 2008-08-01  Bean  <bean123ch@gmail.com>
6516         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6517         (bufio_mod_SOURCES): New macro.
6518         (bufio_mod_CFLAGS): Likewise.
6519         (bufio_mod_LDFLAGS): Likewise.
6521         * include/grub/bufio.h: New file.
6523         * io/bufio.c: Likewise.
6525         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6526         (grub_video_reader_png): Use grub_buffile_open to open file.
6528         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6529         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6531         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6532         (grub_video_reader_tga): Use grub_buffile_open to open file.
6534         * font/manager.c: Include <grub/bufio.h>.
6535         (add_font): Use grub_buffile_open to open file.
6537 2008-07-31  Robert Millan  <rmh@aybabtu.com>
6539         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6540         ELF segments, use a macro for arbitrarily accessing any of them instead
6541         of preparing a pointer that allows access to one at a time.
6542         (grub_multiboot_load_elf64): Likewise.
6544 2008-07-31  Bean  <bean123ch@gmail.com>
6546         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6547         GRUB_KERNEL_MACHINE_DATA_END.
6549 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6551         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6552         Increase from 0x50 to 0x60.
6553         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6554         use UUIDs to identify the root drive for them.  If that's not
6555         possible, abort.
6556         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6557         check, for cross-disk installs.
6559 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6561         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6562         is non-empty, use it to set the `prefix' environment variable instead
6563         of the usual approach.
6564         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6565         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6566         environment variable instead of dummy make_install_device().
6568         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6569         (start): Insert a data section, with `grub_prefix' variable.
6570         * kern/i386/linuxbios/startup.S: Likewise.
6572         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6573         New variable reference.
6574         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6575         New macro.  Defines offset of `grub_prefix' within startup.S (relative
6576         to `start').
6577         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
6578         section within startup.S (relative to `start').
6579         * include/grub/i386/coreboot/kernel.h: Likewise.
6581         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6582         Overwrite grub_prefix with its contents, at the beginning of the
6583         first segment.
6584         (main): Understand -p|--prefix.
6586 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6588         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6590 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6592         * term/i386/pc/vga_text.c (grub_console_cls): Use
6593         grub_console_gotoxy() to go back to beginning of the screen.
6594         Found by Patrick Georgi <patrick.georgi@coresystems.de>
6596 2008-07-29  Christian Franke  <franke@computer.org>
6598         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6599         Add conversion of emulated mount points on Cygwin.
6601 2008-07-29  Christian Franke  <franke@computer.org>
6603         * util/update-grub.in: Add a check for admin
6604         group on Cygwin.
6605         Remove old `grub.cfg.new' before creation.
6606         Add `-f' to `mv' to handle the different filesystem
6607         semantics of Windows.
6609 2008-07-29  Bean  <bean123ch@gmail.com>
6611         * normal/main.c (get_line): Fix buffer overflow bug.
6613 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6615         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6616         (struct grub_apple_header): New struct.  Describes the layout of
6617         the partmap header.
6618         (apple_partition_map_iterate): Check the header magic as well as the
6619         partition magic (which was already being checked).
6621 2008-07-28  Pavel Roskin  <proski@gnu.org>
6623         * genmk.rb: Add a warning to the beginning of the output that
6624         it's a generated file and should not be edited.
6626 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6628         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6629         with the same number are found, just use issue a warning with
6630         grub_dprintf(), as this error has been reported to be non-fatal.
6632 2008-07-27  Robert Millan  <rmh@aybabtu.com>
6634         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6635         information.
6637 2008-07-27  Bean  <bean123ch@gmail.com>
6639         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6640         (grub_fat_find_dir): Ignore case when comparing filename.
6642 2008-07-27  Bean  <bean123ch@gmail.com>
6644         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6645         smallino, as it's more descriptive, and i8count can be confused with
6646         the other field count.
6647         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6648         inode type.
6650 2008-07-27  Bean  <bean123ch@gmail.com>
6652         * commands/crc.c: New file.
6654         * lib/crc.c: Likewise.
6656         * include/grub/lib/crc.h: Likewise.
6658         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6660         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6661         (hexdump): Move this function to ...
6663         * lib/hexdump.c: ... here.
6665         * include/grub/hexdump.h: Renamed to ...
6667         * include/grub/lib/hexdump.h: ... this.
6669         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6671         * util/grub-editenv.c: Likewise.
6673         * include/envblk.h: Renamed to ...
6675         * include/lib/envblk.h: ... this.
6677         * util/envblk.c: Renamed to ...
6679         * lib/envblk.c: ... this.
6681         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6682         lib/hexdump.c.
6683         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6684         (pkglib_MODULES): Add crc.mod.
6685         (hexdump_mod_SOURCES): Add lib/hexdump.c.
6686         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6687         (crc_mod_SOURCES): New macro.
6688         (crc_mod_CFLAGS): Likewise.
6689         (crc_mod_LDFLAGS): Likewise.
6691         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6693         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6695         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6697         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6699         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6701 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
6703         * commands/help.c: Include <grub/term.h>.
6704         (TERM_WIDTH): Removed.  Updated all users.
6706 2008-07-27  Pavel Roskin  <proski@gnu.org>
6708         * util/getroot.c (find_root_device): Rephrase a comment to avoid
6709         spurious warnings about a comment within a comment.
6711 2008-07-25  Robert Millan  <rmh@aybabtu.com>
6713         * util/getroot.c (find_root_device): Skip devices that match
6714         /dev/dm-[0-9].  This lets the real device be found for any type of
6715         abstraction (LVM, EVMS, RAID..).
6716         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6717         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
6718         device is found first, find_root_device() will now skip it.
6720 2008-07-24  Pavel Roskin  <proski@gnu.org>
6722         * include/grub/types.h: Use __builtin_bswap32() and
6723         __builtin_bswap64() with gcc 4.3 and newer.
6725 2008-07-24  Christian Franke  <franke@computer.org>
6727         * util/i386/pc/grub-install.in: If `--debug' is specified,
6728         pass `--verbose' to grub-setup.
6729         Abort script if make_system_path_relative_to_its_root() fails.
6731 2008-07-24  Bean  <bean123ch@gmail.com>
6733         * configure.ac: Fixed a bug caused by the previous cygwin patch,
6734         variable `target_platform' should be `platform'.
6736 2008-07-24  Bean  <bean123ch@gmail.com>
6738         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6739         (grub_png_init_fixed_block): New function.
6740         (grub_png_decode_image_data): Handle fixed huffman code compression.
6742 2008-07-24  Bean  <bean123ch@gmail.com>
6744         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6745         (grub_pe2elf_SOURCES): New macro.
6746         (CLEANFILES): Add grub-pe2elf.
6748         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6749         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6750         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6751         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6752         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6753         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6754         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6755         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6756         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6757         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6758         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6759         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6760         (GRUB_PE32_DT_FUNCTION): Likewise.
6761         (GRUB_PE32_REL_I386_DIR32): Likewise.
6762         (GRUB_PE32_REL_I386_REL32): Likewise.
6763         (grub_pe32_symbol): New structure.
6764         (grub_pe32_reloc): Likewise.
6766         * util/grub-pe2elf.c: New file.
6768         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6769         start symbol in non pc platform.
6771         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6773         The following patches are from Christian Franke.
6775         * include/grub/dl.h: Remove .previous, gas supports this only
6776         for ELF format.
6778         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6779         Remove .type, gas supports this only for ELF format.
6781         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6782         nullbytes in symbol table. This fixes an infinite loop if table is
6783         zero filled.
6785         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6786         TARGET_IMG_LDFLAGS and EXEEXT.
6788         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6789         TARGET_IMG_LDFLAGS_AC.
6790         (grub_CHECK_STACK_ARG_PROBE): New function.
6792         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6794         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6796         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6797         to set TARGET_IMG_LD* accordingly.
6798         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6799         Add call to grub_CHECK_STACK_ARG_PROBE.
6800         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6802         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6804         * genmk.rb: Add EXEEXT to CLEANFILES.
6806 2008-07-23  Robert Millan  <rmh@aybabtu.com>
6808         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6809         define the codes for arrows and lines used for the menu).
6810         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6811         as well.
6813         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6814         fonts, because the latter are too slow.
6816 2008-07-21  Bean  <bean123ch@gmail.com>
6818         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6819         a20. Run keyboard test last, as it will cause macbook to halt.
6821 2008-07-18  Pavel Roskin  <proski@gnu.org>
6823         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
6824         load foreign architecture modules correctly anyway.  Keep
6825         support for loading host architecture modules, whether we
6826         compile them or not.
6828 2008-07-17  Pavel Roskin  <proski@gnu.org>
6830         * configure.ac: Use -m32 or -m64 regardless of whether we had to
6831         change target_cpu.  The compiler default can mismatch target_cpu
6832         in any case.
6834         * disk/efi/efidisk.c: Fix format warnings on x86_64.
6835         * kern/efi/efi.c: Likewise.
6837         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
6838         target compiler is functional.
6839         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6840         are set up.
6842         * configure.ac: Default to efi platform for x86_64-apple.  Allow
6843         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
6844         adjustments from the rest, only do them if target is not
6845         explicitly given.  Merge other adjustments with the final sanity
6846         check.  Remove an extraneous check for supported CPU.  Be
6847         specific which CPU and which platform is not supported.
6849         * configure.ac: Default to pc platform for x86_64.
6851 2008-07-17  Robert Millan  <rmh@aybabtu.com>
6853         Partial LinuxBIOS -> Coreboot rename.
6855         * conf/i386-linuxbios.rmk: Renamed to ...
6856         * conf/i386-coreboot.rmk: ... this.
6857         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6858         * configure.ac: Accept "coreboot" as input platform (but maintain
6859         compatibility with "linuxbios").
6860         * include/grub/i386/linuxbios: Renamed to ...
6861         * include/grub/i386/coreboot: ... this.
6863 2008-07-17  Bean  <bean123ch@gmail.com>
6865         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6866         (appleldr_mod_SOURCE): New variable.
6867         (appleldr_mod_CFLAGS): Likewise.
6868         (appleldr_mod_LDFLAGS): Likewise.
6869         (pci_mod_SOURCES): Likewise.
6870         (pci_mod_CFLAGS): Likewise.
6871         (pci_mod_LDFLAGS): Likewise.
6872         (lspci_mod_SOURCES): Likewise.
6873         (lspci_mod_CFLAGS): Likewise.
6874         (lspci_mod_LDFLAGS): Likewise.
6876         * conf/x86_64-efi.rmk: New file.
6878         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6879         macro.
6880         (grub_efidisk_write): Likewise.
6882         * include/efi/api.h (efi_call_0): New macro.
6883         (efi_call_1): Likewise.
6884         (efi_call_2): Likewise.
6885         (efi_call_3): Likewise.
6886         (efi_call_4): Likewise.
6887         (efi_call_5): Likewise.
6888         (efi_call_6): Likewise.
6890         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6891         grub_rescue_cmd_chainloader.
6893         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6894         (grub_pe32_optional_header): Change some fields based on i386 or
6895         x86_64 platform.
6896         (GRUB_PE32_PE32_MAGIC): Likewise.
6898         * include/grub/efi/uga_draw.h: New file.
6900         * include/grub/elf.h (STN_ABS): New constant.
6901         (R_X86_64_NONE): Relocation constant for x86_64.
6902         (R_X86_64_64): Likewise.
6903         (R_X86_64_PC32): Likewise.
6904         (R_X86_64_GOT32): Likewise.
6905         (R_X86_64_PLT32): Likewise.
6906         (R_X86_64_COPY): Likewise.
6907         (R_X86_64_GLOB_DAT): Likewise.
6908         (R_X86_64_JUMP_SLOT): Likewise.
6909         (R_X86_64_RELATIVE): Likewise.
6910         (R_X86_64_GOTPCREL): Likewise.
6911         (R_X86_64_32): Likewise.
6912         (R_X86_64_32S): Likewise.
6913         (R_X86_64_16): Likewise.
6914         (R_X86_64_PC16): Likewise.
6915         (R_X86_64_8): Likewise.
6916         (R_X86_64_PC8): Likewise.
6918         * include/grub/i386/efi/pci.h: New file.
6920         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6921         Change it value based on platform.
6922         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6923         (GRUB_E820_RAM): Likewise.
6924         (GRUB_E820_RESERVED): Likewise.
6925         (GRUB_E820_ACPI): Likewise.
6926         (GRUB_E820_NVS): Likewise.
6927         (GRUB_E820_EXEC_CODE): Likewise.
6928         (GRUB_E820_MAX_ENTRY): Likewise.
6929         (grub_e820_mmap): New structure.
6930         (linux_kernel_header): Change the efi field according to different
6931         kernel version, also field from linux_kernel_header.
6933         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6935         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6936         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6937         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6938         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6939         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6940         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6941         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6942         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6943         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6944         (GRUB_PCI_ADDR_IO_MASK): Likewise.
6946         * include/grub/x86_64/efi/kernel.h: New file.
6948         * include/grub/x86_64/efi/loader.h: Likewise.
6950         * include/grub/x86_64/efi/machine.h: Likewise.
6952         * include/grub/x86_64/efi/pci.h: Likewise.
6954         * include/grub/x86_64/efi/time.h: Likewise.
6956         * include/grub/x86_64/linux.h: Likewise.
6958         * include/grub/x86_64/setjmp.h: Likewise.
6960         * include/grub/x86_64/time.h: Likewise.
6962         * include/grub/x86_64/types.h: Likewise.
6964         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6965          GRUB_TARGET_SIZEOF_VOID_P.
6967         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6968         (grub_efi_locate_handle): Likewise.
6969         (grub_efi_open_protocol): Likewise.
6970         (grub_efi_set_text_mode): Likewise.
6971         (grub_efi_stall): Likewise.
6972         (grub_exit): Likewise.
6973         (grub_reboot): Likewise.
6974         (grub_halt): Likewise.
6975         (grub_efi_exit_boot_services): Likewise.
6976         (grub_get_rtc): Likewise.
6978         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6979         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6980         (grub_efi_allocate_pages): Wrap efi calls.
6981         (grub_efi_free_pages): Wrap efi calls.
6982         (grub_efi_get_memory_map): Wrap efi calls.
6984         * kern/x86_64/dl.c: New file.
6986         * kern/x86_64/efi/callwrap.S: Likewise.
6988         * kern/x86_64/efi/startup.S: Likewise.
6990         * loader/efi/appleloader.c: Likewise.
6992         * loader/efi/chainloader.c (cmdline): New variable.
6993         (grub_chainloader_unload): Wrap efi calls.
6994         (grub_chainloader_boot): Likewise.
6995         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6996         command line.
6998         * loader/efi/chainloader_normal.c (chainloader_command):
6999         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
7000         command line.
7002         * loader/i386/efi/linux.c (allocate_pages): Change allocation
7003         method.
7004         (grub_e820_add_region): New function.
7005         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
7006         booting.
7007         (grub_find_video_card): New function.
7008         (grub_linux_setup_video): New function.
7009         (grub_rescue_cmd_linux): Probe for video information.
7011         * normal/x86_64/setjmp.S: New file.
7013         * term/efi/console.c (map_char): New function.
7014         (grub_console_putchar): Map unicode char.
7015         (grub_console_checkkey): Wrap efi calls.
7016         (grub_console_getkey): Likewise.
7017         (grub_console_getwh): Likewise.
7018         (grub_console_gotoxy): Likewise.
7019         (grub_console_cls): Likewise.
7020         (grub_console_setcolorstate): Likewise.
7021         (grub_console_setcursor): Likewise.
7023         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
7025 2008-07-16  Pavel Roskin  <proski@gnu.org>
7027         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
7028         format strings.
7030         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
7031         pointer, not an integer.  This fixes a warning and prevents
7032         precision loss on 64-bit systems.
7033         (relocate_addresses): Remove unneeded cast.
7035 2008-07-15  Pavel Roskin  <proski@gnu.org>
7037         * kern/i386/ieee1275/init.c: Include grub/cache.h.
7039         * term/ieee1275/ofconsole.c: Disable code unused on i386.
7041         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
7042         Fix comparison between signed and unsigned.
7044         * include/grub/i386/ieee1275/console.h: Declare
7045         grub_console_init() and grub_console_fini().
7047         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
7048         It's empty and unused.
7050         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
7051         beginning to avoid warnings with some compilers.
7053         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
7054         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
7056 2008-07-14  Pavel Roskin  <proski@gnu.org>
7058         * kern/env.c (grub_register_variable_hook): Don't copy empty
7059         string, it leaks memory.  Pass "" to grub_env_set(), it should
7060         handle constant strings.
7062         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
7063         * commands/cmp.c (grub_cmd_cmp): Likewise.
7064         * kern/dl.c (grub_dl_flush_cache): Likewise.
7065         (grub_dl_load_core): Likewise.
7066         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
7067         (grub_elf64_load_phdrs): Likewise.
7069 2008-07-13  Pavel Roskin  <proski@gnu.org>
7071         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
7072         between signed and unsigned.
7073         (LzmaEnc_Finish): Fix warning about an unused parameter.
7075 2008-07-13  Bean  <bean123ch@gmail.com>
7077         * Makefile.in (enable_lzo): New rule.
7079         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
7081         * configure.ac (ENABLE_LZO): New option --enable-lzo.
7083         * boot/i386/pc/lnxboot.S: #include <config.h>.
7085         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
7086         its value according to the compression algorithm used, lzo or lzma.
7088         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
7089         compression algorithm according to configure macro.
7091         * kern/i386/pc/startup.S (codestart): Likewise.
7093         * kern/i386/pc/lzma_decode.S: New file.
7095         * include/grub/lib/LzFind.h: Likewise.
7097         * include/grub/lib/LzHash.h: Likewise.
7099         * include/grub/lib/LzmaDec.h: Likewise.
7101         * include/grub/lib/LzmaEnc.h: Likewise.
7103         * include/grub/lib/LzmaTypes.h: Likewise.
7105         * lib/LzFind.c: Likewise.
7107         * lib/LzmaDec.c: Likewise.
7109         * lib/LzmaEnc.c: Likewise.
7111 2008-07-13  Bean  <bean123ch@gmail.com>
7113         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
7114         (grub_ext4_extent_header): New structure.
7115         (grub_ext4_extent): Likewise.
7116         (grub_ext4_extent_idx): Likewise.
7117         (grub_ext4_find_leaf): New function.
7118         (grub_ext2_read_block): Handle extents.
7120 2008-07-12  Robert Millan  <rmh@aybabtu.com>
7122         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
7124 2008-07-11  Robert Millan  <rmh@aybabtu.com>
7126         * util/grub.d/40_custom.in: New file. Example on how to add custom
7127         entries to /etc/grub.d.
7128         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
7129         40_custom (implicitly, by merging all the grub.d rules).
7131 2008-07-11  Pavel Roskin  <proski@gnu.org>
7133         * commands/read.c (grub_getline): Fix invalid memory access.
7134         Don't add newline to the variable value.
7136         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
7137         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
7138         (serial_hw_get_port): Check validity of the port number.
7139         (grub_cmd_serial): Check return value of serial_hw_get_port().
7141 2008-07-07  Pavel Roskin  <proski@gnu.org>
7143         * boot/i386/pc/diskboot.S (notification_string): Replace
7144         "Loading kernel" with just "loading".  This is shorter, less
7145         confusing and saves a few bytes for possible future changes.
7147 2008-07-05  Pavel Roskin  <proski@gnu.org>
7149         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
7150         size for ATAPI devices, they are undefined.  Output sector
7151         number in decimal form.
7153         * disk/ata.c: Use named constants for status bits.
7155 2008-07-04  Pavel Roskin  <proski@gnu.org>
7157         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
7158         grub_addr_t before casting it to the void pointer to fix a
7159         warning.  Non-addressable regions are discarded earlier.
7160         (grub_arch_modules_addr): Cast _end to grub_addr_t.
7161         * kern/i386/linuxbios/table.c: Include grub/misc.h.
7162         (check_signature): Don't shadow table_header.
7163         (grub_linuxbios_table_iterate): Cast numeric constants to
7164         grub_linuxbios_table_header_t.
7165         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
7166         grub_stop().
7168         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
7169         prevent warnings.
7171         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
7172         pointer, which can cause warnings.  Support 64-bit addresses.
7174         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
7175         of sizeof(long).  This fixes PowerPC image generation on x86_64.
7177 2008-07-04  Robert Millan  <rmh@aybabtu.com>
7179         This fixes a performance issue when pc & gpt partmap iterators
7180         didn't abort iteration even after our hook found what it was
7181         looking for (often causing expensive probes of non-existent drives).
7183         Some callers relied on previous buggy behaviour, since they would
7184         raise an error when their own hooks caused early abortion of its
7185         iteration.
7187         * kern/device.c (grub_device_open): Improve error message.
7188         * disk/lvm.c (grub_lvm_open): Likewise.
7189         * disk/raid.c (grub_raid_open): Likewise.
7191         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7192         when hook requests it, independently of grub_errno.
7193         (pc_partition_map_probe): Do not fail when find_func() caused
7194         early abortion of pc_partition_map_iterate().
7196         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7197         when hook requests it, independently of grub_errno.
7198         (gpt_partition_map_probe): Do not fail when find_func() caused
7199         early abortion of gpt_partition_map_iterate().
7201         * kern/partition.c (grub_partition_iterate): Abort parent iteration
7202         when hook requests it, independently of grub_errno.  Do not fail when
7203         part_map_iterate_hook() caused early abortion of p->iterate().
7205         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7206         when grub_partition_iterate() returned with non-zero.
7208 2008-07-03  Pavel Roskin  <proski@gnu.org>
7210         * disk/ata.c (grub_ata_pio_write): Check status before writing,
7211         like we do in grub_ata_pio_read().
7212         (grub_ata_readwrite): Always write individual sectors.  Fix the
7213         sector count for the remainder.
7214         (grub_ata_write): Enable writing to ATA devices.  Correctly
7215         report error for ATAPI devices.
7217 2008-07-02  Pavel Roskin  <proski@gnu.org>
7219         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7220         warning.
7222         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7223         for every read sector, we already increment it for the whole
7224         batch.  This fixes reading more than 256 sectors at once.
7226         * util/grub-editenv.c (cmd_info): Cast argument to long
7227         explicitly.  ptrdiff_t reduces to int on i386.
7229         * util/grub-editenv.c (main): Be specific which parameter is
7230         missing.
7232         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7233         (memdisk): Make memdisk_orig_addr a pointer.
7235         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7236         for file offsets, use grub_off_t instead.  Fix printf format
7237         warnings.
7239         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7240         there.  Real unexpected warnings should not drown in the noise
7241         about known problems.
7243         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7244         grub_disk_addr_t for memory addresses.
7246         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7247         explicitly to fix a warning.
7249         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7251         * Makefile.in (MODULE_LDFLAGS): New variable.
7252         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
7253         the linker accepts --build-id=none.
7254         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
7255         MODULE_LDFLAGS.
7256         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7258         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7259         those in Linux XFS code.  Provide a way to access 64-bit parent
7260         inode.
7261         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
7262         the end of struct grub_xfs_dir_header.
7264 2008-07-02  Bean  <bean123ch@gmail.com>
7266         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7267         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7268         and GRUB_IEEE1275_FLAG_NO_ANSI.
7270         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7271         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7272         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7274         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7275         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7277         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7278         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7280         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7281         esc sequence on non ANSI terminal.
7282         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7284         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7285         beginning of file.
7287 2008-07-02  Bean  <bean123ch@gmail.com>
7289         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7290         (grub_editenv_SOURCES): New variable.
7291         (pkglib_MODULES): Add loadenv.mod.
7292         (loadenv_mod_SOURCES): New variable.
7293         (loadenv_mod_CFLAGS): Likewise.
7294         (loadenv_mod_LDFLAGS): Likewise.
7296         * include/grub/envblk.h: New file.
7298         * util/envblk.c: New file.
7300         * util/grub-editenv.c: New file.
7302         * commands/loadenv.c: New file.
7304 2008-07-01  Pavel Roskin  <proski@gnu.org>
7306         * include/multiboot2.h (struct multiboot_tag_module): Use char,
7307         not unsigned char.  This fixes warnings and is consistent with
7308         other tags.
7310         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7312         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7314         * term/tparm.c (analyze): Always set *popcount.
7316         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7317         cast to fix a warning.
7319         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7320         cast to suppress a warning.
7322         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7323         grub_fshelp_read_file() expects.
7325         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
7326         write uuid as a 32-bit value in CPU byte order, so declare and
7327         use it as such.
7329         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7330         long if the format specifier expects it.
7331         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7332         * partmap/pc.c (pc_partition_map_iterate): Likewise.
7333         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7334         long to fix a warning.
7335         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7336         grub_dprintf() arguments to fix warnings.
7338 2008-06-30  Pavel Roskin  <proski@gnu.org>
7340         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7341         install_bsd_part immediately before core.img is embedded or
7342         modified on disk.  This fixes core.img verification if core.img
7343         cannot be embedded.
7345         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7346         core_path to calculate the blocklist.
7347         Patch from Javier Martín <lordhabbit@gmail.com>
7349 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7351         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
7352         block to disk block.
7353         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7354         Patch from Niels Böhm <bitbucket@arcor.de>
7356 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7358         * util/update-grub_lib.in (font_path): Search for fonts in
7359         /boot/grub first, which is more likely to be readable (we aren't
7360         deciding where fonts live, just looking for them).
7362 2008-06-26  Pavel Roskin  <proski@gnu.org>
7364         * util/biosdisk.c (read_device_map): Don't leave dead map
7365         entries for devices failing stat() check.
7367         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7368         core_path_dev for the core.img path on the target device.
7370 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7372         * disk/fs_uuid.c: New file.
7373         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7374         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7375         (fs_uuid_mod_LDFLAGS): New variables.
7376         * include/grub/disk.h (grub_disk_dev_id): Add
7377         `GRUB_DISK_DEVICE_UUID_ID'.
7378         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7379         implement iterate().
7381 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7383         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7384         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7385         Linux image includes no initrd.
7387 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
7389         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7390         call to resolve the core image location that effectively appended the
7391         name twice.
7393 2008-06-21  Robert Millan  <rmh@aybabtu.com>
7395         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7396         call from here ...
7398         * util/grub.d/10_hurd.in: ... to here ...
7399         * util/grub.d/10_linux.in: ... and here.
7401 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7403         * kern/main.c (grub_main): Export `prefix' variable immediately
7404         after it has been set by grub_machine_set_prefix().
7406 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7408         * commands/search.c (search_label, search_fs_uuid, search_file): Print
7409         search result when not saving to variable, not the other way around.
7410         When saving to variable, abort iteration as soon as a match is found.
7412 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7414         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7415         check for partition that provides /boot/grub.  Its logic is flawed,
7416         as it prevents prepare_grub_to_access_device() from being called
7417         multiple times.
7419 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7421         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7422         "insmod" command directly when abstraction modules are needed,
7423         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7424         since it had already been processed).
7426 2008-06-19  Pavel Roskin  <proski@gnu.org>
7428         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7429         changed.  This is needed in case GRUB_LIBDIR changes.
7430         * conf/i386-ieee1275.rmk: Likewise.
7431         * conf/i386-linuxbios.rmk: Likewise.
7432         * conf/i386-pc.rmk: Likewise.
7433         * conf/powerpc-ieee1275.rmk: Likewise.
7435 2008-06-18  Pavel Roskin  <proski@gnu.org>
7437         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7438         kernel_elf_symlist.c to symlist.c for consistency with other
7439         architectures.  Update all users.
7440         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7442 2008-06-18  Robert Millan  <rmh@aybabtu.com>
7444         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7445         it in prefix.
7447         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
7448         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
7449         a RAID device, run setup() for all members independently on whether
7450         LVM abstraction is being used.
7451         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7452         If grub-mkimage has set `*install_dos_part == -2', don't override this
7453         value.
7454         Perform *install_dos_part adjustments independently on whether
7455         we're embedding or not.
7456         Clarify error message when image is too big for embedding.
7457         Remove duplicate *install_dos_part stanza.
7459 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7461         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7462         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7463         variables.
7464         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7465         values in grub_ofconsole_normal_color and
7466         grub_ofconsole_highlight_color (they're not directly related to
7467         background and foreground).
7468         (grub_ofconsole_setcolorstate): Extract background and foreground
7469         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7471 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7473         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7474         /boot/grub for the check in last commit, not /boot (they could be
7475         different partitions).
7477 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7479         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7480         asked to setup access for the same partition that provides /boot,
7481         don't bother using UUIDs since our root already has the value we
7482         want.
7484 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7486         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7487         I2O devices.
7488         Patch from Sven Mueller <sven@debian.org>.
7490 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7492         * util/update-grub.in: Check for $EUID instead of $UID.
7493         Reported by Vincent Zweije.
7495 2008-06-16  Bean  <bean123ch@gmail.com>
7497         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
7498         (grub_ext2_read_block): Likewise.
7499         (grub_ext2_read_inode): Likewise.
7500         (grub_ext2_mount): Likewise.
7501         (grub_ext2_close): Likewise.
7502         (grub_ext3_get_journal): Removed.
7504         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
7505         (grub_reiserfs_read_symlink): Likewise.
7506         (grub_reiserfs_mount): Likewise.
7507         (grub_reiserfs_open): Likewise.
7508         (grub_reiserfs_read): Likewise.
7509         (grub_reiserfs_close): Likewise.
7510         (grub_reiserfs_get_journal): Removed.
7512         * fs/fshelp.c (grub_fshelp_read): Removed.
7513         (grub_fshelp_map_block): Likewise.
7515         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7516         (grub_fshelp_journal): Likewise.
7517         (grub_fshelp_read): Likewise.
7518         (grub_fshelp_map_block): Likewise.
7520 2008-06-16  Pavel Roskin  <proski@gnu.org>
7522         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7523         floating point anymore.
7524         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7526 2008-06-15  Pavel Roskin  <proski@gnu.org>
7528         * commands/ls.c (grub_ls_list_files): Use integer calculations
7529         for human readable format, avoid floating point use.
7530         * kern/misc.c (grub_ftoa): Remove.
7531         (grub_vsprintf): Remove floating point support.
7533 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7535         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7536         devices.
7537         Reported by Max Vozeler.
7539 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7541         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7542         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7543         skipped later.
7544         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7545         the beginning of the prefix.
7547         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7548         It is assumed that if we have a memdisk, grub-mkimage has set
7549         grub_prefix to include the "(memdisk)" drive in it.
7551 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7553         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7554         Initialize keyboard controller after registering the terminal, so that
7555         grub_printf() can be called from grub_keyboard_controller_init().
7557 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7559         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7560         extent-btree which is written as big endian on disk.
7561         Reported by Alain Greppin  <al@chilibi.org>.
7563 2008-06-14  Robert Millan  <rmh@aybabtu.com>
7565         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7566         * util/i386/pc/grub-install.in (modules): Likewise.
7568 2008-06-13  Pavel Roskin  <proski@gnu.org>
7570         * commands/ls.c (grub_ls_list_files): Fix format warnings.
7572 2008-06-13  Bean  <bean123ch@gmail.com>
7574         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7576         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7578         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7579         to indicate sparse block.
7581 2008-06-12  Pavel Roskin  <proski@gnu.org>
7583         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7584         number, grub_fshelp_read() does it for us.
7586         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
7587         linear disk read with journal translation.
7588         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7589         * include/grub/fshelp.h: Declare grub_fshelp_read().
7591 2008-06-09  Pavel Roskin  <proski@gnu.org>
7593         * fs/minix.c (grub_minix_mount): Handle error reading
7594         superblock.
7596 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7598         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7599         don't append the RAID prefix afterwards.
7600         Reported by Clint Adams.
7602 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7604         Based on description from Pavel:
7605         * kern/disk.c (grub_disk_check_range): Rename to ...
7606         (grub_disk_adjust_range): ... this.  Add a comment explaining the
7607         tasks performed by this function.
7609 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7611         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7612         `num_serial' (for consistency with other variables).
7613         (struct grub_ntfs_data): Add `uuid' member.
7614         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7615         (grub_ntfs_uuid): New function.
7616         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7618 2008-06-07  Pavel Roskin  <proski@gnu.org>
7620         * util/biosdisk.c (open_device): Revert last change to the
7621         function, it broke installation.  The sector needs to be
7622         different dependent on which device is opened.
7624 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7626         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7627         rest of GRUB, and breakage doesn't happen if its value were modified.
7629         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7630         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7631         a constant (same value).
7632         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7633         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7635 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7637         * util/biosdisk.c (open_device): Do not modify sector offset when
7638         accessing a partition.  kern/disk.c already handles this for us.
7640 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7642         * util/grub-emu.c (grub_machine_init): Move code in this function from
7643         here ...
7644         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7645         segfault in case grub_printf() is called).
7647         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7648         grub_probe.  Update all users not to explicitly add it again.
7649         (grub_device): New variable; contains corresponding device for grubdir.
7650         (fs_module, partmap_module, devabstraction_module): Pass
7651         `--device ${grub_device}' to grub_probe to avoid traversing /dev
7652         every time.
7654 2008-06-05  Robert Millan  <rmh@aybabtu.com>
7656         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7657         is found, print it (same layout as with labels).
7659 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7661         * util/biosdisk.c (get_drive): Rename to ...
7662         (find_grub_drive): ... this.  Update all users.
7664         (get_os_disk): Rename to ...
7665         (convert_system_partition_to_system_disk): ... this.  Update all users.
7667         (find_drive): Rename to ...
7668         (find_system_device): ... this.  Update all users.
7670 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7672         * util/biosdisk.c (get_os_disk): Handle IDA devices.
7673         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7674         (make_device_map): Likewise.
7676 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7678         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7679         before dereferencing it.
7681         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7682         union with fat12/fat16-specific ones.  Add some new fields, including
7683         `num_serial' for both versions.
7684         (struct grub_fat_data): Add `uuid' member.
7685         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7686         names.  Initialize `data->uuid' using `num_serial'.
7687         (grub_fat_uuid): New function.
7688         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7690         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7691         (grub_reiserfs_uuid): New function.
7692         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7693         member.
7695         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7696         (grub_xfs_uuid): New function.
7697         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7699 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7701         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7702         code that is backward compatible with pre-uuid search command.
7704 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7706         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7707         floppies after everything else, to ensure floppy drive isn't accessed
7708         unnecessarily (patch from Bean).
7710 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7712         * commands/search.c (search_label, search_fs_uuid, search_file): Do
7713         not print device names when we were asked to set a variable.
7715 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7717         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7718         using "cursor-on" and "cursor-off" commands (understood at least by
7719         the Open Firmware flavour on OLPC).
7721 2008-05-31  Michael Gorven  <michael@gorven.za.net>
7723         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7724         on and off sequences.
7726 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7728         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7729         * util/update-grub.in: Likewise.
7731 2008-05-30  Pavel Roskin  <proski@gnu.org>
7733         * util/biosdisk.c (linux_find_partition): Simplify logic and
7734         make the code more universal.  Keep special processing for
7735         devfs, but use a simple rule for all other devices.  If the
7736         device ends with a number, append 'p' and the partition number.
7737         Otherwise, append only the partition number.
7739 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7741         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7742         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7743         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7744         the `root' parameter to Linux.
7746 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7748         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7749         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7750         --fs_uuid with --fs-uuid.
7751         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7752         all filesystems support them).
7754 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7756         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7757         grub_printf() flags, since we're printing in units of 2 bytes.
7759 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7761         * util/grub.d/00_header.in: Remove obsolete comment referencing
7762         convert_system_path_to_grub_path().
7763         * util/update-grub.in: Likewise.
7764         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7765         (convert_system_path_to_grub_path): Add a warning message explaining
7766         that this function is deprecated.  Rely on is_path_readable_by_grub()
7767         for the readability checks.
7768         (font_path): Use is_path_readable_by_grub() for the readability
7769         check rather than convert_system_path_to_grub_path().
7771 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7773         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7774         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7775         converting it first.
7776         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7777         grub.cfg for access to font file, and afterwards call it again to set
7778         the root device.
7780 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7782         * commands/search.c (options): Add --fs_uuid option.
7783         (search_fs_uuid): New function.
7784         (grub_cmd_search): Fix --set argument passing.
7785         Use search_fs_uuid() when requested via --fs_uuid.
7786         (grub_search_init): Update help message.
7787         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7788         and redeclare it as an array of 16-bit words.
7789         (grub_ext2_uuid): New function.
7790         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7791         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7792         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7793         (GRUB_DEVICE_BOOT_UUID): New variables.
7794         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7795         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7796         whenever possible.
7797         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
7798         just assume `root' variable has the right value.
7799         * util/grub.d/10_linux.in: Likewise.
7800         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7801         via PRINT_FS_UUID.
7802         (main): Recognise `-t fs_uuid' argument.
7804 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7806         * util/biosdisk.c (map): Redefine structure to hold information
7807         about GRUB drive name.
7808         (get_drive): Reimplement without assuming (and verifying) BIOS-like
7809         drive names.
7810         (call_hook): Remove.
7811         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7812         member.  Assume drive has partitions.
7813         (grub_util_biosdisk_open): Access device names via `.device' struct
7814         member.
7815         (open_device): Likewise.
7816         (find_drive): Likewise.
7817         (read_device_map): Adjust map[] usage to match the new struct
7818         definition.  Don't check for duplicates (still possible, but not cheap
7819         anymore).
7820         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7821         (make_device_name): Remove assumption of BIOS-like drive names.
7823 2008-05-30  Pavel Roskin  <proski@gnu.org>
7825         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7826         compiling execute.c doesn't need grub_script.tab.h anymore.
7827         (normal/command.c_DEPENDENCIES): Likewise.
7828         (normal/function.c_DEPENDENCIES): Likewise.
7829         * conf/i386-ieee1275.rmk: Likewise.
7830         * conf/i386-linuxbios.rmk: Likewise.
7831         * conf/i386-pc.rmk: Likewise.
7832         * conf/powerpc-ieee1275.rmk: Likewise.
7833         * conf/sparc64-ieee1275.rmk: Likewise.
7835 2008-05-29  Pavel Roskin  <proski@gnu.org>
7837         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7838         when scanning metadata for volume group name.
7840         * include/grub/script.h: Don't include grub_script.tab.h.  It's
7841         a generated file, which may only be included from the files with
7842         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
7843         use union YYSTYPE, as the later allows forward declaration.
7844         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7846 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7848         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7849         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7850         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7851         (grub_console_checkkey): Add grub_dprintf() call to report unknown
7852         scan codes.
7854 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7856         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7857         control key combinations.
7859 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7861         * util/powerpc/ieee1275/grub-install.in: Move from here ...
7862         * util/ieee1275/grub-install.in: ... to here.
7863         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7864         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7865         (grub_install_SOURCES): Likewise.
7867 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7869         * fs/affs.c: Update copyright year.
7870         * fs/ext2.c: Likewise.
7871         * fs/fshelp.c: Likewise.
7872         * fs/hfsplus.c: Likewise.
7873         * fs/ntfs.c: Likewise.
7874         * fs/xfs.c: Likewise.
7875         * include/grub/fshelp.h: Likewise.
7876         * util/grub-mkdevicemap.c: Likewise.
7878 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7880         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7881         might need to be fatfs to support some firmware implementations
7882         (e.g. OFW or EFI).
7884 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7886         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7887         devices.
7888         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7889         (make_device_map): Likewise.
7891 2008-05-20  Bean  <bean123ch@gmail.com>
7893         * fs/fshelp.c (grub_fshelp_map_block): New function.
7894         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7895         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7897         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7898         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7899         (grub_fshelp_journal): New structure.
7900         (grub_fshelp_map_block): New function prototype.
7901         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7902         (grub_fshelp_map_block): Likewise.
7904         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7905         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7906         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7907         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7908         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7909         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7910         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7911         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7912         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7913         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7914         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7915         (grub_ext2_sblock): New members for journal support.
7916         (grub_ext3_journal_header): New structure.
7917         (grub_ext3_journal_revoke_header): Likewise.
7918         (grub_ext3_journal_block_tag): Likewise.
7919         (grub_ext3_journal_sblock): Likewise.
7920         (grub_fshelp_node): New members logfile and journal.
7921         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7922         grub_fshelp_map_block to get real block number.
7923         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7924         number.
7925         (grub_ext2_read_inode): Likewise.
7926         (grub_ext3_get_journal): New function.
7927         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7928         (grub_ext2_close): Release memory used by journal.
7930         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7931         (REISERFS_MAGIC_DESC_BLOCK): New macro.
7932         (grub_reiserfs_transaction_header): Renamed to
7933         grub_reiserfs_description_block, replace field data with real_blocks.
7934         (grub_reiserfs_commit_block): New structure.
7935         (grub_reiserfs_data): New member journal.
7936         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7937         number.
7938         (grub_reiserfs_read_symlink): Likewise.
7939         (grub_reiserfs_iterate_dir): Likewise.
7940         (grub_reiserfs_open): Likewise.
7941         (grub_reiserfs_read): Likewise.
7942         (grub_reiserfs_get_journal): New function.
7943         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7944         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7945         using grub_reiserfs_get_journal.
7946         (grub_reiserfs_close): Release memory used by journal.
7948         * fs/affs.c (grub_affs_read_block): Change block type to
7949         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7951         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7953         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7955         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7957         * fs/udf.c (grub_udf_read_block): Change block type to
7958         grub_disk_addr_t. Use type cast to avoid warning.
7960         * fs/xfs.c (grub_xfs_read_block): Likewise.
7962 2008-05-16  Christian Franke  <franke@computer.org>
7964         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7965         to ensure that break with ESC will always work.
7966         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7967         Remove ESC from keyboard queue.
7969 2008-05-16  Christian Franke  <franke@computer.org>
7971         * util/biosdisk.c: [__CYGWIN__] Add includes.
7972         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7973         (get_os_disk): Move variable declarations to OS specific
7974         parts to avoid warning.
7975         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7976         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7977         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7978         Cygwin.
7979         * util/getroot.c: [__CYGWIN__] Add includes.
7980         (strip_extra_slashes): Fix "/" case.
7981         [__CYGWIN__] (get_win32_path): New function.
7982         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7983         [__CYGWIN__] (find_root_device): Disable.
7984         [__CYGWIN__] (get_bootsec_serial): New function.
7985         [__CYGWIN__] (find_cygwin_root_device): Likewise.
7986         [__linux__] (grub_guess_root_device): Add early returns to simplify
7987         structure.
7988         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7989         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7990         check for Linux only.
7992 2008-05-15  Bean  <bean123ch@gmail.com>
7994         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7995         keyboard hang problem in apple's intel mac.
7997 2008-05-09  Robert Millan  <rmh@aybabtu.com>
7999         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
8000         devices.
8001         * util/grub-mkdevicemap.c (get_virtio_disk_name)
8002         (make_device_map): Likewise.
8003         Reported by Aurelien Jarno <aurel32@debian.org>
8005 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
8007         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
8008         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
8009         (make_device_map): Output entries for xvd type disks.
8011 2008-05-07  Robert Millan  <rmh@aybabtu.com>
8013         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
8014         devices.
8015         * util/grub-mkdevicemap.c (get_cciss_disk_name)
8016         (make_device_map): Likewise.
8017         Reported by Roland Dreier <rdreier@cisco.com>
8019 2008-05-07  Robert Millan  <rmh@aybabtu.com>
8021         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
8022         grub_strstr() call.  Correct a few mistakes in failure path handling.
8024 2008-05-06  Robert Millan  <rmh@aybabtu.com>
8026         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8027         Do not print a trailing slash (therefore, the root directory is an
8028         empty string).
8029         (convert_system_path_to_grub_path): Do not remove trailing slash
8030         from make_system_path_relative_to_its_root() output.
8032         * util/i386/pc/grub-install.in: Add trailing slash to output from
8033         make_system_path_relative_to_its_root().
8035 2008-05-06  Robert Millan  <rmh@aybabtu.com>
8037         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
8038         ensures that output lines aren't intermangled with those sent to
8039         stderr (via grub_util_info()).
8040         * util/grub-probe.c (grub_refresh): Likewise.
8041         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
8043 2008-05-05  Christian Franke  <franke@computer.org>
8045         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
8046         Add Cygwin device names.
8047         (get_ide_disk_name) [__CYGWIN__]: Likewise.
8048         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
8049         (check_device): Return error instead of success on empty name.
8050         (make_device_map): Move label inside linux specific code to
8051         prevent compiler warning.
8053 2008-04-30  Robert Millan  <rmh@aybabtu.com>
8055         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
8056         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
8057         first boot option.
8058         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
8060 2008-04-29  Robert Millan  <rmh@aybabtu.com>
8062         * docs/grub.cfg: New file (example GRUB configuration).
8064 2008-04-26  Robert Millan  <rmh@aybabtu.com>
8066         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
8067         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
8068         and `disk/ieee1275/nand.c'.
8070 2008-04-25  Bean  <bean123ch@gmail.com>
8072         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
8073         i386-linuxbios.
8075         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
8076         change the buffer size to 4096 for cdrom device.
8078         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
8079         and nand.mod.
8080         (_linux_mod_SOURCES): New variable.
8081         (_linux_mod_CFLAGS): Likewise.
8082         (_linux_mod_LDFLAGS): Likewise.
8083         (linux_mod_SOURCES): Likewise.
8084         (linux_mod_CFLAGS): Likewise.
8085         (linux_mod_LDFLAGS): Likewise.
8086         (nand_mod_SOURCES): Likewise.
8087         (nand_mod_CFLAGS): Likewise.
8088         (nand_mod_LDFLAGS): Likewise.
8090         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
8091         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
8092         type property. (nand device in olpc don't have this property)
8094         * include/grub/disk.h (grub_disk_dev_id): New macro
8095         GRUB_DISK_DEVICE_NAND_ID.
8097         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
8098         function prototype.
8099         (grub_rescue_cmd_initrd): Likewise.
8101         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
8102         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
8103         ofw_cif_handler and ofw_idt, adjust padding number.
8105         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
8106         GRUB_MACHINE_IEEE1275 is defined.
8108         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
8109         Use NESTED_FUNC_ATTR attribute on the hook parameter.
8111         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
8112         on nested function heap_init.
8113         (grub_upper_mem): New variable for i386-ieee1275.
8114         (grub_get_extended_memory): New function for i386-ieee1275.
8115         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
8117         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
8118         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
8119         property.
8121         * loader/i386/ieee1275/linux.c: New file.
8123         * loader/i386/ieee1275/linux_normal.c: New file.
8125         * disk/ieee1275/nand.c: New file.
8127 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
8129         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
8130         value.
8131         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
8133 2008-04-18  Robert Millan  <rmh@aybabtu.com>
8135         Restructures early code path on ieee1275 to unify grub_main() as
8136         the first C function that is executed in every platform.
8138         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
8139         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
8140         cmain().
8141         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
8142         * kern/ieee1275/cmain.c (cmain): Rename to ...
8143         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
8144         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
8145         at the beginning.
8147 2008-04-18  Robert Millan  <rmh@aybabtu.com>
8149         * util/update-grub.in: Fix syntax error when setting
8150         `GRUB_PRELOAD_MODULES'.
8151         Reported by Stephane Chazelas <stephane@artesyncp.com>
8153 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
8155         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
8156         section into account, newer toolchains generate unique build ids
8157         * configure.ac: remove the test for --build-id=none acceptance,
8158         we want build ids to be preserved
8159         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
8160         far from other sections don't cause the raw binary images grow
8161         size
8163 2008-04-15  Robert Millan  <rmh@aybabtu.com>
8165         * disk/lvm.c: Update copyright year.
8166         * kern/misc.c: Likewise.
8168 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
8170         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
8171         there is no memory left for physical volume name.
8173 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
8175         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
8176         volume name mapping to support bigger than 9 character names properly.
8178 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8180         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
8181         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8183 2008-04-13  Christian Franke  <franke@computer.org>
8185         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8186         to create a floppy emulation boot CD when non emulation mode
8187         does not work.
8188         Enable Joliet CD filesystem extension.
8190 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8192         * kern/misc.c (grub_strncat): Fix off-by-one error.
8193         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8195         * kern/env.c (grub_env_context_close): Clear current context, not
8196         previous one.
8197         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8199         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8201 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8203         Improve robustness when handling LVM.
8205         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
8206         (and leave `*p' unmodified).
8207         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8208         through it.
8209         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8210         iterating through it.
8211         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8212         through it.
8213         (grub_lvm_scan_device): Check the return value (and fail gracefully
8214         when due) on each grub_lvm_getvalue() or grub_strstr() call.
8215         Don't assume `vg->pvs != NULL' when iterating through it.
8217 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8219         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8220         * genmk.rb (partmap): New variable.
8221         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8222         (#{partmap}): New target rule.
8223         * genpartmaplist.sh: New file.
8224         * Makefile.in (pkglib_DATA): Add partmap.lst.
8225         (partmap.lst): New target rule.
8226         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8227         modules (including all partition maps), instead of preloading them.
8229 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
8231         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8232         `linux-boot-prober' (if installed) to detect other operating
8233         systems which are installed on the computer and add them to
8234         the boot menu.
8235         * conf/common.rmk: Build and install 30_os-prober.
8237 2008-04-12  Robert Millan  <rmh@aybabtu.com>
8239         * kern/powerpc/ieee1275/init.c: Move from here ...
8240         * kern/ieee1275/init.c: ... to here.  Update all users.
8242         * kern/powerpc/ieee1275/cmain.c: Move from here ...
8243         * kern/ieee1275/cmain.c: ... to here.  Update all users.
8245         * kern/powerpc/ieee1275/openfw.c: Move from here ...
8246         * kern/ieee1275/openfw.c: ... to here.  Update all users.
8248         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8249         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
8251 2008-04-10  Pavel Roskin  <proski@gnu.org>
8253         * configure.ac: Always use "_cv_" in cache variables for
8254         compatibility with Autoconf 2.62.
8256 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8258         Revert grub/machine/init.h addition by Pavel (since it breaks on
8259         i386-ieee1275 and others):
8260         * util/i386/pc/misc.c: Remove grub/machine/init.h.
8261         * util/powerpc/ieee1275/misc.c: Likewise.
8263 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8265         * util/grub-probe.c (probe): Improve error message.
8267 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8269         * util/biosdisk.c (read_device_map): Skip devices that don't exist
8270         (this prevents the presence of a bogus entry from ruining the whole
8271         thing).
8273 2008-04-06  Pavel Roskin  <proski@gnu.org>
8275         * util/biosdisk.c: Include grub/util/biosdisk.h.
8276         * util/grub-fstest.c (execute_command): Make static.
8277         * util/grub-mkdevicemap.c (check_device): Likewise.
8278         * util/i386/pc/misc.c: Include grub/machine/init.h.
8279         * util/powerpc/ieee1275/misc.c: Likewise.
8280         * util/lvm.c: Include grub/util/lvm.h.
8281         * util/misc.c: Include grub/kernel.h, grub/misc.h and
8282         grub/cache.h.
8283         * util/raid.c: Include grub/util/raid.h.
8284         (grub_util_getdiskname): Make static.
8286         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8287         grub_hostfs_fini(), as they are called from grub_init_all() and
8288         grub_fini_all() respectively.  This fixes an infinite loop in
8289         grub-fstest due to double registration of hostfs.
8290         Reported by Christian Franke <Christian.Franke@t-online.de>
8292 2008-04-05  Pavel Roskin  <proski@gnu.org>
8294         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8295         all 8 functions.  Otherwise, probe function 0 only.
8297 2008-04-04  Pavel Roskin  <proski@gnu.org>
8299         * commands/lspci.c (grub_lspci_iter): Print the bus number
8300         correctly.
8302         * commands/lspci.c (grub_pci_classes): Fix typos.
8303         (grub_lspci_iter): Don't print func twice.  Print vendor ID
8304         before device ID, as it's normally done.
8306         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8307         Fix signedness warnings.
8308         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8309         Likewise.
8310         * util/ieee1275/get_disk_name.c: Include config.h so that
8311         _GNU_SOURCE is defined and getline() is declared.  Mark an
8312         unused argument as such.  Fix a signedness warning.
8314 2008-04-02  Pavel Roskin  <proski@gnu.org>
8316         * genkernsyms.sh.in: Use more robust assignments for CC and
8317         srcdir.  Quote srcdir.
8318         * gensymlist.sh.in: Likewise.  Assert at the compile time that
8319         the symbol table is not empty.
8321         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8322         * fs/cpio.c (grub_cpio_read): Likewise.
8324 2008-04-01  Pavel Roskin  <proski@gnu.org>
8326         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8327         * disk/host.c (grub_host_open): Likewise.
8328         * disk/loopback.c (grub_loopback_open): Likewise.
8329         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8330         disk->id as in disk/host.c, not a multi-character constant.
8332         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
8333         later is obsolete, potentially dangerous and sets a bad example.
8334         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8335         * util/misc.c (grub_util_get_image_size): Likewise.
8337         * disk/loopback.c (options): Improve help for "--partitions".
8339         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8340         options to align them with the short options, e.g. "echo -e".
8342 2008-03-31  Bean  <bean123ch@gmail.com>
8344         * video/reader/png.c (grub_png_data): New member is_16bit and
8345         image_data.
8346         (grub_png_decode_image_header): Detect 16 bit png image.
8347         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8348         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8349         (grub_video_reader_png): Release memory occupied by image_data.
8351         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8352         4096 bytes.
8353         (grub_nfs_mount): Skip the test for sector per cluster.
8355         * include/grub/ntfs.h (MAX_SPC): Removed.
8357 2008-03-31  Bean  <bean123ch@gmail.com>
8359         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8360         (grub_probe_SOURCES): Add fs/afs.c.
8361         (grub_fstest_SOURCES): Likewise.
8362         (afs_mod_SOURCES): New variable.
8363         (afs_mod_CFLAGS): Likewise.
8364         (afs_mod_LDFLAGS): Likewise.
8366         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8367         (grub_emu_SOURCES): Likewise.
8369         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8371         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8373         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8375         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8377         * fs/afs.c: New file.
8379 2008-03-30  Pavel Roskin  <proski@gnu.org>
8381         * disk/host.c: Include grub/misc.h to fix a warning.
8382         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8383         warnings about implicit declarations.
8385         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8386         variable.
8387         * include/grub/i386/loader.h: Change declaration of
8388         grub_linux_boot() to match what grub_loader_set() expects.
8389         * util/getroot.c (grub_guess_root_device): Return const char* to
8390         fix a warning.
8391         * util/grub-probe.c (probe): Fix a warning about uninitialized
8392         abstraction_name variable.
8393         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8394         second argument as unused to fix a warning.
8396         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8397         missing grub_error() call.
8399         * util/update-grub_lib.in: Define datarootdir, since Autoconf
8400         2.60 and newer uses it to define datadir.
8402         * commands/sleep.c: Fix warning about implicit declaration.
8403         * disk/memdisk.c: Likewise.
8404         * loader/aout.c: Likewise.
8405         * loader/i386/bsd_normal.c: Likewise.
8406         * util/grub-probe.c: Likewise.
8408         * commands/i386/cpuid.c (has_longmode): Make static.
8409         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8410         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8412         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8413         GDT.  This is more robust, as %ds can change.
8414         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8415         calling real_to_prot().
8416         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8418 2008-03-28  Pavel Roskin  <proski@gnu.org>
8420         * kern/i386/pc/startup.S: Assert that uncompressed functions
8421         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8422         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8423         code, as they push parts of the code (error handlers) beyond
8424         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
8425         code as correctness and size.
8427 2008-03-28  Pavel Roskin  <proski@gnu.org>
8429         * kern/i386/pc/startup.S
8430         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8431         data block address to the real mode, keep offset minimal.  This
8432         works around a bug in AWARD BIOS on old Athlon systems, which
8433         makes CD detection hang.
8435 2008-03-26  Pavel Roskin  <proski@gnu.org>
8437         * normal/color.c (grub_parse_color_name_pair): Make `name' a
8438         const.
8439         * include/grub/normal.h: Add grub_parse_color_name_pair()
8440         declaration.
8442 2008-03-24  Bean  <bean123ch@gmail.com>
8444         * disk/i386/pc/biosdisk.c (cd_start): Removed.
8445         (cd_count): Removed.
8446         (cd_drive): New variable.
8447         (grub_biosdisk_get_drive): Don't check for (cdN) device.
8448         (grub_biosdisk_call_hook): Likewise.
8449         (grub_biosdisk_iterate): Change cdrom detection method.
8450         (grub_biosdisk_open): Replace cd_start with cd_drive.
8451         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8452         detect cdrom device.
8454         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8455         Removed.
8456         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8457         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8458         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8459         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8460         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8461         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8462         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8463         (grub_biosdisk_cdrp): New structure.
8464         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8466         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8468         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8469         device.
8471         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8472         New function.
8474 2008-03-20  Robert Millan  <rmh@aybabtu.com>
8476         Remove 2 TiB limit in ata.mod.
8477         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8478         (grub_ata_dumpinfo): Print sector count with 0x%llx.
8479         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8480         grub_uint64_t instead of grub_uint32_t.
8482 2008-03-05  Bean  <bean123ch@gmail.com>
8484         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8485         (grub_multiboot): Set boot device.
8487         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8489 2008-03-02  Bean  <bean123ch@gmail.com>
8491         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8492         symlink_buffer.
8494 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
8496         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8497         texinfo.tex.
8499         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8500         modified.
8502         * docs/fdl.texi: New file.
8504         * docs/mdate-sh: New file. Copied from gnulib.
8505         * docs/texinfo.tex: Likewise.
8507         * config.guess: Updated from gnulib.
8508         * install-sh: Likewise.
8510 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8512         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8513         (aout_mod_SOURCES): New variable.
8514         (aout_mod_CFLAGS): Likewise.
8515         (aout_mod_LDFLAGS): Likewise.
8517         * conf/i386-ieee1275.rmk: Likewise.
8519 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8521         * util/update-grub.in: Reorganise terminal validity check.  Accept
8522         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8523         Based on suggestion by Franklin PIAT.
8525 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
8527         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8528         function.
8529         * util/getroot.c (grub_util_check_block_device): New function that
8530         returns the given argument if it is a block device and returns NULL else.
8531         * util/grub-probe.c (argument_is_device): New variable.
8532         (probe): Promote device_name from a variable to an argument. Receive
8533         device_name from grub_util_check_block_device() if path is NULL and from
8534         grub_guess_root_device() else. Do not free() device_name anymore.
8535         (options): Introduce new parameter '-d, --device'.
8536         (main): Add description of the new parameter to the help screen.
8537         Rename path variable to argument. Set argument_is_device if the '-d'
8538         option is given. Pass argument to probe() depending on
8539         argument_is_device.
8541 2008-02-24  Bean  <bean123ch@gmail.com>
8543         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8544         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8545         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8546         (GRUB_ISO9660_VOLDESC_PART): Likewise.
8547         (GRUB_ISO9660_VOLDESC_END): Likewise.
8548         (grub_iso9660_primary_voldesc): New member escape.
8549         (grub_iso9660_data): New member joliet.
8550         (grub_iso9660_convert_string): New function.
8551         (grub_iso9660_mount): Detect joliet extension.
8552         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8553         (grub_iso9660_iso9660_label): Likewise.
8555         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8556         (grub_setup_SOURCES): Add fs/udf.c.
8557         (grub_fstest_SOURCES): Likewise.
8558         (udf_mod_SOURCES): New variable.
8559         (udf_mod_CFLAGS): Likewise.
8560         (udf_mod_LDFLAGS): Likewise.
8562         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8563         (grub_emu_SOURCES): Likewise.
8565         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8567         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8569         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8571         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8573         * fs/udf.c: New file.
8575 2008-02-24  Robert Millan  <rmh@aybabtu.com>
8577         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8578         (normal/lexer.c_DEPENDENCIES): New variables.
8579         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8580         (normal/lexer.c_DEPENDENCIES): Likewise.
8581         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8582         (normal/lexer.c_DEPENDENCIES): Likewise.
8583         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8584         (normal/lexer.c_DEPENDENCIES): Likewise.
8585         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8586         (normal/lexer.c_DEPENDENCIES): Likewise.
8587         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8588         (normal/lexer.c_DEPENDENCIES): Likewise.
8590 2008-02-23  Robert Millan  <rmh@aybabtu.com>
8592         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8593         since they were intended to be in hex.  This didn't break previously
8594         because of a bug in gpt_partition_map_iterate() (see below).
8596         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8597         when checking the validity of GPT header.
8598         Remove `partno', since it always provides the same information as `i'.
8600 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
8602         * include/grub/efi/time.h: Fix a wrong comment.
8604 2008-02-19  Pavel Roskin  <proski@gnu.org>
8606         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8607         message.
8609 2008-02-19  Bean  <bean123ch@gmail.com>
8611         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8612         (aout_mod_SOURCES): New variable.
8613         (aout_mod_CFLAGS): Likewise.
8614         (aout_mod_LDFLAGS): Likewise.
8615         (_bsd_mod_SOURCES): New variable.
8616         (_bsd_mod_CFLAGS): Likewise.
8617         (_bsd_mod_LDFLAGS): Likewise.
8618         (bsd_mod_SOURCES): New variable.
8619         (bsd_mod_CFLAGS): Likewise.
8620         (bsd_mod_LDFLAGS): Likewise.
8622         * include/grub/aout.h: New file.
8624         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8626         * include/grub/i386/bsd.h: New file.
8628         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8629         to make it public.
8631         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8632         function is called, so that it's possible to change it inside the hook.
8633         (grub_elf64_load): Likewise.
8634         (grub_elf_file): Don't close the file if elf header is not found.
8635         (grub_elf_close): Close the file if grub_elf_file fails (The new
8636         grub_elf_file won't close it).
8637         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8638         (grub_elf64_size): Likewise.
8640         * kern/i386/loader.S (grub_unix_real_boot): New function.
8642         * loader/aout.c: New file.
8644         * loader/i386/bsd.c: New file.
8646         * loader/i386/bsd_normal.c: New file.
8648         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8650         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8651         can test other formats.
8653 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8655         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8656         (grub_gpt_partition_type_empty): Redefine with macro from
8657         `<grub/gpt_partition.h>'.
8658         (gpt_partition_map_iterate): Adjust partition type comparison.
8660         Export `entry' as partmap-specific `part.data' struct.
8661         (grub_gpt_header, grub_gpt_partentry): Move from here ...
8663         * include/grub/gpt_partition.h (grub_gpt_header)
8664         (grub_gpt_partentry): ... to here (new file).
8666         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8668         (grub_gpt_partition_type_bios_boot): New const variable, defined
8669         with macro from `<grub/gpt_partition.h>'.
8671         (setup): Replace `first_start' with `embed_region', which keeps
8672         track of the embed region (and is partmap-agnostic).
8674         Replace find_first_partition_start() with find_usable_region(),
8675         which finds a usable region for embedding using partmap-specific
8676         knowledge (supports PC/MSDOS and GPT).
8678         Fix all assumptions that the embed region start at sector 1, using
8679         `embed_region.start' from now on.  Similarly, use `embed_region.end'
8680         rather than `first_start' to calculate available size.
8682         In grub_util_info() message, replace "into after the MBR" with an
8683         indication of the specific sector our embed region starts at.
8685 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8687         * DISTLIST: Replace `commands/ieee1275/halt.c' and
8688         `commands/ieee1275/reboot.c' with `commands/halt.c' and
8689         `commands/reboot.c'.
8690         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8691         (halt_mod_SOURCES): Likewise.
8692         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8693         (halt_mod_SOURCES): Likewise.
8695 2008-02-17  Christian Franke  <franke@computer.org>
8697         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8699 2008-02-17  Robert Millan  <rmh@aybabtu.com>
8701         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8702         set `first_start' to 0 for non-PC/MSDOS partition maps.
8704 2008-02-16  Robert Millan  <rmh@aybabtu.com>
8706         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8707         do not assume partition map is PC/MSDOS before performing checks that
8708         are specific to that layout.
8710 2008-02-13  Robert Millan  <rmh@aybabtu.com>
8712         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8713         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8714         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8716 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
8718         * configure.ac: Only a cosmetic change on the handling of
8719         -fno-stack-protector.
8721 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
8723         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8724         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8725         reboot.c.
8726         (grub_install_SOURCES): Add halt.mod and reboot.mod.
8727         (halt_mod_SOURCES): New variable.
8728         (halt_mod_CFLAGS): Likewise.
8729         (halt_mod_LDFLAGS): Likewise.
8730         (reboot_mod_SOURCES): Likewise.
8731         (reboot_mod_CFLAGS): Likewise.
8732         (reboot_mod_LDFLAGS): Likewise.
8734         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8735         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8736         reboot.c.
8737         (halt_mod_SOURCES): Likewise.
8738         (reboot_mod_SOURCES): Likewise.
8740         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8741         commands/i386/pc/reboot.c by commands/reboot.c.
8742         (reboot_mod_SOURCES): Likewise.
8744         * commands/i386/pc/reboot.c: merge this file ...
8746         * commands/ieee1275/reboot.c: ... and this file ...
8748         * commands/reboot.c: ... to this file.
8749         Add some precompiler directive to include the correct header for
8750         each machine.
8752         * commands/ieee1275/halt.c: move this file ...
8754         * commands/halt.c: ... to here.
8755         Add some precompiler directive to include the correct header for
8756         each machine.
8758         * include/grub/efi/efi.h (grub_reboot): New function declaration.
8759         (grub_halt): Likewise.
8761         * kern/efi/efi.c (grub_reboot): New function.
8762         (grub_halt): Likewise.
8764 2008-02-12  Robert Millan  <rmh@aybabtu.com>
8766         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8767         /dev (like it is done for /dev/mapper).  This doesn't provide support
8768         for EVMS, but at least it is now easy to identify the problem when it
8769         arises.
8771 2008-02-11  Robert Millan  <rmh@aybabtu.com>
8773         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8774         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8775         comparing it with -1, not 0.
8777 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8779         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8780         `disk/lvm.c'.
8781         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8782         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8784         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8785         `disk/lvm.c' to the end of the list.
8786         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8787         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8789 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8791         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
8792         grub_print_error() instead.  This will let user know why we're entering
8793         rescue mode.
8794         Based on suggestions from Sam Morris.
8796 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
8798         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8799         on remaining N args, instead of "--" arg N times.
8801 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
8803         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8804         (fill_with_default_glyph): Changed to use unknown_glyph for fill
8805         pattern for unknown glyphs.
8807 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8809         * configure.ac: Probe for `help2man'.
8810         * Makefile.in (builddir): New variable.
8811         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
8812         or otherwise add a few flags/options to it.
8813         (install-local): For every executable utility or script that is
8814         installed, invoke $(HELP2MAN) to install a manpage based on --help
8815         output.
8817         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8818         that it doesn't prevent --help from working in build tree.
8820         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8821         with `bug-grub@gnu.org'.
8822         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8823         * util/update-grub.in (usage): New function.
8824         Implement proper argument check, with support for --help and --version
8825         (as well as existing -y).
8827 2008-02-09  Christian Franke  <franke@computer.org>
8829         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8830         avoid overwriting previous output.
8831         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8833 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8835         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8836         drawing the menu.
8838 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8840         * commands/sleep.c: New file.
8841         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8842         (sleep_mod_SOURCES): New variable.
8843         (sleep_mod_CFLAGS): Likewise.
8844         (sleep_mod_LDFLAGS): Likewise.
8846 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8848         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8849         situations in which we can deduce the RAID size and the superblock
8850         doesn't match it.
8852 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8854         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
8855         and return a grub_diskmemberlist_t composed of LVM physical volumes.
8856         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8858         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
8859         and return a grub_diskmemberlist_t composed of physical array members.
8860         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8862         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8863         prototype.
8864         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8865         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8866         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8868         * util/grub-probe.c (probe): Move partmap probing code from here ...
8869         (probe_partmap): ... to here.
8870         (probe): Use probe_partmap() once for the disk we're probing, and
8871         additionally, when such disk contains a memberlist() struct member,
8872         once for each disk that is contained in the structure returned by
8873         memberlist().
8875 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8877         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8878         environment variable to 'all' in order to obtain debug output from
8879         non-util/ code.
8880         * util/i386/pc/grub-setup.c (main): Likewise.
8882 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8884         * disk/raid.c (grub_raid_scan_device): Check for
8885         `array->device[sb.this_disk.number]' rather than for
8886         `array->device[sb.this_disk.number]->name', since the latter is not
8887         guaranteed to be accessible.
8889 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8891         * disk/raid.c: Update copyright.
8892         * fs/cpio.c: Likewise.
8893         * include/grub/raid.h: Likewise.
8894         * loader/i386/pc/multiboot.c: Likewise.
8895         * util/hostfs.c: Likewise.
8897 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8899         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8900         to a grub_disk_t array.
8901         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8902         `device[x]'.
8903         (grub_raid_scan_device): Replace `device[x].name' accesses with
8904         `device[x]->name'.  Simplify initialization of `array->device[x]'.
8906 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8908         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8909         grub_dprintf() calls.
8910         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8911         error message.
8913 2008-02-07  Christian Franke  <franke@computer.org>
8915         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8916         instead of fseek and ftell to support large files.
8917         (grub_hostfs_read): Likewise.
8919 2008-02-07  Robert Millan  <rmh@aybabtu.com>
8921         Patch from Jeroen Dekkers.
8922         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8923         failure, since successfully reading all array members might not be
8924         required.
8926 2008-02-06  Robert Millan  <rmh@aybabtu.com>
8928         * util/grub-probe.c (probe): Simplify partmap probing (with the
8929         assumption that the first word up to the underscore equals to
8930         the module name).
8932 2008-02-06  Christian Franke  <franke@computer.org>
8934         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8935         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8936         last block of a cpio or tar stream.
8937         Check for "TRAILER!!!" instead of any empty data
8938         block to detect last block of a cpio stream.
8939         (grub_cpio_dir): Fix constness of variable np.
8940         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8941         cpio or tar trailer is detected.  This fixes a crash
8942         on open of a non existing file.
8944 2008-02-05  Bean  <bean123ch@gmail.com>
8946         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8947         address of entry.
8948         (grub_multiboot_load_elf64): Likewise.
8949         (grub_multiboot): Initialize mbi structure.
8951         * util/grub-fstest.c: Don't include unused header file script.h.
8953         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8954         of file.
8955         (grub_fstest_SOURCES): Likewise.
8957 2008-02-05  Robert Millan  <rmh@aybabtu.com>
8959         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8960         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8961         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8962         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8964         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8965         (translation_table): Replace hardcoded values with macros
8966         provided by `<grub/term.h>'.
8968         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8969         (keyboard_map): Correct/add a few values, with macros provided
8970         by `<grub/term.h>'.
8971         (keyboard_map_shift): Zero values that don't differ from their
8972         `keyboard_map' equivalents.
8973         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8974         Discard the second scan code that is always sent by Caps lock.
8975         Only use `keyboard_map_shift' when it provides a non-zero value,
8976         otherwise fallback to `keyboard_map'.
8978 2008-02-04  Bean  <bean123ch@gmail.com>
8980         * Makefile.in (enable_grub_fstest): New variable.
8982         * conf/common.rmk (grub_fstest_init.lst): New rule.
8983         (grub_fstest_init.h): Likewise.
8984         (grub_fstest_init.c): Likewise.
8985         (util/grub-fstest.c_DEPENDENCIES): New variable.
8986         (grub_fstest_SOURCES): Likewise.
8988         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8990         * util/grub-fstest.c: New file.
8992 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8994         Make grub-setup handle a separate root device.
8996         * util/i386/pc/grub-setup.c (setup): Always open the root device,
8997         so that the root device can be compared with the destination
8998         device.
8999         When embedding the core image, if the root and destination devices
9000         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
9001         0xFF.
9002         When not embedding, set ROOT_DRIVE to 0xFF.
9004 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
9006         Add support for having a grub directory in a different drive. This
9007         is still only the data handling part.
9009         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
9010         (codestart): Save %dh in GRUB_ROOT_DRIVE.
9011         (grub_root_drive): New variable.
9013         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
9014         instead of GRUB_BOOT_DRIVE to construct a device name. Set
9015         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
9016         as it was.
9018         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
9020         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
9021         macro.
9022         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
9024         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
9025         is bogus, because PXE booting does not specify any drive
9026         correctly.
9028         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
9029         am not sure if this is really correct.
9031         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
9032         is always identical to the boot drive when booting from a CD.
9034         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
9035         longer.
9036         (root_drive): New variable.
9037         (real_start): Unconditionally set %dh to ROOT_DRIVE.
9038         (setup_sectors): Push %dx right after popping it, because %dh will
9039         be modified later.
9040         (copy_buffer): Restore %dx.
9042 2008-02-03  Robert Millan  <rmh@aybabtu.com>
9044         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
9045         use `cdboot.img' for cdrom images.
9047 2008-02-03  Robert Millan  <rmh@aybabtu.com>
9049         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
9050         only setup gfxterm when `font' command has succeeded.
9052 2008-02-03  Robert Millan  <rmh@aybabtu.com>
9054         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
9055         (grub_rescue_cmd_multiboot_loader)
9056         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
9058 2008-02-03  Pavel Roskin  <proski@gnu.org>
9060         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
9061         %edx and %esi from stack only after grub_gate_a20() is called.
9062         grub_gate_a20() clobbers %edx.
9064 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
9066         * configure.ac (AC_INIT): Bumped to 1.96.
9068         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
9069         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
9070         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
9071         video/readers/png.c.
9073 2008-02-03  Bean  <bean123ch@gmail.com>
9075         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
9076         (cdboot_img_SOURCES): New variable.
9077         (cdboot_img_ASFLAGS): New variable.
9078         (cdboot_img_LDFLAGS): New variable.
9080         * boot/i386/pc/cdboot.S: New file.
9082         * disk/i386/pc/biosdisk.c (cd_start): New variable.
9083         (cd_count): Likewise.
9084         (grub_biosdisk_get_drive): Add support for cd device.
9085         (grub_biosdisk_call_hook): Likewise.
9086         (grub_biosdisk_iterate): Likewise.
9087         (grub_biosdisk_open): Likewise.
9088         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
9089         (grub_biosdisk_rw): Support reading from cd device.
9090         (GRUB_MOD_INIT): Iterate cd devices.
9092         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
9093         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
9094         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
9096         * kern/i386/pc/init.c (make_install_device): Check for cd device.
9098 2008-02-02  Robert Millan  <rmh@aybabtu.com>
9100         * commands/read.c: New file.
9101         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
9102         (read_mod_SOURCES): New variable.
9103         (read_mod_CFLAGS): Likewise.
9104         (read_mod_LDFLAGS): Likewise.
9106 2008-02-02  Robert Millan  <rmh@aybabtu.com>
9108         * normal/main.c (grub_normal_execute): Check for `menu->size' when
9109         determining whether menu has to be displayed.
9111 2008-02-02  Marco Gerards  <marco@gnu.org>
9113         * bus/pci.c: New file.
9115         * include/grub/pci.h: Likewise.
9117         * include/grub/i386/pc/pci.h: Likewise.
9119         * commands/lspci.c: Likewise.
9121         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
9122         `lspci.mod'.
9123         (pci_mod_SOURCES): New variable.
9124         (pci_mod_CFLAGS): Likewise.
9125         (pci_mod_LDFLAGS): Likewise.
9126         (lspci_mod_SOURCES): Likewise.
9127         (lspci_mod_CFLAGS): Likewise.
9128         (lspci_mod_LDFLAGS): Likewise.
9130 2008-02-02  Bean  <bean123ch@gmail.com>
9132         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
9133         (grub_ufs_get_file_block): Fix indirect block calculation problem.
9135         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
9136         (grub_xfs_btree_node): New structure.
9137         (grub_xfs_btree_root): New structure.
9138         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
9139         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
9140         (GRUB_XFS_EXTENT_BLOCK): Likewise.
9141         (GRUB_XFS_EXTENT_SIZE): Likewise.
9142         (grub_xfs_read_block): Support btree format type.
9143         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
9144         Use directory block as basic unit.
9146         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
9148         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
9149         __attribute__ ((__regparm__ (1))).
9151 2008-02-01  Robert Millan  <rmh@aybabtu.com>
9153         Correct a mistake in previous commit.
9155         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
9156         top.
9157         (normal/command.c_DEPENDENCIES): New variable.
9159 2008-02-01  Robert Millan  <rmh@aybabtu.com>
9161         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
9162         top.
9163         (normal/command.c_DEPENDENCIES): New variable.
9164         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
9165         * conf/i386-ieee1275.rmk: Likewise.
9166         * conf/i386-linuxbios.rmk: Likewise.
9167         * conf/i386-pc.rmk: Likewise.
9168         * conf/sparc64-ieee1275.rmk: Likewise.
9169         * conf/powerpc-ieee1275.rmk: Likewise.
9170         (grub_emu_SOURCES): Add `fs/fshelp.c'.
9172         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
9174 2008-02-01  Robert Millan  <rmh@aybabtu.com>
9176         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
9177         call at beginning of function.
9179 2008-01-31  Pavel Roskin  <proski@gnu.org>
9181         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
9182         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9183         (grub_mkrescue_SOURCES): Likewise.
9184         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9186 2008-01-30  Robert Millan  <rmh@aybabtu.com>
9188         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9189         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9190         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9191         (grub_probe_SOURCES): ... to here.
9193         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9194         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9195         * conf/i386-ieee1275.rmk: Likewise.
9196         * conf/i386-linuxbios.rmk: Likewise.
9197         * conf/powerpc-ieee1275.rmk: Likewise.
9199 2008-01-30  Tristan Gingold  <gingold@free.fr>
9201         * kern/rescue.c: Silently accept empty lines.
9203 2008-01-29  Bean  <bean123ch@gmail.com>
9205         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9206         (real_code_2): Code cleanup and change comment style.
9207         (move_memory): Avoid using 32-bit address mode.
9209 2008-01-29  Bean  <bean123ch@gmail.com>
9211         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9212         (png_mod_SOURCES): New variable.
9213         (png_mod_CFLAGS): Likewise.
9214         (png_mod_LDFLAGS): Likewise.
9216         * video/readers/png.c: New file.
9218 2008-01-28  Robert Millan  <rmh@aybabtu.com>
9220         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9221         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9222         `ifndef GRUB_MOD_GAP' hack.
9223         * util/elf/grub-mkimage.c (add_segments): Likewise.
9225 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9227         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9228         `GRUB_MOD_GAP' for platforms in which it's not defined.
9229         * util/elf/grub-mkimage.c (add_segments): Likewise.
9231 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9233         Get grub-emu to build again (including parallel builds).
9235         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9236         Split into ...
9237         (util/grub-emu.c_DEPENDENCIES): ... this, ...
9238         (normal/execute.c_DEPENDENCIES): ... this, ...
9239         (grub-emu_DEPENDENCIES): ... and this.
9241         * conf/i386-efi.rmk: Likewise.
9242         * conf/i386-linuxbios.rmk: Likewise.
9243         * conf/i386-ieee1275.rmk: Likewise.
9244         * conf/powerpc-ieee1275.rmk: Likewise.
9245         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9247 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9249         * NEWS: Add a few items.
9251 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9253         Fix parallel builds with grub-emu.  Based on earlier commit for
9254         grub-probe and grub-setup.
9256         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9257         (util/grub-emu.c_DEPENDENCIES): ... this.
9258         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9259         (util/grub-emu.c_DEPENDENCIES): ... this.
9260         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9261         (util/grub-emu.c_DEPENDENCIES): ... this.
9262         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9263         (util/grub-emu.c_DEPENDENCIES): ... this.
9264         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9265         (util/grub-emu.c_DEPENDENCIES): ... this.
9267 2008-01-27  Pavel Roskin  <proski@gnu.org>
9269         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9270         to create a gap between _end and the modules added to the image
9271         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
9272         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9273         * util/elf/grub-mkimage.c (add_segments): Likewise.
9275 2008-01-26  Pavel Roskin  <proski@gnu.org>
9277         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9278         just return an error.
9280 2008-01-26  Bean  <bean123ch@gmail.com>
9282         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9283         (grub_reiserfs_get_item): Save offset of the next item.
9284         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9286 2008-01-25  Robert Millan  <rmh@aybabtu.com>
9288         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9289         make all filesystem sources appear together (possibly fixing omissions
9290         while at it).
9291         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9292         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9293         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9294         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9296         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
9297         add `kern/file.c'.
9298         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9299         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9300         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9301         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9303         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9304         (probe): Add a sanity check to make sure of our ability to read
9305         requested files when probing for filesystem type.
9307         * genmk.rb: Update copyright year (2007).
9309         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9310         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9311         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9312         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9313         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9314         : Remove function prototypes.
9316 2008-01-25  Robert Millan  <rmh@aybabtu.com>
9318         Revert my previous commits (based on wrong assumption of how grub_errno
9319         works).
9321         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
9322         * kern/file.c (grub_file_open): Likewise.
9324 2008-01-24  Pavel Roskin  <proski@gnu.org>
9326         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9327         that hang if GRUB tries to setup colors.
9328         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9329         colors for firmwares that don't support it.
9330         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9331         Recognize Open Hack'Ware, set flags to work around its
9332         limitations.
9334 2008-01-24  Robert Millan  <rmh@aybabtu.com>
9336         * kern/file.c (grub_file_open): Do not account previous failures of
9337         unrelated functions when grub_errno is checked for.
9338         Reported by Oleg Strikov.
9340 2008-01-24  Bean  <bean123ch@gmail.com>
9342         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9343         (grub_ufs_sblock): New member volume name.
9344         (grub_ufs_find_file): Fix string copy bug.
9345         (grub_ufs_label): Implement this function properly.
9347         * fs/hfs.c (grub_hfs_cnid_type): New enum.
9348         (grub_hfs_iterate_records): Use the correct file number for extents
9349         and catalog file. Fix problem in next index calculation.
9350         (grub_hfs_find_node): Replace recursive function call with loop.
9351         (grub_hfs_iterate_dir): Replace recursive function call with loop.
9353 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9355         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9356         `<grub/symbol.h>' and `<grub/multiboot.h>'.
9357         (grub_multiboot2_real_boot): New function prototype.
9359         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9360         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9362         * kern/i386/ieee1275/init.c (grub_os_area_addr)
9363         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9365 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9367         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9368         #ifdef'ed out grub_printf().
9370 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9372         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9373         grub_dprintf calls, since they make "debug=all" mode unusable.
9374         (grub_console_checkkey): Likewise.
9376 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9378         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9379         `term/i386/pc/at_keyboard.c'.
9380         (pkglib_MODULES): Add `serial.mod'.
9381         (serial_mod_SOURCES): New variable.
9382         (serial_mod_CFLAGS): Likewise.
9383         (serial_mod_LDFLAGS): Likewise.
9385         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
9386         `<grub/powerpc/ieee1275/console.h>'.
9387         (grub_keyboard_controller_init): New function prototype.
9388         (grub_console_checkkey): Likewise.
9389         (grub_console_getkey): Likewise.
9391         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9392         keyboard on i386.
9394         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9395         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9397 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9399         * kern/i386/pc/init.c (make_install_device): When memdisk image is
9400         present, "(memdisk)/boot/grub" becomes the default prefix.
9402         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9403         a memdisk tarball with all the modules.  Add --overlay=DIR option that
9404         allows users to overlay additional files into the image.
9406 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9408         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9409         and `machine/memory.h'.
9410         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9411         (_multiboot_mod_SOURCES): New variable.
9412         (_multiboot_mod_CFLAGS): Likewise.
9413         (_multiboot_mod_LDFLAGS): Likewise.
9414         (multiboot_mod_SOURCES): Likewise.
9415         (multiboot_mod_CFLAGS): Likewise.
9416         (multiboot_mod_LDFLAGS): Likewise.
9418         * include/grub/i386/ieee1275/loader.h: New file.
9420         * include/grub/i386/ieee1275/machine.h: Likewise.
9422         * include/grub/i386/ieee1275/memory.h: Likewise.
9424         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9425         variable declaration.
9426         (grub_os_area_size): Likewise.
9428         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9429         (grub_lower_mem, grub_upper_mem): New variables.
9430         (grub_stop_floppy): New function (just to make
9431         grub_multiboot2_real_boot() happy).
9433         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9434         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9435         (grub_stop): New function.
9436         Include `"../realmode.S"' and `"../loader.S"'.
9438         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9439         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9441         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9442         rely on grub_multiboot2_real_boot() for final boot.
9444 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9446         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9447         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9448         device that doesn't look like an SD card.
9449         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9450         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9451         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9452         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9453         found.
9455 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9457         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9458         avoid claiming over our own code.
9460 2008-01-22  Bean  <bean123ch@gmail.com>
9462         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9463         (jpeg_mod_SOURCES): New variable.
9464         (jpeg_mod_CFLAGS): Likewise.
9465         (jpeg_mod_LDFLAGS): Likewise.
9467         * video/readers/jpeg.c : New file.
9469 2008-01-22  Bean  <bean123ch@gmail.com>
9471         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9472         there are no more items.
9474 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9476         * kern/mm.c (grub_mm_init_region): Improve debug message.
9478 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9480         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9481         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9482         address.
9483         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9484         a C macro.
9485         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9486         Indicates start of upper memory.
9487         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9488         (generate_image): Abort when image size is big enough to corrupt
9489         upper memory.
9491         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9492         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9493         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9494         instead of hardcoding 0xA0000.
9495         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9496         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9497         instead of hardcoding 0xA0000.
9499 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9501         * disk/memdisk.c (memdisk_size): New variable.
9502         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9503         `memdisk_size'.
9504         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
9505         image to dynamic memory.
9506         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9507         `memdisk_size'.  Free memdisk block.
9509 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9511         Fix detection of very small filesystems (like tar).
9513         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9514         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9515         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9516         a problem with this disk).
9518 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9520         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9521         on grub_biosdisk_rw_standard() error.
9523 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9525         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9526         recent changes.
9527         * kern/elf.c: Likewise.
9528         * kern/ieee1275/ieee1275.c: Likewise.
9529         * kern/powerpc/ieee1275/openfw.c: Likewise.
9530         * term/ieee1275/ofconsole.c: Likewise.
9532 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9534         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9536         * include/grub/kernel.h (grub_arch_memdisk_addr)
9537         (grub_arch_memdisk_size): Moved from here ...
9539         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9540         (grub_arch_memdisk_size): ... to here.
9542 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9544         Mostly based on bugfix from Bean.
9546         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9547         attribute with hook() parameter.
9548         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9549         declaration.
9550         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9551         attribute with hook() parameter.
9552         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9553         declaration.
9555 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9557         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9558         (pkglib_MODULES): Add `memdisk.mod'.
9559         (memdisk_mod_SOURCES): New variable.
9560         (memdisk_mod_CFLAGS): Likewise.
9561         (memdisk_mod_LDFLAGS): Likewise.
9563         * disk/memdisk.c: New file.
9565         * include/grub/disk.h (grub_disk_dev_id): Add
9566         `GRUB_DISK_DEVICE_MEMDISK_ID'.
9568         * include/grub/i386/pc/kernel.h
9569         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9570         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9571         (grub_kernel_image_size): New variable declaration.
9572         (grub_total_module_size): Likewise.
9573         (grub_memdisk_image_size): Likewise.
9575         * include/grub/i386/pc/memory.h
9576         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9578         * include/grub/kernel.h: Include `<grub/symbol.h>'.
9579         (grub_arch_memdisk_addr): New variable declaration.
9580         (grub_arch_memdisk_size): Likewise.
9582         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9583         (grub_arch_memdisk_size): Likewise.
9585         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9586         (codestart): Replace hardcoded `0x100000' with
9587         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9589         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9590         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
9591         not NULL, append the contents of the file it refers to, at the end of
9592         the compressed kernel image.  Initialize `grub_memdisk_image_size'
9593         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9594         (options): Add "memdisk"|'m' option.
9595         (main): Parse --memdisk|-m option, and pass user-provided path as
9596         parameter to generate_image().
9598 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9600         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9601         grub_dprintf() calls from here ...
9602         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9604 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9606         Fix detection of "real mode" when /options/real-mode? doesn't exist.
9608         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9609         declaration.
9610         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9611         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9612         `GRUB_IEEE1275_FLAG_REAL_MODE'.
9613         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9614         property).
9615         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9616         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9618 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9620         Get rid of confusing function (superseded by
9621         `grub_ieee1275_get_integer_property')
9622         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9623         prototype.
9624         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9625         function.
9626         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9627         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9628         in native endianness from grub_ieee1275_get_integer_property().
9630 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9632         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9633         command after "shut-down", since implementations differ on which
9634         the command for halt is.
9636 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9638         * include/grub/i386/linuxbios/console.h: Add header protection.
9639         (grub_keyboard_controller_init): New function prototype.
9640         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9641         (KEYBOARD_COMMAND_READ): Likewise.
9642         (KEYBOARD_COMMAND_WRITE): Likewise.
9643         (KEYBOARD_SCANCODE_SET1): Likewise.
9644         (grub_keyboard_controller_write): New function.
9645         (grub_keyboard_controller_read): Likewise.
9646         (grub_keyboard_controller_init): Likewise.
9648         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9649         (grub_console_init): On coreboot/LinuxBIOS, call
9650         grub_keyboard_controller_init().
9652 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9654         PowerPC changes provided by Pavel Roskin.
9656         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9657         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9658         don't rely on cmain() doing it.
9659         * kern/i386/ieee1275/startup.S (_start): Store %eax in
9660         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9662 2008-01-16  Robert Millan  <rmh@aybabtu.com>
9664         * include/grub/i386/linuxbios/memory.h
9665         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9666         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9667         receive `table_header' as argument.  Instead, probe for it in the
9668         known memory ranges where it can be present.
9669         (grub_available_iterate): Do not pass a fixed `table_header' address
9670         to grub_linuxbios_table_iterate().
9672 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9674         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9675         * conf/i386-ieee1275.rmk: New file.
9676         * include/grub/i386/ieee1275/console.h: Likewise.
9677         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9678         * include/grub/i386/ieee1275/kernel.h: Likewise.
9679         * include/grub/i386/ieee1275/time.h: Likewise.
9680         * kern/i386/ieee1275/init.c: Likewise.
9681         * kern/i386/ieee1275/startup.S: Likewise.
9683 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9685         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9686         when pointers are 32-bit (but still do set it to one when they are
9687         64-bit).
9689 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9691         * include/grub/ieee1275/ieee1275.h
9692         (grub_ieee1275_get_integer_property): New function prototype.
9694         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9695         (grub_ieee1275_get_integer_property): New function.  Wraps around
9696         grub_ieee1275_get_property() to handle endianness.
9698         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9699         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9700         where appropriate.
9701         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9702         (grub_map): Likewise.
9703         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9705 2008-01-15  Bean  <bean123ch@gmail.com>
9707         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9708         (grub_script_execute_cmdline): Reset grub_errno.
9710         * normal/main.c (read_config_file): Reset grub_errno.
9712         * normal/parse.y (script_init): New.
9713         (script): Move function and menuentry here.
9714         (delimiter): New.
9715         (command): Add delimiter at the end of command.
9716         (commands): Adjust to match the new command.
9717         (commandblock): Remove grub_script_lexer_record_start.
9718         (menuentry): Add grub_script_lexer_record_start, use the new commands.
9719         (if): Use the new commands.
9721         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9723 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9725         * normal/menu.c (run_menu): Move timeout message from here ...
9726         (print_timeout): ... to here.
9727         (run_menu): Use print_timeout() once during initial draw to print
9728         the whole message, and again in every clock tick to update only
9729         the number of seconds.
9731 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9733         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9734         actual size of `available' from grub_ieee1275_get_property(), and
9735         restrict parsing to that bound.
9737 2008-01-15  Christian Franke  <franke@computer.org>
9739         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9740         (argp_program_version): Remove variable.
9741         (argp_program_bug_address): Likewise.
9742         (options): Convert from struct argp_option to struct option.
9743         (struct arguments): Remove.
9744         (parse_opt): Remove.
9745         (usage): New function.
9746         (main): Replace struct args members by simple variables.
9747         Replace argp_parse() by getopt_long().
9748         Add switch to evaluate options.
9749         Add missing "(...)" around root_dev in prefix string.
9751 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9753         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9754         for grub_ieee1275_exit(), in order to improve portability.
9756 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9758         * util/grub.d/10_linux.in (prefix): Define.
9759         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
9761 2008-01-13  Pavel Roskin  <proski@gnu.org>
9763         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9764         grub_errno if no errors have been detected.
9766 2008-01-12  Robert Millan  <rmh@aybabtu.com>
9768         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9769         (grub_util_get_dev_abstraction): New function prototype.
9771         * util/getroot.c: Include `<grub/util/getroot.h>'
9772         (grub_util_get_grub_dev): Move detection of abstraction type to ...
9773         (grub_util_get_dev_abstraction): ... here (new function).
9775         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
9776         `PRINT_ABSTRACTION'.
9777         (probe): Probe for abstraction type when requested.
9778         (main): Understand `--target=abstraction'.
9780         * util/i386/efi/grub-install.in: Add abstraction module to core
9781         image when it is found to be necessary.
9782         * util/i386/pc/grub-install.in: Likewise.
9783         * util/powerpc/ieee1275/grub-install.in: Likewise.
9785         * util/update-grub_lib.in (font_path): Return system path without
9786         converting to GRUB path.
9787         * util/update-grub.in: Convert system path returned by font_path()
9788         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
9789         abstraction module is needed for loading fonts (if any).  Export
9790         that as `GRUB_PRELOAD_MODULES'.
9791         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9792         insmod commands).
9794 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
9796         Remove some unused code from reiserfs.
9798         * fs/reiserfs.c (struct grub_reiserfs_key)
9799         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9800         (struct grub_reiserfs_node_body): Removed.
9801         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9802         Likewise.
9803         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9804         Likewise.
9805         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9806         Likewise.
9807         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9808         Likewise.
9809         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9810         Likewise.
9811         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9812         Likewise.
9813         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9814         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9815         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9817 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9819         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9820         Determines if a file is garbage left by packaging systems, etc.
9821         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9822         for processing /etc/grub.d scripts.
9823         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9824         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
9825         as a condition for processing Linux images.
9827 2008-01-10  Pavel Roskin  <proski@gnu.org>
9829         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
9830         to compile reiserfs.c on PowerPC.
9832 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9834         * kern/device.c (grub_device_iterate): Do not abort device iteration
9835         when one of the devices cannot be opened.
9836         * kern/disk.c (grub_disk_open): Do not account previous failures of
9837         unrelated functions when grub_errno is checked for.
9839 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9841         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9842         `! grub_linux_is_bzimage', change order of address comparison to make
9843         it more intuitive, and improve "too big zImage" error message.
9845 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9847         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9848         `$(update-grub_DATA)'.
9849         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9850         targets.
9852 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9854         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9855         which instruction is modified by grub-setup during installation
9856         (since it wasn't obvious by only looking at this file).
9858 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9860         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
9861         listing actual TODO items.
9863 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9865         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9866         correctly.
9867         (grub_reiserfs_get_key_offset): Likewise.
9868         (grub_reiserfs_set_key_offset): Likewise.
9869         (grub_reiserfs_set_key_type): Likewise.
9870         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9872         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9873         better to remove the bitfield version completely.
9875 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9877         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9878         allocated from the heap, due to the fshelp implementation.
9879         (grub_reiserfs_dir): Free NODE, due to the same reason.
9881 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9883         Mostly from Vincent Pelletier:
9885         * fs/reiserfs.c: New file.
9887         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9888         (reiserfs_mod_SOURCES): New variable.
9889         (reiserfs_mod_CFLAGS): Likewise.
9890         (reiserfs_mod_LDFLAGS): Likewise.
9892         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9893         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9894         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9895         normal/color.c.
9897 2008-01-06  Robert Millan  <rmh@aybabtu.com>
9899         * normal/color.c: Remove `<grub/env.h>'.
9901 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
9903         * include/grub/normal.h: Include <grub/env.h>.
9905 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9907         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9908         usage example with `(hd0,1)'.
9909         Reported by Samuel Thibault.
9911 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9913         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9914         (grub_linux_boot_zimage): Rename to ...
9915         (grub_linux_boot): ... this.
9916         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9917         (grub_linux_boot_zimage): Conditionalize zImage copy.
9919         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9920         (grub_linux_boot_bzimage): Remove prototype.
9921         (grub_linux_boot_zimage): Rename to ...
9922         (grub_linux_boot): ... this.
9924         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9925         (grub_linux_boot): Remove function.
9927 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9929         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9930         (grub_env_write_color_highlight): Likewise.
9931         (grub_wait_after_message): Likewise.
9933         * normal/color.c: New file.
9935         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9936         (normal_mod_DEPENDENCIES): Likewise.
9938         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9939         (normal_mod_DEPENDENCIES): Likewise.
9941         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9942         (normal_mod_DEPENDENCIES): Likewise.
9944         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9945         (normal_mod_DEPENDENCIES): Likewise.
9947         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9948         for waiting after a message is printed.
9949         * normal/main.c (read_config_file): Likewise.
9950         (grub_normal_init): Register grub_env_write_color_normal() and
9951         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
9952         `color_highlight' variables as global.
9954         * normal/menu.c (grub_wait_after_message): New function.
9955         (grub_color_menu_normal): New variable.  Replaces ...
9956         (GRUB_COLOR_MENU_NORMAL): ... this macro.
9957         (grub_color_menu_highlight): New variable.  Replaces ...
9958         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9959         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9960         `GRUB_TERM_COLOR_STANDARD'.
9961         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
9962         `normal_code' and `highlight_code' to `old_color_normal' and
9963         `old_color_highlight', respectively.
9964         (grub_menu_init_page): Update colors when drawing the menu, based on
9965         `menu_color_normal' and `menu_color_highlight' variables.
9966         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9967         a message is printed.
9969 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9971         * kern/env.c (grub_env_context_open): Propagate hooks for global
9972         variables to new context.
9974         * kern/main.c (grub_set_root_dev): Export `root' variable.
9976 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9978         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9979         discs unconditionally, since udev and others have options to provide
9980         them.
9982 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9984         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9986 2008-01-04  Christian Franke  <franke@computer.org>
9988         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9989         of eisa_mmap.
9991 2008-01-03  Pavel Roskin  <proski@gnu.org>
9993         * kern/i386/linuxbios/init.c: Put "void" to all function
9994         declarations with no arguments.
9995         * kern/powerpc/ieee1275/init.c: Likewise.
9996         * term/i386/pc/at_keyboard.c: Likewise.
9997         * term/i386/pc/vga_text.c: Likewise.
9998         * util/grub-mkdevicemap.c: Likewise.
10000 2008-01-02  Robert Millan  <rmh@aybabtu.com>
10002         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
10003         message when loaded image is out of bounds.
10004         (grub_multiboot_load_elf64): Likewise.
10006 2008-01-02  Pavel Roskin  <proski@gnu.org>
10008         * util/grub.d/10_linux.in: Try version without ".old" when
10009         looking for initrd.  It's better to use initrd from the newer
10010         kernel of the same version than no initrd at all.
10012 2008-01-01  Robert Millan  <rmh@aybabtu.com>
10014         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
10016 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
10018         * include/grub/video.h: Added grub_video_unmap_color and
10019         grub_video_get_active_render_target.
10020         (grub_video_adapter): Added unmap_color and get_active_render_target.
10022         * video/video.c: Added grub_video_unmap_color and
10023         grub_video_get_active_render_target.
10024         (grub_video_get_info): Changed method to accept NULL pointer as an
10025         argument to allow detection of active video adapter.
10027         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
10028         grub_video_vbe_unmap_color_int.
10029         Added grub_video_vbe_unmap_color and
10030         grub_video_vbe_get_active_render_target.
10031         (grub_video_vbe_adapter): Added unmap_color and
10032         get_active_render_target.
10034         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
10035         with grub_video_vbe_unmap_color_int.
10037         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
10038         (DEFAULT_NORMAL_COLOR): Likewise.
10039         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
10040         (DEFAULT_FG_COLOR): Removed.
10041         (DEFAULT_BG_COLOR): Likewise.
10042         (DEFAULT_CURSOR_COLOR): Changed value.
10043         (grub_virtual_screen): Added standard_color_setting,
10044         normal_color_setting, highlight_color_setting and term_color.
10045         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
10046         (bitmap_width): Added.
10047         (bitmap_height): Likewise.
10048         (bitmap): Likewise.
10049         (set_term_color): Likewise.
10050         (grub_virtual_screen_setup): Changed to use new terminal coloring
10051         settings.
10052         (grub_gfxterm_init): Added init for bitmap.
10053         (grub_gfxterm_fini): Added destroy for bitmap.
10054         (redraw_screen_rect): Updated to use background bitmap and new
10055         terminal coloring.
10056         (scroll_up): Added optimization for case when there is no bitmap.
10057         (grub_gfxterm_cls): Fixed to use correct background color.
10058         (grub_virtual_screen_setcolorstate): Changed to use new terminal
10059         coloring.
10060         (grub_virtual_screen_setcolor): Likewise.
10061         (grub_virtual_screen_getcolor): Added.
10062         (grub_gfxterm_background_image_cmd): Likewise.
10063         (grub_video_term): Added setcolor and getcolor.
10064         (MOD_INIT): Added registration of background_image command.
10065         (MOD_TERM): Added unregistration for background_image command.
10067 2007-12-30  Pavel Roskin  <proski@gnu.org>
10069         * loader/multiboot_loader.c: Fix multiboot command
10070         unregistration.  Fix all typos in the word "multiboot".
10072 2007-12-29  Pavel Roskin  <proski@gnu.org>
10074         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
10075         support for initrd names used in Fedora.
10077 2007-12-26  Bean  <bean123ch@gmail.com>
10079         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
10080         (cpio_mod_SOURCES): New variable.
10081         (cpio_mod_CFLAGS): Likewise.
10082         (cpio_mod_LDFLAGS): Likewise.
10084         * fs/cpio.c: New file.
10086         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
10088         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10090         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10092         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10094 2007-12-25  Robert Millan  <rmh@aybabtu.com>
10096         * include/grub/term.h (struct grub_term): Add `getcolor' function.
10097         (grub_getcolor): New function.
10099         * kern/term.c (grub_getcolor): New function.
10100         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
10101         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
10102         (print_entry): Set normal and highlight colors to
10103         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
10104         respectively, before printing and restore them to old
10105         values afterwards.
10106         (grub_menu_init_page): Likewise.  Fill an additional colored space
10107         that would otherwise be left blank.
10109         * term/efi/console.c (grub_console_getcolor): New function.
10110         (struct grub_console_term.getcolor): New variable.
10111         * term/i386/pc/console.c (grub_console_getcolor): New function.
10112         (struct grub_console_term.getcolor): New variable.
10113         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
10114         (struct grub_console_term.getcolor): New variable.
10116         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
10117         (struct grub_console_term.setcolor): Remove variable.
10118         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
10119         (struct grub_console_term.setcolor): Remove variable.
10120         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
10121         (struct grub_console_term.setcolor): Remove variable.
10122         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
10123         (struct grub_console_term.setcolor): Remove variable.
10125 2007-12-25  Robert Millan  <rmh@aybabtu.com>
10127         * configure.ac: Search for possible unifont.hex locations, and
10128         define UNIFONT_HEX if found.
10130         * Makefile.in (UNIFONT_HEX): Define variable.
10131         (DATA): Rename to ...
10132         (PKGLIB): ... this.  Update all users.
10133         (PKGDATA): New variable.
10134         (pkgdata_IMAGES): Rename to ...
10135         (pkglib_IMAGES): ... this. Update all users.
10136         (pkgdata_MODULES): Rename to ...
10137         (pkglib_MODULES): ... this. Update all users.
10138         (pkgdata_PROGRAMS): Rename to ...
10139         (pkglib_PROGRAMS): ... this. Update all users.
10140         (pkgdata_DATA): Rename to ...
10141         (pkglib_DATA): ... this. Update all users.
10142         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
10143         (unicode.pff, ascii.pff): New rules.
10144         (all-local): Add `$(PKGDATA)' dependency.
10145         (install-local): Process `$(PKGDATA)'.
10147         * util/update-grub_lib.in (font_path): Search for *.pff files in
10148         a few more locations, including `${pkgdata}'.
10150 2007-12-23  Robert Millan  <rmh@aybabtu.com>
10152         Patch from Bean  <bean123ch@gmail.com>:
10153         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
10154         `size'.
10156 2007-12-21  Bean  <bean123ch@gmail.com>
10158         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
10159         (ntfscomp_mod_SOURCES): New variable.
10160         (ntfscomp_mod_CFLAGS): Likewise.
10161         (ntfscomp_mod_LDFLAGS): Likewise.
10163         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
10164         (grub_probe_SOURCES): Likewise.
10165         (grub_emu_SOURCES): Likewise.
10167         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10168         (grub_emu_SOURCES): Likewise.
10170         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10171         (grub_emu_SOURCES): Likewise.
10173         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10174         (grub_emu_SOURCES): Likewise.
10176         * fs/ntfs.c (grub_ntfscomp_func): New variable.
10177         (read_run_list): Renamed to grub_ntfs_read_run_list.
10178         (decomp_nextvcn): Moved to ntfscomp.c.
10179         (decomp_getch): Likewise.
10180         (decomp_get16): Likewise.
10181         (decomp_block): Likewise.
10182         (read_block): Likewise.
10183         (read_data): Partially moved to ntfscomp.c.
10184         (fixup): Change unsigned to grub_uint16_t.
10185         (read_mft): Change unsigned long to grub_uint32_t.
10186         (read_attr): Likewise.
10187         (read_data): Likewise.
10188         (read_run_data): Likewise.
10189         (read_run_list): Likewise.
10190         (read_mft): Likewise.
10192         * fs/ntfscomp.c: New file.
10194         * include/grub/ntfs.h: New file.
10196 2007-12-16  Robert Millan  <rmh@aybabtu.com>
10198         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10199         IDE disk check, since Linux is known to support 20 IDE disks.
10200         Reported by Colin Watson.
10202 2007-12-15  Bean  <bean123ch@gmail.com>
10204         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10205         (lnxboot_img_SOURCES): New variable.
10206         (lnxboot_img_ASFLAGS): Likewise.
10207         (lnxboot_img_LDFLAGS): Likewise.
10209         * boot/i386/pc/lnxboot.S: New file.
10211 2007-11-24  Pavel Roskin  <proski@gnu.org>
10213         * configure.ac: Test if '--build-id=none' is supported by the
10214         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
10215         objcopy to generate incorrect binary files (binutils
10216         2.17.50.0.18-1 as shipped by Fedora 8).
10217         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10218         linking, so that build ID doesn't break the test.
10220 2007-11-24  Pavel Roskin  <proski@gnu.org>
10222         * include/grub/i386/time.h: use "void" in the argument list
10223         of grub_cpu_idle().
10224         * include/grub/powerpc/time.h: Likewise.
10225         * include/grub/sparc64/time.h: Likewise.
10227 2007-11-18  Christian Franke  <franke@computer.org>
10229         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10230         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10231         This fixes the problem that function keys did not work in grub-emu.
10233 2007-11-18  Christian Franke  <franke@computer.org>
10235         * disk/host.c (grub_host_open): Remove attribute unused from
10236         name parameter. Add check for "host". This fixes the problem
10237         that grub-emu does not find partitions.
10239 2007-11-18  Christian Franke  <franke@computer.org>
10241         * util/hostfs.c (is_dir): New function.
10242         (grub_hostfs_dir):  Handle missing dirent.d_type case.
10243         (grub_hostfs_read): Add missing fseek().
10244         (grub_hostfs_label): Clear label pointer.  This fixes a crash
10245         of grub-emu on "ls (host)".
10247 2007-11-18  Christian Franke  <franke@computer.org>
10249         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10250         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10251         to 64 bit boundary by default.
10253 2007-11-18  Bean  <bean123ch@gmail.com>
10255         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10256         (hexdump_mod_SOURCES): New variable.
10257         (hexdump_mod_CFLAGS): Likewise.
10258         (hexdump_mod_LDFLAGS): Likewise.
10260         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10262         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10264         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10266         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10268         * include/grub/hexdump.h: New file.
10270         * commands/hexdump.c: New file.
10272 2007-11-10  Robert Millan  <rmh@aybabtu.com>
10274         * commands/i386/pc/play.c (beep_off): Switch order of arguments
10275         in grub_outb() calls.
10276         (beep_on): Likewise.
10278 2007-11-10  Christian Franke  <franke@computer.org>
10280         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10281         (grub_menu_run): Likewise.
10283 2007-11-10  Robert Millan  <rmh@aybabtu.com>
10285         * include/grub/i386/efi/machine.h: New file.
10286         * include/grub/i386/linuxbios/machine.h: Likewise.
10287         * include/grub/i386/pc/machine.h: Likewise.
10288         * include/grub/powerpc/ieee1275/machine.h: Likewise.
10289         * include/grub/sparc64/ieee1275/machine.h: Likewise.
10291         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10292         (serial_hw_io_addr): New variable.
10293         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10294         instead of `(unsigned short *) 0x400'.
10296 2007-11-10  Bean  <bean123ch@gmail.com>
10298         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10300 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
10302         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10303         (vga_mod_SOURCES): Added.
10304         (vga_mod_CFLAGS): Likewise.
10305         (vga_mod_LDFLAGS): Likewise.
10307         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10308         grub_outb() calls.
10309         (set_map_mask): Likewise.
10310         (set_read_map): Likewise.
10311         (set_read_address): Likewise.
10312         (vga_font): Removed variable.
10313         (get_vga_glyph): Removed function.
10314         (invalidate_char): Likewise.
10315         (write_char): Changed to use grub_font_get_glyph() for font
10316         information.
10317         (grub_vga_putchar): Likewise.
10318         (grub_vga_getcharwidth): Likewise.
10320 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
10322         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10323         flags.
10324         (pxeboot_img_LDFLAGS): Likewise.
10325         (diskboot_img_LDFLAGS): Likewise.
10326         (kernel_img_LDFLAGS): Likewise.
10328 2007-11-06  Robert Millan  <rmh@aybabtu.com>
10330         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10331         in grub_outb() calls.
10332         (serial_hw_init): Likewise.
10334 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10336         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10337         spaces.  Skip non-regular files.
10339 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10341         * kern/disk.c (grub_disk_firmware_fini)
10342         (grub_disk_firmware_is_tainted): New variables.
10344         * include/grub/disk.h (grub_disk_firmware_fini)
10345         (grub_disk_firmware_is_tainted): Likewise.
10347         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10348         (grub_disk_biosdisk_fini): ... to here.
10349         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10350         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10351         is set.  Register grub_disk_biosdisk_fini() in
10352         `grub_disk_firmware_fini'.
10354         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10355         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10356         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10357         to finish existing firmware disk interface.
10359         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10360         (ata_mod_SOURCES): New variable.
10361         (ata_mod_CFLAGS): Likewise.
10362         (ata_mod_LDFLAGS): Likewise.
10364 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10366         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
10367         (grub_ata_wait): Reimplement using grub_millisleep().
10369         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10370         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10372 2007-11-03  Marco Gerards  <marco@gnu.org>
10374         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10375         (CRTC_ADDR_PORT): New macro.
10376         (CRTC_DATA_PORT): Likewise.
10377         (CRTC_CURSOR): Likewise.
10378         (CRTC_CURSOR_ADDR_HIGH): Likewise.
10379         (CRTC_CURSOR_ADDR_LOW): Likewise.
10380         (update_cursor): New function.
10381         (grub_console_real_putchar): Call `update_cursor'.
10382         (grub_console_gotoxy): Likewise.
10383         (grub_console_cls): Set the default color when clearing the
10384         screen.
10385         (grub_console_setcursor): Implemented.
10387 2007-11-03  Marco Gerards  <marco@gnu.org>
10389         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10390         become activate.
10391         (grub_ata_pio_write): Likewise.
10393         (grub_atapi_identify): Wait after issuing an ATA command.
10394         (grub_atapi_packet): Likewise.
10395         (grub_ata_identify): Likewise.
10396         (grub_ata_readwrite): Likewise.
10398 2007-11-03  Marco Gerards  <marco@gnu.org>
10400         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10401         (grub_ata_pio_write): Likewise.
10402         (grub_ata_readwrite): Use `grub_error', instead of
10403         returning `grub_errno'.
10405 2007-11-03  Marco Gerards  <marco@gnu.org>
10407         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10408         grub_ata_pio_write once for every single sector, instead of for
10409         multiple sectors.
10411 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10413         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10415         * conf/i386-linuxbios.rmk: New file.
10417         * kern/i386/pc/hardware.c: Likewise.
10418         * term/i386/pc/at_keyboard.c: Likewise.
10419         * term/i386/pc/vga_text.c: Likewise.
10421         * include/grub/i386/linuxbios/boot.h: Likewise.
10422         * include/grub/i386/linuxbios/console.h: Likewise.
10423         * include/grub/i386/linuxbios/init.h: Likewise.
10424         * include/grub/i386/linuxbios/kernel.h: Likewise.
10425         * include/grub/i386/linuxbios/loader.h: Likewise.
10426         * include/grub/i386/linuxbios/memory.h: Likewise.
10427         * include/grub/i386/linuxbios/serial.h: Likewise.
10428         * include/grub/i386/linuxbios/time.h: Likewise.
10430         * kern/i386/linuxbios/init.c: Likewise.
10431         * kern/i386/linuxbios/startup.S: Likewise.
10432         * kern/i386/linuxbios/table.c: Likewise.
10434 2007-10-31  Marco Gerards  <marco@gnu.org>
10436         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10437         (ata_mod_SOURCES): New variable.
10438         (ata_mod_CFLAGS): Likewise.
10439         (ata_mod_LDFLAGS): Likewise.
10441         * disk/ata.c: New file.
10443         * include/grub/disk.h (grub_disk_dev_id): Add
10444         `GRUB_DISK_DEV_ATA_ID'.
10446 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10448         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10449         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10451         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10452         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10454         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10455         `<grub/types.h>'.
10457         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10459 2007-10-27  Robert Millan  <rmh@aybabtu.com>
10461         * include/grub/types.h (ULONG_MAX): Define macro.
10463 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10465         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
10466         `"../realmode.S"'.
10467         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
10469 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10471         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10472         (pkgdata_MODULES): Add `biosdisk.mod'.
10473         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10474         variables.
10476         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10477         (grub_biosdisk_init): Replace with ...
10478         (GRUB_MOD_INIT(biosdisk)): ... this.
10479         (grub_biosdisk_fini): Replace with ...
10480         (GRUB_MOD_FINI(biosdisk)): ... this.
10482         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10483         (grub_machine_init): Remove call to grub_biosdisk_init().
10484         (grub_machine_fini): Remove call to grub_machine_fini().
10486         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10488 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10490         * include/grub/time.h: New file.
10491         * include/grub/i386/time.h: Likewise.
10492         * include/grub/powerpc/time.h: Likewise.
10493         * include/grub/sparc64/time.h: Likewise.
10495         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10496         instances to ...
10497         (KERNEL_MACHINE_TIME_HEADER): ... this.
10498         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10499         instances to ...
10500         (KERNEL_MACHINE_TIME_HEADER): ... this.
10501         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10502         instances to ...
10503         (KERNEL_MACHINE_TIME_HEADER): ... this.
10505         * kern/i386/efi/init.c: Include `<grub/time.h>'.
10506         (grub_millisleep): New function.
10507         * kern/i386/pc/init.c: Include `<grub/time.h>'.
10508         (grub_millisleep): New function.
10509         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10510         Remove `grub/machine/time.h' include.
10511         (grub_millisleep): New function.
10512         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10513         Remove `grub/machine/time.h' include.
10514         (grub_millisleep): New function.
10516         * include/grub/misc.h (grub_div_roundup): New function.
10518         * kern/misc.c: Include `<grub/time.h>'.
10519         (grub_millisleep_generic): New function.
10521         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10522         Add `time.h'.
10523         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10524         Add `time.h'.
10525         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10526         `machine/time.h'.  Add `time.h'.
10527         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10529 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10531         * include/grub/misc.h (grub_max): New function.
10533 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10535         * util/misc.c (grub_util_info): Call fflush() before returning.
10537 2007-10-20  Robert Millan  <rmh@aybabtu.com>
10539         * genmk.rb (Image): Copy `extra_flags' from here ...
10540         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
10542         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10543         to `argc' and `args' arguments.
10545 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10547         * kern/i386/loader.S: New file.
10549         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10550         * kern/i386/loader.S (grub_linux_prot_size)... to here.
10551         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10552         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10553         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10554         * kern/i386/loader.S (grub_linux_real_addr)... to here.
10555         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10556         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10557         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10558         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10559         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10560         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10561         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10562         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10564         * kern/i386/realmode.S: New file.
10566         * kern/i386/pc/startup.S (protstack): Moved from here ...
10567         * kern/i386/realmode.S (protstack)... to here.
10568         * kern/i386/pc/startup.S (gdt): Moved from here ...
10569         * kern/i386/realmode.S (gdt)... to here.
10570         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10571         * kern/i386/realmode.S (prot_to_real)... to here.
10573         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10574         `kern/i386/realmode.S'.
10576 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10578         * include/grub/i386/loader.h: New file.
10580         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10581         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10582         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10583         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10584         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10585         * include/grub/i386/loader.h (grub_linux_prot_size)
10586         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10587         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10588         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10589         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10591         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10593 2007-10-15  Robert Millan  <rmh@aybabtu.com>
10595         * normal/misc.c (grub_normal_print_device_info): Do not probe for
10596         filesystem when dev->disk is unset.
10597         Do probe for filesystem even when dev->disk->has_partitions is set.
10598         In case a filesystem is found, always report it.
10599         In case it isn't, if dev->disk->has_partitions is set, report that
10600         a partition table was found instead of reporting that no filesystem
10601         could be identified.
10603 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10605         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10606         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10608         * include/grub/types.h (grub_host_to_target16): New macro.
10609         (grub_host_to_target32): Likewise.
10610         (grub_host_to_target64): Likewise.
10611         (grub_target_to_host16): Likewise.
10612         (grub_target_to_host32): Likewise.
10613         (grub_target_to_host64): Likewise.
10615         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10616         Renamed from to ...
10617         (GRUB_MOD_ALIGN): ...this.  Update all users.
10619         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10620         grub_host_to_target32.
10621         Replace grub_be_to_cpu32 with grub_target_to_host32.
10622         (load_modules): Likewise.
10623         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10624         Replace grub_be_to_cpu32 with grub_target_to_host32.
10625         Replace grub_cpu_to_be16 with grub_host_to_target16.
10626         Replace grub_cpu_to_be32 grub_host_to_target32.
10628 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10630         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10631         * util/elf/grub-mkimage.c: ... here.
10633         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
10634         `util/powerpc/ieee1275/grub-mkimage.c'.
10636 2007-10-07  Robert Millan  <rmh@aybabtu.com>
10638         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10639         and make it easier to figure out.
10640         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10641         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10642         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10643         leave us with less than HEAP_MIN_SIZE total heap.
10644         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10646 2007-10-03  Robert Millan  <rmh@aybabtu.com>
10648         * include/grub/i386/io.h: New file.
10649         * commands/i386/pc/play.c (inb): Removed.
10650         (outb): Removed.
10651         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10652         with grub_outb().
10653         * term/i386/pc/serial.c  (inb): Removed.
10654         (outb): Removed.
10655         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10656         with grub_outb().
10657         * term/i386/pc/vga.c  (inb): Removed.
10658         (outb): Removed.
10659         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10660         with grub_outb().
10662 2007-10-02  Robert Millan  <rmh@aybabtu.com>
10664         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10665         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10666         Reported by Marcin Kurek.
10668 2007-09-07  Robert Millan  <rmh@aybabtu.com>
10670         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10671         SmartFirmware version updates (as released by Sven Luther), and avoid
10672         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10673         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10674         known broken.
10676 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10678         From Hitoshi Ozeki:
10679         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10680         when merging two regions.
10682 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10684         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10685         * normal/completion.c (grub_normal_do_completion): Likewise.
10686         Reported by Hitoshi Ozeki.
10688 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10690         Do not use devices at boot in chainloading.
10692         * loader/i386/pc/chainloader.c (boot_drive): New variable.
10693         (boot_part_addr): Likewise.
10694         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10695         with BOOT_DRIVE and BOOT_PART_ADDR.
10696         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10697         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10699 2007-08-29  Robert Millan  <rmh@aybabtu.com>
10701         Patch from Simon Peter <dn.tlp@gmx.net>:
10702         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10703         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10704         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
10705         util/i386/pc/grub-setup.c_DEPENDENCIES.
10706         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10707         util/grub-probe.c_DEPENDENCIES.
10708         * conf/powerpc-ieee1275.rmk: Likewise.
10710 2007-08-28  Robert Millan  <rmh@aybabtu.com>
10712         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
10713         to tell grub-mkdevicemap how to name devices.
10714         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10715         feature).
10717         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10718         util/i386/get_disk_name.c.
10719         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10720         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10721         util/ieee1275/get_disk_name.c.
10723         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10725         * DISTLIST: Add util/i386/get_disk_name.c and
10726         util/ieee1275/get_disk_name.c.
10728         * util/grub-mkdevicemap.c: Replace device naming logic with
10729         grub_util_get_disk_name() calls.
10731 2007-08-20  Robert Millan  <rmh@aybabtu.com>
10733         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10734         (so that it works for both plural and singular quantities).
10736 2007-08-05  Robert Millan  <rmh@aybabtu.com>
10738         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10739         so that [xz] isn't taken into account when determining order.
10741 2007-08-02  Marco Gerards  <marco@gnu.org>
10743         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10744         `include/multiboot2.h', `include/grub/elfload.h',
10745         `include/multiboot.h', `include/grub/multiboot.h',
10746         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10747         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10748         `kern/elf.c', `loader/multiboot_loader.c',
10749         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10750         `loader/i386/pc/multiboot2.c',
10751         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10752         `util/i386/pc/grub-mkrescue.in'.  Remove
10753         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10754         `include/grub/i386/pc/util/biosdisk.h' and
10755         `include/grub/powerpc/ieee1275/multiboot.h'.
10757 2007-08-02  Bean  <bean123ch@gmail.com>
10759         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10760         (ntfs_mod_SOURCES): New variable.
10761         (ntfs_mod_CFLAGS): Likewise.
10762         (ntfs_mod_LDFLAGS): Likewise.
10764         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10765         (grub_probe_SOURCES): Likewise.
10766         (grub_emu_SOURCES): Likewise.
10768         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10769         (grub_emu_SOURCES): Likewise.
10771         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10772         (grub_emu_SOURCES): Likewise.
10774         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10776         * fs/ntfs.c: New file.
10778 2007-08-02  Bean  <bean123ch@gmail.com>
10780         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10782         * file.h (grub_file): Likewise.
10784         * fshelp.h (grub_fshelp_read_file): Likewise.
10786         * util/i386/pc/grub-setup.c (setup): Likewise.
10787         (save_first_sector): Likewise.
10788         (save_blocklists): Likewise.
10790         * fs/affs.c (grub_affs_read_file): Likewise.
10792         * fs/ext2.c (grub_ext2_read_file): Likewise.
10794         * fs/fat.c (grub_fat_read_data): Likewise.
10796         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10798         * fs/hfs.c (grub_hfs_read_file): Likewise.
10800         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10802         * fs/jfs.c (grub_jfs_read_file): Likewise.
10804         * fs/minix.c (grub_minix_read_file): Likewise.
10806         * fs/sfs.c (grub_sfs_read_file): Likewise.
10808         * fs/ufs.c (grub_ufs_read_file): Likewise.
10810         * fs/xfs.c (grub_xfs_read_file): Likewise.
10812         * command/blocklist.c (read_blocklist): Likewise.
10813         (print_blocklist): Likewise.
10815 2007-08-02  Marco Gerards  <marco@gnu.org>
10817         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10818         `util/hostfs.c'.
10820         * disk/host.c: New file.
10822         * util/hostfs.c: Likewise.
10824         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10825         return `GRUB_ERR_BAD_FS'.
10826         * fs/sfs.c (grub_sfs_mount): Likewise.
10827         * fs/xfs.c (grub_xfs_mount): Likewise.
10829         * include/grub/disk.h (enum grub_disk_dev_id): Add
10830         `GRUB_DISK_DEVICE_HOST_ID'.
10832         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10834 2007-07-24  Jerone Young  <jerone@gmail.com>
10836         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10837         modules for compilation.
10838         * conf/powerpc-ieee1275.rmk: Likewise.
10840         * include/multiboot.h: Move multiboot definitions to one file. Rename
10841         many definitions to not get grub specific.
10842         * include/multiboot2.h: Create header with multiboot 2 definitions.
10843         * include/grub/multiboot.h: Header for grub specific function
10844         prototypes and definitions.
10845         * include/grub/multiboot2.h: Likewise.
10846         * include/grub/multiboot_loader.h: Likewise.
10847         * include/grub/i386/pc/multiboot.h: Removed.
10848         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10850         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10851         and 2 to allow for one multiboot and module commands.
10852         * loader/multiboot2.c: Add multiboot2 functionality.
10853         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10854         and definition names.
10855         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10856         2 functions.
10857         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10858         ieee1275 specific multiboot2 code.
10860         * kern/i386/pc/startup.S: Change headers and definition names for
10861         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10863 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10865         * geninitheader.sh: Process file specified in first parameter rather
10866         than hardcoding grub_modules_init.lst.
10867         * geninit.sh: Likewise.  Also, construct header name dynamically rather
10868         than hardcoding grub_modules_init.h.
10870         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10871         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
10872         grub_probe_init.[ch] and grub_setup_init.[ch].
10874         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10875         grub_modules_init.h with grub_emu_init.h.
10876         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10877         grub_probe_init.[ch] files.
10878         * conf/i386-efi.rmk: Likewise.
10879         * conf/i386-pc.rmk: Likewise.
10880         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10881         grub_setup_init.[ch] files.
10883         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10884         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
10885         to initialize modules rather than a list of hardcoded functions.
10886         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
10887         grub_init_all() to initialize modules rather than a list of hardcoded
10888         functions.
10890 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10892         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10893         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10895 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10897         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10898         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10899         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10900         flag when running on SmartFirmware.
10901         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10902         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10903         was set.
10905         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10906         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10907         rather than decreasing it.
10909         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10910         there's not enough space to do it, fail in the same way as when it
10911         can't be done because there are no partitions.
10913         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10914         when nvsetenv failed.
10916 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10918         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10919         because this rule is automatically generated.
10920         (grub-mkrescue): Removed for the same reason as above.
10922 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10924         Migrate to GNU General Public License Version 3.
10926         * COPYING: Replaced with the plain text version of GPLv3.
10928         * config.guess: Updated from gnulib.
10929         * config.sub: Likewise.
10931         * geninit.sh: Output a GPLv3 copyright notice.
10932         * geninitheader.sh: Likewise.
10933         * genmodsrc.sh: Likewise.
10934         * gensymlist.sh.in: Likewise.
10936         * boot/i386/pc/boot.S: Upgraded to GPLv3.
10937         * boot/i386/pc/diskboot.S: Likewise.
10938         * boot/i386/pc/pxeboot.S: Likewise.
10939         * commands/blocklist.c: Likewise.
10940         * commands/boot.c: Likewise.
10941         * commands/cat.c: Likewise.
10942         * commands/cmp.c: Likewise.
10943         * commands/configfile.c: Likewise.
10944         * commands/echo.c: Likewise.
10945         * commands/help.c: Likewise.
10946         * commands/ls.c: Likewise.
10947         * commands/search.c: Likewise.
10948         * commands/terminal.c: Likewise.
10949         * commands/test.c: Likewise.
10950         * commands/videotest.c: Likewise.
10951         * commands/i386/cpuid.c: Likewise.
10952         * commands/i386/pc/halt.c: Likewise.
10953         * commands/i386/pc/play.c: Likewise.
10954         * commands/i386/pc/reboot.c: Likewise.
10955         * commands/i386/pc/vbeinfo.c: Likewise.
10956         * commands/i386/pc/vbetest.c: Likewise.
10957         * commands/ieee1275/halt.c: Likewise.
10958         * commands/ieee1275/reboot.c: Likewise.
10959         * commands/ieee1275/suspend.c: Likewise.
10960         * disk/loopback.c: Likewise.
10961         * disk/lvm.c: Likewise.
10962         * disk/raid.c: Likewise.
10963         * disk/efi/efidisk.c: Likewise.
10964         * disk/i386/pc/biosdisk.c: Likewise.
10965         * disk/ieee1275/ofdisk.c: Likewise.
10966         * font/manager.c: Likewise.
10967         * fs/affs.c: Likewise.
10968         * fs/ext2.c: Likewise.
10969         * fs/fat.c: Likewise.
10970         * fs/fshelp.c: Likewise.
10971         * fs/hfs.c: Likewise.
10972         * fs/hfsplus.c: Likewise.
10973         * fs/iso9660.c: Likewise.
10974         * fs/jfs.c: Likewise.
10975         * fs/minix.c: Likewise.
10976         * fs/sfs.c: Likewise.
10977         * fs/ufs.c: Likewise.
10978         * fs/xfs.c: Likewise.
10979         * hello/hello.c: Likewise.
10980         * include/grub/acorn_filecore.h: Likewise.
10981         * include/grub/arg.h: Likewise.
10982         * include/grub/bitmap.h: Likewise.
10983         * include/grub/boot.h: Likewise.
10984         * include/grub/cache.h: Likewise.
10985         * include/grub/device.h: Likewise.
10986         * include/grub/disk.h: Likewise.
10987         * include/grub/dl.h: Likewise.
10988         * include/grub/elfload.h: Likewise.
10989         * include/grub/env.h: Likewise.
10990         * include/grub/err.h: Likewise.
10991         * include/grub/file.h: Likewise.
10992         * include/grub/font.h: Likewise.
10993         * include/grub/fs.h: Likewise.
10994         * include/grub/fshelp.h: Likewise.
10995         * include/grub/gzio.h: Likewise.
10996         * include/grub/hfs.h: Likewise.
10997         * include/grub/kernel.h: Likewise.
10998         * include/grub/loader.h: Likewise.
10999         * include/grub/lvm.h: Likewise.
11000         * include/grub/misc.h: Likewise.
11001         * include/grub/mm.h: Likewise.
11002         * include/grub/net.h: Likewise.
11003         * include/grub/normal.h: Likewise.
11004         * include/grub/parser.h: Likewise.
11005         * include/grub/partition.h: Likewise.
11006         * include/grub/pc_partition.h: Likewise.
11007         * include/grub/raid.h: Likewise.
11008         * include/grub/rescue.h: Likewise.
11009         * include/grub/script.h: Likewise.
11010         * include/grub/setjmp.h: Likewise.
11011         * include/grub/symbol.h: Likewise.
11012         * include/grub/term.h: Likewise.
11013         * include/grub/terminfo.h: Likewise.
11014         * include/grub/tparm.h: Likewise.
11015         * include/grub/types.h: Likewise.
11016         * include/grub/video.h: Likewise.
11017         * include/grub/efi/api.h: Likewise.
11018         * include/grub/efi/chainloader.h: Likewise.
11019         * include/grub/efi/console.h: Likewise.
11020         * include/grub/efi/console_control.h: Likewise.
11021         * include/grub/efi/disk.h: Likewise.
11022         * include/grub/efi/efi.h: Likewise.
11023         * include/grub/efi/pe32.h: Likewise.
11024         * include/grub/efi/time.h: Likewise.
11025         * include/grub/i386/linux.h: Likewise.
11026         * include/grub/i386/setjmp.h: Likewise.
11027         * include/grub/i386/types.h: Likewise.
11028         * include/grub/i386/efi/kernel.h: Likewise.
11029         * include/grub/i386/efi/loader.h: Likewise.
11030         * include/grub/i386/efi/time.h: Likewise.
11031         * include/grub/i386/pc/biosdisk.h: Likewise.
11032         * include/grub/i386/pc/boot.h: Likewise.
11033         * include/grub/i386/pc/chainloader.h: Likewise.
11034         * include/grub/i386/pc/console.h: Likewise.
11035         * include/grub/i386/pc/init.h: Likewise.
11036         * include/grub/i386/pc/kernel.h: Likewise.
11037         * include/grub/i386/pc/loader.h: Likewise.
11038         * include/grub/i386/pc/memory.h: Likewise.
11039         * include/grub/i386/pc/multiboot.h: Likewise.
11040         * include/grub/i386/pc/serial.h: Likewise.
11041         * include/grub/i386/pc/time.h: Likewise.
11042         * include/grub/i386/pc/vbe.h: Likewise.
11043         * include/grub/i386/pc/vbeblit.h: Likewise.
11044         * include/grub/i386/pc/vbefill.h: Likewise.
11045         * include/grub/i386/pc/vbeutil.h: Likewise.
11046         * include/grub/i386/pc/vga.h: Likewise.
11047         * include/grub/ieee1275/ieee1275.h: Likewise.
11048         * include/grub/ieee1275/ofdisk.h: Likewise.
11049         * include/grub/powerpc/libgcc.h: Likewise.
11050         * include/grub/powerpc/setjmp.h: Likewise.
11051         * include/grub/powerpc/types.h: Likewise.
11052         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
11053         * include/grub/powerpc/ieee1275/console.h: Likewise.
11054         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
11055         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
11056         * include/grub/powerpc/ieee1275/loader.h: Likewise.
11057         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
11058         * include/grub/powerpc/ieee1275/time.h: Likewise.
11059         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
11060         * include/grub/sparc64/libgcc.h: Likewise.
11061         * include/grub/sparc64/setjmp.h: Likewise.
11062         * include/grub/sparc64/types.h: Likewise.
11063         * include/grub/sparc64/ieee1275/console.h: Likewise.
11064         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11065         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11066         * include/grub/sparc64/ieee1275/time.h: Likewise.
11067         * include/grub/util/biosdisk.h: Likewise.
11068         * include/grub/util/getroot.h: Likewise.
11069         * include/grub/util/lvm.h: Likewise.
11070         * include/grub/util/misc.h: Likewise.
11071         * include/grub/util/raid.h: Likewise.
11072         * include/grub/util/resolve.h: Likewise.
11073         * io/gzio.c: Likewise.
11074         * kern/device.c: Likewise.
11075         * kern/disk.c: Likewise.
11076         * kern/dl.c: Likewise.
11077         * kern/elf.c: Likewise.
11078         * kern/env.c: Likewise.
11079         * kern/err.c: Likewise.
11080         * kern/file.c: Likewise.
11081         * kern/fs.c: Likewise.
11082         * kern/loader.c: Likewise.
11083         * kern/main.c: Likewise.
11084         * kern/misc.c: Likewise.
11085         * kern/mm.c: Likewise.
11086         * kern/parser.c: Likewise.
11087         * kern/partition.c: Likewise.
11088         * kern/rescue.c: Likewise.
11089         * kern/term.c: Likewise.
11090         * kern/efi/efi.c: Likewise.
11091         * kern/efi/init.c: Likewise.
11092         * kern/efi/mm.c: Likewise.
11093         * kern/i386/dl.c: Likewise.
11094         * kern/i386/efi/init.c: Likewise.
11095         * kern/i386/efi/startup.S: Likewise.
11096         * kern/i386/pc/init.c: Likewise.
11097         * kern/i386/pc/lzo1x.S: Likewise.
11098         * kern/i386/pc/startup.S: Likewise.
11099         * kern/ieee1275/ieee1275.c: Likewise.
11100         * kern/powerpc/cache.S: Likewise.
11101         * kern/powerpc/dl.c: Likewise.
11102         * kern/powerpc/ieee1275/cmain.c: Likewise.
11103         * kern/powerpc/ieee1275/crt0.S: Likewise.
11104         * kern/powerpc/ieee1275/init.c: Likewise.
11105         * kern/powerpc/ieee1275/openfw.c: Likewise.
11106         * kern/sparc64/cache.S: Likewise.
11107         * kern/sparc64/dl.c: Likewise.
11108         * kern/sparc64/ieee1275/init.c: Likewise.
11109         * kern/sparc64/ieee1275/openfw.c: Likewise.
11110         * loader/efi/chainloader.c: Likewise.
11111         * loader/efi/chainloader_normal.c: Likewise.
11112         * loader/i386/efi/linux.c: Likewise.
11113         * loader/i386/efi/linux_normal.c: Likewise.
11114         * loader/i386/pc/chainloader.c: Likewise.
11115         * loader/i386/pc/chainloader_normal.c: Likewise.
11116         * loader/i386/pc/linux.c: Likewise.
11117         * loader/i386/pc/linux_normal.c: Likewise.
11118         * loader/i386/pc/multiboot.c: Likewise.
11119         * loader/i386/pc/multiboot_normal.c: Likewise.
11120         * loader/powerpc/ieee1275/linux.c: Likewise.
11121         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11122         * normal/arg.c: Likewise.
11123         * normal/cmdline.c: Likewise.
11124         * normal/command.c: Likewise.
11125         * normal/completion.c: Likewise.
11126         * normal/execute.c: Likewise.
11127         * normal/function.c: Likewise.
11128         * normal/lexer.c: Likewise.
11129         * normal/main.c: Likewise.
11130         * normal/menu.c: Likewise.
11131         * normal/menu_entry.c: Likewise.
11132         * normal/misc.c: Likewise.
11133         * normal/parser.y: Likewise.
11134         * normal/script.c: Likewise.
11135         * normal/i386/setjmp.S: Likewise.
11136         * normal/powerpc/setjmp.S: Likewise.
11137         * normal/sparc64/setjmp.S: Likewise.
11138         * partmap/acorn.c: Likewise.
11139         * partmap/amiga.c: Likewise.
11140         * partmap/apple.c: Likewise.
11141         * partmap/gpt.c: Likewise.
11142         * partmap/pc.c: Likewise.
11143         * partmap/sun.c: Likewise.
11144         * term/gfxterm.c: Likewise.
11145         * term/terminfo.c: Likewise.
11146         * term/efi/console.c: Likewise.
11147         * term/i386/pc/console.c: Likewise.
11148         * term/i386/pc/serial.c: Likewise.
11149         * term/i386/pc/vesafb.c: Likewise.
11150         * term/i386/pc/vga.c: Likewise.
11151         * term/ieee1275/ofconsole.c: Likewise.
11152         * util/biosdisk.c: Likewise.
11153         * util/console.c: Likewise.
11154         * util/genmoddep.c: Likewise.
11155         * util/getroot.c: Likewise.
11156         * util/grub-emu.c: Likewise.
11157         * util/grub-mkdevicemap.c: Likewise.
11158         * util/grub-probe.c: Likewise.
11159         * util/lvm.c: Likewise.
11160         * util/misc.c: Likewise.
11161         * util/raid.c: Likewise.
11162         * util/resolve.c: Likewise.
11163         * util/update-grub.in: Likewise.
11164         * util/update-grub_lib.in: Likewise.
11165         * util/grub.d/00_header.in: Likewise.
11166         * util/grub.d/10_hurd.in: Likewise.
11167         * util/grub.d/10_linux.in: Likewise.
11168         * util/i386/efi/grub-install.in: Likewise.
11169         * util/i386/efi/grub-mkimage.c: Likewise.
11170         * util/i386/pc/grub-install.in: Likewise.
11171         * util/i386/pc/grub-mkimage.c: Likewise.
11172         * util/i386/pc/grub-mkrescue.in: Likewise.
11173         * util/i386/pc/grub-setup.c: Likewise.
11174         * util/i386/pc/misc.c: Likewise.
11175         * util/powerpc/ieee1275/grub-install.in: Likewise.
11176         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
11177         * util/powerpc/ieee1275/misc.c: Likewise.
11178         * video/bitmap.c: Likewise.
11179         * video/video.c: Likewise.
11180         * video/i386/pc/vbe.c: Likewise.
11181         * video/i386/pc/vbeblit.c: Likewise.
11182         * video/i386/pc/vbefill.c: Likewise.
11183         * video/i386/pc/vbeutil.c: Likewise.
11184         * video/readers/tga.c: Likewise.
11186 2007-07-02  Robert Millan  <rmh@aybabtu.com>
11188         * conf/i386-efi.rmk: Replace obsolete reference to
11189         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11190         with util/getroot.c.
11191         * conf/powerpc-ieee1275.rmk: Likewise.
11192         * conf/sparc64-ieee1275.rmk: Likewise.
11194         * util/grub-emu.c (main): Fix unchecked pointer handling.
11196 2007-07-02  Robert Millan  <rmh@aybabtu.com>
11198         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11199         invocation to fail, in order to support partition-less media.
11201         * util/i386/pc/grub-install.in: Likewise.
11203         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11204         which fs or partmap modules are needed (akin to its sister scripts).
11206         Also use grub-probe to get rid of unportable /proc/mounts check.
11208         Print the same informational message that the other scripts do, before
11209         exiting.
11211 2007-06-23  Robert Millan  <rmh@aybabtu.com>
11213         * util/update-grub_lib.in (font_path): New function.  Determine whether
11214         a font file can be found and, if so, echo the GRUB path to it.
11216         * util/update-grub.in: Handle multiple terminals depending on user
11217         input, platform availability and font file presence.  Propagate
11218         variables of our findings to /etc/grub.d/ children.
11220         * util/grub.d/00_header.in: Handle multiple terminals, based on
11221         environment setup by update-grub.
11223 2007-06-23  Robert Millan  <rmh@aybabtu.com>
11225         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
11227 2007-06-21  Robert Millan  <rmh@aybabtu.com>
11229         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11230         indicate end of data section in kernel image.
11231         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11232         GRUB_KERNEL_MACHINE_DATA_END.
11234         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11235         space for it.
11236         * kern/i386/efi/startup.S: Likewise.
11238         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11239         during image generation.  Implement --prefix option to override this
11240         patch.
11241         * util/i386/efi/grub-mkimage.c: Likewise.
11243         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11244         code to make path relative to its root into a separate function.
11246         * util/i386/pc/grub-install.in: Use newly provided
11247         make_system_path_relative_to_its_root() to convert ${grubdir}, then
11248         pass the result to grub-install --prefix.
11250 2007-06-13  Robert Millan  <rmh@aybabtu.com>
11252         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11253         DEFAULT_DEVICE_MAP.
11254         * util/grub-emu.c: Use above definitions from misc.h instead of
11255         defining them.
11256         * util/grub-mkdevicemap.c: Likewise.
11257         * util/i386/pc/grub-setup.c: Likewise.
11258         * util/grub-probe.c: Likewise.
11259         (probe): Abort with grub_util_error() when either
11260         grub_guess_root_device or grub_util_get_grub_dev fails.
11262 2007-06-12  Robert Millan  <rmh@aybabtu.com>
11264         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11265         "pager" assignment.
11266         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11267         "pcdata".
11268         * util/grub-probe.c (probe): Likewise for "drive_name".
11270 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11272         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11273         not just the cdrom one.
11275 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11277         * util/i386/pc/grub-mkrescue.in: Add "set -e".
11278         Add --pkglibdir=DIR option to override pkglibdir.
11279         Mention --image-type=TYPE in help output.
11280         Fix --grub-mkimage (it was a no-op).
11281         Abort gracefully when no parameter is given.
11283 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11285         * util/i386/pc/grub-mkrescue.in: New file.
11286         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
11287         * Makefile.in: Handle bin_SCRIPTS.
11289 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
11291         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11292         list of video modes.
11294 2007-06-06  Robert Millan  <rmh@aybabtu.com>
11296         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11297         file doesn't exist, or if it is in a filesystem grub can't read.
11299         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
11300         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
11301         header comment to fit in 80 columns when the variables are resolved.
11303         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11304         could be identified by update-grub.  Remove redundant check for
11305         unifont.pff existence (since convert_system_path_to_grub_path now
11306         handles that).
11308 2007-06-04  Robert Millan  <rmh@aybabtu.com>
11310         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11312         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11314         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11316 2007-06-04  Robert Millan  <rmh@aybabtu.com>
11318         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11320         * include/grub/partition.h: Declare grub_apple_partition_map_init and
11321         grub_apple_partition_map_fini.
11323         * util/biosdisk.c
11324         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11325         to access >2 TiB disks).
11327         Print disk->total_sectors with %llu instead of %lu, since this
11328         variable is always 64-bit (prevents wrong disk size from being displayed
11329         on either >2 TiB disk or big-endian CPU).
11331         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11332         into a generic case that supports all (sane) partition maps.
11334         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11335         breaks big-endian.
11337         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11338         and grub_apple_partition_map_fini() after that.
11340 2007-06-01  Robert Millan  <rmh@aybabtu.com>
11342         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11344         * util/grub.d/00_header.in: Only enable gfxterm when
11345         convert_system_path_to_grub_path() succeeds.
11347 2007-05-20  Robert Millan  <rmh@aybabtu.com>
11349         * util/update-grub_lib.in: New file.
11350         * DISTLIST: Add update-grub_lib.in.
11351         * conf/common.rmk: Generate update-grub_lib and install it in
11352         $(lib_DATA).
11353         * Makefile.in: Add install routine for $(lib_DATA).
11355         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11356         function provided by update-grub_lib to support arbitrary paths of
11357         unifont.pff.
11358         * util/update-grub.in: Use convert_system_path_to_grub_path() to
11359         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11361 2007-05-19  Robert Millan  <rmh@aybabtu.com>
11363         * commands/i386/cpuid.c: New module.
11364         * DISTLIST: Add it.
11365         * conf/i386-efi.rmk: Enable cpuid.mod.
11366         * conf/i386-pc.rmk: Likewise.
11368 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11370         * kern/disk.c (grub_disk_read): Check return value of
11371         grub_realloc().
11373 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11375         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11376         arrays.
11377         * disk/raid.c (grub_raid_open): Likewise.
11379 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11381         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11382         stack instead of on the heap.
11384         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11385         before doing a read on it.
11387         * configure.ac: Only use -fno-stack-protector for the target
11388         environment.
11390 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11392         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11393         __attribute_ ((unused)) to mode_type argument.
11395         * util/getroot.c (grub_guess_root_device): Fix #endif.
11397         * kern/misc.c (memcmp): Fix prototype.
11399         * include/grub/partition.h [GRUB_UTIL]
11400         (grub_gpt_partition_map_init): Add prototype.
11401         (grub_gpt_partition_map_fini): Likewise.
11403         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11404         at the right place.
11406         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11407         (grub_fat_read_data): Likewise.
11408         (grub_fat_find_dir): Likewise.
11410         * font/manager.c (find_glyph): Make table a const.
11411         (grub_font_get_glyph): Remove bitmap from if statement.
11413 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
11415         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11416         code, first search for device in /dev/mapper, then in /dev.
11417         (grub_util_get_grub_dev): New function.
11418         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11419         prototype.
11420         * util/grub-probe.c (probe): Remove check for RAID, call
11421         grub_util_get_grub_dev() instead of
11422         grub_util_biosdisk_get_grub_dev().
11423         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11424         grub_util_biosdisk_get_grub_dev().
11425         * util/i386/pc/grub-setup.c (main): Likewise.
11427 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11429         * DISTLIST: Update for the latest changes.
11430         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11431         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11432         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11433         grub/util/biosdisk.h.
11434         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11435         grub/util/biosdisk.h.
11437 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11439         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11441 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11443         * util/i386/efi/grub-install.in: New.
11444         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11445         newly added grub-install.
11446         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11447         include.
11448         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11449         grub/util/biosdisk.h.
11450         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11451         grub/util/biosdisk.h.
11453 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11455         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11456         * include/grub/util/biosdisk.h: ... here.
11457         * util/i386/pc/biosdisk.c: Moved to ...
11458         * util/biosdisk.c: ... here.
11459         * util/i386/pc/getroot.c: Moved to ...
11460         * util/getroot.c: ... here.
11461         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11462         * util/grub-mkdevicemap.c: ... here.
11463         * util/i386/pc/grub-probe.c: Moved to ...
11464         * util/grub-probe.c: ... here.
11466 2007-05-15  Robert Millan  <rmh@aybabtu.com>
11468         * util/update-grub.in: Remove duplicated line in grub.cfg header
11469         message.
11471 2007-05-13  Robert Millan  <rmh@aybabtu.com>
11473         * util/update-grub.in: Fix a few assumptions about the devices holding
11474         /, /boot and /boot/grub being the same.
11475         * util/grub.d/00_header.in: Likewise.
11476         * util/grub.d/10_hurd.in: Likewise.
11477         * util/grub.d/10_linux.in: Likewise.
11479         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11480         patterns.  Use that to define the `.old' suffix as older than `'.
11482         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11484         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11485         the grub.cfg header message.
11487 2007-05-11  Robert Millan  <rmh@aybabtu.com>
11489         * util/update-grub.in: Create device.map if it doesn't already exist,
11490         before attempting to run grub-probe.
11491         Check for grub-probe and grub-mkdevicemap with the same code
11492         grub-install is using.
11493         Remove test mode.
11495 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11497         * Makefile.in: Add the datarootdir autoconf variable.
11499 2007-05-09  Robert Millan  <rmh@aybabtu.com>
11501         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
11502         fail gracefully if dev->disk->partition == NULL.
11504 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11506         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11507         determine partition map module.
11508         * util/i386/pc/grub-install.in: Use this feature to decide which
11509         partition module to load, instead of hardcoding pc and gpt.
11511 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11513         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11514         source directory differs from build directory.
11516 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11518         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11519         initialisation.
11521 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11523         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11525 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11527         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11528         command-line arguments via ${GRUB_CMDLINE_LINUX}.
11530 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11532         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11533         (grub_probe_SOURCES): Likewise.
11534         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11535         GPT and initialize dos_part and bsd_part accordingly.
11536         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11537         install_bsd_part.
11538         (main): Activate gpt module for use during partition identification,
11539         and deactivate it afterwards.
11540         * util/i386/pc/grub-install.in: Add gpt module to core.img.
11541         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11542         partition identification, and deactivate it afterwards.
11544 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11546         * term/i386/pc/console.c (grub_console_fini): Call
11547         grub_term_set_current() before grub_term_unregister().
11549 2007-05-04  Robert Millan  <rmh@aybabtu.com>
11551         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11552         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11553         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
11554         and update-grub_DATA.
11555         * conf/common.rmk: Build and install update-grub components.
11556         * conf/common.mk: Regenerate.
11557         * util/update-grub.in: New.  Core of update-grub.
11558         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
11559         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
11560         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
11561         * util/grub.d/README: New.  Document grub.d directory layout.
11563 2007-05-01  Robert Millan  <rmh@aybabtu.com>
11565         * util/grub-emu.c: Move initialization functions
11566         grub_util_biosdisk_init() and grub_init_all() before
11567         grub_util_biosdisk_get_grub_dev(), which relies on them.
11569 2007-04-19  Robert Millan  <rmh@aybabtu.com>
11571         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11572         it is used later.
11574 2007-04-18  Jerone Young  <jerone@gmail.com>
11576         * kernel/elf.c: Add missing parenthesis for conditional statement
11577         stanza.
11579 2007-04-10  Jerone Young  <jerone@gmail.com>
11581         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11582         continue on and look for device node with real device name.
11584 2007-04-10  Jerone Young  <jerone@gmail.com>
11586         * configure.ac: Add argument for autoconf to use transformation
11587         ability.
11588         * Makefile.in: Add autoconf package transformation code.
11589         * util/i386/pc/grub-install.in: Likewise.
11590         * util/powerpc/ieee1275/grub-install.in: Likewise.
11592 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
11594         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11595         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11596         (EXT2_REVISION): Likewise.
11597         (EXT2_INODE_SIZE): Likewise.
11598         (struct grub_ext2_block_group): Added a missing member
11599         "used_dirs".
11600         (grub_ext2_read_inode): Divide by the inode size in a superblock
11601         instead of 128 to obtain INODES_PER_BLOCK.
11602         Use the macro EXT2_INODE_SIZE instead of directly using
11603         SBLOCK->INODE_SIZE.
11605 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
11607         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11608         superblock instead of the structure size to compute an
11609         offset. This fixes the problem that GRUB could not read a
11610         filesystem when inode size is different from 128-byte.
11612 2007-03-05  Marco Gerards  <marco@gnu.org>
11614         * normal/main.c (read_config_file): When "menu" is not set, create
11615         an initial context.
11617 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11619         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11620         (HEAP_LIMIT): New macro.
11621         (grub_claim_heap): Claim memory up to `heaplimit'.
11623 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11625         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11626         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11627         (_start): Likewise.
11628         (grub_arch_modules_addr): Return address after `_end'.
11629         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11630         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11631         (add_segments): Calculate `_end' from phdr size and location.
11632         (ALIGN_UP): Moved to ...
11633         * include/grub/misc.h: here.
11634         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11635         New macro.
11636         (GRUB_IEEE1275_MODULE_BASE): Removed.
11638 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11640         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11641         loop boundary.
11643 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11645         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11646         All users updated.
11647         (grub_elf64_load_hook_t): Likewise.
11648         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11649         debug output.
11651 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11653         * kern/mm.c: Update copyright.
11654         (grub_mm_debug): Correct syntax error.
11655         (grub_mm_dump_free): New function.
11656         (grub_debug_free): Call `grub_free'.
11657         * include/grub/mm.h: Update copyright.
11658         (grub_mm_dump_free): Add declaration.
11660 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11662         * include/grub/ieee1275/ieee1275.h: Update copyright.
11663         * kern/powerpc/ieee1275/init.c: Likewise.
11664         * kern/powerpc/ieee1275/openfw.c: Likewise.
11666         * loader/powerpc/ieee1275/linux.c: Likewise.
11667         * include/grub/elfload.h: Likewise.
11668         * kern/elf.c: Likewise.
11669         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
11670         callers.
11671         (grub_elf64_load): Likewise.
11672         (grub_elf32_load_segment): Move to a nested function.
11673         (grub_elf64_load_segment): Likewise.
11675 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11677         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11678         prototype.
11679         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11680         (grub_heap_len): Likewise.
11681         (HEAP_SIZE): New macro.
11682         (grub_claim_heap): New function.
11683         (grub_machine_init): Don't claim heap directly.  Call
11684         `grub_claim_heap'.
11685         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11686         (grub_available_iterate): New function.
11688 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
11690         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11691         * configure.ac: Use it for testing the HOST and TARGET compilers.
11693 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
11695         * Makefile.in (enable_grub_emu): New variable.
11696         * configure.ac (--enable-grub-emu): New option.
11697         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11698         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11699         * conf/i386-pc.rmk: Likewise.
11700         * conf/powerpc-ieee1275.rmk: Likewise.
11701         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11703 2006-12-12  Marco Gerards  <marco@gnu.org>
11705         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11707         * kern/env.c (grub_env_unset): Don't free the member `value' when
11708         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11709         pointer.
11711         * normal/main.c (current_menu): Removed.
11712         (free_menu): Unset the `menu' environment variable.
11713         (grub_normal_menu_addentry): Make use of the environment variable
11714         `menu', instead of using the global `current_menu'.  Allocate
11715         memory for the sourcecode of this entry.
11716         (read_config_file): New argument `nested', changed all callers.
11717         Only in the case of a new context, initialize a new menu.  Set the
11718         `menu' environment variable.
11719         (grub_normal_execute): Don't set and unset the environment
11720         variable `menu' here anymore.  Only free the menu when leaving the
11721         context.
11723         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11724         leak.
11726 2006-12-11  Marco Gerards  <marco@gnu.org>
11728         * normal/menu_entry.c (run): Fix off by one bug so the last line
11729         is executed.  Move the loader check to outside the loop.
11731 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
11733         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11735 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
11737         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11738         the number of sectors.  Reported by Andrey Shuvikov
11739         <mr_hyro@yahoo.com>.
11741 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
11743         * kern/disk.c (grub_disk_read): When there is a read error, always
11744         try to read only the necessary data.
11746         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11747         disk/raid.c.
11748         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11749         prototype.
11750         [GRUB_UTIL] (grub_raid_fini): Likewise.
11751         [GRUB_UTIL] (grub_lvm_init): Likewise.
11752         [GRUB_UTIL] (grub_lvm_fini): Likewise.
11753         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11754         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11755         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11756         and grub_raid_fini().
11758 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11760         * include/grub/types.h (__unused): Rename to UNUSED.
11761         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11762         (grub_elf64_size): Likewise.
11764 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11766         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11767         grub_error_push and grub_error_pop in the error-handling path.
11768         (grub_elf32_load_segment): Only call grub_file_read with non-zero
11769         length.
11771 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11773         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11774         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11775         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11776         (kernel_elf_SOURCES): Likewise.
11777         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11778         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11779         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11780         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11781         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11782         (elf_mod_SOURCES): New variable.
11783         (elf_mod_CFLAGS): Likewise.
11784         (elf_mod_LDFLAGS): Likewise.
11785         * include/grub/types.h (__unused): New macro.
11786         * include/grub/elfload.h: New file.
11787         * kern/elf.c: Likewise.
11788         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11789         (ELF32_LOADMASK): New macro.
11790         (ELF64_LOADMASK): Likewise.
11791         (vmlinux): Removed.
11792         (grub_linux_load32): New function.
11793         (grub_linux_load64): Likewise.
11794         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11795         Use grub_elf_t instead of grub_file_t.
11797 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
11799         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11800         `catch_result' to struct set_color_args.
11802 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
11804         * normal/menu.c: Include grub/script.h.
11805         * normal/menu_entry.c: Likewise.
11806         * include/grub/normal.h: Do not include grub/script.h.
11808 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11810         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11812 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11814         * kern/disk.c (grub_disk_open): Print debug messages when opening a
11815         disk.
11816         (grub_disk_close): Print debug messages when closing a disk.
11817         (grub_disk_read): Print debug messages when disk read fails.
11818         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11819         filesystem type.
11820         * kern/partition.c: Include misc.h.
11821         (grub_partition_iterate): Print debug messages when detecting
11822         partition type.
11824 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11826         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11827         is negative.
11828         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11830 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
11832         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11833         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11835 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
11837         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11838         instead of sizeof(lv). Patch by Michael Guntsche.
11840 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11842         * disk/lvm.c: Rename VGS to VG_LIST.
11843         (grub_lvm_iterate): Change VGS->LV to VG-LV.
11844         (grub_lvm_open): Likewise.
11845         Thanks to Michael Guntsche for finding this bug.
11847 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11849         * configure.ac (AC_INIT): Bumped to 1.95.
11851 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11853         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11854         with "/dev/.static/dev/md".
11856 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11858         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11859         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11860         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11861         DRIVE_NAME are always freed.
11863         * util/i386/pc/biosdisk.c (make_device_name): Add one into
11864         DOS_PART, as a DOS partition is counted from one instead of zero
11865         now. Reported by Robert Millan.
11867 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11869         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11870         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11871         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11872         string returned by grub_guess_root_device.
11873         * util/i386/pc/grub-setup.c: Likewise.
11874         * util/i386/pc/grub-probefs.c: Likewise.
11876         * util/i386/pc/grub-probefs.c: Rename to ...
11877         * util/i386/pc/grub-probe.c: ... this.
11878         * DISTLIST: Remove grub-probefs, add grub-probe.
11879         * conf/i386-efi.rmk: Likewise.
11880         * conf/i386-pc.rmk: Likewise.
11881         * util/i386/pc/grub-install.in: Likewise.
11883         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11884         choose which information we want to print.
11886 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11888         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11889         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11890         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11891         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11892         video/readers/tga.c and video/i386/pc/vbeutil.c.
11894 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
11896         Added support for RAID and LVM.
11898         * disk/lvm.c: New file.
11899         * disk/raid.c: Likewise.
11900         * include/grub/lvm.h: Likewise.
11901         * include/grub/raid.h: Likewise.
11902         * include/grub/util/lvm.h: Likewise.
11903         * include/grub/util/raid.h: Likewise.
11904         * util/lvm.c: Likewise.
11905         * util/raid.c: Likewise.
11907         * include/grub/disk.h (grub_disk_dev_id): Add
11908         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11909         (grub_disk_get_size): New prototype.
11910         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11911         returns a partition.
11912         (grub_disk_get_size): New function.
11914         * kern/i386/pc/init.c (make_install_device): Copy the prefix
11915         verbatim if grub_install_dos_part is -2.
11917         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11918         and LVM devices.
11920         * util/i386/pc/grub-setup.c (setup): New argument
11921         MUST_EMBED. Force embedding of GRUB when the argument is
11922         true. Close FILE before returning.
11923         (main): Add support for RAID and LVM.
11925         * conf/common.rmk: Add RAID and LVM modules.
11926         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11927         util/lvm.c.
11928         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11930         * kern/misc.c (grub_strstr): New function.
11931         * include/grub/misc.h (grub_strstr): New prototype.
11933 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
11935         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11937 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
11939         * kern/misc.c (grub_strtoull): Guess the base only if not
11940         specified.
11942 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11944         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11945         PowerMac support.
11947 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11949         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11951         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11952         Remove `flags' argument.  All callers changed.
11953         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11954         (IEEE1275_IHANDLE_INVALID): New variable.
11955         (IEEE1275_CELL_INVALID): New variable.
11956         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11957         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11958         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11959         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11960         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11961         codes from Open Firmware.  All callers updated.
11962         (grub_ieee1275_next_property): Directly return Open Firmware return
11963         code.
11964         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11965         Standardize error checking from `grub_ieee1275_get_property'.
11966         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11967         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
11969 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11971         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11972         `instance_to_package_args' to `instance_to_path_args'.
11974         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11975         `grub_ieee1275_chosen'.
11977         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11978         `grub_ieee1275_interpret'.
11980 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11982         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11984 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11986         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11987         (__cmpdi): Likewise.
11989         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11990         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
11991         `grub_ssize_t'.
11993         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11995         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11996         to type `grub_ssize_t'.
11997         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11999 2006-09-22  Marco Gerards  <marco@gnu.org>
12001         * normal/script.c (grub_script_create_cmdmenu): Skip leading
12002         newlines.
12004 2006-09-22  Marco Gerards  <marco@gnu.org>
12006         * commands/echo.c: New file.
12008         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
12010         * conf/common.rmk (echo_mod_SOURCES): New variable.
12011         (echo_mod_CFLAGS): Likewise.
12012         (echo_mod_LDFLAGS): Likewise.
12014 2006-09-22  Marco Gerards  <marco@gnu.org>
12016         * normal/main.c (get_line): Malloc memory instead of using
12017         preallocated memory.  Removed the arguments `cmdline' and
12018         `max_len'.  Updated all callers.
12020 2006-09-22  Marco Gerards  <marco@gnu.org>
12022         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
12023         (normal_mod_DEPENDENCIES): Likewise.
12025         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
12026         (normal_mod_DEPENDENCIES): Likewise.
12028         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
12030 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
12032         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
12033         programs.
12034         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
12035         (normal_mod_DEPENDENCIES): Likewise.
12036         * conf/i386-pc.mk: Regenerate.
12037         * conf/i386-efi.mk: Likewise
12038         * conf/common.mk: Likewise.
12039         * conf/powerpc-ieee1275.mk: Likewise.
12040         * conf/sparc64-ieee1275.mk: Likewise.
12042 2006-09-22  Robert Millan  <rmh@aybabtu.com>
12044         Sync with i386 version.
12045         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
12046         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
12048 2006-09-21  Robert Millan  <rmh@aybabtu.com>
12050         Import from GRUB Legacy (lib/device.c):
12051         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
12052         (init_device_map) [__linux__]: Add support for I2O devices.
12054 2006-09-14  Marco Gerards  <marco@gnu.org>
12056         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
12057         `-melf_i386'.
12059 2006-09-14  Robert Millan  <rmh@aybabtu.com>
12061         * util/i386/pc/grub-install.in: Skip menu.lst when removing
12062         /boot/grub/*.lst.
12064         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
12066         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
12067         before adding it to device.map.
12069 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
12071         * genmk.rb: Let GCC generate dependencies the first time it
12072         compiles a file; using the -MD option.
12073         * conf/common.mk: Regenerate.
12074         * conf/i386-pc.mk: Likewise.
12075         * conf/i386-efi.mk: Likewise.
12076         * conf/powerpc-ieee1275.mk: Likewise.
12077         * conf/sparc64-ieee1275.mk: Likewise.
12079 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
12081         Move the prototypes of grub_setjmp and grub_longjmp to
12082         cpu/setjmp.h, so that each architecture may specify different
12083         attributes.
12085         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
12086         (grub_longjmp): Likewise.
12087         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
12088         (grub_longjmp): Likewise.
12089         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
12090         (grub_longjmp): Likewise.
12092         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
12093         [!GRUB_UTIL] (grub_longjmp): Removed.
12095 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
12097         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
12098         "color!" method does not return any value.
12100 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12102         * include/grub/bitmap.h: New file.
12104         * include/grub/i386/pc/vbeutil.h: Likewise.
12106         * video/bitmap.c: Likewise.
12108         * video/readers/tga.c: Likewise.
12110         * video/i386/pc/vbeutil.c: Likewise.
12112         * commands/videotest.c: Code cleanup and updated to reflect to new
12113         video API.
12115         * term/gfxterm.c: Likewise.
12117         * video/video.c: Likewise.
12119         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
12120         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
12121         (bitmap_mod_SOURCES): New entry.
12122         (bitmap_mod_CFLAGS): Likewise.
12123         (bitmap_mod_LDFLAGS): Likewise.
12124         (tga_mod_SOURCES): Likewise.
12125         (tga_mod_CFLAGS): Likewise.
12126         (tga_mod_LDFLAGS): Likewise.
12128         * include/grub/video.h (grub_video_blit_operators): New enum type.
12129         (grub_video_render_target): Changed as forward declaration and moved
12130         actual definition to be video driver specific.
12131         (grub_video_adapter.blit_bitmap): Added blitting operator.
12132         (grub_video_adapter.blit_render_target): Likewise.
12133         (grub_video_blit_bitmap): Likewise.
12134         (grub_video_blit_render_target): Likewise.
12136         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
12137         driver specific render target definition.
12138         (grub_video_vbe_map_rgba): Added driver internal helper.
12139         (grub_video_vbe_unmap_color): Updated to use
12140         grub_video_i386_vbeblit_info.
12141         (grub_video_vbe_get_video_ptr): Likewise.
12143         * include/grub/i386/pc/vbeblit.h
12144         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
12145         grub_video_i386_vbeblit_info.
12146         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
12147         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
12148         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
12149         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
12150         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
12151         (grub_video_i386_vbeblit_index_index): Likewise.
12152         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
12153         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
12154         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
12155         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
12156         operator.
12157         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
12158         operator.
12160         * video/i386/pc/vbeblit.c: Updated to reflect changes on
12161         include/grub/i386/pc/vbeblit.h.
12163         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
12164         Updated to use grub_video_i386_vbeblit_info.
12165         (grub_video_i386_vbefill_R8G8B8): Likewise.
12166         (grub_video_i386_vbefill_index): Likewise.
12167         (grub_video_i386_vbefill): Added generic filler.
12169         * video/i386/pc/vbefill.c: Updated to reflect changes on
12170         include/grub/i386/pc/vbefill.h.
12172         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
12173         grub_video_i386_vbeblit_info.
12174         (grub_video_vbe_unmap_color): Likewise.
12175         (grub_video_vbe_blit_glyph): Likewise.
12176         (grub_video_vbe_scroll): Likewise.
12177         (grub_video_vbe_draw_pixel): Removed function.
12178         (grub_video_vbe_get_pixel): Likewise.
12179         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
12180         updated code to use it.
12181         (common_blitter): Added common blitter for render target and bitmap.
12182         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12183         (grub_video_vbe_blit_render_target): Likewise.
12185 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
12187         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12188         is in text mode if there is no console control protocol instance
12189         available.
12191 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12193         * include/grub/video.h: Code cleanup.
12195         * include/grub/i386/pc/vbe.h: Likewise.
12197         * video/i386/pc/vbe.c: Likewise.
12199         * video/i386/pc/vbeblit.c: Likewise.
12201         * video/i386/pc/vbefill.c: Likewise.
12203         * video/video.c: Likewise.  Also added more comments.
12205 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12207         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12208         (struct grub_biosdisk_dap): Likewise.
12210         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
12211         linkage settings for all functions.
12213 2006-07-12  Marco Gerards  <marco@gnu.org>
12215         * configure.ac (--enable-mm-debug): Fix typo.
12217         * genkernsyms.sh.in: Use proper quoting for `CC'.
12219 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
12221         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12222         (normal_mod_ASFLAGS): Remove "-m32".
12224 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
12226         * util/misc.c: Include config.h.
12227         [!HAVE_MEMALIGN]: Do not include malloc.h.
12228         (grub_memalign): Use posix_memalign, if present. Then, use
12229         memalign, if present. Otherwise, emit an error.
12231         * util/grub-emu.c: Do not include malloc.h.
12233         * include/grub/util/misc.h: Include unistd.h. This is required for
12234         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12235         D. Eades III <hde@foobar-qux.org>.
12237         * configure.ac (AC_GNU_SOURCE): Added.
12238         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12239         type.
12241 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
12243         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12244         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12246 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
12248         * include/grub/types.h (grub_host_addr_t): Rename to
12249         grub_target_addr_t.
12250         (grub_host_off_t): Rename to grub_target_off_t.
12251         (grub_host_size_t): Rename to grub_target_size_t.
12252         (grub_host_ssize_t): Rename to grub_target_ssize_t.
12253         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12255         * include/grub/kernel.h (struct grub_module_header): Change type
12256         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12257         (grub_module_info): Likewise.
12259 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
12261         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12262         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12263         Velazquez <jesus.velazquez@gmail.com>.
12265 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
12267         Count partitions from 1 instead of 0 in the string representation
12268         of partitions. Still use 0-based internally.
12270         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12271         (sun_partition_map_iterate): Use grub_partition_t instead of
12272         struct grub_partition *. Cast DESC->START_CYLINDER to
12273         grub_uint64_t after converting the endian.
12274         (sun_partition_map_probe): Subtract 1 for PARTNUM.
12275         (sun_partition_map_get_name): Add 1 to P->INDEX.
12277         * partmap/pc.c (grub_partition_parse): Subtract 1 for
12278         PCDATA->DOS_PART.
12279         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12281         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12282         zero instead of one.
12283         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12284         (gpt_partition_map_get_name): Add 1 into P->INDEX.
12286         * partmap/apple.c (apple_partition_map_iterate): Change the type
12287         of POS to unsigned.
12288         (apple_partition_map_probe): Subtract 1 for PARTNUM.
12289         (apple_partition_map_get_name): Add 1 into P->INDEX.
12291         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12292         of POS to unsigned.
12293         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12294         calculate the offset of a partition.
12295         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12296         (amiga_partition_map_get_name): Add 1 into P->INDEX.
12298         * partmap/acorn.c (acorn_partition_map_find): Change the type of
12299         SECTOR to grub_disk_addr_t.
12300         (acorn_partition_map_iterate): Likewise.
12301         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12302         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12303         top.
12304         (acorn_partition_map_get_name): Add 1 into P->INDEX.
12306         * kern/i386/pc/init.c (make_install_device): Add 1 into
12307         GRUB_INSTALL_DOS_PART.
12309         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12310         conditional.
12312 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12314         Clean up the code to support 64-bit addressing in disks and
12315         files. This change is not enough for filesystems yet.
12317         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12318         type of "start" to grub_uint64_t.
12319         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12320         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12321         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12322         convert addresses.
12324         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12325         to grub_disk_addr_t.
12327         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12328         string.
12330         * partmap/pc.c (pc_partition_map_iterate): Likewise.
12332         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12333         to char *.
12335         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12337         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12339         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12341         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12342         to grub_off_t, to detect an error from grub_file_seek.
12343         (grub_multiboot_load_elf32): Likewise.
12345         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12346         maximum unsigned long value when an overflow is detected.
12347         (grub_strtoull): New function.
12348         (grub_divmod64): Likewise.
12349         (grub_lltoa): use grub_divmod64.
12351         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12352         grub_disk_addr_t.
12353         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12354         the pointer to next character. Use grub_strtoull instead of
12355         grub_strtoul.
12356         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12357         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12358         respectively.
12360         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
12361         return value is signed.
12362         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12363         test if OFFSET is less than zero, as OFFSET is unsigned now.
12365         * kern/disk.c (struct grub_disk_cache): Change the type of
12366         "sector" to grub_disk_addr_t.
12367         (grub_disk_cache_get_index): Change the type of SECTOR to
12368         grub_disk_addr_t. Calculate the hash with SECTOR casted to
12369         unsigned after shifting.
12370         (grub_disk_cache_invalidate): Change the type of SECTOR to
12371         grub_disk_addr_t.
12372         (grub_disk_cache_unlock): Likewise.
12373         (grub_disk_cache_store): Likewise.
12374         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12375         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12376         grub_disk_addr_t and grub_uint64_t, respectively.
12377         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12378         body, as the value of OFFSET is tweaked by
12379         grub_disk_check_range. Change the types of START_SECTOR, LEN and
12380         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12381         respectively.
12382         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12383         body, as the value of OFFSET is tweaked by
12384         grub_disk_check_range. Change the types of LEN and N to
12385         grub_size_t.
12387         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12388         and "saved_offset" to grub_off_t.
12389         (test_header): Cast BUF to char *.
12390         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12391         to char *.
12392         (grub_gzio_read): Change the types of OFFSET and SIZE to
12393         grub_off_t and grub_size_t, respectively.
12395         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12396         Removed.
12397         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12398         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12399         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12400         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12401         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12403         * include/grub/types.h (grub_off_t): Unconditionally set to
12404         grub_uint64_t.
12405         (grub_disk_addr_t): Changed to grub_uint64_t.
12407         * include/grub/partition.h (struct grub_partition): Change the
12408         types of "start", "len" and "offset" to grub_disk_addr_t,
12409         grub_uint64_t and grub_disk_addr_t, respectively.
12410         (grub_partition_get_start): Return grub_disk_addr_t.
12411         (grub_partition_get_len): Return grub_uint64_t.
12413         * include/grub/misc.h (grub_strtoull): New prototype.
12414         (grub_divmod64): Likewise.
12416         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12417         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12418         grub_off_t, respectively.
12419         All callers and references changed.
12421         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12422         grub_size_t in "read".
12423         All callers and references changed.
12425         * include/grub/file.h (struct grub_file): Change the types of
12426         "offset" and "size" to grub_off_t and grub_off_t,
12427         respectively. Change the type of SECTOR to grub_disk_addr_t in
12428         "read_hook".
12429         (grub_file_read): Change the type of LEN to grub_size_t.
12430         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12431         grub_off_t.
12432         (grub_file_size): Return grub_off_t.
12433         (grub_file_tell): Likewise.
12434         All callers and references changed.
12436         * include/grub/disk.h (struct grub_disk_dev): Change the types of
12437         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12438         "write".
12439         (struct grub_disk): Change the type of "total_sectors" to
12440         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12441         "read_hook".
12442         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12443         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12444         (grub_disk_write): Likewise.
12445         All callers and references changed.
12447         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12448         char * for grub_strncmp to silence gcc.
12449         (grub_iso9660_mount): Likewise.
12450         (grub_iso9660_mount): Likewise.
12451         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12452         return statement.
12453         (grub_iso9660_iterate_dir): Likewise.
12454         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12456         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12457         LEN to grub_disk_addr_t and grub_size_t, respectively.
12459         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12461         * fs/jfs.c (grub_jfs_read_file): Likewise.
12463         * fs/minix.c (grub_jfs_read_file): Likewise.
12465         * fs/sfs.c (grub_jfs_read_file): Likewise.
12467         * fs/ufs.c (grub_jfs_read_file): Likewise.
12469         * fs/xfs.c (grub_jfs_read_file): Likewise.
12471         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12472         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12473         respectively.
12475         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12476         BLKNR to -1 instead of returning GRUB_ERRNO.
12477         (grub_ext2_read_file): Change the types of SECTOR and
12478         LEN to grub_disk_addr_t and grub_size_t, respectively.
12480         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12481         LEN to grub_disk_addr_t and grub_size_t, respectively.
12483         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12484         grub_file_read.
12486         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12487         string. Do not cast SECTOR explicitly.
12489         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12490         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12491         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12492         grub_disk_addr_t and grub_size_t, respectively. If the sector is
12493         over 2TB and LBA mode is not supported, raise an error.
12494         (get_safe_sectors): New function.
12495         (grub_biosdisk_read): Use get_safe_sectors.
12496         (grub_biosdisk_write): Likewise.
12498         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12499         (grub_efidisk_write): Likewise.
12501         * disk/loopback.c (delete_loopback): Cosmetic changes.
12502         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12503         correctly.
12504         (grub_loopback_open): Likewise.
12505         (grub_loopback_read): Likewise. Also, change the type of POS to
12506         grub_off_t, and fix the usage of grub_memset.
12508         * commands/i386/pc/play.c: Include grub/machine/time.h.
12510         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12511         print FILE->SIZE.
12513         * commands/configfile.c: Include grub/env.h.
12515         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12516         GRUB_ERRNO directly instead. Change the type of POS to
12517         grub_off_t. Follow the coding standard.
12519         * commands/blocklist.c: Include grub/partition.h.
12520         (grub_cmd_blocklist): Return an error if the underlying device is
12521         not a disk. Take the starting sector of a partition into account,
12522         if a partition is used.
12524         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12525         a length field.
12526         (lba_mode): Support 64-bit addresses.
12527         (chs_mode): Likewise.
12528         (copy_buffer): Adapted to the new offsets of a length field and a
12529         segment field.
12530         (blocklist_default_start): Allocate 64-bit space.
12532         * boot/i386/pc/boot.S (force_lba): Removed.
12533         (boot_drive): Moved to under KERNEL_SECTOR.
12534         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12535         space.
12536         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12537         is useless.
12538         (lba_mode): Refactored to support a 64-bit address. More size
12539         optimization.
12540         (setup_sectors): Likewise.
12542 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12544         * DISTLIST: Added include/grub/i386/linux.h. Removed
12545         include/grub/i386/pc/linux.h
12547         * configure.ac (AC_INIT): Bumped to 1.94.
12549         * config.guess: Updated from gnulib.
12550         * config.sub: Likewise.
12551         * install-sh: Likewise.
12552         * mkinstalldirs: Likewise.
12554 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12556         * conf/common.rmk (grub_modules_init.lst): Depended on
12557         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12558         MODSRCFILES.
12560         * genmk.rb (PModule::rule): Reverted the previous change.
12562 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12564         * conf/common.rmk (grub_modules_init.lst): Depends on
12565         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12566         that the target does not exist before producing.
12567         (grub_modules_init.h): Remove the target before generating.
12568         (grub_emu_init.c): Likewise.
12570         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12572 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
12574         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12575         for the target-specific tests. Make sure that we also have the
12576         up-to-date target variables for those tests.
12578 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12580         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12581         (PModule::rule): Likewise.
12583 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12585         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12586         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12587         target-specific flags should be prefixed.
12588         (PModule::rule): Likewise.
12590 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
12592         * configure.ac (CMP): Check if cmp is available explicitly.
12594 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
12596         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12597         (target_cpu): New variable.
12598         (pkglibdir): Use target_cpu instead of host_cpu.
12600         * util/i386/pc/grub-install.in (host_cpu): Removed.
12601         (target_cpu): New variable.
12602         (pkglibdir): Use target_cpu instead of host_cpu.
12604         * util/genmoddep.c: Removed.
12606         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12607         instead of GRUB_HOST_SIZEOF_VOID_P.
12608         * kern/dl.c: Likewise.
12610         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12611         ...
12612         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12613         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12614         (GRUB_TARGET_SIZEOF_LONG): ... this.
12615         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12616         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12617         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12618         to ...
12619         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12620         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12621         (GRUB_TARGET_SIZEOF_LONG): ... this.
12622         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12623         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12624         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12625         to ...
12626         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12627         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12628         (GRUB_TARGET_SIZEOF_LONG): ... this.
12629         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12630         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12632         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12633         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12634         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12635         instead of GRUB_HOST_SIZEOF_LONG.
12636         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12637         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12638         GRUB_CPU_WORDS_BIGENDIAN.
12639         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12640         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12641         grub_host_ssize_t.
12643         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12644         (genmoddep_SOURCES): Likewise.
12645         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12646         (genmoddep_SOURCES): Likewise.
12647         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12648         (genmoddep_SOURCES): Likewise.
12649         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12650         Likewise.
12651         (genmoddep_SOURCES): Likewise.
12653         * genmoddep.awk: New file.
12655         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12656         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12657         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12658         (PModule::rule): Likewise.
12659         (Program::rule): Likewise.
12660         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12661         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12662         respectively.
12664         * configure.ac: Rewritten intensively to use host and target
12665         instead of build and host, respectively.
12667         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12668         (host_cpu): Removed.
12669         (target_cpu): New variable.
12670         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12671         (BUILD_CC): Removed.
12672         (BUILD_CFLAGS): Likewise.
12673         (BUILD_CPPFLAGS): Likewise.
12674         (TARGET_CC): New variable.
12675         (TARGET_CFLAGS): Likewise.
12676         (TARGET_CPPFLAGS): Likewise.
12677         (TARGET_LDFLAGS): Likewise.
12678         (AWK): Likewise.
12679         (include): Use target_cpu instead of host_cpu.
12680         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12682         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12684 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
12686         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12687         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
12688         field 'false' to 'exec_on_false'.
12689         (grub_script_create_cmdif): Renamed argument names to reflect above
12690         changes.
12692         * normal/execute.c (grub_script_execute_cmdif): Likewise.
12694         * normal/script.c (grub_script_create_cmdif): Likewise.
12696 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
12698         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12699         top.
12700         (grub_hfsplus_btree_recptr): Likewise.
12701         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12702         FILEBLOCK both to pass a block number and store next block
12703         number.
12704         (grub_hfsplus_read_block): Rewritten heavily to support an extent
12705         overflow file correctly. Specify errors appropriately, because
12706         fshelp expects that GRUB_ERRNO is set when fails. Reuse
12707         grub_hfsplus_btree_recptr to get the pointer to a found key.
12708         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12709         is found.
12711         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12712         linux.mod.
12713         (_linux_mod_SOURCES): New variable.
12714         (_linux_mod_CFLAGS): Likewise.
12715         (_linux_mod_LDFLAGS): Likewise.
12716         (linux_mod_SOURCES): Likewise.
12717         (linux_mod_CFLAGS): Likewise.
12718         (linux_mod_LDFLAGS): Likewise.
12720         * DISTLIST: Added loader/i386/efi/linux.c,
12721         loader/i386/efi/linux_normal.c and
12722         include/grub/i386/efi/loader.h.
12724         * loader/i386/efi/linux.c: New file.
12725         * loader/i386/efi/linux_normal.c: Likewise.
12726         * include/grub/i386/efi/loader.h: Likewise.
12728 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
12730         * commands/blocklist.c: New file.
12732         * DISTLIST: Added commands/blocklist.c.
12734         * term/efi/console.c (grub_console_highlight_color): Use a lighter
12735         color for the background, and a darker color for the foreground.
12736         (grub_console_checkkey): Return READ_KEY.
12737         (grub_console_cls): Set the background to
12738         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12740         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12742         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12743         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12745         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12746         prototype.
12748         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12749         BG. The spec is wrong again.
12751         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12752         prototype.
12753         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12755         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12756         commands/blocklist.c.
12757         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12759         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12760         (blocklist_mod_SOURCES): New variable.
12761         (blocklist_mod_CFLAGS): Likewise.
12762         (blocklist_mod_LDFLAGS): Likewise.
12764 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
12766         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12767         duplication.
12768         (lba_mode): Use %eax more intensively to reduce the code size.
12770 2006-05-20  Marco Gerards  <marco@gnu.org>
12772         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12774         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
12775         for `menuentry'.
12776         (script): Accept leading newlines.
12777         (newlines): New rule to describe 0 or more newlines.
12778         (commands): Accept `command' with trailing newline.  Fixed the
12779         order in which arguments were passed to `grub_script_add_cmd'.
12780         Accept commands separated by newlines.
12781         (function): Changed to accept newlines.
12782         (menuentry) Rewritten.
12784         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12785         front of the list, instead of to the end.
12787 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
12789         * util/i386/pc/grub-install.in (bindir): New variable.
12790         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12791         Shaver <lbgwjl@gmail.com>.
12793 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
12795         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12796         grub/machine/linux.h
12797         * loader/i386/pc/linux.c: Likewise.
12799         * include/grub/i386/pc/linux.h: Moved to ...
12800         * include/grub/i386/linux.h: ... here.
12802         * include/grub/i386/linux.h (struct linux_kernel_params): New
12803         struct.
12805 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
12807         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12808         checking.
12809         (grub_video_vbe_blit_glyph): Likewise.
12810         (grub_video_vbe_blit_bitmap): Likewise.
12811         (grub_video_vbe_blit_render_target): Likewise.
12813 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
12815         * configure.ac (--with-platform): Properly quote the square
12816         brackets.
12818 2006-05-08  Marco Gerards  <marco@gnu.org>
12820         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12821         this...
12822         (kernel_elf_HEADERS): ...to this.  Updated all users.
12823         (grubof_symlist.c): Renamed from this...
12824         (kernel_elf_symlist.c): ...to this.  Updated all users.
12825         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12826         (grubof_SOURCES): Renamed from this...
12827         (kernel_elf_SOURCES): ...to this.
12828         (grubof_HEADERS): Renamed from this...
12829         (kernel_elf_HEADERS): ...to this.
12830         (grubof_CFLAGS): Renamed from this...
12831         (kernel_elf_CFLAGS): ...to this.
12832         (grubof_ASFLAGS): Renamed from this...
12833         (kernel_elf_ASFLAGS): ...to this.
12834         (grubof_LDFLAGS): Renamed from this...
12835         (kernel_elf_LDFLAGS): ...to this.
12837         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12838         this...
12839         (kernel_elf_HEADERS): ...to this.  Updated all users.
12840         (grubof_symlist.c): Renamed from this...
12841         (kernel_elf_symlist.c): ...to this.  Updated all users.
12842         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12843         (grubof_SOURCES): Renamed from this...
12844         (kernel_elf_SOURCES): ...to this.
12845         (grubof_HEADERS): Renamed from this...
12846         (kernel_elf_HEADERS): ...to this.
12847         (grubof_CFLAGS): Renamed from this...
12848         (kernel_elf_CFLAGS): ...to this.
12849         (grubof_ASFLAGS): Renamed from this...
12850         (kernel_elf_ASFLAGS): ...to this.
12851         (grubof_LDFLAGS): Renamed from this...
12852         (kernel_elf_LDFLAGS): ...to this.
12854         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12855         `kernel.elf' instead of `grubof'.
12857 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
12859         Add --with-platform to configure. Use pkglibdir instead of
12860         pkgdatadir. This is reported by Roger Leigh.
12862         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12863         (host_vendor): Likewise.
12864         (host_os): Likewise.
12865         (pkgdatadir): Likewise.
12866         (platform): New variable.
12867         (pkglibdir): Likewise.
12868         Use PKGLIBDIR instead of PKGDATADIR.
12870         * util/i386/pc/grub-install.in (datadir): Removed.
12871         (host_vendor): Likewise.
12872         (host_os): Likewise.
12873         (pkgdatadir): Likewise.
12874         (platform): New variable.
12875         (pkglibdir): Likewise.
12876         Use PKGLIBDIR instead of PKGDATADIR.
12878         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12879         instead of GRUB_DATADIR.
12880         (main): Likewise.
12881         * util/i386/pc/grub-mkimage.c (usage): Likewise.
12882         (main): Likewise.
12883         * util/i386/efi/grub-mkimage.c (usage): Likewise.
12884         (main): Likewise.
12886         * configure.ac (--with-platform): New option.
12887         Use PLATFORM instead of HOST_VENDOR to specify a platform.
12889         * Makefile.in: Include a makefile based on PLATFORM instead of
12890         HOST_VENDOR.
12891         (pkgdatadir): Not appended by the machine type.
12892         (pkglibdir): Appended by the machine type.
12893         (host_vendor): Removed.
12894         (platform): New variable.
12895         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12896         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12897         (uninstall): Likewise.
12899 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
12901         Use the environment context in the menu. Remove the commands
12902         "default" and "timeout", and use variables instead.
12904         * normal/menu.c: Include grub/env.h.
12905         (print_entry): Cast TITLE to silence gcc.
12906         (get_timeout): New function.
12907         (set_timeout): Likewise.
12908         (get_entry_number): Likewise.
12909         (run_menu): Use a default entry, a fallback entry and a timeout
12910         in the environment variables "default", "fallback" and
12911         "timeout". Also, tweak the default entry if it is not within the
12912         current menu entries.
12913         (grub_menu_run): Use a fallback entry in the environment variable
12914         "fallback".
12916         * normal/main.c (read_config_file): Do not initialize
12917         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12918         NEWMENU->TIMEOUT.
12919         (grub_normal_execute): Use a data slot to store the menu.
12921         * include/grub/normal.h (struct grub_menu): Removed default_entry,
12922         fallback_entry and timeout.
12923         (struct grub_menu_list): Removed.
12924         (grub_menu_list_t): Likewise.
12925         (struct grub_context): Likewise.
12926         (grub_context_t): Likewise.
12927         (grub_context_get): Likewise.
12928         (grub_context_get_current_menu): Likewise.
12929         (grub_context_push_menu): Likewise.
12930         (grub_context_pop_menu): Likewise.
12931         (grub_default_init): Likewise.
12932         (grub_default_fini): Likewise.
12933         (grub_timeout_init): Likewise.
12934         (grub_timeout_fini): Likewise.
12936         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12937         and timeout.mod.
12938         (normal_mod_SOURCES): Removed normal/context.c.
12940         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12941         commands/default.c, commands/timeout.c and normal/context.c.
12942         (normal_mod_SOURCES): Removed normal/context.c.
12944         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12945         commands/timeout.c and normal/context.c.
12946         (normal_mod_SOURCES): Removed normal/context.c.
12948         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12949         commands/default.c, commands/timeout.c and normal/context.c.
12950         (normal_mod_SOURCES): Removed normal/context.c.
12952         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12953         timeout.mod.
12954         (default_mod_SOURCES): Removed.
12955         (default_mod_CFLAGS): Likewise.
12956         (default_mod_LDFLAGS): Likewise.
12957         (timeout_mod_SOURCES): Removed.
12958         (timeout_mod_CFLAGS): Likewise.
12959         (timeout_mod_LDFLAGS): Likewise.
12961         * DISTLIST: Removed commands/default.c, commands/timeout.c and
12962         normal/context.c.
12964         * commands/default.c: Removed.
12965         * commands/timeout.c: Likewise.
12966         * normal/context.c: Likewise.
12968 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
12970         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12972 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
12974         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12975         "next" to "prev" for readability.
12976         (struct grub_env_sorted_var): New struct.
12977         (grub_env_context): Renamed to ...
12978         (initial_context): ... this.
12979         (grub_env_var_context): Renamed to ...
12980         (current_context): ... this.
12981         (grub_env_find): Look only at CURRENT_CONTEXT.
12982         (grub_env_context_open): Rewritten to copy exported variables from
12983         previous context.
12984         (grub_env_context_close): Rewritten according to the new
12985         scheme. Also, add an assertion to prevent the initial context from
12986         removed.
12987         (grub_env_insert): Removed the code for the sorted list.
12988         (grub_env_remove): Likewise.
12989         (grub_env_export): Simply mark the variable with
12990         GRUB_ENV_VAR_GLOBAL.
12991         (grub_env_set): A cosmetic change for naming consistency.
12992         (grub_env_get): Likewise.
12993         (grub_env_unset): Likewise.
12994         (grub_env_iterate): Rewritten to sort variables within this
12995         function.
12996         (grub_register_variable_hook): Fixed for naming consistency. Call
12997         grub_env_find again, only if NAME is not found at the first time.
12998         (mangle_data_slot_name): New function.
12999         (grub_env_set_data_slot): Likewise.
13000         (grub_env_get_data_slot): Likewise.
13001         (grub_env_unset_data_slot): Likewise.
13003         * include/grub/env.h (grub_env_var_type): New enum.
13004         (GRUB_ENV_VAR_LOCAL): New constant.
13005         (GRUB_ENV_VAR_GLOBAL): Likewise.
13006         (GRUB_ENV_VAR_DATA): Likewise.
13007         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
13008         "type".
13009         (grub_env_set): Replace VAR with NAME for consistency.
13010         (grub_register_variable_hook): Likewise.
13011         (grub_env_export): Specify the name of the argument.
13012         (grub_env_set_data_slot): New prototype.
13013         (grub_env_get_data_slot): Likewise.
13014         (grub_env_unset_data_slot): Likewise.
13016 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
13018         Extend the loader so that GRUB can accept a loader which comes
13019         back to GRUB when a loaded image exits. Also, this change adds
13020         support for a chainloader on EFI.
13022         * term/efi/console.c: Include grub/misc.h.
13023         (grub_console_checkkey): Display a scan code on the top for
13024         debugging. This will be removed once the EFI port gets stable.
13025         Correct the scan code mapping.
13027         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
13028         allocate memory from larger regions, in order to reduce the number
13029         of allocated regions. Otherwise, the MacOSX loader panics.
13030         (filter_memory_map): Avoid less than 1MB for compatibility with
13031         other loaders.
13032         (add_memory_regions): Allocate from the tail of a region, if
13033         possible, to avoid allocating a region near to 1MB, for the MacOSX
13034         loader.
13036         * kern/efi/init.c (grub_efi_set_prefix): Specify
13037         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
13039         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
13040         argument IMAGE_HANDLE and specify it to get a loaded image.
13041         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
13042         grub_efi_get_loaded_image.
13043         (grub_efi_get_filename): Divide the length by the size of
13044         grub_efi_char16_t.
13045         (grub_efi_get_device_path): New function.
13046         (grub_efi_print_device_path): Print End Device Path nodes. Divide
13047         the length by the size of grub_efi_char16_t for a file path device
13048         path node.
13050         * kern/loader.c (grub_loader_noreturn): New variable.
13051         (grub_loader_set): Accept a new argument NORETURN. Set
13052         GRUB_LOADER_NORETURN to NORETURN.
13053         All callers changed.
13054         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
13055         grub_machine_fini.
13057         * include/grub/efi/efi.h (grub_efi_get_device_path): New
13058         prototype.
13059         (grub_efi_get_loaded_image): Take an argument to specify an image
13060         handle.
13062         * include/grub/loader.h (grub_loader_set): Added one more argument
13063         NORETURN.
13065         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
13066         instead of grub_efi_open_protocol.
13067         (grub_efidisk_get_device_name): Likewise.
13068         (grub_efidisk_close): Print a newline.
13069         (grub_efidisk_get_device_handle): Fixed to use
13070         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
13071         GRUB_EFI_DEVICE_PATH_TYPE.
13073         * disk/efi/efidisk.c (device_path_guid): Moved to ...
13074         * kern/efi/efi.c (device_path_guid): ... here.
13076         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
13077         chain.mod.
13078         (kernel_mod_HEADERS): Added efi/disk.h.
13079         (_chain_mod_SOURCES): New variable.
13080         (_chain_mod_CFLAGS): Likewise.
13081         (_chain_mod_LDFLAGS): Likewise.
13082         (chain_mod_SOURCES): Likewise.
13083         (chain_mod_CFLAGS): Likewise.
13084         (chain_mod_LDFLAGS): Likewise.
13086         * DISTLIST: Added include/grub/efi/chainloader.h,
13087         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
13089         * include/grub/efi/chainloader.h: New file.
13090         * loader/efi/chainloader.c: Likewise.
13091         * loader/efi/chainloader_normal.c: Likewise.
13093 2006-04-30  Marco Gerards  <marco@gnu.org>
13095         * commands/configfile.c (grub_cmd_source): New function.
13096         (GRUB_MOD_INIT): Register the commands `source' and `.'.
13097         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
13099 2006-04-30  Marco Gerards  <marco@gnu.org>
13101         * normal/execute.c (grub_script_execute_cmd): Change the return
13102         type to `grub_err_t'.  Correctly return the error.
13103         (grub_script_execute_cmdline): In case a command line is not a
13104         command or a function, try to interpret it as an assignment.
13106 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
13108         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
13109         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
13110         skip a node whose name is obviously invalid as UTF-16,
13111         i.e. contains a NUL character. Stop the iteration when the last
13112         directory entry is found. Instead of using the return value of
13113         grub_hfsplus_btree_iterate_node, store the value in RET and use
13114         it, because the iterator can be stopped by the last directory
13115         entry.
13117 2006-04-30  Marco Gerards  <marco@gnu.org>
13119         * include/grub/env.h (grub_env_export): New prototype.  Reported
13120         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
13122 2006-04-30  Marco Gerards  <marco@gnu.org>
13124         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
13125         size of the extents in a catalog file record.
13127 2006-04-29  Marco Gerards  <marco@gnu.org>
13129         * commands/configfile.c (grub_cmd_configfile): Execute the
13130         configfile within its own context.
13132         * include/grub/env.h (grub_env_context_open): New prototype.
13133         (grub_env_context_close): Likewise.
13135         * kern/env.c (grub_env): Removed.
13136         (grub_env_sorted): Likewise.
13137         (grub_env_context): New variable.
13138         (grub_env_var_context): Likewise.
13139         (grub_env_find): Search both the active context and the global
13140         context.
13141         (grub_env_context_open): New function.
13142         (grub_env_context_close): Likewise.
13143         (grub_env_insert): Likewise.
13144         (grub_env_remove): Likewise.
13145         (grub_env_export): Likewise.
13146         (grub_env_set): Changed to use helper functions to avoid code
13147         duplication.
13148         (grub_env_iterate): Rewritten so both the current context and the
13149         global context are being used.
13151         * normal/command.c (export_command): New function.
13152         (grub_command_init): Register the `export' function.
13154 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
13156         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
13157         explicitly to suppress gcc's warnings.
13158         * fs/fat.c (grub_fat_find_dir): Likewise.
13159         (grub_fat_label): Likewise.
13160         * fs/xfs.c (grub_xfs_read_inode): Likewise.
13161         (grub_xfs_mount): Likewise.
13162         (grub_xfs_label): Likewise.
13163         * fs/affs.c (grub_affs_mount): Likewise.
13164         (grub_affs_label): Likewise.
13165         (grub_affs_iterate_dir): Likewise.
13166         * fs/sfs.c (grub_sfs_mount): Likewise.
13167         (grub_sfs_iterate_dir): Likewise.
13168         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
13169         * fs/hfs.c (grub_hfs_mount): Likewise.
13170         (grub_hfs_cmp_catkeys): Likewise.
13171         (grub_hfs_find_dir): Likewise.
13172         (grub_hfs_dir): Likewise.
13173         (grub_hfs_label): Likewise.
13174         * fs/jfs.c (grub_jfs_mount): Likewise.
13175         (grub_jfs_opendir): Likewise.
13176         (grub_jfs_getent): Likewise.
13177         (grub_jfs_lookup_symlink): Likewise.
13178         (grub_jfs_label): Likewise.
13179         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
13180         (grub_hfsplus_iterate_dir): Likewise.
13181         (grub_hfsplus_btree_iterate_node): Made static.
13183         * util/grub-emu.c (prefix): New variable.
13184         (grub_machine_set_prefix): New function.
13185         (main): Do not set the environment variable "prefix" here. Only
13186         set PREFIX, which is used later by grub_machine_set_prefix.
13188         * include/grub/video.h: Do not include grub/symbol.h.
13189         (grub_video_register): Not exported. This symbol is not defined in
13190         the kernel.
13191         (grub_video_unregister): Likewise.
13192         (grub_video_iterate): Likewise.
13193         (grub_video_setup): Likewise.
13194         (grub_video_restore): Likewise.
13195         (grub_video_get_info): Likewise.
13196         (grub_video_get_blit_format): Likewise.
13197         (grub_video_set_palette): Likewise.
13198         (grub_video_get_palette): Likewise.
13199         (grub_video_set_viewport): Likewise.
13200         (grub_video_get_viewport): Likewise.
13201         (grub_video_map_color): Likewise.
13202         (grub_video_map_rgb): Likewise.
13203         (grub_video_map_rgba): Likewise.
13204         (grub_video_fill_rect): Likewise.
13205         (grub_video_blit_glyph): Likewise.
13206         (grub_video_blit_bitmap): Likewise.
13207         (grub_video_blit_render_target): Likewise.
13208         (grub_video_scroll): Likewise.
13209         (grub_video_swap_buffers): Likewise.
13210         (grub_video_create_render_target): Likewise.
13211         (grub_video_delete_render_target): Likewise.
13212         (grub_video_set_active_render_target): Likewise.
13214         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13215         Undefined.
13216         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13218         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13219         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13220         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13221         instead of $(srcdir)/genkernsyms.sh.
13223         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
13224         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13225         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13226         instead of $(srcdir)/genkernsyms.sh.
13228         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13229         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13230         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13231         instead of $(srcdir)/genkernsyms.sh.
13233         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13234         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13235         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13236         instead of $(srcdir)/genkernsyms.sh.
13238         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13239         genkernsyms.sh.
13241         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13242         genkernsyms.sh.
13243         (gensymlist.sh): New target.
13244         (genkernsyms.sh): Likewise.
13246         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13247         genkernsyms.sh.in and gensymlist.sh.in.
13249         * genkernsyms.sh: Removed.
13250         * gensymlist.sh: Likewise.
13252         * genkernsyms.sh.in: New file.
13253         * gensymlist.sh.in: Likewise.
13255 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
13257         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13258         clobber "prefix", since we may have already set it manually.
13260 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
13262         * kern/misc.c (abort): New alias for grub_abort.
13264 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
13266         A new machine-specific function "grub_machine_set_prefix" is
13267         defined. This is called after loading modules, so that a prefix
13268         initialization can use modules. Also, this change adds an
13269         intensive debugging feature for the memory manager via the
13270         configure option "--enable-mm-debug".
13272         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13273         PART.LEN.
13275         * kern/sparc64/ieee1275/init.c (abort): Removed.
13276         (grub_stop): Likewise.
13277         (grub_exit): New function.
13278         (grub_set_prefix): Renamed to ...
13279         (grub_machine_set_prefix): ... this.
13280         (grub_machine_init): Do not call grub_set_prefix.
13282         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13283         (grub_machine_set_prefix): ... this.
13284         (grub_machine_init): Do not call grub_set_prefix.
13286         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13287         (grub_machine_init): Do not set the prefix here.
13289         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13291         * kern/efi/init.c: Include grub/mm.h.
13292         (grub_efi_set_prefix): New function.
13294         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13295         (grub_efi_get_filename): New function.
13296         (grub_print_device_path): Renamed to ...
13297         (grub_efi_print_device_path): ... this.
13299         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13300         [MM_DEBUG] (grub_realloc): Likewise.
13301         [MM_DEBUG] (grub_free): Likewise.
13302         [MM_DEBUG] (grub_memalign): Likewise.
13303         [MM_DEBUG] (grub_mm_debug): New variable.
13304         [MM_DEBUG] (grub_debug_malloc): New function.
13305         [MM_DEBUG] (grub_debug_free): New function.
13306         [MM_DEBUG] (grub_debug_realloc): New function.
13307         [MM_DEBUG] (grub_debug_memalign): New function.
13309         * kern/misc.c (grub_abort): Print a newline to distinguish
13310         the message.
13312         * kern/main.c (grub_main): Call grub_machine_set_prefix and
13313         grub_set_root_dev after loading modules. This is necessary when
13314         setting a prefix depends on modules.
13316         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13317         (grub_efi_print_device_path): ... this.
13318         (grub_efi_get_filename): New prototype.
13319         (grub_efi_set_prefix): Likewise.
13321         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13322         and grub/disk.h.
13323         (grub_efidisk_get_device_handle): New prototype.
13324         (grub_efidisk_get_device_name): Likewise.
13326         * include/grub/mm.h: Include config.h.
13327         (MM_DEBUG): Removed.
13328         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13329         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13330         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13331         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13332         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13333         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13334         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13335         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13336         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13338         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13340         * disk/efi/efidisk.c: Include grub/partition.h.
13341         (iterate_child_devices): New function.
13342         (add_device): First, compare only last device path nodes, so that
13343         devices are sorted by the types.
13344         (grub_efidisk_get_device_handle): New function.
13345         (grub_efidisk_get_device_name): Likewise.
13347         * configure.ac (--enable-mm-debug): New option to enable the
13348         memory manager debugging feature. This makes the binary much
13349         bigger, so is disabled by default.
13351 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
13353         Use grub_abort instead of grub_stop, and grub_exit must be
13354         define in each architecture now. Also, this change adds support
13355         for EFI disks.
13357         * util/i386/pc/grub-probefs.c: Include grub/term.h.
13358         (grub_getkey): New function.
13359         (grub_term_get_current): Likewise.
13361         * util/i386/pc/grub-setup.c: Include grub/term.h.
13362         (grub_getkey): New function.
13363         (grub_term_get_current): Likewise.
13365         * util/misc.c (grub_stop): Renamed to ...
13366         (grub_exit): ... this.
13368         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13369         (grub_exit): ... this.
13370         (grub_machine_init): Use grub_abort instead of abort.
13371         (grub_stop): Removed.
13373         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13374         abort.
13376         * kern/i386/pc/startup.S (grub_exit): New function.
13377         (cold_reboot): New label.
13379         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13380         (grub_efi_init): Call grub_efidisk_init.
13381         (grub_efi_fini): Call grub_efidisk_fini.
13383         * kern/efi/efi.c: Include grub/mm.h.
13384         (grub_efi_console_control_guid): Renamed to ...
13385         (console_control_guid): ... this.
13386         (grub_efi_loaded_image_guid): Renamed to ...
13387         (loaded_image_guid): ... this.
13388         (grub_efi_locate_handle): New function.
13389         (grub_efi_open_protocol): Likewise.
13390         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13391         GRUB_EFI_CONSOLE_CONTROL_GUID.
13392         (grub_efi_exit): Removed.
13393         (grub_stop): Likewise.
13394         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13395         (grub_exit): New function.
13396         (grub_print_device_path): Likewise.
13398         * kern/rescue.c (grub_rescue_cmd_exit): New function.
13399         (grub_enter_rescue_mode): Register "exit".
13401         * kern/misc.c (grub_real_dprintf): A cosmetic change.
13402         (grub_abort): New function.
13404         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13406         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13408         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13410         * include/grub/efi/efi.h (grub_efi_exit): Removed.
13411         (grub_print_device_path): New prototype.
13412         (grub_efi_locate_handle): Likewise.
13413         (grub_efi_open_protocol): Likewise.
13415         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13416         * disk/efi/efidisk.c: Likewise.
13418         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13420         * include/grub/efi/console_control.h
13421         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13423         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13424         last 8 bytes as an array.
13425         (GRUB_EFI_DISK_IO_GUID): New macro.
13426         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13427         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13428         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13429         grub_uint8_t.
13430         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13431         (struct grub_efi_device_path): Rename the member "sub_type" to
13432         "subtype".
13433         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13434         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13435         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13436         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13437         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13438         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13439         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13440         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13441         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13442         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13443         (struct grub_efi_pci_device_path): New structure.
13444         (grub_efi_pci_device_path_t): New type.
13445         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13446         (struct grub_efi_pccard_device_path): New structure.
13447         (grub_efi_pccard_device_path_t): New type.
13448         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13449         (struct grub_efi_memory_mapped_device_path): New structure.
13450         (grub_efi_memory_mapped_device_path_t): New type.
13451         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13452         (struct grub_efi_vendor_device_path): New structure.
13453         (grub_efi_vendor_device_path_t): New type.
13454         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13455         (struct grub_efi_controller_device_path): New structure.
13456         (grub_efi_controller_device_path_t): New type.
13457         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13458         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13459         (struct grub_efi_acpi_device_path): New structure.
13460         (grub_efi_acpi_device_path_t): New type.
13461         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13462         (struct grub_efi_expanded_acpi_device_path): New structure.
13463         (grub_efi_expanded_acpi_device_path_t): New type.
13464         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13465         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13466         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13467         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13468         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13469         (struct grub_efi_atapi_device_path): New structure.
13470         (grub_efi_atapi_device_path_t): New type.
13471         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13472         (struct grub_efi_fibre_channel_device_path): New structure.
13473         (grub_efi_fibre_channel_device_path_t): New type.
13474         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13475         (struct grub_efi_1394_device_path): New structure.
13476         (grub_efi_1394_device_path_t): New type.
13477         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13478         (struct grub_efi_usb_device_path): New structure.
13479         (grub_efi_usb_device_path_t): New type.
13480         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13481         (struct grub_efi_usb_class_device_path): New structure.
13482         (grub_efi_usb_class_device_path_t): New type.
13483         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13484         (struct grub_efi_i2o_device_path): New structure.
13485         (grub_efi_i2o_device_path_t): New type.
13486         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13487         (struct grub_efi_mac_address_device_path): New structure.
13488         (grub_efi_mac_address_device_path_t): New type.
13489         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13490         (struct grub_efi_ipv4_device_path): New structure.
13491         (grub_efi_ipv4_device_path_t): New type.
13492         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13493         (struct grub_efi_ipv6_device_path): New structure.
13494         (grub_efi_ipv6_device_path_t): New type.
13495         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13496         (struct grub_efi_infiniband_device_path): New structure.
13497         (grub_efi_infiniband_device_path_t): New type.
13498         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13499         (struct grub_efi_uart_device_path): New structure.
13500         (grub_efi_uart_device_path_t): New type.
13501         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13502         (struct grub_efi_vendor_messaging_device_path): New structure.
13503         (grub_efi_vendor_messaging_device_path_t): New type.
13504         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13505         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13506         (struct grub_efi_hard_drive_device_path): New structure.
13507         (grub_efi_hard_drive_device_path_t): New type.
13508         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13509         (struct grub_efi_cdrom_device_path): New structure.
13510         (grub_efi_cdrom_device_path_t): New type.
13511         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13512         (struct grub_efi_vendor_media_device_path): New structure.
13513         (grub_efi_vendor_media_device_path_t): New type.
13514         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13515         (struct grub_efi_file_path_device_path): New structure.
13516         (grub_efi_file_path_device_path_t): New type.
13517         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13518         (struct grub_efi_protocol_device_path): New structure.
13519         (grub_efi_protocol_device_path_t): New type.
13520         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13521         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13522         (struct grub_efi_bios_device_path): New structure.
13523         (grub_efi_bios_device_path_t): New type.
13524         (struct grub_efi_disk_io): New structure.
13525         (grub_efi_disk_io_t): New type.
13526         (struct grub_efi_block_io_media): New structure.
13527         (grub_efi_block_io_media_t): New type.
13528         (struct grub_efi_block_io): New structure.
13529         (grub_efi_block_io_t): New type.
13531         * include/grub/misc.h (grub_stop): Removed.
13532         (grub_exit): New prototype.
13533         (grub_abort): Likewise.
13535         * include/grub/disk.h (enum grub_disk_dev_id): Added
13536         GRUB_DISK_DEVICE_EFIDISK_ID.
13538         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13539         disk/efi/efidisk.c.
13540         (kernel_syms.lst): Remove the target if an error occurs.
13542 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
13544         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13545         as it was simply too buggy.
13547 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
13549         * kern/misc.c (grub_lltoa): New function.
13550         (grub_vsprintf): Added support for the long long suffix,
13551         i.e. "ll".
13553 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
13555         * Makefile.in (LDFLAGS): Add variable.
13556         (LD): Remove variable.
13557         * configure.ac: Add -m32 to LDFLAGS.
13558         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13559         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13560         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13561         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13562         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13563         variables.
13564         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13565         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13566         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13568 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
13570         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13571         length for unknown glyph.
13573 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13575         Add support for pre-loaded modules into the EFI port.
13577         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13578         completely. Accept one more argument DIR. The caller has changed.
13580         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13582         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13583         (grub_efi_loaded_image_guid): New variable.
13584         (grub_efi_get_loaded_image): New function.
13585         (grub_arch_modules_addr): Likewise.
13587         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13588         prototype.
13590         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13591         (struct grub_efi_loaded_image): New structure.
13592         (grub_efi_loaded_image_t): New type.
13594 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13596         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13597         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13598         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13600 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
13602         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13604 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
13606         * DISTLIST: Added include/grub/efi/console.h,
13607         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13608         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13610         * include/grub/efi/console.h: New file.
13611         * include/grub/efi/time.h: Likewise.
13612         * include/grub/i386/efi/kernel.h: Likewise.
13613         * kern/efi/init.c: Likewise.
13614         * kern/efi/mm.c: Likewise.
13615         * term/efi/console.c: Likewise.
13617         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13618         (grub_stop): Removed.
13619         (grub_get_rtc): Likewise.
13620         (grub_machine_init): Simply call grub_efi_init.
13621         (grub_machine_fini): Call grub_efi_fini.
13623         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13624         (grub_efi_output_string): Removed.
13625         (grub_efi_stall): New function.
13626         (grub_stop): Likewise.
13627         (grub_get_rtc): Likewise.
13629         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13630         (grub_efi_stall): New prototype.
13631         (grub_efi_allocate_pages): Likewise.
13632         (grub_efi_free_pages): Likewise.
13633         (grub_efi_get_memory_map): Likewise.
13634         (grub_efi_mm_init): Likewise.
13635         (grub_efi_mm_fini): Likewise.
13636         (grub_efi_init): Likewise.
13637         (grub_efi_fini): Likewise.
13639         * include/grub/i386/efi/time.h: Do not include
13640         grub/symbol.h. Include grub/efi/time.h.
13641         (GRUB_TICKS_PER_SECOND): Removed.
13642         (grub_get_rtc): Likewise.
13644         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13645         Added padding. The EFI spec is buggy.
13646         (GRUB_EFI_BLACK): New macro.
13647         (GRUB_EFI_BLUE): Likewise.
13648         (GRUB_EFI_GREEN): Likewise.
13649         (GRUB_EFI_CYAN): Likewise.
13650         (GRUB_EFI_RED): Likewise.
13651         (GRUB_EFI_MAGENTA): Likewise.
13652         (GRUB_EFI_BROWN): Likewise.
13653         (GRUB_EFI_LIGHTGRAY): Likewise.
13654         (GRUB_EFI_BRIGHT): Likewise.
13655         (GRUB_EFI_DARKGRAY): Likewise.
13656         (GRUB_EFI_LIGHTBLUE): Likewise.
13657         (GRUB_EFI_LIGHTGREEN): Likewise.
13658         (GRUB_EFI_LIGHTCYAN): Likewise.
13659         (GRUB_EFI_LIGHTRED): Likewise.
13660         (GRUB_EFI_LIGHTMAGENTA): Likewise.
13661         (GRUB_EFI_YELLOW): Likewise.
13662         (GRUB_EFI_WHITE): Likewise.
13663         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13664         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13665         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13666         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13667         (GRUB_EFI_BACKGROUND_RED): Likewise.
13668         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13669         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13670         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13671         (GRUB_EFI_TEXT_ATTR): Likewise.
13673         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13674         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13675         (kernel_mod_HEADERS): Added efi/time.h.
13677 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
13679         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13680         include/grub/efi/api.h, include/grub/efi/console_control.h,
13681         include/grub/efi/efi.h, include/grub/efi/pe32.h,
13682         include/grub/i386/efi/time.h, kern/efi/efi.c,
13683         kern/i386/efi/init.c, kern/i386/efi/startup.S,
13684         and util/i386/efi/grub-mkimage.c.
13686         * Makefile.in (RMKFILES): Added i386-efi.rmk.
13688         * genmk.rb (PModule#rule): Do not export symbols if
13689         #{prefix}_EXPORTS is set to "no".
13691         * conf/i386-efi.mk: New file.
13692         * conf/i386-efi.rmk: Likewise.
13693         * include/grub/efi/api.h: Likewise.
13694         * include/grub/efi/console_control.h: Likewise.
13695         * include/grub/efi/efi.h: Likewise.
13696         * include/grub/efi/pe32.h: Likewise.
13697         * include/grub/i386/efi/time.h: Likewise.
13698         * kern/efi/efi.c: Likewise.
13699         * kern/i386/efi/init.c: Likewise.
13700         * kern/i386/efi/startup.S: Likewise.
13701         * util/i386/efi/grub-mkimage.c: Likewise.
13703 2006-04-17  Marco Gerards  <marco@gnu.org>
13705         * include/grub/script.h: Include <grub/parser.h> and
13706         "grub_script.tab.h".
13707         (struct grub_lexer_param): New struct.
13708         (struct grub_parser_param): Likewise.
13709         (grub_script_create_arglist): Pass the state in an argument.
13710         (grub_script_add_arglist): Likewise.
13711         (grub_script_create_cmdline): Likewise.
13712         (grub_script_create_cmdblock): Likewise.
13713         (grub_script_create_cmdif): Likewise.
13714         (grub_script_create_cmdmenu): Likewise.
13715         (grub_script_add_cmd): Likewise.
13716         (grub_script_arg_add): Likewise.
13717         (grub_script_lexer_ref): Likewise.
13718         (grub_script_lexer_deref): Likewise.
13719         (grub_script_lexer_record_start): Likewise.
13720         (grub_script_lexer_record_stop): Likewise.
13721         (grub_script_mem_record): Likewise.
13722         (grub_script_mem_record_stop): Likewise.
13723         (grub_script_malloc): Likewise.
13724         (grub_script_yylex): Likewise.
13725         (grub_script_yyparse): Likewise.
13726         (grub_script_yyerror): Likewise.
13727         (grub_script_yylex): Likewise.
13728         (grub_script_lexer_init): Return the state.
13730         * normal/lexer.c (grub_script_lexer_state): Removed variable.
13731         (grub_script_lexer_done): Likewise.
13732         (grub_script_lexer_getline): Likewise.
13733         (grub_script_lexer_refs): Likewise.
13734         (script): Likewise.
13735         (newscript): Likewise.
13736         (record): Likewise.
13737         (recording): Likewise.
13738         (recordpos): Likewise.
13739         (recordlen): Likewise.
13740         (grub_script_lexer_init): Return the state instead of setting
13741         global variables.
13742         (grub_script_lexer_ref): Use the newly added argument for state
13743         instead of globals.
13744         (grub_script_lexer_deref): Likewise.
13745         (grub_script_lexer_record_start): Likewise.
13746         (grub_script_lexer_record_stop): Likewise.
13747         (recordchar): Likewise.
13748         (nextchar): Likewise.
13749         (grub_script_yylex2): Likewise.
13750         (grub_script_yylex): Likewise.
13751         (grub_script_yyerror): Likewise.
13753         * normal/parser.y (func_mem): Removed variable.
13754         (menu_entry): Likewise.
13755         (err): Likewise.
13756         (%lex-param): New parser option.
13757         (%parse-param): Likewise.
13758         (script): Always return the AST.
13759         (argument): Pass the state around.
13760         (arguments): Likewise.
13761         (grubcmd): Likewise.
13762         (commands): Likewise.
13763         (function): Likewise.
13764         (menuentry): Likewise.
13765         (if_statement): Likewise.
13766         (if): Likewise.
13768         * normal/script.c (grub_script_memused): Removed variable.
13769         (grub_script_parsed): Likewise.
13770         (grub_script_malloc): Added a state argument.  Use that instead of
13771         global variables.
13772         (grub_script_mem_record): Likewise.
13773         (grub_script_mem_record_stop): Likewise.
13774         (grub_script_arg_add): Likewise.
13775         (grub_script_add_arglist): Likewise.
13776         (grub_script_create_cmdline): Likewise.
13777         (grub_script_create_cmdif): Likewise.
13778         (grub_script_create_cmdmenu): Likewise.
13779         (grub_script_add_cmd): Likewise.
13780         (grub_script_parse): Setup the state before calling the parser.
13782 2006-04-16  Marco Gerards  <marco@gnu.org>
13784         * normal/command.c (grub_command_init): Remove the title command.
13786         * normal/lexer.c (grub_script_yylex): Renamed from this...
13787         (grub_script_yylex2): ... to this.
13788         (grub_script_yylex): New function.  Temporary
13789         introduced to filter some tokens.
13790         (grub_script_yyerror): Print a newline.
13792         * normal/main.c (read_config_file): Output information about the
13793         lines that contain errors.  Wait for a key after all lines have
13794         been processed.  Don't return an empty menu.
13796         * normal/parser.y (func_mem): Don't initialize.
13797         (menu_entry): Likewise.
13798         (err): New variable.
13799         (script): Don't return anything when an error was encountered.
13800         (ws, returns): Removed rules.
13801         (argument): Disabled concatenated variable support.
13802         (arguments): Remove explicit separators.
13803         (grubcmd): Likewise.
13804         (function): Likewise.
13805         (menuentry): Likewise.
13806         (if): Likewise.
13807         (commands): Likewise.  Add error handling.
13809         * normal/script.c (grub_script_create_cmdline): If
13810         `grub_script_parsed' is 0, assume the parser encountered an error.
13812 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
13814         * configure.ac: Add support for EFI. Fix the typo
13815         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13817 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13819         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
13820         foreign multibyte characters should be shown correctly.
13822 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13824         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13825         calculation.
13826         (read_config_file): Made it to close file before returning.
13828 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
13830         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13831         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13832         video/i386/pc/vbefill.c.
13834         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13835         video/i386/pc/vbefill.c.
13837         * include/grub/video.h (grub_video_blit_format): New enum.
13838         (grub_video_mode_info): Added new member blit_format.
13839         (grub_video_get_blit_format): New function prototype.
13841         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13842         function prototype.
13843         (grub_video_vbe_map_rgb): Likewise.
13844         (grub_video_vbe_unmap_color): Likewise.
13846         * include/grub/i386/pc/vbeblit.h: New file.
13848         * include/grub/i386/pc/vbefill.h: New file.
13850         * video/video.c (grub_video_get_blit_format): New function.
13851         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13852         (grub_video_vbe_map_rgb): Likewise.
13853         (grub_video_vbe_unmap_color): Likewise.
13855         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13856         optimized fills.
13857         (grub_video_vbe_blit_render_target): Changed to use more optimized
13858         blits.
13859         (grub_video_vbe_setup): Added detection for optimized settings.
13860         (grub_video_vbe_create_render_target): Likewise.
13862         * video/i386/pc/vbeblit.c: New file.
13864         * video/i386/pc/vbefill.c: New file.
13866 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
13868         * font/manager.c (grub_font_get_glyph): Removed font fixup from
13869         here...
13871         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
13872         parsing to support both hex and dec ranges.  If filename was missing
13873         show usage information.
13875 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
13877         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13878         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
13880         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13881         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
13882         (video_mod_SOURCES): Added.
13883         (video_mod_CFLAGS): Likewise.
13884         (video_mod_LDFLAGS): Likewise.
13885         (gfxterm_mod_SOURCES): Likewise.
13886         (gfxterm_mod_CFLAGS): Likewise.
13887         (gfxterm_mod_LDFLAGS): Likewise.
13888         (videotest_mod_SOURCES): Likewise.
13889         (videotest_mod_CFLAGS): Likewise.
13890         (videotest_mod_LDFLAGS): Likewise.
13891         (vesafb_mod_SOURCES): Removed.
13892         (vesafb_mod_CFLAGS): Likewise.
13893         (vesafb_mod_LDFLAGS): Likewise.
13894         (vga_mod_SOURCES): Likewise.
13895         (vga_mod_CFLAGS): Likewise.
13896         (vga_mod_LDFLAGS): Likewise.
13898         * commands/videotest.c: New file.
13900         * font/manager.c (fill_with_default_glyph): Modified to use
13901         grub_font_glyph.
13902         (grub_font_get_glyph): Likewise.
13903         (fontmanager): Renamed from this...
13904         (font_manager): ... to this.
13906         * include/grub/font.h (grub_font_glyph): Added new structure.
13907         (grub_font_get_glyph): Modified to use grub_font_glyph.
13909         * include/grub/misc.h (grub_abs): Added as inline function.
13911         * include/grub/video.h: New file.
13913         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13914         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13915         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13916         (grub_vbe_get_controller_info): Renamed from this...
13917         (grub_vbe_bios_get_controller_info): ... to this.
13918         (grub_vbe_get_mode_info): Renamed from this...
13919         (grub_vbe_bios_get_mode_info): ... to this.
13920         (grub_vbe_set_mode): Renamed from this...
13921         (grub_vbe_bios_set_mode): ... to this.
13922         (grub_vbe_get_mode): Renamed from this...
13923         (grub_vbe_bios_get_mode): ... to this.
13924         (grub_vbe_set_memory_window): Renamed from this...
13925         (grub_vbe_bios_set_memory_window): ... to this.
13926         (grub_vbe_get_memory_window): Renamed from this...
13927         (grub_vbe_bios_get_memory_window): ... to this.
13928         (grub_vbe_set_scanline_length): Renamed from this...
13929         (grub_vbe_set_scanline_length): ... to this.
13930         (grub_vbe_get_scanline_length): Renamed from this...
13931         (grub_vbe_bios_get_scanline_length): ... to this.
13932         (grub_vbe_set_display_start): Renamed from this...
13933         (grub_vbe_bios_set_display_start): ... to this.
13934         (grub_vbe_get_display_start): Renamed from this...
13935         (grub_vbe_bios_get_display_start): ... to this.
13936         (grub_vbe_set_palette_data): Renamed from this...
13937         (grub_vbe_bios_set_palette_data): ... to this.
13938         (grub_vbe_set_pixel_rgb): Removed.
13939         (grub_vbe_set_pixel_index): Likewise.
13941         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13942         from this...
13943         (grub_vbe_bios_get_controller_info): ... to this.
13944         (grub_vbe_get_mode_info): Renamed from this...
13945         (grub_vbe_bios_get_mode_info): ... to this.
13946         (grub_vbe_set_mode): Renamed from this...
13947         (grub_vbe_bios_set_mode): ... to this.
13948         (grub_vbe_get_mode): Renamed from this...
13949         (grub_vbe_bios_get_mode): ... to this.
13950         (grub_vbe_set_memory_window): Renamed from this...
13951         (grub_vbe_bios_set_memory_window): ... to this.
13952         (grub_vbe_get_memory_window): Renamed from this...
13953         (grub_vbe_bios_get_memory_window): ... to this.
13954         (grub_vbe_set_scanline_length): Renamed from this...
13955         (grub_vbe_set_scanline_length): ... to this.
13956         (grub_vbe_get_scanline_length): Renamed from this...
13957         (grub_vbe_bios_get_scanline_length): ... to this.
13958         (grub_vbe_set_display_start): Renamed from this...
13959         (grub_vbe_bios_set_display_start): ... to this.
13960         (grub_vbe_get_display_start): Renamed from this...
13961         (grub_vbe_bios_get_display_start): ... to this.
13962         (grub_vbe_set_palette_data): Renamed from this...
13963         (grub_vbe_bios_set_palette_data): ... to this.
13964         (grub_vbe_bios_get_controller_info): Fixed problem with registers
13965         getting corrupted after calling it.  Added more pushes and pops.
13966         (grub_vbe_bios_set_mode): Likewise.
13967         (grub_vbe_bios_get_mode): Likewise.
13968         (grub_vbe_bios_get_memory_window): Likewise.
13969         (grub_vbe_bios_set_scanline_length): Likewise.
13970         (grub_vbe_bios_get_scanline_length): Likewise.
13971         (grub_vbe_bios_get_display_start): Likewise.
13972         (grub_vbe_bios_set_palette_data): Likewise.
13974         * normal/cmdline.c (cl_set_pos): Refresh the screen.
13975         (cl_insert): Likewise.
13976         (cl_delete): Likewise.
13978         * term/gfxterm.c: New file.
13980         * term/i386/pc/vesafb.c: Removed file.
13982         * video/video.c: New file.
13984         * video/i386/pc/vbe.c (real2pm): Added new function.
13985         (grub_video_vbe_draw_pixel): Likewise.
13986         (grub_video_vbe_get_video_ptr): Likewise.
13987         (grub_video_vbe_get_pixel): Likewise
13988         (grub_video_vbe_init): Likewise.
13989         (grub_video_vbe_fini): Likewise.
13990         (grub_video_vbe_setup): Likewise.
13991         (grub_video_vbe_get_info): Likewise.
13992         (grub_video_vbe_set_palette): Likewise.
13993         (grub_video_vbe_get_palette): Likewise.
13994         (grub_video_vbe_set_viewport): Likewise.
13995         (grub_video_vbe_get_viewport): Likewise.
13996         (grub_video_vbe_map_color): Likewise.
13997         (grub_video_vbe_map_rgb): Likewise.
13998         (grub_video_vbe_map_rgba): Likewise.
13999         (grub_video_vbe_unmap_color): Likewise.
14000         (grub_video_vbe_fill_rect): Likewise.
14001         (grub_video_vbe_blit_glyph): Likewise.
14002         (grub_video_vbe_blit_bitmap): Likewise.
14003         (grub_video_vbe_blit_render_target): Likewise.
14004         (grub_video_vbe_scroll): Likewise.
14005         (grub_video_vbe_swap_buffers): Likewise.
14006         (grub_video_vbe_create_render_target): Likewise.
14007         (grub_video_vbe_delete_render_target): Likewise.
14008         (grub_video_vbe_set_active_render_target): Likewise.
14009         (grub_vbe_set_pixel_rgb): Remove function.
14010         (grub_vbe_set_pixel_index): Likewise.
14011         (index_color_mode): Remove static variable.
14012         (active_mode): Likewise.
14013         (framebuffer): Likewise.
14014         (bytes_per_scan_line): Likewise.
14015         (grub_video_vbe_adapter): Added new static variable.
14016         (framebuffer): Likewise.
14017         (render_target): Likewise.
14018         (initial_mode): Likewise.
14019         (mode_in_use): Likewise.
14020         (mode_list): Likewise.
14022 2006-03-10  Marco Gerards  <marco@gnu.org>
14024         * configure.ac (AC_INIT): Bumped to 1.93.
14026         * DISTLIST: Added `include/grub/hfs.h'.
14028 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
14030         * boot/i386/pc/boot.S (general_error): Before looping, try INT
14031         18H, which might help the BIOS falling back to next boot media.
14033 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
14035         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
14036         Poe Chen <poe.poechen@gmail.com>.
14038 2006-01-17  Marco Gerards  <marco@gnu.org>
14040         * include/grub/normal.h: Include <grub/script.h>.
14041         (grub_command_list): Removed struct.
14042         (grub_command_list_t): Removed type.
14043         (grub_menu_entry): Remove members `num' and `command_list'.  Add
14044         members `commands' and `sourcecode'.
14045         * include/grub/script.h: Add inclusion guards.
14046         (grub_script_cmd_menuentry): New struct.
14047         (grub_script_execute_menuentry): New prototype.
14048         (grub_script_lexer_record_start): Likewise.
14049         (grub_script_lexer_record_stop): Likewise.
14050         * normal/execute.c (grub_script_execute_menuentry): New function.
14051         * normal/lexer.c (record, recording, recordpos, recordlen): New
14052         variables.
14053         (grub_script_lexer_record_start): New function.
14054         (grub_script_lexer_record_stop): Likewise.
14055         (recordchar): Likewise.
14056         (nextchar): Likewise.
14057         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
14058         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
14059         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
14060         (current_menu): New variable.
14061         (free_menu): Mainly rewritten.
14062         (grub_normal_menu_addentry): New function.
14063         (read_config_file): Rewritten.
14064         * normal/menu.c (run_menu_entry): Mainly rewritten.
14065         * normal/menu_entry.c (make_screen): Rewritten the code to insert
14066         the menu entry.
14067         (run): Mainly rewritten.
14068         * normal/parser.y (menu_entry): New variable.
14069         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
14070         (menuentry): New rule.
14071         (command): Add `menuentry'.
14072         (if_statement): Allow additional returns before `fi'.
14073         * normal/script.c (grub_script_create_cmdmenu): New function.
14075 2006-01-03  Marco Gerards  <marco@gnu.org>
14077         * INSTALL: GNU Bison is required.
14078         * configure.ac: Rewritten the test to detect Bison.
14079         * Makefile.in (YACC): New variable.  Reported by Xun Sun
14080         <xun.sun.cn@gmail.com>.
14082 2006-01-03  Marco Gerards  <marco@gnu.org>
14084         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
14085         the HFS+ filesystem to filesystem blocks.
14086         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
14087         GCC warning is silenced.
14089 2006-01-03  Marco Gerards  <marco@gnu.org>
14091         * partmap/apple.c (apple_partition_map_iterate): Convert the data
14092         read from disk from big endian to host byte order.
14094 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
14096         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
14097         documentation.
14098         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
14099         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
14100         embedded HFS+ filesystem.
14101         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
14102         (grub_hfs_sblock): Move from here...
14103         * include/grub/hfs.h: To here...  New file.
14104         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
14105         documentation.
14106         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
14107         New macros.
14108         (grub_hfsplus_volheader): Change type of member `magic' to
14109         `grub_uint16_t'.
14110         (grub_hfsplus_data): Add new member `embedded_offset'.
14111         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
14112         returned block.
14113         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
14114         Calculate the offset.
14116 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14118         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
14119         Removed.
14120         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
14122 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14124         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
14125         ENV->NAME is NULL after allocating ENV->VALUE.
14127 2005-12-25  Marco Gerards  <marco@gnu.org>
14129         * kern/env.c (grub_env_set): Rewritten the error handling code.
14131 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14133         * geninit.sh: Made more robust, and more portable.
14135 2005-12-25  Marco Gerards  <marco@gnu.org>
14137         Add support for Apple HFS+ filesystems.
14139         * fs/hfsplus.c: New file.
14141         * DISTLIST: Added `fs/hfsplus.c'.
14143         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
14144         (hfsplus_mod_SOURCES): New variable.
14145         (hfsplus_mod_CFLAGS): Likewise.
14146         (hfsplus_mod_LDFLAGS): Likewise.
14147         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
14148         (grub_setup_SOURCES): Likewise.
14149         (grub_mkdevicemap_SOURCES): Likewise.
14150         (grub_emu_SOURCES): Likewise.
14151         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14153         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
14155         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
14157 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14159         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
14160         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
14161         include/grub/parser.h, include/grub/script.h, kern/parser.c,
14162         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
14163         normal/lexer.c, normal/parser.y, normal/script.c, and
14164         partmap/gpt.c.
14165         Removed kern/sparc64/cache.c.
14167         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
14168         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
14169         grub_emu_init.c.
14171         * configure.ac (AC_INIT): Bumped to 1.92.
14173 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
14175         * kern/err.c (grub_error_push): Added new function to support error
14176         stacks.
14177         (grub_error_pop): Likewise.
14178         (grub_error_stack_items): New local variable to support error stacks.
14179         (grub_error_stack_pos): Likewise.
14180         (grub_error_stack_assert): Likewise.
14181         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
14182         stack depth.
14183         (grub_print_error): Added support to print errors from error stack.
14185         * include/grub/err.h (grub_error_push): Added function prototype.
14186         (grub_error_pop): Likewise.
14188 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
14190         * configure.ac: Accept `powerpc64' as host_cpu.
14191         (amd64): Rename to `biarch32'.
14193         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14194         non-cacheline-aligned addresses.
14196         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14197         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
14198         if `size' is non-zero.
14200 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
14202         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14203         and `cd' to make sure the filename is not prefixed with a
14204         directory name.
14205         (pkgdata_MODULES): Add `gpt.mod'.
14206         (gpt_mod_SOURCES): New variable.
14207         (gpt_mod_CFLAGS): Likewise.
14208         (gpt_mod_LDFLAGS): Likewise.
14210         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14212         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14213         New macro.
14215         * partmap/gpt.c: New file.
14217         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14218         GPT partition map is detected.
14220 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
14222         * commands/i386/pc/play.c: New file.
14223         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14224         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14225         macros.
14227 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
14229         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14230         ((unused))' to silence gcc warning.
14232 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
14234         * configure.ac: Correct `AC_PROG_YACC' test.
14236 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14238         * util/powerpc/ieee1275/grub-install.in: Run the mount point
14239         check before installing files.
14241 2005-11-22  Mike Small  <smallm@panix.com>
14243         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14244         number regex so multidigit numbers are recognized correctly.
14246 2005-11-22  Mike Small  <smallm@panix.com>
14248         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14249         debugging message before attempting to claim memory.
14250         (grub_rescue_cmd_initrd): Add a claim debugging message and try
14251         multiple addresses in case of failure.
14253 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14255         * term/tparm.c (get_space): Remove empty `if' statement.
14257         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14259         * kern/parser.c (check_varstate): Rename `state' to 's'.
14261 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14263         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
14264         variable definitions to the beginning of each function.  Sort stack
14265         variables by size.
14266         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
14267         `buf' argument to `char *'.
14269 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14271         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14272         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14273         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14274         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14275         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14276         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14277         configfile.mod, search.mod, gzio.mod and test.mod.
14278         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14279         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14280         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14281         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14282         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14283         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14284         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14285         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14286         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14287         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14288         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14289         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14290         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14291         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14292         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14293         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14294         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14295         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14296         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14297         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14298         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14299         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14300         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14302         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14303         `grep --include'.
14304         (pkgdata_MODULES): Add test.mod.
14306 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14308         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
14309         appending to variables with "+=".
14310         (PModule): Use full pathname to generate *.lst filenames.
14312         * Makefile.in: Fixed list rules moved from genmk.rb.
14313         (.DELETE_ON_ERROR): New special target.
14314         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14316         * conf/i386-pc.rmk: Include conf/common.mk.
14317         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14318         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14319         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14320         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14321         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14322         configfile.mod, search.mod, gzio.mod and test.mod.
14323         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14324         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14325         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14326         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14327         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14328         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14329         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14330         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14331         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14332         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14333         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14334         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14335         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14336         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14337         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14338         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14339         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14340         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14341         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14342         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14343         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14344         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14345         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14346         here...
14347         * conf/common.rmk: ... to here.  New file.
14349         * conf/common.mk: New file.
14351 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
14353         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14354         (grub_script.tab.c): ... here.
14356         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14357         (grub_script.tab.c): ... here.
14359         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14360         (grub_script.tab.c): ... here.
14362         * normal/command.c (grub_command_find): Fixed a memory leak of
14363         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14365 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14367         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14368         "@" which marks the start of a comment on ARM.
14369         (VARIABLE): Likewise.
14371 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14373         Add support for Linux/ADFS partition tables.
14375         * partmap/acorn.c: New file.
14377         * include/grub/acorn_filecore.h: Likewise.
14379         * DISTLIST: Added `partmap/acorn.c' and
14380         `include/grub/acorn_filecore.h'.
14382         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14383         `partmap/acorn.c'.
14384         (pkgdata_MODULES): Add `acorn.mod'.
14385         (acorn_mod_SOURCES): New variable.
14386         (acorn_mod_CFLAGS): Likewise.
14388         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14389         `partmap/acorn.c'.
14390         (pkgdata_MODULES): Add `acorn.mod'.
14391         (acorn_mod_SOURCES): New variable.
14392         (acorn_mod_CFLAGS): Likewise.
14394         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14395         (pkgdata_MODULES): Add `acorn.mod'.
14396         (acorn_mod_SOURCES): New variable.
14397         (acorn_mod_CFLAGS): Likewise.
14398         (acorn_mod_LDFLAGS): Likewise.
14400         * include/types.h (grub_disk_addr_t): New typedef.
14402 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
14404         * geninit.sh: New file.
14406         * geninitheader.sh: Likewise.
14408         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14409         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14410         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14411         * commands/configfile.c (grub_configfile_init)
14412         (grub_configfile_fini): Likewise.
14413         * commands/default.c (grub_default_init, grub_default_fini):
14414         Likewise.
14415         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14416         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14417         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14418         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14419         Likewise.
14420         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14421         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14422         Likewise.
14423         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14424         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14425         Likewise.
14426         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14427         Likewise.
14428         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14429         Likewise.
14430         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14431         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14432         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14433         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14434         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14435         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14436         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14437         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14438         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14439         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14440         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14441         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14442         * partmap/amiga.c (grub_amiga_partition_map_init)
14443         (grub_amiga_partition_map_fini): Likewise.
14444         * partmap/apple.c (grub_apple_partition_map_init)
14445         (grub_apple_partition_map_fini): Likewise.
14446         * partmap/pc.c (grub_pc_partition_map_init)
14447         (grub_pc_partition_map_fini): Likewise.
14448         * partmap/sun.c (grub_sun_partition_map_init,
14449         grub_sun_partition_map_fini): Likewise.
14450         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14451         Likewise.
14453         * util/grub-emu.c: Include <grub_modules_init.h>.
14454         (main): Don't initialize and de-initialize any modules directly,
14455         use `grub_init_all' and `grub_fini_all' instead.
14457         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14458         `grub_vesafb_mod_init'.
14459         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
14460         all users.
14461         * term/i386/pc/vga.c (grub_vga_init): Renamed to
14462         `grub_vga_mod_init'.  Updated all users.
14463         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14465         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14466         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14467         rules.
14469         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14470         Generate a function to initialize the module in utilities.
14471         Updated all callers.
14472         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
14473         initialize the module in utilities.  Updated all callers.
14475 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14477         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14478         escape sequence and a literal ^L to clear the screen.
14480         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14481         when returning from Open Firmware.
14483 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14485         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14486         (grub_ofconsole_height): Likewise.
14487         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14488         manually insert a '\n'.
14489         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14490         `grub_ofconsole_height'.  Return early if these are already set.
14492 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
14494         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14495         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14496         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14497         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14498         and `normal/script.c'.
14499         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14500         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14501         (test_mod_SOURCES): New variable.
14502         (test_mod_CFLAGS): Likewise.
14503         (test_mod_LDFLAGS): Likewise.
14504         (pkgdata_MODULES): Add `test.mod'.
14505         (grub_script.tab.c): New rule.
14506         (grub_script.tab.h): Likewise.
14508 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
14510         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14511         `commands/test.c', `normal/execute.c', `normal/lexer.c',
14512         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14513         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14514         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14515         (test_mod_SOURCES): New variable.
14516         (test_mod_CFLAGS): Likewise.
14517         (pkgdata_MODULES): Add `test.mod'.
14518         (grub_script.tab.c): New rule.
14519         (grub_script.tab.h): Likewise.
14521 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
14523         Add initial scripting support.
14525         * commands/test.c: New file.
14526         * include/grub/script.h: Likewise.
14527         * normal/execute.c: Likewise.
14528         * normal/function.c: Likewise.
14529         * normal/lexer.c: Likewise.
14530         * normal/parser.y: Likewise.
14531         * normal/script.c: Likewise.
14533         * configure.ac: Add `AC_PROG_YACC' test.
14535         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14536         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14537         `normal/function.c' and `normal/script.c'.
14538         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14539         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14540         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14541         variables.
14542         (pkgdata_MODULES): Add `test.mod'.
14543         (grub_script.tab.c): New rule.
14544         (grub_script.tab.h): Likewise.
14546         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14548         * include/grub/normal.h (grub_test_init): New prototype.
14549         (grub_test_fini): Likewise.
14551         * normal/command.c: Include <grub/script.h>.
14552         (grub_command_execute): Rewritten.
14554         * util/grub-emu.c (main): Call `grub_test_init' and
14555         `grub_test_fini'.
14557 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14559         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14560         to 0.
14561         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14562         there are no pending characters.
14564 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14566         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14567         `grub_strndup' to drop device arguments. Replace unnecessary
14568         `grub_strndup' with `grub_strdup'.
14570 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14572         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14573         `debug' environment variable has been set.
14575 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
14577         * Makefile.in (install-local): Use $(DATA).
14578         (uninstall): Likewise.
14579         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14580         (sbin_UTILITIES): ... to here.
14581         (sbin_SCRIPTS): New variable.
14582         (grub_install_SOURCES): New variable.
14583         * util/powerpc/ieee1275/grub-install.in: New file.
14584         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14585         variable.
14586         (add_segments): Call `grub_util_get_path'.
14588 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
14590         From Timothy Baldwin:
14591         * commands/ls.c (grub_ls_list_files): Close FILE with
14592         grub_file_close.
14593         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14595 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
14597         * include/grub/parser.h: New file.
14599         * kern/parser.c: Likewise.
14601         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14602         (grub_setup_SOURCES): Likewise.
14603         (grub_probefs_SOURCES): Likewise.
14604         (grub_emu_SOURCES): Likewise.
14605         (kernel_img_HEADERS): Add `parser.h'.
14607         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14608         (grub_emu_SOURCES): Add `kern/parser.c'.
14609         (grubof_SOURCES): Likewise.
14611         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14612         (grubof_SOURCES): Add `kern/parser.c'.
14614         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14616         * kern/misc.c (grub_split_cmdline): Removed function.
14618         * kern/rescue.c: Include <grub/parser.h>.
14619         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14620         of `grub_split_cmdline'.
14622         * normal/command.c: Include <grub/parser.h>.
14623         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
14624         of `grub_split_cmdline'.
14626         * normal/completion.c: Include <grub/parser.h>.
14627         (cmdline_state): New variable.
14628         (iterate_dir): End the filename with a quote depending on the
14629         command line state.
14630         (get_state): new function.
14631         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14632         split the arguments and determine the current argument.  When the
14633         argument string is not quoted, escape all spaces.
14635 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14637         * normal/sparc64/setjmp.S: New file.
14639 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14641         * include/grub/sparc64/libgcc.h: New file.
14642         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14643         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14644         normal/sparc64/setjmp.c.
14646 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14648         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14649         * kern/sparc64/cache.S: New file.
14650         * kern/sparc64/cache.c: Removed.
14651         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14652         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
14653         -mtune=ultrasparc.
14654         (COMMON_LDFLAGS): Add -melf64_sparc.
14655         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14656         (grubof_SOURCES): Use cache.S instead of cache.c.
14657         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
14658         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14659         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14660         commented though.
14661         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14662         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14663         (linux_mod_CFLAGS): Commented out.
14664         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14665         out because module isn't built.
14666         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14667         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14668         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14669         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14670         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14671         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14672         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14673         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14674         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14675         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14676         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14677         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14678         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14679         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14681 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
14683         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14684         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14685         longer, because HFS should not be used on PC.
14687 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14689         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14690         consistently within the loop.
14692 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
14694         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14695         directory can not be read.
14697 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14699         * configure.ac (AC_INIT): Increase the version number to 1.91.
14701         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14702         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14703         term/i386/pc/serial.c.
14705 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14707         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14708         file size must be permitted.
14710         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14711         between %ah and %al.
14713 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14715         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14716         grub_uint64_t.
14717         Call the hook with a NUL-terminated filename.
14718         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14719         grub_cpu_to_be32.
14721         * kern/term.c (cursor_state): New variable.
14722         (grub_term_set_current): Reset the cursor state on a new
14723         terminal.
14724         (grub_setcursor): Rewritten to use CURSOR_STATE.
14725         (grub_getcursor): New function.
14727         * include/grub/term.h (grub_getcursor): New prototype.
14729         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14730         integers on ARM. Reported by Timothy Baldwin
14731         <T.E.Baldwin99@members.leeds.ac.uk>.
14733 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
14735         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14736         allocated.
14737         (grub_sfs_dir): Likewise.
14739 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
14741         Add support for the SFS filesystem.
14743         * fs/sfs.c: New file.
14745         * DISTLIST: Added `fs/sfs.c'.
14747         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14748         (grub_probefs_SOURCES): Likewise.
14749         (grub_emu_SOURCES): Likewise.
14750         (pkgdata_MODULES): Add `sfs.mod'.
14751         (sfs_mod_SOURCES): New variable.
14752         (sfs_mod_CFLAGS): Likewise.
14753         (sfs_mod_LDFLAGS): Likewise.
14755         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14756         (pkgdata_MODULES): Add `sfs.mod'.
14757         (sfs_mod_SOURCES): New variable.
14758         (sfs_mod_CFLAGS): Likewise.
14760         * util/grub-emu.c (main): Call `grub_sfs_init' and
14761         `grub_sfs_fini'.
14763         * include/grub/fs.h (grub_sfs_init): New prototype.
14764         (grub_sfs_fini): Likewise.
14766 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
14768         Add support for the AFFS filesystem.
14770         * fs/affs.c: New file.
14772         * DISTLIST: Added `fs/affs.c'.
14774         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14775         (grub_probefs_SOURCES): Likewise.
14776         (grub_emu_SOURCES): Likewise.
14777         (pkgdata_MODULES): Add `affs.mod'.
14778         (affs_mod_SOURCES): New variable.
14779         (affs_mod_CFLAGS): Likewise.
14780         (affs_mod_LDFLAGS): Likewise.
14782         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14783         (pkgdata_MODULES): Add `affs.mod'.
14784         (affs_mod_SOURCES): New variable.
14785         (affs_mod_CFLAGS): Likewise.
14787         * util/grub-emu.c (main): Call `grub_affs_init' and
14788         `grub_affs_fini'.
14790         * include/grub/fs.h (grub_affs_init): New prototype.
14791         (grub_affs_fini): Likewise.
14793 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14795         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14797 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14799         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
14800         `-m32' to CFLAGS.
14802         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14803         linking.
14805         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14806         (COMMON_LDFLAGS): New variable.
14807         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14808         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14809         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14810         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14811         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14812         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14813         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14814         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14815         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14816         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14817         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14818         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14819         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14820         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14821         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14822         variables.
14823         (normal_mod_ASFLAGS): Add `-m32'.
14825         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14826         (grub_host_size_t, grub_host_ssize_t): New types.
14827         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14828         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14829         `GRUB_HOST_SIZEOF_VOID_P'.
14831         * include/grub/kernel.h (struct grub_module_header): Type of
14832         member offset changed to `grub_host_off_t'.  Type of member size
14833         changed to `grub_host_size_t'.
14834         (struct grub_module_info): Type of member offset changed to
14835         `grub_host_off_t'.  Type of member size changed to
14836         `grub_host_size_t'.
14838 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
14840         Make GRUB's kernel compliant to Multiboot Specification.
14842         * kern/i386/pc/startup.S (multiboot_header): New label.
14843         (multiboot_entry): Likewise.
14844         (multiboot_trampoline): Likewise.
14846         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14847         Increased to 0x4A0.
14849         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14850         put parentheses after a question mark.
14851         [!GRUB_UTIL] (my_mod): New variable.
14853         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14855 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
14857         Adds support for the XFS filesystem.  Btrees are not supported
14858         yet.
14860         * fs/xfs.c: New file.
14862         * DISTLIST: Added `fs/xfs.c'.
14864         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14865         (grub_probefs_SOURCES): Likewise.
14866         (grub_emu_SOURCES): Likewise.
14867         (pkgdata_MODULES): Add `xfs.mod'.
14868         (xfs_mod_SOURCES): New variable.
14869         (xfs_mod_CFLAGS): Likewise.
14871         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14872         (pkgdata_MODULES): Add `xfs.mod'.
14873         (xfs_mod_SOURCES): New variable.
14874         (xfs_mod_CFLAGS): Likewise.
14876         * util/grub-emu.c (main): Call `grub_xfs_init' and
14877         `grub_xfs_fini'.
14879         * include/grub/fs.h (grub_xfs_init): New prototype.
14880         (grub_xfs_fini): Likewise.
14883 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
14885         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14886         color modes, allow greater than 16 colors to be configured as
14887         a default palette.
14889 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
14891         * normal/completion.c (complete_arguments): Add the qualifier
14892         const into OPTIONS.
14894         From Omniflux <omniflux+lists@omniflux.com>:
14895         * include/grub/terminfo.h: New file.
14896         * include/grub/tparm.h: Likewise.
14897         * include/grub/i386/pc/serial.h: Likewise.
14898         * term/terminfo.c: Likewise.
14899         * term/tparm.c: Likewise.
14900         * term/i386/pc/serial.c: Likewise.
14901         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14902         serial.mod.
14903         (terminfo_mod_SOURCES): New variable.
14904         (terminfo_mod_CFLAGS): Likewise.
14905         (serial_mod_SOURCES): Likewise.
14906         (serial_mod_CFLAGS): Likewise.
14908 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
14910         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14911         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14912         and kern/powerpc/ieee1275/cmain.c, respectively.
14914         * boot/powerpc/ieee1275/crt0.S: Moved to ...
14915         * kern/powerpc/ieee1275/crt0.S: ... here.
14917         * boot/powerpc/ieee1275/cmain.c: Moved to ...
14918         * kern/powerpc/ieee1275/cmain.c: ... here.
14920         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14921         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14922         instead of boot/powerpc/ieee1275/crt0.S and
14923         boot/powerpc/ieee1275/cmain.c, respectively.
14925         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14926         sectors. It was not used anyway.
14928 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14930         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14931         `unused parameter' warning.
14933 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14935         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14936         function.
14937         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14938         getcharwidth.
14940 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
14942         * include/grub/normal.h (enum grub_completion_type): Added
14943         `GRUB_COMPLETION_TYPE_ARGUMENT'.
14945         * normal/cmdline.c (print_completion): Handle
14946         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14947         * normal/menu_entry.c (store_completion): Likewise.
14949         * normal/completion.c (complete_arguments): New function.
14950         (grub_normal_do_completion): Call `complete_arguments' when the
14951         current words start with a dash.
14953 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
14955         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14956         `gzio.mod' instead of `io.mod').
14958 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
14960         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14961         (DISTDIRS): Added io and video.
14962         Rewrite the search routine to make an output consistently.
14964         * DISTLIST: Added conf/sparc64-ieee1275.mk,
14965         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14966         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14967         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14968         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14969         util/powerpc/ieee1275/misc.c.
14971         * include/grub/gzio.h: New file.
14972         * io/gzio.c: Likewise.
14974         * kern/file.c (grub_file_close): Call grub_device_close only if
14975         FILE->DEVICE is not NULL.
14977         * include/grub/mm.h [!NULL] (NULL): New macro.
14979         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14981         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14982         (pkgdata_MODULES): Added gzio.mod.
14983         (gzio_mod_SOURCES): New variable.
14984         (gzio_mod_CFLAGS): Likewise.
14986         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14987         (pkgdata_MODULES): Added gzio.mod.
14988         (gzio_mod_SOURCES): New variable.
14989         (gzio_mod_CFLAGS): Likewise.
14991         * commands/cat.c: Include grub/gzio.h.
14992         (grub_cmd_cat): Use grub_gzfile_open instead of
14993         grub_file_open.
14995         * commands/cmp.c: Include grub/gzio.h.
14996         (grub_cmd_cmp): Use grub_gzfile_open instead of
14997         grub_file_open.
14999         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
15000         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
15001         grub_file_open.
15002         (grub_rescue_cmd_module): Likewise.
15004 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15006         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
15007         kern/sparc64/ieee1275/init.c because it contains _start.
15008         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
15010 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15012         * configure.ac: Add support for sparc64 host with ieee1275
15013         firmware.
15014         * configure: Generated from configure.ac.
15015         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
15016         instead of int.
15017         (grub_ofdisk_read): Likewise.
15018         (grub_ofdisk_open): Use %p to print pointer values, and cast the
15019         pointers as (void *) to remove a warning.
15020         (grub_ofdisk_close): Likewise.
15021         (grub_ofdisk_read): Likewise.
15022         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
15023         returns, so make it return void to remove a warning.
15024         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
15025         Corresponding prototype change.
15026         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
15027         values, and cast the pointers as (void *) to remove a warning.
15028         (grub_mm_dump): Likewise.
15029         * conf/sparc64-ieee1275.mk: New file.
15030         * conf/sparc64-ieee1275.rmk: Likewise.
15031         * include/grub/sparc64/setjmp.h: Likewise.
15032         * include/grub/sparc64/types.h: Likewise.
15033         * include/grub/sparc64/ieee1275/console.h: Likewise.
15034         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
15035         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
15036         * include/grub/sparc64/ieee1275/time.h: Likewise.
15037         * kern/sparc64/cache.c: Likewise.
15038         * kern/sparc64/dl.c: Likewise.
15039         * kern/sparc64/ieee1275/init.c: Likewise.
15040         * kern/sparc64/ieee1275/openfw.c: Likewise.
15042 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
15044         * util/console.c (grub_ncurses_putchar): If C is greater than
15045         0x7f, set C to a question mark.
15046         (grub_ncurses_getcharwidth): New function.
15047         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
15048         getcharwidth.
15050         * normal/menu.c (print_entry): Made aware of Unicode. First,
15051         convert TITLE to UCS-4, and predict the cursor position by
15052         grub_getcharwidth.
15054         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
15055         const to SRC.
15056         * kern/misc.c (grub_utf16_to_utf8): Likewise.
15058 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
15060         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
15061         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15062         grub_strcat.
15064         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
15065         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15066         grub_strcpy and grub_strlen. Take it into account that a space
15067         character is inserted as a delimiter.
15069 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
15071         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
15072         invalid magic in the error.
15074         * commands/search.c: New file.
15076         * util/grub-emu.c (main): Call grub_search_init and
15077         grub_search_fini.
15079         * kern/rescue.c (grub_rescue_print_disks): Removed.
15080         (grub_rescue_print_devices): New function.
15081         (grub_rescue_cmd_ls): Use grub_device_iterate with
15082         grub_rescue_print_devices instead of grub_disk_dev_iterate with
15083         grub_rescue_print_disks.
15085         * kern/partition.c (grub_partition_iterate): Return the result of
15086         PARTMAP->ITERATE instead of GRUB_ERRNO.
15088         * kern/device.c: Include grub/partition.h.
15089         (grub_device_iterate): New function.
15091         * include/grub/partition.h (grub_partition_iterate): Return int
15092         instead of grub_err_t.
15094         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
15095         prototype.
15096         [GRUB_UTIL] (grub_search_fini): Likewise.
15098         * include/grub/device.h (grub_device_iterate): New prototype.
15100         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15101         commands/search.c.
15102         (pkgdata_MODULES): Added search.mod.
15103         (search_mod_SOURCES): New variable.
15104         (search_mod_CFLAGS): Likewise.
15106         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
15107         (pkgdata_MODULES): Added search.mod.
15108         (search_mod_SOURCES): New variable.
15109         (search_mod_CFLAGS): Likewise.
15111         * commands/ls.c (grub_ls_list_disks): Renamed to ...
15112         (grub_ls_list_devices): ... this, and use grub_device_iterate.
15113         All callers changed.
15115         * DISTLIST: Added commands/search.c.
15117 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
15119         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
15120         conversion.
15121         (grub_getcharwidth): New function.
15123         * kern/misc.c (grub_utf8_to_ucs4): New function.
15125         * include/grub/term.h (struct grub_term): Added a new member
15126         "getcharwidth".
15127         (grub_getcharwidth): New prototype.
15129         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
15131         * term/i386/pc/console.c (map_char): New function. Segregated from
15132         grub_console_putchar.
15133         (grub_console_putchar): Use map_char.
15134         (grub_console_getcharwidth): New function.
15135         (grub_console_term): Specified grub_console_getcharwidth as
15136         getcharwidth.
15138         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
15139         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
15141         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
15142         GRUB_ERRNO.
15143         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
15144         on grub_strtoul completely.
15145         (write_char): Declare local variables in the beginning of the
15146         function.
15147         (grub_vesafb_getcharwidth): New function.
15148         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
15149         getcharwidth.
15151 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
15153         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
15154         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
15155         commands/i386/pc/vbetest.c.
15157         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
15158         call grub_vbe_get_controller_info again, because the returned
15159         information is volatile.
15160         (grub_vbe_set_video_mode): Mostly rewritten.
15161         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
15162         grub_vbe_status_t correctly.
15163         (grub_vbe_get_video_mode_info): Likewise.
15164         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
15165         several if statements.
15167         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
15168         * commands/i386/pc/vbeinfo.c: ... this.
15170         * commands/i386/pc/vbe_test.c: Renamed to ...
15171         * commands/i386/pc/vbetest.c: ... this.
15173         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
15174         ...
15175         (grub_cmd_vbeinfo): ... this. Save video modes before
15176         iterating. Skip a video mode, if it is not available, not enough
15177         information is given or it is monochrome. Show the memory
15178         model. Leave the interpretation of MODEVAR to grub_strtoul
15179         completely.
15180         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
15181         (GRUB_MOD_FINI): Likewise.
15183         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15184         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15185         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15186         duplicated grub_env_get. Leave the interpretation of MODEVAR to
15187         grub_strtoul completely.
15188         (real2pm): Removed.
15189         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15190         (GRUB_MOD_FINI): Likewise.
15192         * normal/misc.c: Include grub/mm.h.
15194         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15195         vbe_list_modes with vbetest.mod and vbeinfo.mod.
15196         (vbe_list_modes_mod_SOURCES): Removed.
15197         (vbe_list_modes_mod_CFLAGS): Likewise.
15198         (vbe_test_mod_SOURCES): Likewise.
15199         (vbe_test_mod_CFLAGS): Likewise.
15200         (vbeinfo_mod_SOURCES): New variable.
15201         (vbeinfo_mod_CFLAGS): Likewise.
15202         (vbetest_mod_SOURCES): Likewise.
15203         (vbetest_mod_CFLAGS): Likewise.
15205 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
15207         * normal/misc.c: New file.
15209         * DISTLIST: Added normal/misc.c.
15211         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15212         DISK to HOOK. Call HOOK with DISK.
15213         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15214         * partmap/pc.c (pc_partition_map_iterate): Likewise.
15215         * partmap/sun.c (sun_partition_map_iterate): Likewise.
15217         * normal/menu_entry.c (struct screen): Added a new member
15218         "completion_shown".
15219         (completion_buffer): New global variable.
15220         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15221         (store_completion): New function.
15222         (complete): Likewise.
15223         (clear_completions): Likewise.
15224         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15225         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15226         a tab, call complete.
15228         * normal/completion.c (disk_dev): Removed.
15229         (print_simple_completion): Likewise.
15230         (print_partition_completion): Likewise.
15231         (print_func): New global variable.
15232         (add_completion): Do not take the arguments WHAT or PRINT any
15233         longer. Added a new argument TYPE. Instead of printing directly,
15234         call PRINT_FUNC if not NULL.
15235         All callers changed.
15236         (complete_device): Use a local variable DEV instead of
15237         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15238         (grub_normal_do_completion): Take a new argument HOOK. Do not
15239         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15240         empty string, return NULL instead.
15241         All callers changed.
15243         * normal/cmdline.c (print_completion): New function.
15245         * kern/partition.c (grub_partition_iterate): Add an argument DISK
15246         to HOOK.
15247         All callers changed.
15249         * kern/disk.c (grub_print_partinfo): Removed.
15251         * include/grub/partition.h (struct grub_partition_map): Add a new
15252         argument DISK into HOOK of ITERATE.
15253         (grub_partition_iterate): Add a new argument DISK to HOOK.
15255         * include/grub/normal.h (enum grub_completion_type): New enum.
15256         (grub_completion_type_t): New type.
15257         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15258         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15259         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15260         (GRUB_COMPLETION_TYPE_FILE): Likewise.
15261         (grub_normal_do_completion): Added a new argument HOOK.
15262         (grub_normal_print_device_info): New prototype.
15264         * include/grub/disk.h (grub_print_partinfo): Removed.
15266         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15267         (normal_mod_SOURCES): Likewise.
15268         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15269         (normal_mod_SOURCES): Likewise.
15271         * commands/ls.c (grub_ls_list_disks): Use
15272         grub_normal_print_device_info instead of grub_print_partinfo. Free
15273         PNAME.
15274         (grub_ls_list_files): Use grub_normal_print_device_info instead of
15275         duplicating the code.
15277 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
15279         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
15280         follow GCS more precisely.
15281         * commands/i386/pc/vbe_test.c: Likewise.
15282         * include/grub/i386/pc/vbe.h: Likewise.
15283         * term/i386/pc/vesafb.c: Likewise.
15284         * video/i386/pc/vbe.c: Likewise.
15286 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
15288         * DISTLIST: Added term/i386/pc/vesafb.c
15289         DISTLIST: Added video/i386/pc/vbe.c
15290         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15291         DISTLIST: Added commands/i386/pc/vbe_test.c.
15292         * commands/i386/pc/vbe_list_modes.c: New file.
15293         * commands/i386/pc/vbe_test.c: Likewise.
15294         * term/i386/pc/vesafb.c: Likewise.
15295         * video/i386/pc/vbe.c: Likewise.
15296         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15297         (grub_vbe_probe) Added prototype.
15298         (grub_vbe_set_video_mode) Likewise.
15299         (grub_vbe_get_video_mode) Likewise.
15300         (grub_vbe_get_video_mode_info) Likewise.
15301         (grub_vbe_set_pixel_rgb) Likewise.
15302         (grub_vbe_set_pixel_index) Likewise.
15303         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15304         (pkgdata_MODULES): Added vesafb.mod.
15305         (pkgdata_MODULES): Added vbe_list_modes.mod.
15306         (pkgdata_MODULES): Added vbe_test.mod.
15307         (vbe_mod_SOURCES): Added.
15308         (vbe_mod_CFLAGS): Likewise.
15309         (vesafb_mod_SOURCES): Likewise.
15310         (vesafb_mod_CFLAGS): Likewise.
15311         (vbe_list_modes_mod_SOURCES): Likewise.
15312         (vbe_list_modes_mod_CFLAGS): Likewise.
15313         (vbe_test_mod_SOURCES): Likewise.
15314         (vbe_test_mod_CFLAGS): Likewise.
15316 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
15318         * normal/command.c (grub_command_execute): If INTERACTIVE is
15319         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15320         CMDLINE. Disable the pager if INTERACTIVE is true.
15321         All callers are changed.
15323         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15324         before reading a config file.
15325         * normal/main.c (read_config_file): Even if a command is not
15326         found, register it if it is within an entry.
15328         * util/grub-emu.c: Include sys/types.h and unistd.h.
15329         (options): Added --hold.
15330         (struct arguments): Added a new member "hold".
15331         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15332         missing.
15333         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15334         cleared by a debugger, if it is not zero.
15336         * include/grub/normal.h (grub_command_execute): Add an argument
15337         INTERACTIVE.
15339 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
15341         * DISTLIST: Added include/grub/i386/pc/vbe.h.
15343 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
15345         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15346         program with another one, because the old one didn't detect a bug
15347         in gcc-3.4. Always use regparm 2, because the new test is still
15348         not enough for gcc-4.0. Someone must investigate a simple test
15349         case which detects a bug in gcc-4.0.
15351 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
15353         * DISTLIST: Added normal/completion.c.
15355         * normal/completion.c: New file.
15357         * term/i386/pc/console.c (grub_console_getwh): New function.
15358         (grub_console_term): Assign grub_console_getwh to getwh.
15360         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15361         function is defined in normal/completion.c as
15362         grub_normal_do_completion.
15363         (grub_cmdline_get): Use grub_normal_do_completion instead of
15364         grub_tab_complete.
15366         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15367         returns non-zero, otherwise return 0.
15368         (grub_partition_iterate): First, probe the partition map. Then,
15369         call ITERATE only for this partition map.
15371         * kern/misc.c (grub_strncmp): Rewritten.
15373         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15374         returns non-zero. Otherwise return 0.
15376         * include/grub/partition.h (grub_partition_map_iterate): Return
15377         int instead of void.
15379         * include/grub/normal.h (grub_normal_do_completion): New prototype.
15381         * include/grub/misc.h (grub_strncmp): Change the type of N to
15382         grub_size_t.
15384         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15385         of void.
15387         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
15388         unsigned explicitly before comparing it with I.
15390         * kern/main.c (grub_env_write_root): Add the attribute unused into
15391         VAR.
15393         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15394         normal/completion.c.
15395         (normal_mod_SOURCES): Likewise.
15396         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15397         (normal_mod_SOURCES): Likewise.
15399         * normal/command.c (grub_iterate_commands): If ITERATE returns
15400         non-zero, return one immediately.
15402 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
15404         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15405         * kern/i386/pc/startup.S: Updated Global Descriptor table's
15406         descriptions.
15407         (grub_vbe_get_controller_info): New function.
15408         (grub_vbe_get_mode_info): Likewise.
15409         (grub_vbe_set_mode): Likewise.
15410         (grub_vbe_get_mode): Likewise.
15411         (grub_vbe_set_memory_window): Likewise.
15412         (grub_vbe_get_memory_window): Likewise.
15413         (grub_vbe_set_scanline_length): Likewise.
15414         (grub_vbe_get_scanline_length): Likewise.
15415         (grub_vbe_set_display_start): Likewise.
15416         (grub_vbe_get_display_start): Likewise.
15417         (grub_vbe_set_palette_data): Likewise.
15418         * include/grub/i386/pc/vbe.h: New file.
15420 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15422         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15423         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15424         * DISTLIST: Likewise.
15425         * kern/ieee1275/of.c: Moved to ...
15426         * kern/ieee1275/ieee1275.c: ... here.
15428 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15430         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15431         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15432         Pass 0 as `end' parameter to grub_strtoul().
15434 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15436         * include/grub/powerpc/ieee1275/console.h: Do not include
15437         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
15438         ifdef.
15439         (grub_console_cur_color): Remove i386-specific prototype.
15440         (grub_console_real_putchar): Likewise.
15441         (grub_console_checkkey): Likewise.
15442         (grub_console_getkey): Likewise.
15443         (grub_console_getxy): Likewise.
15444         (grub_console_gotoxy): Likewise.
15445         (grub_console_cls): Likewise.
15446         (grub_console_setcursor): Likewise.
15447         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15448         Include <grub/machine/console.h>.
15449         * term/ieee1275/ofconsole.c: Likewise.
15451 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
15453         * Makefile.in (LIBLZO): New variable.
15455         * configure.ac: Check for LZO version 2.
15457         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15458         lzo/lzo1x.h instead of lzo1x.h.
15460         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15461         of -llzo.
15463         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15464         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15466         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15467         copying the data from PARTITION to P.
15469 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15471         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15472         negative, unload the module.
15474         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15475         map is "pc_partition_map" but not "pc".
15476         (usage): Fix the description. The options are --boot-image and
15477         --core-image but not --boot-file or --core-file.
15478         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15479         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15480         DEFAULT_DIRECTORY.
15482         * util/i386/pc/grub-install.in: Do not specify --boot-file or
15483         --core-file. Specify INSTALL_DEVICE as an argument.
15485         * util/console.c: Include config.h.
15486         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15487         [HAVE_NCURSES_H]: Include ncurses.h.
15488         [HAVE_CURSES_H]: Include curses.h.
15489         [!A_NORMAL] (A_NORMAL): Defined as zero.
15490         [!A_STANDOUT] (A_STANDOUT): Likewise.
15492         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15493         -lncurses.
15494         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15496         * configure.ac: Check for curses libraries and headers.
15498         * Makefile.in (LIBCURSES): New variable.
15500         * genmk.rb (Script::rule): Set the executable bits.
15502         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15503         name of the PC partition map is "pc_partition_map" but not "pc".
15505 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15507         * util/i386/pc/grub-install.in (grub_probefs): New variable.
15508         (modules): Likewise.
15509         (usage): Added descriptions for --modules and --grub-probefs.
15510         Handle --modules and --grub-probefs. Save the arguments in MODULES
15511         and GRUB_PROBEFS, respectively.
15512         Auto-detect a filesystem module against GRUBDIR. If the result is
15513         empty and modules are not specified explicitly, abort the
15514         installation. Add the result to MODULES.
15516         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15517         disk/powerpc/ieee1275/ofdisk.c,
15518         include/grub/powerpc/ieee1275/init.h and
15519         term/powerpc/ieee1275/ofconsole.c.
15520         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15521         term/ieee1275/ofconsole.c.
15523         * include/grub/powerpc/ieee1275/console.h: Resurrected.
15525         * COPYING: Upgraded to the latest version. Only the address of the
15526         FSF office has changed.
15528 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15530         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15531         kern/ieee1275.c with kern/ieee1275/of.c.
15533         * kern/ieee1275.c: Moved to ...
15534         * kern/ieee1275/of.c: ... here.
15536 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
15538         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15539         readability.
15541         * config.guess: Updated to the latest version from gnulib.
15542         * config.sub: Likewise.
15543         * install.sh: Likewise.
15544         * mkinstalldirs: Likewise.
15546         * include/grub/console.h: Removed. This file is arch-specific. Do
15547         not put this in include/grub.
15549         * include/grub/i386/pc/console.h: Resurrected.
15551         * util/console.c: Include grub/machine/console.h instead of
15552         grub/console.h.
15553         * util/grub-emu.c: Likewise.
15555 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
15557         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15558         hardcoded value.
15560         From Vincent Pelletier  <subdino2004@yahoo.fr>
15561         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15562         Redefined to use grub_getwh.
15563         (grub_term): New member named getwh.
15564         (grub_getwh): New prototype.
15565         * kern/term.c (grub_getwh): New function.
15566         * term/i386/pc/console.c (grub_console_getwh): New function.
15567         (grub_console_term): New member `getwh'.
15568         * term/i386/pc/vga.c (grub_vga_getwh): New function.
15569         (grub_vga_term): New member `getwh'.
15570         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15571         grub_ssize_t.
15572         (grub_ofconsole_getw): New function.
15573         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15574         (grub_ofconsole_term): New field named getwh and new initial
15575         value.
15577 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
15579         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15580         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
15581         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15582         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15583         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15584         of <grub/machine/ieee1275.h>.
15585         * commands/ieee1275/reboot.c: Likewise.
15586         * boot/powerpc/ieee1275/ieee1275.c: Move ...
15587         * kern/ieee1275.c: ... to here.  All users updated.  Change all
15588         parameter structs to use new type `grub_ieee1275_cell_t'.
15589         * term/powerpc/ieee1275/ofconsole.c: Move ...
15590         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
15591         * disk/powerpc/ieee1275/ofdisk.c: Move ...
15592         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
15593         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15594         to return int.
15595         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15596         Remove unused prototypes.  All users updated.
15597         * include/grub/powerpc/ieee1275/console.h: Removed.
15598         * include/grub/powerpc/ieee1275/ieee1275.h: Define
15599         `grub_ieee1275_cell_t'.
15600         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15601         Cast comparisons with -1 to the correct type.
15602         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15603         type to match `grub_ieee1275_entry_fn'.
15605 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
15607         * DISTLIST: Added util/i386/pc/grub-probefs.c.
15609         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15610         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15611         partmap/sun.c.
15612         (grub_probefs_SOURCES): New variable.
15614         * util/i386/pc/grub-probefs.c: New file.
15616         * util/i386/pc/grub-setup.c (main): Call
15617         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15618         grub_hfs_init and grub_jfs_init to initialize the system. Call
15619         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15620         grub_pc_partition_map_fini to finish the system.
15622 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
15624         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15625         function.
15626         (grub_multiboot_load_elf32): Likewise.
15627         (grub_multiboot_is_elf64): Likewise.
15628         (grub_multiboot_load_elf64): Likewise.
15629         (grub_multiboot_load_elf): Likewise.
15630         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15631         an ELF32 or ELF64 file.
15632         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15634         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15635         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15636         NULL before calling FS->LABEL.
15637         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15638         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15639         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15640         before calling FS->LABEL.
15642 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
15644         * util/i386/pc/grub-install.in (datadir): New variable.
15645         (libdir): Removed.
15646         (pkgdatadir): New variable.
15647         (pkglibdir): Removed.
15649 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
15651         * DISTLIST: Added util/i386/pc/grub-install.in.
15653         * util/i386/pc/grub-install.in: New file.
15655         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15656         (grub_install_SOURCES): Likewise.
15658         * genmk.rb: Added support for scripts.
15659         (Script): New class.
15660         (scripts): New variable.
15662         * Makefile.in (install-local): Install sbin_SCRIPTS by
15663         INSTALL_SCRIPT.
15664         (uninstall): Remove sbin_SCRIPTS.
15666         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15667         device, try to get a GRUB device by
15668         grub_util_biosdisk_get_grub_dev.
15669         Free DEST_DEV.
15671         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15672         description for --device-map.
15674 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15676         Change the semantics of variable hooks. They now return strings
15677         instead of error values.
15679         * util/i386/pc/grub-setup.c: Include grub/env.h.
15680         (setup): Use grub_device_set_root instead of grub_env_set.
15682         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15683         grub_env_get instead of grub_device_set_root and
15684         grub_device_get_root, respectively.
15686         * kern/main.c (grub_env_write_root): New function.
15687         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15688         grub_env_set instead of grub_device_set_root.
15690         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15691         many variables.
15692         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15693         rather than calling ENV->WRITE_HOOK afterwards.
15694         (grub_env_get): Return the result of ENV->READ_HOOK rather than
15695         passing a pointer of a pointer.
15696         (grub_register_variable_hook): Change the types of "read_hook" and
15697         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15698         respectively.
15699         Allocate the default empty string on the heap, because this string
15700         may be freed later.
15702         * kern/device.c: Include grub/env.h.
15703         (grub_device_set_root): Removed.
15704         (grub_device_get_root): Likewise.
15705         (grub_device_open): Use grub_env_get instead of
15706         grub_device_get_root.
15708         * include/grub/env.h (grub_env_read_hook_t): New type.
15709         (grub_env_write_hook_t): Likewise.
15710         (grub_env_var): Change the types of "read_hook" and "write_hook"
15711         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15712         (grub_register_variable_hook): Likewise.
15714         * include/grub/device.h (grub_device_set_root): Removed.
15715         (grub_device_set_root): Likewise.
15717         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15718         make sure that DIRNAME terminates with '/', so that
15719         grub_fat_find_dir will fail if PATH is not a directory.
15721         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15722         from DIRNAME.
15723         Use the qualifier auto for print_files and print_files_long.
15724         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15725         as a regular file.
15726         Put a newline only if there is no error.
15727         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15728         used.
15730 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15732         * kern/partition.c (grub_partition_probe): Initialize PART to
15733         NULL. Otherwise, when no partition map is registered, this returns
15734         a garbage.
15736 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
15738         * partmap/apple.c (apple_partition_map_iterate): Check if POS
15739         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15740         valid.
15742 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
15744         * commands/ls.c (grub_ls_list_disks): Print the filesystem
15745         information on each device, if it does not have partitions. Print
15746         "Device" instead of "Disk", because this function is not specific
15747         to disk devices.
15749         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15750         static to ensure that it is put on the memory rather than a
15751         register.
15753 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15755         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15756         (grub_cat_init): Likewise.
15757         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15758         (options): Likewise.
15759         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15760         (grub_configfile_init): Likewise.
15761         * font/manager.c (GRUB_MOD_INIT): Likewise.
15762         * commands/help.c (GRUB_MOD_INIT): Likewise.
15763         (grub_help_init): Likewise.
15764         * normal/command.c (grub_command_init): Likewise.
15765         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15766         * disk/loopback.c (grub_loop_init): Likewise.
15767         (GRUB_MOD_INIT): Likewise.
15768         * commands/ls.c (grub_ls_init): Likewise.
15769         (GRUB_MOD_INIT): Likewise.
15770         (options): Likewise.
15771         * commands/boot.c (grub_boot_init): Likewise.
15772         (GRUB_MOD_INIT): Likewise.
15773         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15774         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15775         (GRUB_MOD_INIT): Likewise.
15776         * commands/cmp.c (grub_cmp_init): Likewise.
15777         (GRUB_MOD_INIT): Likewise.
15779         * normal/arg.c: Use <> instead of "" to include header files.
15780         (SHORT_ARG_HELP): New macro.
15781         (SHORT_ARG_USAGE): Likewise.
15782         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15783         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15784         descriptions.
15785         (find_short): Check if C is 'h' or 'u' explicitly.
15786         (grub_arg_show_help): Use space characters instead of tabs. Treat
15787         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15788         are shown with --help and --usage only if they are not used for
15789         the command itself.
15790         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15791         'h' and 'u'.
15793         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15794         const into "longarg". Change the type of "shortarg" to int.
15796 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15798         * boot/i386/pc/boot.S (boot_drive_check): New label.
15800         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15801         macro.
15803         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15804         which do not pass a boot drive correctly. Copied from GRUB Legacy.
15806 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15808         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15809         When turning off Gate A20, skip the check and return immediately,
15810         because this is not fatal usually.
15812 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15814         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15815         be 0x7C00 instead of 0x8000.
15817         * boot/i386/pc/pxeboot.S: Rewritten.
15819         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15820         EXT_C.
15821         (gate_a20_check_state): Read a byte from 0x108000. Invert the
15822         result.
15824 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
15826         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15827         robustness. This routine now supports a BIOS call and System
15828         Control Port A to modify the gate A20.
15830         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15831         Increased to 0x440.
15833 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
15835         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15836         device path and resulting ihandle.
15837         (grub_ofdisk_close): dprintf the ihandle being closed.
15838         (grub_ofdisk_read): dprintf function parameters.
15839         * kern/mm.c (grub_mm_init_region): Likewise.
15840         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15841         (grub_linux_boot): dprintf the Linux entry point, initrd address and
15842         size, and boot arguments.
15843         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15844         before loading into memory.
15845         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15846         before loading into memory.
15848 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
15850         * kern/mm.c: Added much documentation.
15851         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15852         8, set to 5 instead of 8.
15854 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15856         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15858         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15859         (grub_mkdevicemap_SOURCES): New variable.
15861         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15862         lib/device.c of GRUB Legacy.
15864 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15866         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15867         instead of PATH is NULL.
15869 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
15871         * commands/cmp.c (BUFFER_SIZE): New macro.
15872         (grub_cmd_cmp): Close the right file at the right time.  Compare
15873         only data just read.  Don't report files of different  size as
15874         identical.  Dynamically allocate buffers.  Move variable
15875         declarations at the beginning of function.
15877 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
15879         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15880         reverse.
15882 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
15884         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15885         when backspace is pressed at beginning of line.
15887 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
15889         * DISTLIST: Added genfslist.sh.
15891         * normal/main.c (fs_module_list): New variable.
15892         (autoload_fs_module): New function.
15893         (read_fs_list): Likewise.
15894         (grub_normal_execute): Call read_fs_list.
15896         * kern/fs.c (grub_fs_autoload_hook): New variable.
15897         (grub_fs_probe): Added support for auto-loading.
15899         * include/grub/normal.h (struct grub_fs_module_list): New struct.
15900         (grub_fs_module_list_t): New type.
15902         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15903         (grub_fs_autoload_hook): New prototype.
15905         * genfslist.sh: New file.
15907         * genmk.rb: Added a rule to generate a filesystem list.
15909 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
15911         * configure.ac: Fix the test for cross-compiling.
15913         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
15914         define GRUB_UTIL anymore.
15916         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15917         so this function works on other systems than just big endian.
15918         (load_modules): Likewise.
15919         (add_segments): Likewise.
15921 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
15923         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
15924         contains `l' modifier, get a long from va_arg().
15926 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
15928         * kern/mm.c (grub_free): If the next free block which is being
15929         merged is the first free block, set the first block to the block
15930         being freed.
15931         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15933 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15935         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15936         `grub_ieee1275_chosen'.
15938 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15940         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15941         (grub_ieee1275_chosen): New variable.
15942         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15943         `chosen'.
15944         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15945         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15946         Rename first argument to `phandle' for consistency.
15947         (grub_ieee1275_get_property_length): Likewise.
15948         (grub_ieee1275_next_property): Likewise.  Change type of first argument
15949         to grub_ieee1275_phandle_t.
15950         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15951         Move export next to declaration.
15952         (grub_ieee1275_chosen): New variable.
15953         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15954         Correct cosmetic typo.
15955         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15956         `grub_ieee1275_chosen'.
15957         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15958         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15959         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15960         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15961         `grub_ieee1275_chosen'.
15963 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
15965         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15966         /chosen/bootargs.
15967         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15968         /chosen/bootargs as "variable=value" pairs.
15970 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
15972         * include/grub/misc.h (grub_dprintf): New macro.
15973         (grub_real_dprintf): New prototype.
15974         (grub_strword): Likewise.
15975         (grub_iswordseparator): Likewise.
15976         * kern/misc.c (grub_real_dprintf): New function.
15977         (grub_strword): Likewise.
15978         (grub_iswordseparator): Likewise.
15980 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
15982         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15983         (roundup): Remove macro.
15984         (grub_ieee1275_flags): Make static.
15985         (grub_ieee1275_realmode): Remove.
15986         (grub_ieee1275_test_flag): New function.
15987         (grub_ieee1275_set_flag): Likewise.
15988         (find_options): Rename to `grub_ieee1275_find_options'; update
15989         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15990         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15991         (cmain): New prototype.
15992         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15993         `grub_ieee1275_flags' directly.
15994         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15995         machine/biosdisk.h.
15996         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15997         Don't include grub/machine/init.h.
15998         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15999         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16000         Remove prototype.
16001         (grub_ieee1275_realmode): Likewise.
16002         (grub_ieee1275_flag): New enum.
16003         (grub_ieee1275_test_flag): New prototype.
16004         (grub_ieee1275_set_flag): New prototype.
16005         * include/grub/powerpc/ieee1275/init.h: Remove file.
16006         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
16007         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
16008         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
16009         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
16010         comment.
16011         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
16012         `grub_ieee1275_test_flag'.
16013         (grub_ieee1275_encode_devname): Likewise.
16015 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
16017         * include/grub/powerpc/ieee1275/ieee1275.h
16018         (grub_ieee1275_encode_devname): New prototype.
16019         (grub_ieee1275_get_filename): Likewise.
16020         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
16021         function.
16022         (grub_set_prefix): Likewise.
16023         (grub_machine_init): Call grub_set_prefix.
16024         * kern/powerpc/ieee1275/openfw.c: Fix typos.
16025         (grub_parse_type): New enum.
16026         (grub_ieee1275_get_devargs): New function.
16027         (grub_ieee1275_get_devname): Likewise.
16028         (grub_ieee1275_parse_args): Likewise.
16029         (grub_ieee1275_get_filename): Likewise.
16030         (grub_ieee1275_encode_devname): Likewise.
16032 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
16034         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
16035         `grub_loader_unset'.
16037 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
16039         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
16040         instead of grub_ieee1275_interpret.
16041         (grub_halt_init): New function.
16042         (grub_halt_fini): Likewise.
16043         (GRUB_MOD_INIT): Correct message grammar.
16044         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
16045         instead of grub_ieee1275_interpret.
16046         (grub_reboot_init): New function.
16047         (grub_reboot_fini): Likewise.
16048         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
16049         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
16050         util/i386/pc/misc.c with commands/ieee1275/halt.c,
16051         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
16052         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
16053         function.
16054         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
16055         Add prototype.
16056         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
16057         prototype.
16058         (grub_halt): Likewise.
16059         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
16060         (cmain): Remove __attribute__((unused)).
16061         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
16062         (grub_heap_len): Likewise.
16063         (grub_machine_fini): New function.
16064         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
16065         (grub_halt): Likewise.
16066         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
16067         function.
16068         * util/powerpc/ieee1275/misc.c: New file.
16070 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
16072         * DISTLIST: New file.
16073         * gendistlist.sh: Likewise.
16075         * Makefile.in (COMMON_DISTFILES): Removed.
16076         (BOOT_DISTFILES): Likewise.
16077         (CONF_DISTFILES): Likewise.
16078         (DISK_DISTFILES): Likewise.
16079         (FS_DISTFILES): Likewise.
16080         (INCLUDE_DISTFILES): Likewise.
16081         (KERN_DISTFILES): Likewise.
16082         (LOADER_DISTFILES): Likewise.
16083         (TERM_DISTFILES): Likewise.
16084         (UTIL_DISTFILES): Likewise.
16085         (DISTFILES): Likewise.
16086         (uninstall): Uninstall files in $(pkgdata_DATA).
16087         (DISTLIST): New target.
16088         (distdir): Use the contents of the file DISTLIST to get a list of
16089         distributed files.
16091 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
16093         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
16094         descriptor. This is ported from GRUB Legacy.
16096         * gencmdlist.sh: Added an extra semicolon to make it work with
16097         old sed versions. Reported by Robert Bihlmeyer
16098         <robbe@orcus.priv.at>.
16100 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
16102         Automatic loading of commands is supported.
16104         * normal/main.c (read_command_list): New function.
16105         (grub_normal_execute): Call read_command_list.
16107         * normal/command.c (grub_register_command): Return zero or CMD.
16108         Allocate CMD->NAME from the heap.
16109         Initialize CMD->MODULE_NAME to zero.
16110         Find the same name as well. If the same command is found and it is
16111         a dummy command, overwrite members. If it is not a dummy command,
16112         return zero.
16113         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
16114         (grub_command_find): If a dummy command is found, load a module
16115         and retry to find a command only once.
16117         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
16118         make sure that each command is loaded.
16120         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
16121         macro.
16122         (struct grub_command): Remove const from the member `name'.
16123         Add a new member `module_name'.
16124         (grub_register_command): Return grub_command_t.
16126         * commands/help.c (grub_cmd_help): Call grub_command_find to make
16127         sure that each command is loaded.
16129         * genmk.rb (PModule::rule): Specify a module name without the
16130         suffix ".mod" to gencmdlist.sh.
16132 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
16134         * gencmdlist.sh: New file.
16136         * genmk.rb (PModule::rule): Generate a rule for a command list.
16137         Clean command.lst.
16138         Generate command.lst from $(COMMANDFILES).
16140         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
16141         (DATA): Added $(pkgdata_DATA).
16142         (install-local): Install files in $(pkgdata_DATA).
16144 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
16146         * term/i386/pc/vga.c (debug_command): Removed.
16147         (GRUB_MOD_INIT): Do not register the command "debug".
16149         From Hollis Blanchard:
16150         * commands/configfile.c: New file.
16151         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16152         commands/configfile.c.
16153         (pkgdata_MODULES): Added configfile.mod.
16154         (configfile_mod_SOURCES): New variable.
16155         (configfile_mod_CFLAGS): Likewise.
16156         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16157         commands/configfile.c.
16158         (pkgdata_MODULES): Added configfile.mod.
16159         (configfile_mod_SOURCES): New variable.
16160         (configfile_mod_CFLAGS): Likewise.
16161         * util/grub-emu.c (main): Call grub_configfile_init and
16162         grub_configfile_fini.
16163         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
16164         prototype.
16165         [GRUB_UTIL] (grub_configfile_fini): Likewise.
16167 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
16169         * normal/arg.c (grub_arg_show_help): Do not show the bug report
16170         address.
16172         * commands/help.c (grub_cmd_help): Do not print newlines after
16173         the last command in print_command_help.
16175 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
16177         * commands/default.h: New file.
16178         * commands/timeout.h: Likewise.
16179         * normal/context.c: Likewise.
16181         * util/misc.c: Do not include sys/times.h.
16182         Include sys/time.h and grub/machine/time.h.
16183         (grub_get_rtc): Rewritten with gettimeofday.
16185         * util/grub-emu.c (main): Call grub_default_init and
16186         grub_timeout_init before grub_normal_init, and call
16187         grub_timeout_fini and grub_default_fini after grub_main.
16189         * util/console.c (grub_ncurses_checkkey): Return the read
16190         character or -1.
16192         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16193         timeouts.
16195         * normal/main.c (read_config_file): Push MENU. If this fails,
16196         print an error and wait for a user input.
16197         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16198         If a menu is empty or an error occurs, pop MENU.
16199         (grub_normal_execute): Pop and free MENU after grub_menu_run
16200         returns.
16202         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16204         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16205         include time.h.
16206         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16207         without GRUB_UTIL.
16208         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16209         time.h.
16210         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16211         without GRUB_UTIL.
16213         * include/grub/normal.h (struct grub_menu_list): New struct.
16214         (grub_menu_list_t): New type.
16215         (struct grub_context): New struct.
16216         (grub_context_t): New type.
16217         (grub_register_command): Got rid of EXPORT_FUNC.
16218         (grub_unregister_command): Likewise.
16219         (grub_context_get): New prototype.
16220         (grub_context_get_current_menu): Likewise.
16221         (grub_context_push_menu): Likewise.
16222         (grub_context_pop_menu): Likewise.
16223         [GRUB_UTIL] (grub_default_init): Likewise.
16224         [GRUB_UTIL] (grub_default_fini): Likewise.
16225         [GRUB_UTIL] (grub_timeout_init): Likewise.
16226         [GRUB_UTIL] (grub_timeout_fini): Likewise.
16228         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16229         commands/timeout.c and normal/context.c.
16230         (pkgdata_MODULES): Added default.mod and timeout.mod.
16231         (normal_mod_SOURCES): Added normal/context.c.
16232         (default_mod_SOURCES): New variable.
16233         (default_mod_CFLAGS): Likewise.
16234         (timeout_mod_SOURCES): Likewise.
16235         (timeout_mod_CFLAGS): Likewise.
16236         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16237         conf/i386-pc.rmk.
16238         (pkgdata_MODULES): Added default.mod and timeout.mod.
16239         (normal_mod_SOURCES): Added normal/context.c.
16240         (default_mod_SOURCES): New variable.
16241         (default_mod_CFLAGS): Likewise.
16242         (timeout_mod_SOURCES): Likewise.
16243         (timeout_mod_CFLAGS): Likewise.
16245         * Makefile.in (all-local): Added $(MKFILES).
16247 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16249         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16250         (grub_emu_SOURCES): Likewise.
16251         (pkgdata_MODULES): Add `sun.mod'.
16252         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16253         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16254         `partmap/sun.c'.
16255         (pkgdata_MODULES): Add `sun.mod'.
16256         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16257         * include/grub/partition.h (grub_sun_partition_map_init): New
16258         prototype.
16259         (grub_sun_partition_map_fini): Likewise.
16260         * partmap/sun.c: New file.
16261         * util/grub-emu.c (main): Initialize and de-initialize the sun
16262         partitionmap support.
16264 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
16266         This implements an Emacs-like menu entry editor.
16268         * normal/menu_entry.c: New file.
16270         * util/console.c (grub_ncurses_putchar): Translate some Unicode
16271         characters to ASCII.
16272         (saved_char): New variable.
16273         (grub_ncurses_checkkey): Rewritten completely.
16274         (grub_ncurses_getkey): Likewise.
16275         (grub_ncurses_init): Call raw instead of cbreak.
16277         * normal/menu.c (print_entry): Do not put a space.
16278         (init_page): Renamed to ...
16279         (grub_menu_init_page): ... this. All callers changed.
16280         (edit_menu_entry): Removed.
16281         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16283         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16285         * kern/misc.c (grub_vprintf): Call grub_refresh.
16287         * normal/menu.c (DISP_LEFT): Renamed to ...
16288         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16289         * normal/menu.c (DISP_UP): Renamed to ...
16290         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16291         * normal/menu.c (DISP_RIGHT): Renamed to ...
16292         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16293         * normal/menu.c (DISP_DOWN): Renamed to ...
16294         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16295         * normal/menu.c (DISP_HLINE): Renamed to ...
16296         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16297         * normal/menu.c (DISP_VLINE): Renamed to ...
16298         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16299         * normal/menu.c (DISP_UL): Renamed to ...
16300         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16301         * normal/menu.c (DISP_UR): Renamed to ...
16302         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16303         * normal/menu.c (DISP_LL): Renamed to ...
16304         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16305         * normal/menu.c (DISP_LR): Renamed to ...
16306         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16307         * normal/menu.c (TERM_WIDTH): Renamed to ...
16308         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16309         * normal/menu.c (TERM_HEIGHT): Renamed to ...
16310         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16311         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16312         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16313         * normal/menu.c (TERM_MARGIN): Renamed to ...
16314         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16315         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16316         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16317         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16318         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16319         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16320         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16321         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16322         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16323         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16324         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16325         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16326         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16327         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16328         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16329         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16330         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16331         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16332         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16333         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16334         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16335         All callers changed.
16337         * include/grub/normal.h: New prototype.
16339         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16340         normal/menu_entry.c.
16341         (normal_mod_SOURCES): Likewise.
16342         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16343         (normal_mod_SOURCES): Likewise.
16345 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
16347         * include/grub/normal.h (grub_halt_init): New prototype.
16348         (grub_halt_fini): Likewise.
16349         (grub_reboot_init): Likewise.
16350         (grub_reboot_fini): Likewise.
16352         * util/grub-emu.c: Include signal.h.
16353         (main_env): New global variable.
16354         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16355         catch C-c.
16356         (grub_machine_fini): New function.
16357         (main): Call grub_halt_init and grub_reboot_init before
16358         grub_main, and grub_reboot_fini and grub_halt_fini after it.
16359         Call setjmp with MAIN_ENV to go back afterwards.
16360         Call grub_machine_fini right before return.
16362         * include/grub/util/misc.h: Include setjmp.h.
16363         (main_env): New prototype.
16365         * include/grub/kernel.h (grub_machine_fini): New prototype.
16366         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16367         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16369         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16370         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16371         * term/i386/pc/console.c (grub_console_fini): Likewise.
16373         * util/i386/pc/misc.c: New file.
16375         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16376         util/i386/pc/misc.c, commands/i386/pc/halt.c and
16377         commands/i386/pc/reboot.c.
16379 2005-02-14  Guillem Jover  <guillem@hadrons.org>
16381         * include/grub/dl.h (grub_dl_check_header): New prototype.
16382         (grub_arch_dl_check_header): Change return type to grub_err_t,
16383         remove size parameter and export function.  Update all callers.
16384         * kern/dl.c (grub_dl_check_header): New function.
16385         (grub_dl_load_core): Use `grub_dl_check_header' instead of
16386         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
16387         are inside the core.
16388         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16389         independent ELF header checks.
16390         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16391         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16392         `grub_dl_check_header' instead of explicit checks.  Check for the
16393         ELF type.
16394         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16395         `grub_dl_check_header' instead of explicit checks.  Remove arch
16396         specific ELF header checks.
16398         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16399         argument SIZE.
16401 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
16403         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16404         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16406 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
16408         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16409         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16410         (part_map_iterate): Clear `grub_errno' and return 0 if
16411         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16412         * partmap/amiga.c (amiga_partition_map_iterate): Return
16413         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16414         * partmap/apple.c (apple_partition_map_iterate): Likewise.
16416 2005-02-01  Guillem Jover  <guillem@hadrons.org>
16418         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16419         help info.
16421 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16423         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16424         Removed prototype.
16425         (grub_rescue_cmd_linux): New prototype.
16426         (grub_rescue_cmd_initrd): Likewise.
16427         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16428         `bi_rec'.
16429         (grub_linux_release_mem): Release the memory for the initrd.
16430         (grub_load_linux): Renamed from this...
16431         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
16432         Changed `entry' not to be static.  Loop over memory regions to
16433         find another one when the default fails.
16434         (grub_rescue_cmd_initrd): New function.
16435         (grub_linux_init): Remove function.
16436         (grub_linux_fini): Likewise.
16437         (GRUB_MOD_INIT): Register `initrd'.
16438         (GRUB_MOD_FINI): Unregister `initrd'.
16439         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16440         Function removed.
16441         (grub_linux_normal_fini): Likewise.
16442         (GRUB_MOD_INIT): Register `initrd'.
16443         (GRUB_MOD_FINI): Unregister `initrd'.
16445 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16447         * commands/help.c: New file.
16448         * normal/arg.c (show_help): Renamed to...
16449         (grub_arg_show_help): ... this.
16450         * commands/i386/pc/halt.c: New file.
16451         * commands/i386/pc/reboot.c: Likewise.
16452         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16453         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16454         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16455         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16456         variables.
16457         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16458         `commands/help.c'.
16459         (pkgdata_MODULES): Add `help.mod'.
16460         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16461         * grub/i386/pc/init.h (grub_reboot): New prototype.
16462         (grub_halt): Likewise.
16463         * include/grub/normal.h (grub_arg_show_help): New prototype.
16464         (grub_help_init): Likewise.
16465         (grub_help_fini): Likewise.
16466         * util/grub-emu.c (main): Initialize and deinitialize the help
16467         command.
16469         * normal/cmdline.c (grub_cmdline_get): Doc fix.
16471         * normal/command.c (grub_command_init): Fixed the description of
16472         the `set' and `unset' commands.
16474 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16476         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16477         function.
16478         * commands/ieee1275/halt.c: New file.
16479         * commands/ieee1275/reboot.c: Likewise.
16480         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16481         `__attribute__ ((unused))'.  Some GCS related fixed.
16482         (grub_suspend_init) [GRUB_UTIL]: Function removed.
16483         (grub_suspend_fini): Likewise.
16484         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16485         and `halt.mod'.
16486         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16487         (halt_mod_CFLAGS): New variables.
16488         * include/grub/powerpc/ieee1275/ieee1275.h
16489         (grub_ieee1275_interpret): New prototype.
16491 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
16493         * include/grub/misc.h (memmove): New prototype.
16494         (memcpy): Likewise.
16496 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
16498         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16499         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
16501 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
16503         * kern/misc.c (grub_strndup): Function rewritten.
16505 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
16507         * normal/menu.c (TERM_WIDTH): Macro redefined.
16508         (TERM_TOP_BORDER_Y): Likewise.
16509         (draw_border): Replaced while-loop by a for-loop.  Make the number
16510         of lines consistent with the number of lines displayed in
16511         print_entries.  Added a margin below the rectangle.
16512         (print_entry): Make the entry fit in the rectangle.
16513         (print_entries): Display the scroll arrows next to the right
16514         border.
16516 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16518         * fs/minix.c (grub_minix_find_file): Reserve more space for
16519         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
16520         `grub_strncpy' to copy `path' into it.
16522 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16524         Add the loopback device, a device via which files can be accessed
16525         as devices.
16527         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16528         (pkgdata_MODULES): Add loopback.mod.
16529         (loopback_mod_SOURCES): New variable.
16530         (loopback_mod_CFLAGS): Likewise.
16531         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16532         `disk/loopback.c'.
16533         (pkgdata_MODULES): Add loopback.mod.
16534         (loopback_mod_SOURCES): New variable.
16535         (loopback_mod_CFLAGS): Likewise.
16536         * disk/loopback.c: new file.
16537         * include/grub/normal.h (grub_loop_init): New prototype.
16538         (grub_loop_fini): New prototype.
16539         * util/grub-emu.c (main): Initialize and de-initialize loopback
16540         support.
16541         * include/grub/disk.h (grub_disk_dev_id): Add
16542         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16544 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
16546         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16547         function.
16548         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16549         (suspend_mod_SOURCES): New variable.
16550         (suspend_mod_CFLAGS): Likewise.
16551         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16552         New prototype.
16553         * commands/ieee1275/suspend.c: New file.
16555 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16557         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16558         ((unused))' to `__attribute__ ((used))'.
16559         (GRUB_MOD_FINI): Likewise.
16560         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16561         * genmk.rb (PModule): Assign space to common symbols when linking
16562         modules.
16564 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
16566         * include/grub/mm.h (grub_mm_init_region): Change the type of the
16567         `unsigned' arguments to `grub_size_t'.
16568         (grub_malloc): Likewise.
16569         (grub_realloc): Likewise.
16570         (grub_memalign): Likewise.
16571         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16572         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16573         * util/misc.c (grub_malloc): Likewise.
16574         (grub_realloc): Likewise.
16575         * kern/mm.c (get_header_from_pointer): Change the casts to
16576         `unsigned' into a cast to `grub_size_t'.
16578         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16579         point to `currnode' when `currnode' is changed.
16581         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
16582         Schottelius <nico-linux@schottelius.org>.
16584 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
16586         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16587         (note_path): Remove variable.
16588         (GRUB_IEEE1275_NOTE_NAME): New macro.
16589         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16590         (grub_ieee1275_note_hdr): New structure.
16591         (grub_ieee1275_note_desc): Likewise.
16592         (grub_ieee1275_note): Likewise.
16593         (load_note): Remove `dir' argument.  All callers updated.  Remove
16594         `note_img' and `path'.  Do not load a file from `note_path'.
16595         Initialize a struct grub_ieee1275_note and write that to `out'.
16596         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16598 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
16600         * util/misc.c (grub_util_read_image): Revert last change.  It
16601         called `grub_util_read_at', which seeks from the beginning of the
16602         file.
16604 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
16606         * TODO: Add note about endianness in grub-mkimage.
16607         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16608         section.
16609         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16610         (grub_mkimage_SOURCES): New target.
16611         * include/grub/kernel.h (grub_start_addr): Remove variable.
16612         (grub_end_addr): Likewise.
16613         (grub_total_module_size): Likewise.
16614         (grub_kernel_image_size): Likewise.
16615         (GRUB_MODULE_MAGIC): New constant.
16616         (grub_module_info): New structure.
16617         (grub_arch_modules_addr): New prototype.
16618         (grub_get_end_addr): Remove prototype.
16619         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16620         * include/grub/powerpc/ieee1275/kernel.h: New file.
16621         * include/grub/util/misc.h (grub_util_get_fp_size): New
16622         prototype.
16623         (grub_util_read_at): Likewise.
16624         (grub_util_write_image_at): Likewise.
16625         * kern/main.c (grub_get_end_addr): Remove function.
16626         (grub_load_modules): Call grub_arch_modules_addr instead of using
16627         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
16628         the grub_module_info fields instead of calling grub_get_end_addr
16629         as loop conditions.  Move grub_add_unused_region code here.
16630         (grub_add_unused_region): Remove function.
16631         * kern/i386/pc/init.c: Include grub/cache.h.
16632         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
16633         one call to add_mem_region.
16634         (grub_arch_modules_addr): New function.
16635         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16636         (grub_total_module_size): Likewise.
16637         Include grub/machine/kernel.h.
16638         (grub_arch_modules_addr): New function.
16639         * util/grub-emu.c (grub_end_addr): Remove variable.
16640         (grub_total_module_size): Likewise.
16641         (grub_arch_modules_addr): New function.
16642         * util/misc.c: Include unistd.h.
16643         (grub_util_get_fp_size): New function.
16644         (grub_util_read_at): Likewise.
16645         (grub_util_write_image_at): Likewise.
16646         (grub_util_read_image): Call grub_util_read_at.
16647         (grub_util_write_image): Call grub_util_write_image_at.
16648         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16649         additional memory in kernel_img for a struct grub_module_info.
16650         Fill in that grub_module_info.
16651         * util/powerpc/ieee1275/grub-mkimage.c: New file.
16653 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16655         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16656         New function.
16657         * include/grub/powerpc/ieee1275/ieee1275.h
16658         (grub_ieee1275_milliseconds): New prototype.
16659         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16660         Change to 1000.
16661         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16662         grub_ieee1275_milliseconds.
16664 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16666         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16667         variable.
16668         (find_options): New function.
16669         (cmain): Call find_options.
16670         * include/grub/powerpc/ieee1275/ieee1275.h
16671         (grub_ieee1275_realmode): New extern variable.
16672         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16673         grub_map if grub_ieee1275_realmode is false.
16675 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
16677         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16678         lines are inserted and make it work like readline.  Reported by
16679         Vincent Pelletier <subdino2004@yahoo.fr>.
16681 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
16683         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16685         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16686         `kern/powerpc/cache.S'.
16688 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
16690         * genmk.rb: Handle the `Program' class in the main loop.  Written
16691         by Johan Rydberg <jrydberg@gnu.org>.
16692         (Program): New class.
16693         (programs): New variable.
16694         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16695         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
16696         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
16697         (help_arch): Function removed.
16698         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16699         `powerpc/libgcc.h' and `loader.h'.
16700         (pkgdata_PROGRAMS): New variable.
16701         (sbin_UTILITIES): Variable removed.
16702         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16703         (grubof_SOURCES): Variable re-defined so it only includes the
16704         core functionality.
16705         (grubof_CFLAGS): Remove `-DGRUBOF'.
16706         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16707         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16708         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16709         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16710         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16711         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16712         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16713         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16714         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16715         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16716         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16717         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16718         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16719         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16720         (pc_mod_CFLAGS): New variables.
16721         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16722         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16723         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16724         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16725         Moved from here...
16726         * include/grub/i386/pc/init.h (grub_os_area_addr)
16727         (rub_os_area_size): ... to here.
16728         * include/grub/powerpc/ieee1275/ieee1275.h
16729         (grub_ieee1275_entry_fn): Export symbol.
16730         * include/grub/powerpc/ieee1275/init.h: New file.
16731         * include/grub/powerpc/libgcc.h: Likewise.
16732         * include/grub/cache.h: Likewise.
16733         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
16734         <hollis@penguinppc.org>.
16735         * kern/dl.c: Include <grub/cache.h>.
16736         (grub_dl_flush_cache): New function.
16737         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16738         for this module.
16739         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16740         (grub_console_init): Removed prototypes.
16741         (grub_machine_init): Don't initialize the modules anymore.
16742         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16743         static.
16744         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16745         Macro undef removed.
16746         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16747         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16748         relocation `R_PPC_REL32'.  Return an error when the relocation is
16749         unknown.
16750         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16751         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16752         * util/misc.c (grub_arch_sync_caches): Likewise.
16754 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
16756         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16757         `symlist.c', add `grubof_symlist.c'.
16758         (symlist.c): Variable removed.
16759         (grubof_HEADERS): Variable added.
16760         (grubof_symlist.c): New target.
16761         (kernel_syms.lst): Use `grubof_HEADERS' instead of
16762         `kernel_img_HEADERS'.
16763         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16764         * kern/powerpc/dl.c: New file.
16765         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16766         Function removed.
16767         (grub_arch_dl_relocate_symbols): Likewise.
16768         (grub_register_exported_symbols): Likewise.
16770 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
16772         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16773         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
16774         to fail instead.  Reported by Vincent Pelletier
16775         <subdino2004@yahoo.fr>.
16777         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16778         it is not allocated.  Reported by Vincent Pelletier
16779         <subdino2004@yahoo.fr>.
16781         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16782         output so the output looks better.
16784 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
16786         Modulize the partition map support and add support for the amiga
16787         partition map.
16789         * commands/ls.c: Include <grub/partition.h> instead of
16790         <grub/machine/partition.h>.
16791         * kern/disk.c: Likewise.
16792         * kern/rescue.c: Likewise.
16793         * loader/i386/pc/chainloader.c: Likewise.
16794         * normal/cmdline.c: Likewise.
16795         * kern/powerpc/ieee1275/init.c: Likewise.
16796         (grub_machine_init): Call `grub_pc_partition_map_init',
16797         `grub_amiga_partition_map_init' and
16798         `grub_apple_partition_map_init'.
16799         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16800         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
16801         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
16802         `partition.h' and `pc_partition.h'.
16803         (grub_setup_SOURCES): Remove
16804         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
16805         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16806         (grub_emu_SOURCES): Likewise.
16807         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16808         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16809         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16810         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16811         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
16812         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16813         (grubof_SOURCES): Likewise.
16814         * disk/i386/pc/partition.c: File removed.
16815         * disk/powerpc/ieee1275/partition.c: Likewise.
16816         * include/grub/powerpc/ieee1275/partition.h: Likewise.
16817         * include/grub/i386/pc/partition.h: Likewise.
16818         * kern/partition.c: New file.
16819         * partmap/amiga.c: Likewise.
16820         * partmap/apple.c: Likewise.
16821         * partmap/pc.c: Likewise.
16822         * include/grub/partition.h: Likewise..
16823         * include/grub/pc_partition.h: Likewise.
16824         * util/grub-emu.c: Include <grub/partition.h> instead of
16825         <grub/machine/partition.h>.
16826         (main): Call `grub_pc_partition_map_init',
16827         `grub_amiga_partition_map_init' and
16828         `grub_apple_partition_map_init' and deinitialize afterwards.
16829         * util/i386/pc/biosdisk.c: Include `#include
16830         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16831         `<grub/machine/partition.h>'.
16832         * util/i386/pc/grub-setup.c: Likewise.
16833         * util/i386/pc/biosdisk.c: Likewise.
16834         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16835         partition information in case of a PC partition.
16836         * util/i386/pc/grub-setup.c: Include `#include
16837         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16838         `<grub/machine/partition.h>'.
16839         (setup): Only access the PC specific partition information in case
16840         of a PC partition.
16842 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
16844         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16845         (grub_longjmp): Likewise.
16846         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16847         20.
16848         * normal/powerpc/setjmp.S: New file.
16849         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16850         `normal/powerpc/setjmp.S'.
16851         (grubof_CFLAGS): Add `-DGRUBOF'.
16852         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16853         [GRUB_UTIL && !GRUBOF].
16855 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
16857         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16858         property named `name'.  Correctly handle the error returned by
16859         `grub_ieee1275_finddevice' if a device can not be opened.
16861 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16863         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16864         `actual' for negativity.
16865         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16866         kern/fshelp.c.
16868 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16870         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16871         (PAGE_OFFSET): New macro.
16872         (CRTC_ADDR_PORT): Likewise.
16873         (CRTC_DATA_PORT): Likewise.
16874         (START_ADDR_HIGH_REGISTER): Likewise.
16875         (START_ADDR_LOW_REGISTER): Likewise.
16876         (GRAPHICS_ADDR_PORT): Likewise.
16877         (GRAPHICS_DATA_PORT): Likewise.
16878         (READ_MAP_REGISTER): Likewise.
16879         (INPUT_STATUS1_REGISTER): Likewise.
16880         (INPUT_STATUS1_VERTR_BIT): Likewise.
16881         (page): New variable.
16882         (wait_vretrace): New function.
16883         (set_read_map): Likewise.
16884         (set_start_address): Likewise.
16885         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
16886         the right page.
16887         (check_vga_mem): Take the page into account.
16888         (write_char): Likewise.
16889         (write_cursor): Likewise.
16890         (scroll_up): Likewise.  Copy the page to the page that is not
16891         shown and switch between both pages.
16892         (grub_vga_putchar): Fix off by one error.
16893         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
16894         account.
16896 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16898         Add support for iso9660 (including rockridge).
16900         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16901         (iso9660_mod_SOURCES): New variable.
16902         (iso9660_mod_CFLAGS): Likewise.
16903         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16904         * include/grub/fs.h (grub_iso9660_init): New prototype.
16905         * util/grub-emu.c (main): Call `grub_iso9660_init'.
16906         * fs/iso9660.c: New file.
16908         * include/grub/misc.h (grub_strncat): New prototype.
16909         * kern/misc.c (grub_strncat): New function.
16911         * fs/hfs.c (grub_hfs_mount): Translate the error
16912         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16913         * fs/jfs.c (grub_jfs_mount): Likewise.
16914         * fs/ufs.c (grub_ufs_mount): Likewise.
16916 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
16918         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16919         which initialized BAT registers.
16920         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16921         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16922         Move from here...
16923         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16924         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16925         ... to here.
16926         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16927         (grub_mapclaim): Likewise.
16928         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16929         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
16930         hand.
16932 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
16934         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16935         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16936         -ffreestanding and -msoft-float.
16938 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
16940         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16941         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16942         set in grub_ieee1275_flags.
16944 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
16946         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16947         prototype.
16948         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16949         grub_console_init first.
16950         Change the memory range used for grub_ieee1275_claim and
16951         grub_mm_init_region.
16952         Print an error message if the claim fails.
16953         Include <grub/misc.h>.
16955 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
16957         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16958         Call grub_children_iterate for device nodes of type `scsi',
16959         `ide', or `ata'.
16960         (grub_ofdisk_open): Remove manual device alias resolution.
16961         Fix memory leak when device cannot be opened.
16962         * include/grub/powerpc/ieee1275/ieee1275.h
16963         (grub_children_iterate): New prototype.
16964         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16965         New function.
16966         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16967         Return -1 if args.size was -1.
16969 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16971         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16972         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16973         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16974         Open Firmware's memory for it; claim memory from _start to _end.
16975         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16976         (_end): New extern.
16977         (_start): Zero BSS from __bss_start to _end.
16978         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16979         New extern.
16980         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16982 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16984         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16985         -1 if args.base was -1.
16987 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
16989         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16990         escape sequence instead of a literal ^L. Also call
16991         grub_ofconsole_gotoxy.
16993 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
16995         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16996         void *  arguments to grub_addr_t.  All callers updated.  Also make
16997         the `result' argument optional.
16998         (grub_ieee1275_release): change void * arguments to grub_addr_t.
16999         All callers updated.
17001 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
17003         * commands/ls.c (grub_ls_list_files): Use the string following the
17004         initial ')', if present, as the filesystem path.
17005         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
17007         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
17009 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
17011         Make the source code of the menu interface more readable.
17013         * normal/menu.c: Include grub/mm.h.
17014         (TERM_WIDTH): New macro.
17015         (TERM_HEIGHT): Likewise.
17016         (TERM_INFO_HEIGHT): Likewise.
17017         (TERM_MARGIN): Likewise.
17018         (TERM_SCROLL_WIDTH): Likewise.
17019         (TERM_TOP_BORDER_Y): Likewise.
17020         (TERM_LEFT_BORDER_X): Likewise.
17021         (TERM_BORDER_WIDTH): Likewise.
17022         (TERM_MESSAGE_HEIGHT): Likewise.
17023         (TERM_BORDER_HEIGHT): Likewise.
17024         (TERM_NUM_ENTRIES): Likewise.
17025         (TERM_FIRST_ENTRY_Y): Likewise.
17026         (TERM_ENTRY_WIDTH): Likewise.
17027         (TERM_CURSOR_X): Likewise.
17028         (draw_border): Use macros instead of magic numbers.
17029         (print_entry): Likewise.
17030         (print_entries): Likewise.
17031         (run_menu): Likewise. Also, handle the key 'e'.
17032         (run_menu_entry): Ignore empty command lines.
17033         (print_message): Added a new argument EDIT. If EDIT is true,
17034         print a different message.
17035         (init_page): Likewise.
17036         (edit_menu_entry): New function. Not implemented yet.
17038 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
17040         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
17041         can be loaded from normal mode.
17043         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
17044         `multiboot.mod'.
17045         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
17046         (multiboot_mod_CFLAGS): New variables.
17047         * loader/i386/pc/linux_normal.c: New file.
17048         * loader/i386/pc/multiboot_normal.c: Likewise.
17050         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
17051         attribute `unused'.
17053         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
17054         `fdiro' to read the mode information from instead of `diro'.
17056         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
17057         looking up a symlink.
17059         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
17060         macro.
17061         * normal/command.c (grub_command_execute): Don't parse the
17062         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
17063         flags of the command.
17065         * normal/menu.c (grub_menu_run): Fix typo.
17067 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
17069         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
17071         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
17072         `y + 1' instead of `y - 1'.
17074         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
17076 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
17078         From Hollis Blanchard <hollis@penguinppc.org>:
17079         * kern/misc.c (memmove): New alias for grub_memmove.
17080         (memcmp): New alias for grub_memcmp.
17081         (memset): New alias for grub_memset.
17082         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17083         Change "int handle" to "grub_ieee1275_phandle_t handle".
17084         * include/grub/powerpc/ieee1275/ieee1275.h
17085         (grub_ieee1275_get_property): Likewise.
17087 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
17089         Added normal mode command `chainloader' as module chain.mod, which
17090         depends on normal.mod and _chain.mod.
17092         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
17093         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
17094         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
17095         Deleted prototype.
17096         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
17097         but arguments parsing moved to ...
17098         (grub_chainloader_cmd): ... here.  New function.
17099         * include/grub/i386/pc/chainloader.h: New file.
17100         * loader/i386/pc/chainloader_normal.c: Likewise.
17102 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
17104         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
17105         (grub_mkimage_LDFLAGS): Likewise.
17106         (grub_emu_SOURCES): Likewise.
17107         (kernel_img_HEADERS): Added fshelp.h.
17108         * fs/ext2.c: Include <grub/fshelp.h>.
17109         (FILETYPE_REG): New macro.
17110         (FILETYPE_INO_REG): Likewise.
17111         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
17112         Changed all users.
17113         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
17114         all users.
17115         (grub_fshelp_node): New struct.
17116         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
17117         to a pointer.
17118         (grub_ext2_get_file_block): Removed function.
17119         (grub_ext2_read_block): New function.
17120         (grub_ext2_read_file): Replaced parameter `data' by `node'.
17121         This function was written.
17122         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
17123         (grub_ext2_find_file): Removed function.
17124         (grub_ext2_read_symlink): New function.
17125         (grub_ext2_iterate_dir): Likewise.
17126         (grub_ext2_open): Rewritten.
17127         (grub_ext2_dir): Rewritten.
17128         * include/grub/fshelp.h: New file.
17129         * fs/fshelp.c: Likewise.
17131 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
17133         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
17134         (print_message): Add a missing newline.
17135         (run_menu): Added timeout support.
17136         (run_menu_entry): New local function.
17137         (grub_menu_run): Added support for booting.
17139         * kern/loader.c (grub_loader_is_loaded): New function.
17141         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
17142         (grub_get_rtc): Exported.
17144         * include/grub/i386/pc/time.h: Include grub/symbol.h.
17145         (grub_get_rtc): Exported.
17147         * include/grub/normal.h (struct grub_command_list): Remove
17148         constant from the member `command'.
17150         * include/grub/loader.h (grub_loader_is_loaded): Declared.
17152         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
17154         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
17156 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
17158         Add support for the JFS filesystem.
17160         * fs/jfs.c: New file.
17161         * include/grub/fs.h (grub_jfs_init): New prototype.
17162         (grub_jfs_fini): New prototype.
17163         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
17164         (grub_emu_SOURCES): Likewise.
17165         (pkgdata_MODULES): Add jfs.mod.
17166         (jfs_mod_SOURCES): New variable.
17167         (jfs_mod_CFLAGS): Likewise.
17168         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
17169         (grubof_SOURCES): Likewise.
17170         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
17172         * fs/fat.c (grub_fat_find_dir): Convert the filename little
17173         endian to the host endian.
17174         (grub_fat_utf16_to_utf8): Move function from there...
17175         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
17176         the endianness of the source string anymore.
17177         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
17179 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
17181         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
17182         (grub_boot_fini) [GRUB_UTIL]: Likewise.
17183         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17184         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
17186         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17187         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
17188         for `node_found' and `it_dir'.
17189         (grub_hfs_dir): Add prototype for `dir_hook'.
17191         * fs/minix.c (grub_minix_get_file_block): Add prototype for
17192         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
17193         and `indir32' to silence a gcc warning.
17195         * include/grub/fs.h (grub_hfs_init): New prototype.
17196         (grub_hfs_fini): Likewise.
17199 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
17201         Each disk device has its own id now. This is useful to make use
17202         of multiple disk devices.
17204         * include/grub/disk.h (grub_disk_dev_id): New enum.
17205         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17206         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17208         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17209         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17211         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17212         GRUB_DISK_DEVICE_OFDISK_ID as an id.
17214         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17215         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17217         * include/grub/disk.h (struct grub_disk_dev): Added a new member
17218         "id" which is used by the cache manager.
17220         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17221         of just "GRUB".
17223 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
17225         * fs/hfs.c: New file.
17226         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17227         (grub_emu_SOURCES): Likewise.
17228         (pkgdata_MODULES): Add hfs.mod.
17229         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17230         (grubof_SOURCES): Likewise.
17231         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17233         * include/grub/misc.h (grub_strncasecmp): Add prototype.
17234         * kern/misc.c (grub_strncasecmp): Add function.
17236 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
17238         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17239         with parentheses.
17241         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17242         (grub_ext2_dir): In case the directory entry type is unknown, read
17243         it from the inode.
17245 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
17247         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17248         grub_load_linux instead of grub_rescue_cmd_linux as second
17249         argument of grub_rescue_register_command.
17251         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17253 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
17255         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17256         function.
17257         * commands/boot.c: Remove the check for `GRUB_UTIL'.
17258         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17259         `loader/powerpc/ieee1275/linux.c',
17260         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17261         * include/grub/powerpc/ieee1275/ieee1275.h
17262         (grub_ieee1275_release): New prototype.
17263         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17264         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17265         normal, boot, linux and linux_normal.
17266         * loader/powerpc/ieee1275/linux.c: New file.
17267         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17269 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
17271         * normal/arg.c (grub_arg_parse): Correct error handling after
17272         reallocating the argumentlist (check if `argl' is not null instead
17273         of checking if `args' is not null).
17274         * kern/mm.c (grub_realloc): Return the same pointer when using the
17275         same region, instead of returning the header address.
17277 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
17279         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17280         one block instead of two when looking for the initial partition.
17281         (grub_partition_probe): Initialize the local variable `p' with 0.
17282         Use base 10 for the grub_strtoul call.
17283         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
17284         need for one local variable.
17285         (grub_strtoul): Don't add the new value to `num', instead of that
17286         just assign it.
17288 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
17290         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17291         (pxeboot_img_SOURCES): New variable.
17292         (pxeboot_img_ASFLAGS): Likewise.
17293         (pxeboot_img_LDFLAGS): Likewise.
17294         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
17295         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
17296         <lode_leroy@hotmail.com>.
17298 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17300         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17301         there was no input.
17303 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17305         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
17306         the history buffer logic.
17308 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17310         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17311         (FILETYPE_INO_SYMLINK): New macros.
17312         (grub_ext2_find_file): Check if the node is a directory using the
17313         inode stat information instead of using the filetype in the
17314         dirent.  Exclude the first character of an absolute symlink.
17315         (grub_ext2_dir): Mask out the filetype part of the mode member of
17316         the inode.
17318 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
17320         Add support for UFS version 1 and 2.  Add support for the minix
17321         filesystem version 1 and 2, both the variants with 14 and 30 long
17322         filenames.
17324         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17325         fs/minix.c.
17326         (grub_emu_SOURCES): Likewise.
17327         (pkgdata_MODULES): Add ufs.mod and minix.mod.
17328         (ufs_mod_SOURCES): New variable.
17329         (ufs_mod_CFLAGS): Likewise.
17330         (minix_mod_SOURCES): Likewise.
17331         (minix_mod_CFLAGS): Likewise.
17332         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17333         fs/minix.c.
17334         (grubof_SOURCES): Likewise.
17335         * fs/ufs.c: New file.
17336         * fs/minix.c: New file.
17337         * include/grub/fs.h (grub_ufs_init): New prototype.
17338         (grub_ufs_fini): Likewise.
17339         (grub_minix_init): Likewise.
17340         (grub_minix_fini): Likewise.
17341         * util/grub-emu.c (main): Initialize and deinitialize UFS and
17342         minix fs.
17344 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
17346         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17347         commands/ls.c, commands/terminal.c, commands/boot.c,
17348         commands/cmp.c and commands/cat.c.
17349         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17351         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17352         "env.h"
17354 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17356         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17357         and grub_, respectively. Because the conversion is trivial and
17358         mechanical, I omit the details here. Please refer to the CVS
17359         if you need more information.
17361 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17363         * include/pupa: Renamed to ...
17364         * include/grub: ... this.
17365         * util/i386/pc/pupa-mkimage.c: Renamed to ...
17366         * util/i386/pc/grub-mkimage.c: ... this.
17367         * util/i386/pc/pupa-setup.c: Renamed to ...
17368         * util/i386/pc/grub-setup.c: ... this.
17369         * util/pupa-emu.c: Renamed to ...
17370         * util/grub-emu.c: ... this.
17372 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
17374         Add support for the newworld apple macintosh (PPC).  This has been
17375         tested on the powerbook 2000 only.  It only adds support for
17376         generic ieee1275 functions, console and disk support.  This should
17377         be easy to port to other architectures with support for Open
17378         Firmware.
17380         * configure.ac: Accept the powerpc as host_cpu.  In the case of
17381         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
17382         specific tests are only executed while building for the i386.
17383         Inverse test for crosscompile.
17384         * genmk.rb (Utility): Allow assembler files.
17385         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17386         * conf/powerpc-ieee1275.rmk: New file.
17387         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17388         * disk/powerpc/ieee1275/partition.c: Likewise.
17389         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17390         * include/pupa/powerpc/ieee1275/console.h: Likewise.
17391         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17392         * include/pupa/powerpc/ieee1275/time.h: Likewise.
17393         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17394         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17395         * include/pupa/powerpc/ieee1275/loader.h
17396         * include/pupa/powerpc/setjmp.h: Likewise.
17397         * include/pupa/powerpc/types.h: Likewise.
17398         * kern/powerpc/ieee1275/init.c: Likewise.
17399         * kern/powerpc/ieee1275/openfw.c: Likewise.
17400         * term/powerpc/ieee1275/ofconsole.c: Likewise.
17402         These files were written by Johan Rydberg
17403         (jrydberg@night.trouble.net) and I only modified them slightly.
17405         * boot/powerpc/ieee1275/cmain.c: New file.
17406         * boot/powerpc/ieee1275/crt0.S: Likewise.
17407         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17408         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17410 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
17412         * Makefile.in: Update copyright.
17413         * genmodsrc.sh: Likewise.
17414         * gensymlist.sh: Likewise.
17415         * term/i386/pc/vga.c: Indent correctly.
17417         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17418         bugreporting address.
17419         * util/i386/pc/pupa-setup.c (usage): Likewise,
17420         (main): Call pupa_ext2_init and pupa_ext2_fini.
17422         * fs/fat.c (log2): Renamed to ...
17423         (fat_log2): ... this.
17424         All callers changed.
17425         * kern/misc.c (memcpy): Alias to pupa_memmove.
17426         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17427         lvalue cast.
17428         * util/console.c (pupa_ncurses_fini): Return 0.
17430         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17431         Move fail label here.
17432         [__GNU__]: Don't warn when using stat.
17433         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17434         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17435         long int. Use strtol instead of strtoul.
17437 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
17439         * commands/boot.c: New file.
17440         * commands/cat.c: Likewise.
17441         * commands/cmp.c: Likewise.
17442         * commands/ls.c: Likewise.
17443         * commands/terminal.c: Likewise.
17444         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17445         (pupa_register_command): Changed interface to match the new
17446         argument parser.
17447         (pupa_command_execute): Changed (almost rewritten) so it uses
17448         pupa_split_command.  Added support for setting variables using the
17449         syntax `foo=bar'.
17450         (rescue_command): Changed to work with the new argument parser.
17451         (terminal_command): Moved from here to commands/terminal.c.
17452         (set_command): New function.
17453         (unset_command): New function.
17454         (insmod_command): New function.
17455         (rmmod_command): New function.
17456         (lsmod_command): New function.
17457         (pupa_command_init): Don't initialize the command terminal
17458         anymore.  Initialize the commands set, unset, insmod, rmmod and
17459         lsmod.
17460         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17461         (kernel_img_HEADERS): Add arg.h and env.h.
17462         (pupa_mkimage_LDFLAGS): Add kern/env.c.
17463         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17464         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17465         normal/arg.c.
17466         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17467         terminal.mod.
17468         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17469         (boot_mod_SOURCES): New variable.
17470         (terminal_mod_SOURCES): Likewise.
17471         (ls_mod_SOURCES): Likewise.
17472         (cmp_mod_SOURCES): Likewise.
17473         (cat_mod_SOURCES): Likewise.
17475         * normal/arg.c: New file.
17476         * kern/env.c: Likewise.
17477         * include/pupa/arg.h: Likewise.
17478         * include/pupa/env.h: Likewise.
17479         * font/manager.c (font_command): Changed to match argument parsing
17480         interface changes.
17481         (PUPA_MOD_INIT): Likewise.
17482         * hello/hello.c (pupa_cmd_hello): Likewise.
17483         (PUPA_MOD_INIT): Likewise.
17484         * include/pupa/disk.h: Include <pupa/device.h>.
17485         (pupa_print_partinfo): New prototype.
17486         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17487         (pupa_dl_get_prefix): Likewise.
17488         * include/pupa/misc.h: Include <pupa/err.h>.
17489         (pupa_isgraph): New prototype.
17490         (pupa_isdigit): Likewise.
17491         (pupa_split_cmdline): Likewise.
17492         * include/pupa/normal.h: Include <pupa/arg.h>.
17493         (pupa_command): Changed the prototype of the member `func' to
17494         match the argument parsing interface.  Added member `options'.
17495         (pupa_register_command): Updated to match function.
17496         (pupa_arg_parse): New prototype.
17497         (pupa_hello_init) [PUPA_UTIL]: New prototype.
17498         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17499         (pupa_ls_init) [PUPA_UTIL]: Likewise.
17500         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17501         (pupa_cat_init) [PUPA_UTIL]: Likewise.
17502         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17503         (pupa_boot_init) [PUPA_UTIL]: Likewise.
17504         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17505         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17506         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17507         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17508         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17509         * kern/disk.c: Include <pupa/file.h>.
17510         (pupa_print_partinfo): New function.
17511         * kern/dl.c: Include <pupa/env.h>.
17512         (pupa_dl_dir): Variable removed.
17513         (pupa_dl_load): Use the environment variable `prefix' instead of
17514         the variable pupa_dl_dir.
17515         (pupa_dl_set_prefix): Function removed.
17516         (pupa_dl_get_prefix): Likewise.
17517         * kern/i386/pc/init.c: Include <pupa/env.h>.
17518         (pupa_machine_init): Use the environment variable `prefix' instead of
17519         using pupa_dl_set_prefix to set the prefix.
17520         * kern/main.c: Include <pupa/env.h>.
17521         (pupa_set_root_dev): Use the environment variable `prefix' instead of
17522         using pupa_dl_get_prefix to get the prefix.
17523         * kern/misc.c: Include <pupa/env.h>.
17524         (pupa_isdigit): New function.
17525         (pupa_isgraph): Likewise.
17526         (pupa_ftoa): Likewise.
17527         (pupa_vsprintf): Added support for printing values of the type
17528         `double'.  Make it possible to format variable output when using
17529         formatting like `%1.2%f'.
17530         (pupa_split_cmdline): New function.
17531         * kern/rescue.c: Include <pupa/env.h>.
17532         (next_word): Removed function.
17533         (pupa_rescue_cmd_prefix): Likewise.
17534         (pupa_rescue_cmd_set): New function.
17535         (pupa_rescue_cmd_unset): New function.
17536         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17537         split the command line instead of splitting it here.  Added
17538         support for setting variables using the syntax `foo=bar'.  Don't
17539         initialize the prefix command anymore.  Initialized the set and
17540         unset commands.
17541         * normal/cmdline.c: Include <pupa/env.h>.
17542         (pupa_tab_complete): Added prototypes for print_simple_completion,
17543         print_partition_completion, add_completion, iterate_commands,
17544         iterate_dev, iterate_part and iterate_dir. Moved code to print
17545         partition information from here to kern/disk.c.
17546         (pupa_cmdline_run): Don't check if the function exists anymore.
17547         * normal/main.c: Include <pupa/env.h>.
17548         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17549         instead of using pupa_dl_get_prefix to get the prefix.
17550         * term/i386/pc/vga.c: Include <pupa/arg.h>.
17551         (check_vga_mem): Cast pointers to `void *' to silence a gcc
17552         warning.
17553         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17554         (pupa_vga_setcolor): Declare unused variables with `__attribute__
17555         ((unused))' to silence a gcc warning.
17556         (pupa_vga_setcolor): Likewise.
17557         (debug_command): Changed to match argument parsing
17558         interface changes.
17559         * util/pupa-emu.c: Include <pupa/env.h>.
17560         (options): Added 0's for unused fields to silence a gcc warning.
17561         (argp): Likewise.
17562         (main): Use the environment variable `prefix' instead of using
17563         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
17564         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
17565         and terminal.
17567         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17568         * util/misc.c: Include <malloc.h>.
17569         (pupa_malloc): Rewritten so errors are correctly reported.
17570         (pupa_realloc): Likewise.
17571         (pupa_memalign): Likewise.
17572         (pupa_mm_init_region): Declare unused variables with
17573         `__attribute__ ((unused))' to silence a gcc warning.
17574         * normal/i386/setjmp.S: Remove tab at the end of the file to
17575         silence a gcc warning.
17576         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17577         variables with `__attribute__ ((unused))' to silence a gcc
17578         warning.
17579         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17580         local variable i unsigned to silence a gcc warning.
17582         * kern/term.c: Include <pupa/misc.h>.
17583         (pupa_more_lines): New variable.
17584         (pupa_more): Likewise.
17585         (pupa_putcode): When the pager is active pause at the end of every
17586         screen.
17587         (pupa_set_more): New function.
17588         * include/pupa/term.h (pupa_set_more): New prototype.
17591 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
17593         Now this project is GRUB 2 rather than PUPA. The location of
17594         the CVS repository was moved to GRUB's.
17596         * configure.ac: Use bug-grub as the reporting address.
17597         Use GRUB instead of PUPA.
17598         Change the version number to 1.90.
17600 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
17602         * genkernsyms.sh: Updated copyright information.
17603         * genmk.rb: Likewise.
17604         * genmodsrc.sh: Likewise.
17605         * gensymlist.sh: Likewise.
17606         * boot/i386/pc/boot.S: Likewise.
17607         * boot/i386/pc/diskboot.S: Likewise.
17608         * disk/i386/pc/biosdisk.c: Likewise.
17609         * disk/i386/pc/partition.c: Likewise.
17610         * font/manager.c: Likewise.
17611         * fs/ext2.c: Likewise.
17612         * fs/fat.c: Likewise.
17613         * include/pupa/boot.h: Likewise.
17614         * include/pupa/device.h: Likewise.
17615         * include/pupa/disk.h: Likewise.
17616         * include/pupa/dl.h: Likewise.
17617         * include/pupa/elf.h: Likewise.
17618         * include/pupa/err.h: Likewise.
17619         * include/pupa/file.h: Likewise.
17620         * include/pupa/font.h: Likewise.
17621         * include/pupa/fs.h: Likewise.
17622         * include/pupa/kernel.h: Likewise.
17623         * include/pupa/loader.h: Likewise.
17624         * include/pupa/misc.h: Likewise.
17625         * include/pupa/mm.h: Likewise.
17626         * include/pupa/net.h: Likewise.
17627         * include/pupa/normal.h: Likewise.
17628         * include/pupa/rescue.h: Likewise.
17629         * include/pupa/setjmp.h: Likewise.
17630         * include/pupa/symbol.h: Likewise.
17631         * include/pupa/term.h: Likewise.
17632         * include/pupa/types.h: Likewise.
17633         * include/pupa/i386/setjmp.h: Likewise.
17634         * include/pupa/i386/types.h: Likewise.
17635         * include/pupa/i386/pc/biosdisk.h: Likewise.
17636         * include/pupa/i386/pc/boot.h: Likewise.
17637         * include/pupa/i386/pc/console.h: Likewise.
17638         * include/pupa/i386/pc/init.h: Likewise.
17639         * include/pupa/i386/pc/kernel.h: Likewise.
17640         * include/pupa/i386/pc/linux.h: Likewise.
17641         * include/pupa/i386/pc/loader.h: Likewise.
17642         * include/pupa/i386/pc/memory.h: Likewise.
17643         * include/pupa/i386/pc/multiboot.h: Likewise.
17644         * include/pupa/i386/pc/partition.h: Likewise.
17645         * include/pupa/i386/pc/time.h: Likewise.
17646         * include/pupa/i386/pc/vga.h: Likewise.
17647         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17648         * include/pupa/util/getroot.h: Likewise.
17649         * include/pupa/util/misc.h: Likewise.
17650         * include/pupa/util/resolve.h: Likewise.
17651         * kern/device.c: Likewise.
17652         * kern/disk.c: Likewise.
17653         * kern/dl.c: Likewise.
17654         * kern/err.c: Likewise.
17655         * kern/file.c: Likewise.
17656         * kern/fs.c: Likewise.
17657         * kern/loader.c: Likewise.
17658         * kern/main.c: Likewise.
17659         * kern/misc.c: Likewise.
17660         * kern/mm.c: Likewise.
17661         * kern/rescue.c: Likewise.
17662         * kern/term.c: Likewise.
17663         * kern/i386/dl.c: Likewise.
17664         * kern/i386/pc/init.c: Likewise.
17665         * kern/i386/pc/lzo1x.S: Likewise.
17666         * kern/i386/pc/startup.S: Likewise.
17667         * loader/i386/pc/chainloader.c: Likewise.
17668         * loader/i386/pc/linux.c: Likewise.
17669         * loader/i386/pc/multiboot.c: Likewise.
17670         * normal/cmdline.c: Likewise.
17671         * normal/command.c: Likewise.
17672         * normal/main.c: Likewise.
17673         * normal/menu.c: Likewise.
17674         * normal/i386/setjmp.S: Likewise.
17675         * term/i386/pc/console.c: Likewise.
17676         * term/i386/pc/vga.c: Likewise.
17677         * util/console.c: Likewise.
17678         * util/genmoddep.c: Likewise.
17679         * util/misc.c: Likewise.
17680         * util/pupa-emu.c: Likewise.
17681         * util/resolve.c: Likewise.
17682         * util/unifont2pff.rb: Likewise.
17683         * util/i386/pc/biosdisk.c: Likewise.
17684         * util/i386/pc/getroot.c: Likewise.
17685         * util/i386/pc/pupa-mkimage.c: Likewise.
17686         * util/i386/pc/pupa-setup.c: Likewise.
17688 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
17690         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17691         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
17692         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
17693         reading and reset it after reading.
17694         (pupa_ext2_close): Return PUPA_ERR_NONE.
17696         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17697         Correct value.
17698         (struct linux_kernel_header): Add kernel_version and
17699         initrd_addr_max.
17700         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17701         pupa_file_read succeeds.
17702         (pupa_rescue_cmd_initrd): Implement.
17704 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
17706         * fs/ext2.c (pupa_ext2_label): New function.
17707         (pupa_ext2_fs): Added label.
17708         * fs/fat.c (pupa_fat_label): New function.
17709         (pupa_fat_fs): Added label.
17710         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17712         * kern/misc.c (pupa_strndup): New function.
17713         * include/pupa/misc.h (pupa_strndup): New prototype.
17715         * include/pupa/normal.h: Include <pupa/err.h>.
17716         (pupa_set_history): New prototype.
17717         (pupa_iterate_commands): New prototype.
17718         * normal/cmdline.c: Include <pupa/machine/partition.h>,
17719         <pupa/disk.h>, <pupa/file.h>.
17720         (hist_size): New variable.
17721         (hist_lines): Likewise.
17722         (hist_end): Likewise.
17723         (hist_used): Likewise.
17724         (pupa_set_history): New function.
17725         (pupa_history_get): Likewise.
17726         (pupa_history_add): Likewise.
17727         (pupa_history_replace): Likewise.
17728         (pupa_tab_complete): Likewise.
17729         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
17730         completion shows partitionnames while completing partitions, this
17731         feature was suggested by Jeff Bailey.
17732         * normal/command.c (pupa_iterate_commands): New function.
17733         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17734         (pupa_normal_init): Initialize history buffer.
17735         (PUPA_MOD_INIT): Likewise.
17736         (pupa_normal_fini): Free the history buffer.
17737         (PUPA_MOD_FINI): Likewise.
17739         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17740         key.
17742         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17743         * configure.ac [i386]: Check for regparam bug.
17744         (NESTED_FUNC_ATTR) [! i386]: Defined.
17746 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
17748         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17749         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17750         (pupa_emu_SOURCES): New variable.
17751         (pupa_emu_LDFLAGS): Likewise.
17752         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17753         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17754         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17755         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17756         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17757         (pupa_jmp_buf): New typedef.
17758         (pupa_setjmp) [PUPA_UTIL]: New macro.
17759         (pupa_longjmp) [PUPA_UTIL]: Likewise.
17760         * include/pupa/term.h (struct pupa_term): New member `refresh'.
17761         (pupa_refresh): New prototype.
17762         * include/pupa/util/getroot.h: New file.
17763         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17764         it.
17765         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17766         (pupa_rescue_cmd_cat): Likewise.
17767         (pupa_rescue_cmd_ls): Likewise.
17768         (pupa_rescue_cmd_testload): Likewise.
17769         (pupa_rescue_cmd_lsmod): Likewise.
17770         * normal/cmdline.c (pupa_cmdline_get): Likewise.
17771         * normal/menu.c (run_menu): Likewise.
17772         * kern/term.c (pupa_cls): Likewise.
17773         (pupa_refresh): New function.
17774         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17775         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17776         * util/console.c: New file.
17778         * util/i386/pc/getroot.c: New file.
17779         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17780         (pupa_putchar): New function.
17781         (pupa_refresh): Likewise.
17782         (xgetcwd): Function moved to ...
17783         (strip_extra_slashes): Likewise.
17784         (get_prefix): Likewise.
17785         * util/i386/pc/getroot.c: ... here.
17786         (find_root_device): Function moved and renamed to...
17787         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17788         Changed all callers.
17789         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17790         and renamed to...
17791         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17792         Changed all callers.
17793         * util/misc.c (pupa_memalign): New function.
17794         (pupa_mm_init_region): Likewise.
17795         (pupa_register_exported_symbols): Likewise.
17796         (pupa_putchar): Function removed.
17797         * util/pupa-emu.c: New file.
17799 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
17801         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17802         (_multiboot_mod_SOURCES): New variable.
17803         (_multiboot_mod_CFLAGS): Likewise.
17804         * loader/i386/pc/multiboot.c: New file.
17805         * include/pupa/i386/pc/multiboot.h: Likewise.
17806         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17807         (pupa_multiboot_real_boot): New function.
17808         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17809         (pupa_multiboot_real_boot): New prototype.
17810         (pupa_rescue_cmd_multiboot): Likewise
17811         (pupa_rescue_cmd_module): Likewise.
17813         * kern/loader.c (pupa_loader_set): Continue when
17814         pupa_loader_unload_func() fails.
17815         (pupa_loader_unset): New function.
17816         * include/pupa/loader.h (pupa_loader_unset): New prototype.
17818         * kern/misc.c (pupa_stpcpy): New function.
17819         * include/pupa/misc.h (pupa_stpcpy): New prototype.
17821 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
17823         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17824         for available extensions.
17826         * include/pupa/i386/pc/time.h: New file.
17827         * kern/disk.c: Include <pupa/machine/time.h>.
17828         (PUPA_CACHE_TIMEOUT): New macro.
17829         (pupa_last_time): New variable.
17830         (pupa_disk_open): Flush the cache when there was a timeout.
17831         (pupa_disk_close): Reset the timer.
17832         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17833         pupa_currticks.
17834         * util/misc.c: Include <sys/times.h>
17835         (pupa_get_rtc): New function.
17837 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
17839         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17840         as blocks.
17841         (pupa_ext2_get_file_block): Use blocks member.
17843         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17844         first block. Return -1 instead of pupa_errno on error.
17846 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
17848         * README: In the pupa-mkimage example use _chain instead of chain
17849         and ext2 instead of fat.
17850         * TODO: Replace ext2fs with jfs as an example.  Add an item for
17851         adding journal playback for ext2fs.
17852         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17853         (pkgdata_MODULES): Added ext2.mod.
17854         (ext2_mod_SOURCES): New variable.
17855         (ext2_mod_CFLAGS): Likewise.
17856         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17857         * include/pupa/misc.h (pupa_strncpy): New prototype.
17858         (pupa_strcat): Likewise.
17859         (pupa_strncmp): Likewise.
17860         * kern/misc.c (pupa_strcat): Enable function.
17861         (pupa_strncpy): New function.
17862         (pupa_strncmp): Likewise.
17863         * fs/ext2.c: New file.
17865         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17866         when the read failed before retrying.
17867         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17868         (_FILE_OFFSET_BITS): Likewise.
17869         * configure.ac: Added AC_SYS_LARGEFILE.
17871 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17873         * genmk.rb (PModule#rule): Make sure to get only symbol names
17874         from the output of nm.
17875         Reported by Robert Millan <zeratul2@wanadoo.es>.
17877 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17879         I forgot to check in these changes for a long time. This adds
17880         incomplete support for VGA console, and this is still very
17881         buggy. Also, a lot of consideration is required for I18N,
17882         UNICODE, and VGA font issues. Therefore, assume that this is
17883         such that "better than nothing".
17885         * font/manager.c: New file.
17886         * include/pupa/font.h: Likewise.
17887         * include/pupa/i386/pc/vga.h: Likewise.
17888         * term/i386/pc/vga.c: Likewise.
17889         * util/unifont2pff.rb: Likewise.
17891         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17892         (pkgdata_MODULES): Added vga.mod and font.mod.
17893         (vga_mod_SOURCES): New variables.
17894         (vga_mod_CFLAGS): Likewise.
17895         (font_mod_SOURCES): Likewise.
17896         (font_mod_CFLAGS): Likewise.
17898         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17900         * include/pupa/term.h: Include pupa/err.h.
17901         (struct pupa_term): Added init and fini.
17902         Changed the argument of putchar to pupa_uint32_t.
17904         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17905         (pupa_console_real_putchar): New prototype.
17906         (pupa_console_putchar): Removed.
17907         (pupa_console_checkkey): Exported.
17908         (pupa_console_getkey): Likewise.
17910         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17911         characters.
17913         * kern/term.c (pupa_term_set_current): Rewritten.
17914         (pupa_putchar): Likewise.
17915         (pupa_putcode): New function.
17917         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17918         (pupa_console_real_putchar): ... this.
17919         (pupa_vga_set_mode): New function.
17920         (pupa_vga_get_font): Likewise.
17922         * normal/command.c: Include pupa/term.h.
17923         (terminal_command): New function.
17924         (pupa_command_init): Register the command "terminal".
17926         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17927         (DISP_UP): Likewise.
17928         (DISP_RIGHT): Likewise.
17929         (DISP_DOWN): Likewise.
17930         (DISP_HLINE): Likewise.
17931         (DISP_VLINE): Likewise.
17932         (DISP_UL): Likewise.
17933         (DISP_UR): Likewise.
17934         (DISP_LL): Likewise.
17935         (DISP_LR): Likewise.
17937         * term/i386/pc/console.c (pupa_console_putchar): New function.
17939 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
17941         * util/resolve.c (pupa_util_resolve_dependencies): BUG
17942         FIX. Reverse the path_list.
17944         * include/pupa/normal.h: Export pupa_register_command and
17945         pupa_unregister_command.
17947         * hello/hello.c (pupa_cmd_hello): New module.
17948         * conf/i386-pc.rmk: Added hello.mod.
17950 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
17952         * kern/i386/pc/lzo1x.S: New file.
17954         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17955         (compress_kernel): New variable.
17956         (generate_image): Heavily modified to support compressing a
17957         large part of the core image.
17959         * util/misc.c (pupa_util_read_image): Fix a file descriptor
17960         leak.
17961         (pupa_util_load_image): New function.
17963         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17964         (pupa_compressed_size): New variable.
17965         (codestart): Enable Gate A20 here.
17966         Decompress the compressed part of the core image.
17967         Rearrange the code to put functions and variables which are
17968         required for initialization in the non-compressed part.
17969         Include lzo1x.S.
17971         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17972         here.
17974         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17976         * include/pupa/i386/pc/kernel.h
17977         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17978         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17979         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17980         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17981         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17983         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17985         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17986         (Utility#rule): Likewise.
17988         * configure.ac: Check if LZO is available.
17990 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
17992         * include/pupa/normal.h: New file.
17993         * include/pupa/setjmp.h: Likewise.
17994         * include/pupa/i386/setjmp.h: Likewise.
17995         * normal/cmdline.c: Likewise.
17996         * normal/command.c: Likewise.
17997         * normal/main.c: Likewise.
17998         * normal/menu.c: Likewise.
17999         * normal/i386/setjmp.S: Likewise.
18001         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
18002         (pupa_rescue_cmd_initrd): Likewise.
18004         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
18005         Likewise.
18007         * kern/i386/pc/startup.S (translation_table): New variable.
18008         (translate_keycode): New function.
18009         (pupa_console_getkey): Call translate_keycode.
18011         * kern/rescue.c (attempt_normal_mode): New function.
18012         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
18013         it failed, print a message.
18015         * kern/mm.c (pupa_real_malloc): Print more information when a
18016         free magic is broken.
18017         (pupa_free): If the first free header is not free actually, set
18018         it to P.
18020         * kern/main.c (pupa_load_normal_mode): Just load the module
18021         "normal".
18022         (pupa_main): Don't print the message
18023         "Entering into rescue mode..." here.
18025         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
18026         Declared.
18027         (pupa_rescue_cmd_initrd): Likewise.
18028         (pupa_rescue_cmd_initrd): Likewise.
18030         * include/pupa/symbol.h (FUNCTION): Specify the type.
18031         (VARIABLE): Likewise.
18033         * include/pupa/err.h (pupa_err_t): Added
18034         PUPA_ERR_UNKNOWN_COMMAND.
18036         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
18037         (pupa_dl_get_prefix): Likewise.
18039         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
18040         Added _chain.mod and _linux.mod instead of chain.mod and
18041         linux.mod.
18042         (chain_mod_SOURCES): Renamed to ...
18043         (_chain_mod_SOURCES): ... this.
18044         (chain_mod_CFLAGS): Renamed to ...
18045         (_chain_mod_CFLAGS): ... this.
18046         (linux_mod_SOURCES): Renamed to ...
18047         (_linux_mod_SOURCES): ... this.
18048         (linux_mod_CFLAGS): Renamed to ...
18049         (_linux_mod_CFLAGS): ... this.
18050         (normal_mod_SOURCES): New variable.
18051         (normal_mod_CFLAGS): Likewise.
18052         (normal_mod_ASFLAGS): Likewise.
18054 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
18056         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
18057         possible.
18059         * kern/dl.c (pupa_dl_ref): Refer depending modules
18060         recursively.
18061         (pupa_dl_unref): Unrefer depending modules recursively.
18062         Don't call pupa_dl_unload implicitly, because PUPA can crash if
18063         a module is unloaded before one depending on that module is
18064         unloaded.
18065         (pupa_dl_unload): Unload depending modules explicitly,
18066         if possible.
18068 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
18070         * include/pupa/i386/pc/linux.h: New file.
18071         * loader/i386/pc/linux.c: Likewise.
18073         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
18074         Removed.
18075         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
18076         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
18077         of PUPA_CHAINLOADER_BOOT_SECTOR.
18079         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
18080         (pupa_linux_prot_size): New variable.
18081         (pupa_linux_tmp_addr): Likewise.
18082         (pupa_linux_real_addr): Likewise.
18083         (pupa_linux_boot_zimage): New function.
18084         (pupa_linux_boot_bzimage): Likewise.
18086         * kern/i386/pc/init.c (struct mem_region): New structure.
18087         (MAX_REGIONS): New macro.
18088         (mem_regions): New variable.
18089         (num_regions): Likewise.
18090         (pupa_os_area_addr): Likewise.
18091         (pupa_os_area_size): Likewise.
18092         (pupa_lower_mem): Likewise.
18093         (pupa_upper_mem): Likewise.
18094         (add_mem_region): New function.
18095         (compact_mem_regions): Likewise.
18096         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
18097         the size of the conventional memory and that of so-called upper
18098         memory (before the first memory hole).
18099         Instead of adding each found region to free memory, use
18100         add_mem_region and add them after removing overlaps.
18101         Also, add only 1/4 of the upper memory to free memory. The rest
18102         is used for loading OS images. Maybe this is ad hoc, but this
18103         makes it much easier to relocate OS images when booting.
18105         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
18106         (pupa_enter_rescue_mode): Don't register initrd and module.
18108         * kern/mm.c: Include pupa/dl.h.
18110         * kern/main.c: Include pupa/file.h and pupa/device.h.
18112         * kern/loader.c (pupa_loader_load_module_func): Removed.
18113         (pupa_loader_load_module): Likewise.
18115         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
18116         ``.o''.
18118         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
18119         (pupa_linux_tmp_addr): Likewise.
18120         (pupa_linux_real_addr): Likewise.
18121         (pupa_linux_boot_zimage): Likewise.
18122         (pupa_linux_boot_bzimage): Likewise.
18124         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
18125         (pupa_upper_mem): Likewise.
18126         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
18127         module is too dangerous.
18129         * include/pupa/loader.h (pupa_os_area_addr): Declared.
18130         (pupa_os_area_size): Likewise.
18131         (pupa_loader_set): Remove the first argument. Loader doesn't
18132         manage modules or initrd any longer.
18133         (pupa_loader_load_module): Removed.
18135         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
18136         (linux_mod_SOURCES): New variable.
18137         (linux_mod_CFLAGS): Likewise.
18139 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
18141         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
18142         the length of a blocklist correctly.
18144         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
18145         Use ioctl only if the OS file is a block device.
18146         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
18147         not very useful for normal files.
18149         * kern/main.c (pupa_set_root_dev): New function.
18150         (pupa_load_normal_mode): Likewise.
18151         (pupa_main): Call those above.
18153         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
18154         pupa_uint16_t.
18156         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
18158 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
18160         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
18161         (setup): Configure the installed partition information and the
18162         dl prefix.
18164         * loader/i386/pc/chainloader.c (my_mod): New variable.
18165         (pupa_chainloader_unload): New function.
18166         (pupa_rescue_cmd_chainloader): Refer itself.
18167         (PUPA_MOD_INIT): Save its own module in MY_MOD.
18169         * kern/i386/pc/startup.S (install_partition): Removed.
18170         (version_string): Likewise.
18171         (config_file): Likewise.
18172         (pupa_install_dos_part): New variable.
18173         (pupa_install_bsd_part): Likewise.
18174         (pupa_prefix): Likewise.
18175         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
18177         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
18178         and pupa/misc.h.
18179         (make_install_device): New function.
18180         (pupa_machine_init): Set the dl prefix.
18182         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18183         (buf): Renamed to ...
18184         (linebuf): ... this.
18185         (pupa_rescue_cmd_prefix): New function.
18186         (pupa_rescue_cmd_insmod): Likewise.
18187         (pupa_rescue_cmd_rmmod): Likewise.
18188         (pupa_rescue_cmd_lsmod): Likewise.
18189         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18190         rmmod and lsmod.
18192         * kern/mm.c (pupa_memalign): If failed even after invalidating
18193         disk caches, unload unneeded modules and retry.
18195         * kern/misc.c (pupa_memmove): New function.
18196         (pupa_memcpy): Removed.
18197         (pupa_strcpy): New function.
18198         (pupa_itoa): Made static.
18200         * kern/dl.c (pupa_dl_iterate): New function.
18201         (pupa_dl_ref): Likewise.
18202         (pupa_dl_unref): Likewise.
18203         (pupa_dl_unload): Return if succeeded or not.
18204         (pupa_dl_unload_unneeded): New function.
18205         (pupa_dl_unload_all): Likewise.
18206         (pupa_dl_init): Renamed to ...
18207         (pupa_dl_set_prefix): ... this.
18208         (pupa_dl_get_prefix): New function.
18210         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18211         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18212         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18213         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18214         (pupa_install_dos_part): Declared.
18215         (pupa_install_bsd_part): Likewise.
18216         (pupa_prefix): Likewise.
18217         (pupa_boot_drive): Likewise.
18219         * include/pupa/types.h: Fix a typo.
18221         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18222         pupa_memmove.
18223         (pupa_memmove): Declared.
18224         (pupa_strcpy): Likewise.
18226         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18227         pupa_mod_init takes one argument, its own module.
18228         (pupa_dl_unload_unneeded): Declared.
18229         (pupa_dl_unload_all): Likewise.
18230         (pupa_dl_ref): Likewise.
18231         (pupa_dl_unref): Likewise.
18232         (pupa_dl_iterate): Likewise.
18233         (pupa_dl_init): Renamed to ...
18234         (pupa_dl_set_prefix): ... this.
18235         (pupa_dl_get_prefix): Declared.
18237         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
18238         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
18239         unloaded.
18240         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18241         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18243         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18244         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18246 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
18248         * util/i386/pc/pupa-setup.c (setup): Define the internal
18249         function find_first_partition_start at the top level, because GCC
18250         3.0.x cannot compile internal functions in deeper scopes
18251         correctly.
18252         (find_root_device): Use lstat instead of stat.
18253         Don't follow symbolic links.
18254         Fix the path-constructing code.
18256         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18257         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18258         by a BLKGETSIZE ioctl first, because block devices don't fill
18259         the member st_mode of the structure stat on Linux.
18260         [__linux__] (linux_find_partition): Use a temporary buffer
18261         REAL_DEV for the working space. Copy it to DEV before returning.
18262         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18263         buffer cache consistent.
18264         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18265         strncmp. The previous value was merely wrong.
18266         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18268         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18269         FAT size is 12. The previous value was merely wrong.
18271         * kern/main.c (pupa_main): Don't split the starting message from
18272         newlines.
18274         * kern/term.c (pupa_putchar): Put CR after LF instead of before
18275         LF, because BIOS goes crazy about character attributes in this
18276         case.
18278 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
18280         * include/i386/pc/util/biosdisk.h: New file.
18281         * util/i386/pc/biosdisk.c: Likewise.
18282         * util/i386/pc/pupa-setup.c: Likewise.
18284         * Makefile.in (INCLUDE_DISTFILES): Added
18285         include/pupa/i386/pc/util/biosdisk.h.
18286         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18287         directory util/i386/pc.
18288         (install-local): Added a rule for sbin_UTILITIES.
18289         (uninstall): Likewise.
18291         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18293         * util/misc.c (xrealloc): New function.
18294         (pupa_malloc): Likewise.
18295         (pupa_free): Likewise.
18296         (pupa_realloc): Likewise.
18297         (pupa_stop): Likewise.
18298         (pupa_putchar): Likewise.
18300         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18302         * include/pupa/util/misc.h (xrealloc): Declared.
18304         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18305         macro.
18306         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18307         (PUPA_BOOT_MACHINE_BPB_END): ... this.
18309         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18310         [PUPA_UTIL] (pupa_fat_fini): Likewise.
18312         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18313         way should be implemented.
18314         [PUPA_UTIL] (pupa_fat_fini): Likewise.
18316         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18317         the size of NAME for safety.
18318         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18319         0x88.
18321         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18322         (pupa_setup_SOURCES): Likewise.
18324         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18326 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
18328         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18329         bunch of pushl's from pusha, because this destroys the return
18330         value.
18332 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
18334         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18335         This means that any missing prototypes could be fatal. Also, you
18336         must take care when writing assembly code. See the comments at
18337         the beginning of startup.S, for more details.
18339         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18340         compilation mechanism.
18341         (pupa_chainloader_real_boot): Likewise.
18342         (pupa_biosdisk_rw_int13_extensions): Likewise.
18343         (pupa_biosdisk_rw_standard): Likewise.
18344         (pupa_biosdisk_check_int13_extensions): Likewise.
18345         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18346         (pupa_biosdisk_get_diskinfo_standard): Likewise.
18347         (pupa_get_memsize): Likewise.
18348         (pupa_get_mmap_entry): Likewise.
18349         (pupa_console_putchar): Likewise.
18350         (pupa_console_setcursor): Likewise.
18351         (pupa_getrtsecs): Use pushl instead of push.
18353         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18354         memory instead of the stack for a mmap entry, because some
18355         BIOSes may ignore the maximum size and overflow.
18357         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18359         * genmk.rb (PModule#rule): Compile automatically generated
18360         sources with module-specific CFLAGS as well as other sources.
18362 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18364         * configure.ac: Check ld.
18365         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18366         respectively, before checking endianness and sizes.
18368         * Makefile.in (LD): New variable.
18370 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18372         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18374 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18376         * Changelog: New file.