2009-07-20 Joe Auricchio <jauricchio@gmail.com>
[grub2/phcoder.git] / ChangeLog
blobc9616e25c6cbc6a617fa7671717861ff69bbfa33
1 2009-07-20  Joe Auricchio <jauricchio@gmail.com>
3         * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
5 2009-07-20  Pavel Roskin  <proski@gnu.org>
7         * configure.ac: Trim excessively wordy excuses.
9 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
11         Add symlink, mtime and label support to AtheFS.
13         * fs/afs.c (grub_afs_sblock): Declare `name' as char.
14         (grub_afs_iterate_dir): Handle symlinks.
15         (grub_afs_open): Use grub_afs_read_symlink.
16         (grub_afs_dir): Likewise.
17         Pass mtime.
18         (grub_afs_label): New function.
19         (grub_afs_fs): Add grub_afs_label.
20         (grub_afs_read_symlink): New function.
22 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
24         Fix AtheFS support.
26         * fs/afs.c: Fix comments style.
27         (grub_afs_blockrun): Declare as packed.
28         (grub_afs_datastream): Likewise.
29         (grub_afs_bnode): Likewise.
30         (grub_afs_btree): Likewise.
31         (grub_afs_sblock): Likewise.
32         Declare `name' as char.
33         (grub_afs_inode): Declare as packed.
34         Change void *vnode to grub_uint32_t unused.
35         (grub_afs_iterate_dir): Check that key_size is positive.
36         (grub_afs_mount): Don't read superblock twice.
37         (grub_afs_dir): Don't free node in case of errorx
38         grub_fshelp_find_file already handles this.
39         (grub_afs_open): Likewise.
41 2009-07-19  Pavel Roskin  <proski@gnu.org>
43         * Makefile.in: Remove LIBLZO and enable_lzo.
44         * conf/i386-pc.rmk: Remove lzo support.
45         * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
46         * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA.  Remove lzo
47         support.
48         * kern/i386/pc/lzo1x.S: Remove.
49         * kern/i386/pc/startup.S: Remove lzo support.
50         * util/i386/pc/grub-mkimage.c: Likewise.
52 2009-07-19  Vladimir Serbinenko  <phcoder@gmail.com>
54         * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
55         * fs/xfs.c (grub_xfs_dir): Likewise.
56         * fs/afs.c (grub_afs_dir): Likewise.
57         * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
58         (grub_iso9660_open): Likewise.
59         * fs/jfs.c (grub_jfs_open): Likewise.
60         * fs/ext2.c (grub_ext2_dir): Likewise.
61         * include/grub/macho.h (grub_macho_fat_arch): Likewise.
62         * script/sh/lexer.c (grub_script_yylex): Likewise.
63         
64 2009-07-16  Pavel Roskin  <proski@gnu.org>
66         * configure.ac: Never add "-c" to CFLAGS.
68         * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
70         * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
71         grub_cv_cc_efiemu should be used.
73         * configure.ac: Typo fixes.
75         * kern/mm.c (grub_zalloc): New function.
76         (grub_debug_zalloc): Likewise.
77         * include/grub/mm.h: Declare grub_zalloc() and
78         grub_debug_zalloc().
79         * util/misc.c (grub_zalloc): New function.
80         * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
81         instead of grub_malloc(), remove unneeded initializations.
82         * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
83         * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
84         * commands/parttool.c (grub_cmd_parttool): Likewise.
85         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
86         * disk/raid5_recover.c (grub_raid5_recover): Likewise.
87         * disk/raid6_recover.c (grub_raid6_recover): Likewise.
88         * disk/usbms.c (grub_usbms_finddevs): Likewise.
89         * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
90         * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
91         (grub_cmd_efiemu_pnvram): Likewise.
92         * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
93         * fs/iso9660.c (grub_iso9660_mount): Likewise.
94         (grub_iso9660_iterate_dir): Likewise.
95         * fs/jfs.c (grub_jfs_opendir): Likewise.
96         * fs/ntfs.c (list_file): Likewise.
97         (grub_ntfs_mount): Likewise.
98         * kern/disk.c (grub_disk_open): Likewise.
99         * kern/dl.c (grub_dl_load_core): Likewise.
100         * kern/elf.c (grub_elf_file): Likewise.
101         * kern/env.c (grub_env_context_open): Likewise.
102         (grub_env_set): Likewise.
103         (grub_env_set_data_slot): Likewise.
104         * kern/file.c (grub_file_open): Likewise.
105         * kern/fs.c (grub_fs_blocklist_open): Likewise.
106         * loader/i386/multiboot.c (grub_module): Likewise.
107         * loader/xnu.c (grub_xnu_create_key): Likewise.
108         (grub_xnu_create_value): Likewise.
109         * normal/main.c (grub_normal_add_menu_entry): Likewise.
110         (read_config_file): Likewise.
111         * normal/menu_entry.c (make_screen): Likewise.
112         * partmap/sun.c (sun_partition_map_iterate): Likewise.
113         * script/sh/lexer.c (grub_script_lexer_init): Likewise.
114         * script/sh/script.c (grub_script_parse): Likewise.
115         * video/bitmap.c (grub_video_bitmap_create): Likewise.
116         * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
117         * video/readers/png.c (grub_png_output_byte): Likewise.
118         (grub_video_reader_png): Likewise.
120 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
122         Enable all targets that can be built by default
124         * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
125         grub-mkfont and grub-fstest if they can be built
127 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
129         Fix hang and segmentation fault in grub-emu-usb
131         * disk/scsi.c (grub_scsi_open): return err and not grub_errno
132         * util/usb.c (grub_libusb_devices): likewise
133         (grub_libusb_init): rename to ...
134         (GRUB_MOD_INIT (libusb)):...this
135         (grub_libusb_fini): rename to ..
136         (GRUB_MOD_FINI (libusb)):...this
137         * disk/usbms.c (grub_usbms_transfer): fix retry logic
138         * include/grub/disk.h (grub_raid_init): removed, it's useless
139         (grub_raid_fini): likewise
140         (grub_lvm_init): likewise
141         (grub_lvm_fini): likewise
142         * util/grub-emu.c (main): don't call grub_libusb_init, it's done
143         by grub_init_all
145 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
147         Fix libusb
149         * Makefile.in (LIBUSB): new macro
150         * genmk.rb (Utility/print_tail): new method
151         (Utility/rule): use intermediary variable #{prefix}_OBJECTS
152         (top level): call util.print_tail at the end.
154 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
156         Make FreeBSD accept zpool.cache
158         * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
159         type is /boot/zfs/zpool.cache
161 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
163         Fix 64-bit efiemu
165         * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
166         correct wrong typedef
167         * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
169 2009-07-15  Pavel Roskin  <proski@gnu.org>
171         * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
172         * kern/disk.c (struct grub_disk_cache): Likewise.
174         * commands/probe.c (options): Typo fix.
176         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
177         Increase to 0x5a to accommodate FAT32.  Adjust other offsets
178         accordingly.
179         Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
181         * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
182         the end of "Error" to make the message more readable.
184         * boot/i386/pc/boot.S (kernel_segment): Remove.
185         (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
186         for destination.
188         * boot/i386/pc/boot.S (boot_version): Remove.
189         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
190         Remove.
192         * include/grub/i386/pc/boot.h: Sort all offsets.
193         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
194         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
195         * boot/i386/pc/boot.S: Assert location of every offset listed in
196         include/grub/i386/pc/boot.h.
198 2009-07-13  Pavel Roskin  <proski@gnu.org>
200         * include/grub/i386/coreboot/machine.h: Rename
201         GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
202         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
203         multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
205         * kern/dl.c: Force native word size to suppress warnings when
206         compiling grub-emu.
208         * kern/device.c (grub_device_iterate): Change struct part_ent to
209         hold the name, not a pointer to it.  Use one grub_malloc() per
210         partition, not two.  Free partition_name if grub_malloc() fails.
211         Set ents to NULL only before grub_partition_iterate() is called.
213 2009-07-11  Bean  <bean123ch@gmail.com>
215         * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
216         childname.
218 2009-07-10  Bean  <bean123ch@gmail.com>
219 2009-07-10  Robert Millan  <rmh.grub@aybabtu.com>
221         * kern/ieee1275/openfw.c (grub_children_iterate)
222         (grub_devalias_iterate): Fix size evaluation for property or path
223         strings, which was broken since r2132.
225 2009-07-07  Pavel Roskin  <proski@gnu.org>
227         * commands/search.c (search_file): Merge into ...
228         (search_fs): ... this.  Accept search type as argument.
229         (grub_cmd_search): Pass search type to search_fs().
231         * include/grub/util/console.h: New file.
232         * util/console.c: Use it instead of grub/machine/console.h.
233         * util/grub-emu.c: Likewise.
235         * lib/arg.c (find_long_option): Remove.
236         (find_long): Add `len' argument, make `s' const char *.
237         (grub_arg_parse): Parse long options in place, not in a
238         temporary buffer.
240 2009-07-06  Pavel Roskin  <proski@gnu.org>
242         * commands/search.c (search_fs): Fix potential NULL pointer
243         dereference.
245         * commands/search.c (search_fs): Replace QUID macro with quid_fn
246         function pointer.
248 2009-07-06  Daniel Mierswa  <impulze@impulze.org>
250         * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
251         comparison.
253 2009-07-05  Pavel Roskin  <proski@gnu.org>
255         * include/grub/i386/linux.h (struct linux_kernel_params):
256         Restore padding3, it's still needed.
258         * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
259         FreeBSD.
260         * util/osdetect.lua: Likewise.
262 2009-07-05  Bean  <bean123ch@gmail.com>
264         * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
266         * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
267         (grub_lua_getenv): Likewise.
268         (grub_lua_setenv): Likewise.
269         (save_errno): New function.
270         (push_result): Likewise.
271         (grub_lua_enum_device): Likewise.
272         (grub_lua_enum_file): Likewise.
273         (grub_lua_file_open): Likewise.
274         (grub_lua_file_close): Likewise.
275         (grub_lua_file_seek): Likewise.
276         (grub_lua_file_read): Likewise.
277         (grub_lua_file_getline): Likewise.
278         (grub_lua_file_getsize): Likewise.
279         (grub_lua_file_getpos): Likewise.
280         (grub_lua_file_eof): Likewise.
281         (grub_lua_file_exist): Likewise.
282         (grub_lua_add_menu): Likewise.
284         * script/lua/grub_lua.h (isupper): New inline function.
285         (islower): Likewise.
286         (ispunct): Likewise.
287         (isxdigit): Likewise.
288         (strcspn): Change to normal function.
289         (strpbkr): New function declaration.
290         (memchr): Likewise.
292         * script/lua/grub_main.c (scan_str): New function.
293         (strcspn): Likewise.
294         (strpbrk): Likewise.
295         (memchr): Likewise.
297         * script/lua/linit.c (lualibs): Enable the string library.
299         * util/osdetect.lua: New file.
301 2009-07-04  Robert Millan  <rmh.grub@aybabtu.com>
303         * include/grub/i386/linux.h (struct linux_kernel_params): Add
304         `capabilities' member.
306 2009-07-02  Pavel Roskin  <proski@gnu.org>
308         * genparttoollist.sh: Add missing newline at the end.
310 2009-07-01  Pavel Roskin  <proski@gnu.org>
312         * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
314         * util/hostdisk.c (open_device): Remove `const' from
315         `sysctl_size', as sysctlbyname() can change it (in this case it
316         doesn't actually happen).
318         * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
319         using signed long int constants.
321         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
322         constant to avoid a warning on FreeBSD.
324         * util/hostdisk.c (device_is_wholedisk): Compile only on systems
325         where it's needed.
327         * Makefile.in: Install include/grub/machine symlink.
329         * Makefile.in: When installing symlinks, use "cp -fR", which
330         works on FreeBSD and MacOSX.
331         From Yves Blusseau <cl7m42e02@sneakemail.com>
333         * kern/dl.c (grub_dl_resolve_symbol): Make static.
334         * include/grub/dl.h: Remove grub_dl_resolve_symbol().
336         * util/misc.c: Move grub_reboot() and grub_halt() ...
337         * util/grub-emu.c: ... here.  Make main_env static.
338         * include/grub/util/misc.h: Remove main_env.
340         * kern/mm.c: Use correct format to print size_t.
342         * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
343         * kern/i386/dl.c: Use ELF symbols without "32" or "64".
344         * kern/powerpc/dl.c: Likewise.
345         * kern/sparc64/dl.c: Likewise.
346         * kern/x86_64/dl.c: Likewise.
348 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
350         Fix grub-emu build on sparc64-ieee1275.
352         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Syncronize with ...
353         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
355 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
357         * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
358         (grub_reboot, grub_halt): New functions.
360         * util/i386/pc/misc.c: Delete.  Update all users.
361         * util/sparc64/ieee1275/misc.c: Likewise.
362         * util/powerpc/ieee1275/misc.c: Likewise.
364 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
366         * conf/i386.rmk (setjmp_mod_SOURCES)
367         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
368         * conf/common.rmk (setjmp_mod_SOURCES)
369         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
370         to use $(target_cpu).
371         * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
372         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
373         * conf/powerpc-ieee1275.rmk: Likewise.
374         * conf/sparc64-ieee1275.rmk: Likewise.
376         * conf/i386-pc.rmk (kernel_img_SOURCES): Use
377         $(target_cpu) for kern/$(target_cpu)/dl.c.
378         * conf/i386-efi.rmk: Likewise.
379         * conf/i386-ieee1275.rmk: Likewise.
380         * conf/x86_64-efi.rmk: Likewise.
381         * conf/i386-coreboot.rmk: Likewise.
382         * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
383         $(target_cpu) for kern/$(target_cpu)/dl.c and for
384         kern/$(target_cpu)/cache.S.
385         * conf/sparc64-ieee1275.rmk: Likewise.
387 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
389         * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
390         type to `grub_uint8_t', and adjust `padding9' accordingly.
392 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
394         * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
396         * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
397         assembly in final jump, using register constraints.
399         (grub_linux_boot): For text mode, initialize `have_vga' using
400         GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
402         Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
403         right before the final jump.
405         Set `video_mode' to 0x3.
407         Document initialization of `video_page', `video_mode' and
408         `video_ega_bx'.
410 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
412         * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
413         * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
414         and set GRUB_LINUX_FLAG_QUIET appropiately.
416 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
418         Fix build on Debian / sparc.
420         * configure.ac: Recognize `sparc' target_cpu (as sparc64).
422 2009-06-28  Pavel Roskin  <proski@gnu.org>
424         * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
425         fix a warning.
427         * util/grub.d/10_linux.in: Match SUSE style initrd names.
429 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
431         * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
432         `err'.
434 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
436         Revert r2338.
438         * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
439         file can't be opened.  grub_file_open() is already supposed to set
440         grub_errno / grub_errmsg appropiately.
441         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
443 2009-06-27  Pavel Roskin  <proski@gnu.org>
444 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
446         * include/grub/dl.h: Include grub/elf.h.
447         (struct grub_dl): Add symtab field.
448         * kern/dl.c [GRUB_MACHINE_QEMU]: Define
449         GRUB_MODULES_MACHINE_READONLY.
450         (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
451         of the header for read-only modules.
452         (grub_dl_unload): Free mod->symtab for read-only modules.
453         * kern/i386/dl.c: Use mod->symtab.
454         * kern/powerpc/dl.c: Likewise.
455         * kern/sparc64/dl.c: Likewise.
456         * kern/x86_64/dl.c: Likewise.
458         * conf/i386-qemu.rmk: New file.
459         * kern/i386/qemu/startup.S: Likewise.
460         * kern/i386/qemu/mmap.c: Likewise.
461         * boot/i386/qemu/boot.S: Likewise.
462         * include/grub/i386/qemu/time.h: Likewise.
463         * include/grub/i386/qemu/serial.h: Likewise.
464         * include/grub/i386/qemu/kernel.h: Likewise.
465         * include/grub/i386/qemu/console.h: Likewise.
466         * include/grub/i386/qemu/boot.h: Likewise.
467         * include/grub/i386/qemu/init.h: Likewise.
468         * include/grub/i386/qemu/machine.h: Likewise.
469         * include/grub/i386/qemu/loader.h: Likewise.
470         * include/grub/i386/qemu/memory.h: Likewise.
472         * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
473         (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
474         [qemu] (pkglib_IMAGES): Add `boot.img'.
475         [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
476         [qemu] (boot_img_FORMAT): New variables.
477         [qemu] (bin_UTILITIES): Add `grub-mkimage'.
478         [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
479         [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
480         [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
481         [qemu] (kernel_img_FORMAT): New variables.
483         * configure.ac: Recognise `i386-qemu'.
485         * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
486         (for no compression).
487         [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
488         a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
489         `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
490         `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
491         ifdefs).
493 2009-06-27  Pavel Roskin  <proski@gnu.org>
495         * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
496         read.
497         * efiemu/prepare32.c: Likewise.
498         * efiemu/prepare64.c: Likewise.
500 2009-06-26  Pavel Roskin  <proski@gnu.org>
502         * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
503         * include/grub/elf.h: Define symbols without "32" or "64" based
504         on GRUB_TARGET_WORDSIZE.
505         * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
506         * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
507         ELF definitions.
508         * efiemu/loadcore64.c: Likewise.
509         * loader/i386/bsd32.c: Likewise.
510         * loader/i386/bsd64.c: Likewise.
511         * kern/dl.c: Remove own ELF definitions.
512         * util/i386/efi/grub-mkimage.c: Likewise.
514 2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>
516         * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
517         segment 0x0 unconditionally, because the reference generated by
518         GAS is an absolute address.
520 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
522         * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
523         [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
525 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
527         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
528         indexes.  Check for -f explicitly.
529         (search_file): Improve error message.
530         (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
532 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
534         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
535         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
537 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
539         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
540         * conf/i386-ieee1275.rmk: Likewise.
541         * conf/i386-coreboot.rmk: Likewise.
543         * kern/i386/pc/startup.S (grub_stop): Remove function.
544         * kern/i386/ieee1275/startup.S: Likewise.
545         * kern/i386/coreboot/startup.S: Likewise.
546         * kern/i386/misc.S (grub_stop): New function.
548 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
550         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
551         * kern/i386/realmode.S (real_to_prot): ... to here.
553 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
555         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
556         with `kernel.img'.
557         (kernel_elf_SOURCES): Rename to ...
558         (kernel_img_SOURCES): ... this.
559         (kernel_elf_HEADERS): Rename to ...
560         (kernel_img_HEADERS): ... this.  Update all users.
561         (kernel_elf_ASFLAGS): Rename to ...
562         (kernel_img_ASFLAGS): ... this.
563         (kernel_elf_CFLAGS): Rename to ...
564         (kernel_img_CFLAGS): ... this.
565         (kernel_elf_LDFLAGS): Rename to ...
566         (kernel_img_LDFLAGS): ... this.
567         * conf/i386-coreboot.rmk: Likewise.
568         * conf/powerpc-ieee1275.rmk: Likewise.
570         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
571         with "kernel.img".
573 2009-06-21  Pavel Roskin  <proski@gnu.org>
575         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
576         to match nested functions.
577         * loader/sparc64/ieee1275/linux.c: Likewise.
579         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
581 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
583         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
584         all i386 platforms.
586 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
588         Fix asm file handling on ELF, and remove workarounds.
590         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
591         and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
592         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
593         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
595 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
597         Load BSD ELF modules
599         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
600         and loader/i386/bsd64.c
601         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
602         (FREEBSD_MODTYPE_ELF_MODULE): New definition
603         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
604         (grub_freebsd_load_elfmodule32): New declaration
605         (grub_freebsd_load_elfmoduleobj64): Likewise
606         (grub_freebsd_load_elf_meta32): Likewise
607         (grub_freebsd_load_elf_meta64): Likewise
608         (grub_freebsd_add_meta): Likewise
609         (grub_freebsd_add_meta_module): Likewise
610         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
611         (grub_freebsd_add_meta_module): Likewise and move module-specific
612         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
613         (grub_cmd_freebsd): Add elf-kernel specific parts
614         based on grub_freebsd_add_meta_module
615         (grub_cmd_freebsd_module): Add type parsing moved from
616         grub_freebsd_add_meta_module
617         (grub_cmd_freebsd_module_elf): New function
618         (cmd_freebsd_module_elf): New variable
619         (GRUB_MOD_INIT): Register freebsd_module_elf
620         * loader/i386/bsd32.c: New file
621         * loader/i386/bsd64.c: Likewise
622         * loader/i386/bsdXX.c: Likewise
623         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
624         (grub_elf64_load): Likewise
625         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
626         All users updated
627         (grub_elf64_load_hook_t): Likewise
629 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
631         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
632         variable.
633         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
634         don't write a menu entry for recovery mode.
636 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
638         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
639         after it's no longer needed.
641 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
643         * include/grub/i386/loader.h (grub_linux_prot_size)
644         (grub_linux_tmp_addr, grub_linux_real_addr)
645         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
646         GRUB_MACHINE_PCBIOS.
647         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
648         common grub_util_info() call to ...
649         (generate_image): ... here.
650         Fix use of uninitialized memory, comparison of signed with
651         unsigned integers and memory leak.
652         Remove bogus module address message.
654 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
656         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
657         grub_raid_register
658         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
660 2009-06-19  Pavel Roskin  <proski@gnu.org>
662         * configure.ac: Remove stray AC_MSG_CHECKING.
664 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
666         * disk/scsi.c (grub_scsi_open): use continue instead of big if
668 2009-06-18  Pavel Roskin  <proski@gnu.org>
670         * conf/common.rmk: Add fs_file.mod.
671         * disk/fs_file.c: New file.
672         * include/grub/disk.h (enum grub_disk_dev_id): Add
673         GRUB_DISK_DEVICE_FILE_ID.
675 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
677         Fix build with Apple's toolchain. Part 2
679         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
680         a fake start
682 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
684         Fix build with Apple's toolchain. Part 1
686         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
687         for long calls
688         * configure.ac: remove a leftover AC_MSG_RESULT
689         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
690         Apple's toolchain
692 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
694         Fix warnings
696         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
697         (decomp_block): initialize ch
698         use grub_memcpy instead of memcpy
700 2009-06-17  Pavel Roskin  <proski@gnu.org>
702         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
703         version, use declarations needed to use vga_text as the startup
704         console.
706         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
707         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
708         the kernel.
709         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
710         and grub_at_keyboard_fini(), it's done on module load and
711         unload.
713 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
715         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
716         file can't be found.
717         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
719 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
721         Fix newline handling
723         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
724         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
725         (grub_script_yylex): don't segfault on unterminated script
726         newline terminates command and variable
728 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
730         avoid double grub_adjust_range call. Bug reported by David Simner
732         * kern/disk.c (grub_disk_write): change to raw disk access before
733         calling disk_read
735 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
737         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
738         spaces, for the benefit of help2man.
739         * util/i386/efi/grub-mkimage.c (usage): Likewise.
741 2009-06-16  Pavel Roskin  <proski@gnu.org>
743         * kern/i386/halt.c: Include grub/machine/init.h.
744         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
746 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
748         * util/grub.d/30_os-prober.in: Use ${root} in the generated
749         drivemap menuentry.
751 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
753         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
754         `echo' command.
756 2009-06-16  Pavel Roskin  <proski@gnu.org>
758         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
759         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
760         save %dx, we only need %dl and we never change it.
761         * boot/i386/pc/cdboot.S: Don't set the root drive.
762         * boot/i386/pc/pxeboot.S: Likewise.
763         * include/grub/i386/pc/boot.h: Remove
764         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
765         GRUB_BOOT_MACHINE_DRIVE_CHECK.
766         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
767         * kern/i386/pc/init.c (make_install_device): Remove references
768         to grub_root_drive.
769         * kern/i386/pc/startup.S: Likewise.
770         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
772 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
774         xnu_uuid command
776         * commands/xnu_uuid.c: new file
777         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
778         (xnu_uuid_mod_SOURCES): new variable
779         (xnu_uuid_mod_CFLAGS): likewise
780         (xnu_uuid_mod_LDFLAGS): likewise
781         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
782         * conf/i386-ieee1275.rmk: likewise
783         * conf/i386-pc.rmk: likewise
784         * conf/powerpc-ieee1275.rmk: likewise
785         * conf/sparc64-ieee1275.rmk: likewise
786         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
788 2009-06-16  Pavel Roskin  <proski@gnu.org>
790         * configure.ac: Avoid '==' in test command, it's not portable.
792 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
794         Probe command
796         * commands/probe.c: new file
797         * conf/common.rmk (pkglib_MODULES): add probe.mod
798         (probe_mod_SOURCES): new variable
799         (probe_mod_CFLAGS): likewise
800         (probe_mod_LDFLAGS): likewise
801         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
802         * conf/i386-ieee1275.rmk: likewise
803         * conf/i386-pc.rmk: likewise
804         * conf/powerpc-ieee1275.rmk: likewise
805         * conf/sparc64-ieee1275.rmk: likewise
807 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
809         Fix handling of string like \"hello\" and "a
810         b"
812         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
813         (grub_script_yylex): fix parsing of quoting, escaping and newline
815 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
817         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
818         handling
820 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
822         * util/grub-mkconfig.in: Fix parsing of --output option.
824 2009-06-12  Pavel Roskin  <proski@gnu.org>
826         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
827         genmk.rb don't need to be generated or installed.
829 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
831         * commands/i386/pc/drivemap_int13h.S: add more comments
833 2009-06-11  Pavel Roskin  <proski@gnu.org>
835         * Makefile.in (uninstall): Uninstall manuals.
837         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
838         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
839         and update-grub_lib in two places.
840         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
842         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
843         a compiler warning.
845         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
846         `entry_lo' to fix variable shadowing.
848 2009-06-11  Christian Franke  <franke@computer.org>
850         * kern/misc.c (__enable_execute_stack): Add missing return type
851         to prevent gcc warning.
853 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
855         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
857 2009-06-11  Pavel Roskin  <proski@gnu.org>
859         * Makefile.in: Don't rely on any scripts being executable.
860         Always use $(SHELL) to run shell scripts.
862         * configure.ac: Always define ___main if using -nostdlib.  This
863         fixes tests on Cygwin.
865 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
867         UDF fix
869         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
870         is in bytes and not in blocks
872 2009-06-11  Pavel Roskin  <proski@gnu.org>
874         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
875         warning.
877 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
879         * util/grub.d/30_os-prober.in: Fix a comment. Source
880         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
881         to set the root device.  Place drivemap command in the generated
882         chain entry.
884 2009-06-11  Pavel Roskin  <proski@gnu.org>
886         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
887         have long been resolved.
889 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
891         * util/grub.d/10_linux.in: Capitalise "Linux".
893         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
895 2009-06-11  Pavel Roskin  <proski@gnu.org>
897         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
898         fix a gcc warning and ensure that the function won't ever exit.
900         * kern/i386/ieee1275/init.c: Add missing prototype for
901         grub_stop_floppy().
903         * loader/ieee1275/multiboot2.c [__i386__]: Include
904         grub/cpu/multiboot.h.
906         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
907         casts to short - they are not portable and cause warnings.  Fix
908         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
910 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
912         Drivemap fixes
914         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
915         new function
916         (grub_get_root_biosnumber_saved): new variable
917         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
918         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
919         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
920         %dx after the call if necessary
921         * conf/common.rmk (pkglib_MODULES): remove boot.mod
922         (boot_mod_SOURCES): remove
923         (boot_mod_CFLAGS): remove
924         (boot_mod_LDFLAGS): remove
925         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
926         (boot_mod_SOURCES): new variable
927         (boot_mod_CFLAGS): likewise
928         (boot_mod_LDFLAGS): likewise
929         * conf/i386-efi.rmk: likewise
930         * conf/i386-ieee1275.rmk: likewise
931         * conf/i386-pc.rmk: likewise
932         * conf/powerpc-ieee1275.rmk: likewise
933         * conf/sparc64-ieee1275.rmk: likewise
934         * conf/x86_64-efi.rmk: likewise
935         * include/grub/i386/pc/biosnum.h: new file
936         * lib/i386/pc/biosnum.c: likewise
937         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
938         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
939         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
941 2009-06-10  Pavel Roskin  <proski@gnu.org>
943         * io/gzio.c (test_header): Don't reuse one buffer for all data.
944         Use separate variables.  Read only the file size at the end, but
945         not the checksum that we don't use.
947         * kern/file.c (grub_file_read): Use void pointer for the buffer.
948         Adjust all callers.
950         * kern/ieee1275/openfw.c: Remove libc includes.
951         * kern/ieee1275/cmain.c: Likewise.
952         * include/grub/ieee1275/ieee1275.h: Likewise.
954         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
955         compiler warnings.
957 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
959         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
960         `genparttoollist.sh'.
961         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
962         Add `*.sh' to the list find searches for and change `mdate.sh'
963         to `mdate-sh'.
965 2009-06-10  Pavel Roskin  <proski@gnu.org>
967         * include/grub/multiboot2.h: Provide compatibility defines for
968         multiboot2.h.
969         * include/multiboot2.h: Include stdint.h only if needed, using
970         angle brackets.
971         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
972         grub/multiboot2.h.
973         * loader/ieee1275/multiboot2.c: Likewise.
974         * loader/multiboot2.c: Likewise.
975         * loader/multiboot_loader.c: Likewise.
977         * configure.ac: Use -nostdlib when probing for the target.  It
978         should not be required to have libc for the target.
980         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
981         they fail without libc headers for the target.
982         * include/grub/powerpc/libgcc.h: Use weak attribute for all
983         exports.
984         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
985         preprocessor conditionals.
987         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
988         build system doesn't need to be aware of the tar.c internals.
990 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
992         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
994 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
996         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
997         disk limit to 26 for IDE, Virtio, Xen and SCSI.
999 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
1001         * util/i386/pc/grub-install.in: Change the error message if UUIDs
1002         aren't available if ata.mod gets used.
1004 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
1006         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
1007         initialising controller.
1008         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1010 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1012         * util/i386/pc/grub-install.in: Add a parameter --disk-module
1013         to choose between ata and biosdisk module on i386-pc.
1015 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
1017         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
1018         Subclass and Programming Interface fields in terms of the 3 byte
1019         Class Code register.
1020         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1022         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
1023         interface is OHCI.  Add grub_dprintf for symmetry with
1024         bus/usb/uhci.c.
1025         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
1026         interface is UHCI.  Add interf variable for programming
1027         interface.  Print interface with class/subclass.
1029         * bus/usb/ohci.c: Set interf with correct field.
1031         * bus/usb/uhci.c: Remove unneeded doubled lines.
1032         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
1033         Remove whitespace inside comment.
1035 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
1037         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
1038         as fallback an equivalent option without depth.
1040 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
1042         Not fail if unable to retrieve C/H/S on LBA disks
1044         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
1045         if unable to retrieve C/H/S on LBA disks
1047 2009-06-08  Pavel Roskin  <proski@gnu.org>
1049         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
1050         about aliasing.
1052 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1054         * Makefile.in (uninstall): Remove all $lib_DATA files.
1056 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
1058         Bugfix: install on partitionless device
1060         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
1061         is a whole disk
1063 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1065         * Makefile.in (uninstall): Remove all $include_DATA files.
1067 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1069         * commands/true.c: New file.  Implement the true and false commands.
1070         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
1071         (true_mod_SOURCES): New variable.
1072         (true_mod_CFLAGS): Likewise.
1073         (true_mod_LDFLAGS): Likewise.
1075 2009-06-05  Colin D Bennett  <colin@gibibit.com>
1077         Optimized font character lookup using binary search instead of linear
1078         search.  Fonts now are required to have the character index ordered by
1079         code point.
1081         * font/font.c (load_font_index): Verify that fonts have ordered
1082         character indices.
1083         (find_glyph): Use binary search instead of linear search to find a
1084         character in a font.
1086 2009-06-05  Michael Scherer  <misc@mandriva.org>
1088         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
1089         uses case sensitive btree.
1090         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
1091         only for case insensitive filesystems.
1093 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
1095         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
1096         * conf/common.rmk (search_mod_CFLAGS): likewise
1098 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1100         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
1101         compensate a compiler bug
1103 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1105         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
1106         instead of '\b'
1108 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1110         Definitions for creating asm symbols with Apple's CC
1112         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
1113         [APPLE_CC] (VARIABLE): likewise
1115 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1117         Disable lnxboot.img when compiled
1118         with Apple's CC
1120         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
1121         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
1122         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
1123         [! APPLE_CC] (CODE_LENG): skip
1124         [! APPLE_CC] (setup_sects): likewise
1125         [! APPLE_CC]: skip filling
1127 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1129         Address in trampolines based on 32-bit registers when compiled
1130         with Apple's CC
1132         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
1133         for addresses
1134         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
1136 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1138         Avoid aliases when compiling with Apple's CC for PCBIOS machine
1140         * kern/misc.c [APPLE_CC] (memcpy): new function
1141         [APPLE_CC] (memmove): likewise
1142         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
1143         (memcpy): define alias conditionally on !APPLE_CC
1144         (memset): likewise
1145         (abort): likewise
1146         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
1147         APPLE_CC are defined
1148         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
1149         (grub_assert_fail): make prototype conditional
1151 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1153         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
1155         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
1156         grub-macho2img
1157         (CLEANFILES): add grub-macho2img
1158         (grub_macho2img_SOURCES): new variable
1159         * kern/i386/pc/startup.S (bss_start): new variable
1160         (bss_end): likewise
1161         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
1162         * util/grub-macho2img.c: new file
1164 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1166         Use objconv when compiling with Apple's CC
1168         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
1169         (efiemu64.o): likewise
1170         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
1171         when compiling with Apple's CC
1172         (efiemu64_s.o): likewise
1173         * configure.ac: check for objconv when compiling with Apple's CC
1174         * genmk.rb: use objconv for modules when compiled with Apple's CC
1176 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1178         Define segment as well as section when compiling with
1179         Apple's CC
1181         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1182         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1183         (efiemu_convert_pointer): likewise
1184         (efiemu_set_virtual_address_map): likewise
1185         (efiemu_convert_pointer): likewise
1186         (efiemu_getcrc32): likewise
1187         (init_crc32_table): likewise
1188         (reflect): likewise
1189         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1190         (GRUB_MOD_DEP): likewise
1192 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1194         Allow a compilation without -mcmodel=large
1196         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1197         when compiled without -mcmodel=large
1198         (filter_memory_map): remove memory post 4 GiB when compiled
1199         without -mcmodel=large
1200         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
1201         TARGET_CFLAGS when -mcmodel=large isn't supported
1203 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1205         Remove nested functions in efiemu core
1207         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
1209 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1211         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1213         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1214         temporary storage
1215         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1216         using Apple's CC
1217         (grub_cpu_is_tsc_supported): likewise
1218         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
1220 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1222         Absolute addressing through constant with Apple's cc
1224         * kern/i386/pc/startup.S: Define necessary constants
1225         and address through it when using ABS with Apple's CC
1226         * boot/i386/pc/diskboot.S: likewise
1227         * boot/i386/pc/boot.S: likewise
1228         * boot/i386/pc/lnxboot.S: likewise
1229         * boot/i386/pc/cdboot.S: likewise
1230         * mmap/i386/pc/mmap_helper.S: likewise
1231         * commands/i386/pc/drivemap_int13h.S: likewise
1233 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1235         Check if compiler is apple cc
1237         * Makefile.in (ASFLAGS): new variable
1238         (TARGET_ASFLAGS): likewise
1239         (TARGET_MODULE_FORMAT): likewise
1240         (TARGET_APPLE_CC): likewise
1241         (OBJCONV): likewise
1242         (TARGET_IMG_CFLAGS): likewise
1243         (TARGET_CPPFLAGS): add includedir
1244         * configure.ac: call grub_apple_cc and grub_apple_target_cc
1245         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1246         Check for linker script only if compiler isn't Apple's CC
1247         (TARGET_MODULE_FORMAT): set
1248         (TARGET_APPLE_CC): likewise
1249         (TARGET_ASFLAGS): likewise
1250         (ASFLAGS): likewise
1251         Check for objcopy only if compiler isn't Apple's CC
1252         Check for BSS symbol only if compiler isn't Apple's CC
1253         * genmk.rb: adapt nm options if we use Apple's utils
1254         * aclocal.m4 (grub_apple_cc): new test
1255         (grub_apple_target_cc): likewise
1257 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1259         Simplify sed expressions and improve awk
1261         * Makefile.in (install-local): simplify sed expression
1262         * gencmdlist.sh: likewise
1263         * genmoddep.awk: avoid adding module as a dependency of itself
1265 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1267         Add missing start symbols
1269         * boot/i386/pc/boot.S: add start
1270         * boot/i386/pc/pxeboot.S: likewise
1272 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1274         Fix wrong assumptions with grub-mkimage on EFI
1276         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
1277         (relocate_addresses): consider both r_addend and value at offset
1278         (make_mods_section): zerofill modinfo and header
1279         (convert_elf): write prefix here
1281 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1283         Use .asciz instead of .string
1285         * i386/pc/diskboot.S: use .asciz instead of .string
1286         * i386/pc/boot.S: likewise
1287         * include/grub/dl.h (GRUB_MOD_DEP): likewise
1288         (GRUB_MOD_NAME): likewise
1290 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1292         gfxpayload support
1294         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1295         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1296         (grub_video_setup): remove
1297         (grub_video_set_mode): new prototype
1298         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1299         (vid_mode): remove
1300         (linux_vesafb_res): compile only on PCBIOS
1301         (grub_linux_boot): support gfxpayload
1302         * loader/i386/pc/xnu.c (video_hook): new function
1303         (grub_xnu_set_video): support gfxpayload
1304         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1305         (DEFAULT_VIDEO_HEIGHT): likewise
1306         (DEFAULT_VIDEO_FLAGS): likewise
1307         (DEFAULT_VIDEO_MODE): new definition
1308         (video_hook): new function
1309         (grub_gfxterm_init): use grub_video_set_mode
1310         * util/grub.d/30_os-prober.in: remove explicit modesetting before
1311         loading xnu
1312         * video/video.c (grub_video_setup): removed
1313         (grub_video_set_mode): new function based on grub_gfxterm_init and
1314         grub_video_setup
1316 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1318         Avoid calling biosdisk in drivemap
1320         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1321         (revparse_biosdisk): likewise
1322         (list_mappings): derive name from id directly
1323         (grub_cmd_drivemap): use tryparse_diskstring
1325 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1327         Script fixes
1329         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1330         (grub_lexer_param): add tokenonhold
1331         (grub_script_create_cmdline): remove cmdline. All callers updated
1332         (grub_script_function_create): make functionname
1333         grub_script_arg. All callers updated
1334         (grub_script_execute_argument_to_string): new prototype
1335         * kern/parser.c (state_transitions): reorder
1336         (grub_parser_cmdline_state): fix a bug and make more compact
1337         * script/sh/execute.c (grub_script_execute_argument_to_string):
1338         make global
1339         (grub_script_execute_cmdline): use new format
1340         * script/sh/function.c (grub_script_function_create): make functionname
1341         grub_script_arg. All callers updated
1342         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
1343         (grub_script_yylex): remove
1344         (grub_script_yylex2): renamed to ...
1345         (grub_script_yylex): ...renamed
1346         parse the expressions like a${b}c
1347         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1348         (GRUB_PARSER_TOKEN_VAR): remove
1349         (GRUB_PARSER_TOKEN_NAME): likewise
1350         ("if"): declare as typeless
1351         ("while"): likewise
1352         ("function"): likewise
1353         ("else"): likewise
1354         ("then"): likewise
1355         ("fi"): likewise
1356         (text): remove
1357         (argument): likewise
1358         (script): accept empty scripts and make exit on error
1359         (arguments): use GRUB_PARSER_TOKEN_ARG
1360         (function): likewise
1361         (command): move error handling to script
1362         (menuentry): move grub_script_lexer_ref before
1363         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
1364         argument. All callers updated
1366 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1368         Prevent GRUB from probing floppies during boot.
1370         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1371         * commands/search.c (options): Add --no-floppy.
1372         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1373         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1374         --no-floppy when searching for UUIDs.
1376 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1378         Simplify the code duplication in commands/search.c.
1380         * commands/search.c (search_label, search_fs_uuid): Merge into ...
1381         (search_fs): ... this.  Update all users.
1383 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
1385         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1387 2009-05-28  Pavel Roskin  <proski@gnu.org>
1389         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1390         Remove the original symlink explicitly.
1392         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1393         just one slash.  That's how grub_fshelp_find_file() does it.
1395 2009-05-26  Pavel Roskin  <proski@gnu.org>
1397         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1398         to `str'.
1400         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1401         possibly unused.
1403 2009-05-25  Christian Franke  <franke@computer.org>
1405         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1406         register.
1407         (grub_atapi_identify): Add wait after drive select.
1408         (grub_ata_identify): Do more strict status register check before
1409         calling grub_atapi_identify ().  Suppress error message if status
1410         register is 0x00 after command failure.  Add status register
1411         check after PIO read to avoid bogus identify due to stuck DRQ.
1412         Thanks to Pavel Roskin for testing.
1413         (grub_device_initialize): Remove unsafe status register check.
1414         Thanks to 'phcoder' for problem report and patch.
1415         Prevent sign extension in debug message.
1417 2009-05-23  Colin D Bennett  <colin@gibibit.com>
1419         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
1420         definition file, and functions defined in `normal/menu.c' have had
1421         their prototypes moved to `include/grub/menu.h' for consistency.
1423         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1424         from normal.h.
1425         (grub_menu_get_entry): Likewise.
1426         (grub_menu_get_timeout): Likewise.
1427         (grub_menu_set_timeout): Likewise.
1428         (grub_menu_execute_entry): Likewise.
1429         (grub_menu_execute_with_fallback): Likewise.
1430         (grub_menu_entry_run): Likewise.
1432         * include/grub/normal.h: Re-ordered and grouped function
1433         prototypes by file that the function is defined in.
1434         (grub_menu_execute_callback): Removed; moved to menu.h.
1435         (grub_menu_get_entry): Likewise.
1436         (grub_menu_get_timeout): Likewise.
1437         (grub_menu_set_timeout): Likewise.
1438         (grub_menu_execute_entry): Likewise.
1439         (grub_menu_execute_with_fallback): Likewise.
1440         (grub_menu_entry_run): Likewise.
1441         (grub_menu_addentry): Renamed from this ...
1442         (grub_normal_add_menu_entry): ... to this.
1444         * normal/main.c (grub_menu_addentry): Renamed from this ...
1445         (grub_normal_add_menu_entry): ... to this.
1447         * script/sh/execute.c (grub_script_execute_menuentry): Update
1448         reference to renamed grub_menu_addentry function.
1450 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
1452         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1454 2009-05-22  Pavel Roskin  <proski@gnu.org>
1456         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1457         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
1458         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
1459         compiling for the i386 targets, but not for the utilities.
1461         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1462         to grub_uint8_t.
1463         (grub_root_drive): Likewise.
1464         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1465         remove alignment.
1466         (grub_root_drive): Change size to byte.
1467         (grub_start_addr): Remove.
1468         (grub_end_addr): Likewise.
1469         (grub_apm_bios_info): Likewise.
1471 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
1473         * normal/i386: Remove.
1474         * normal/powerpc: Likewise.
1475         * normal/sparc64: Likewise.
1476         * normal/x86_64: Likewise.
1478 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
1480         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
1481         * loader/i386/linux_trampoline.S: Fix indentation
1482         * loader/i386/xnu_helper.S: Likewise
1484 2009-05-18  Colin D Bennett  <colin@gibibit.com>
1486         Display error messages when parsing a Lua statement fails.
1487         Previously, executing a syntactically invalid statement like
1488         ")foo" or "bar;" would silently fail.
1490         * script/lua/grub_main.c (handle_lua_error): New function.
1491         (grub_lua_parse_line): Improved reporting of Lua parser and
1492         execution errors.
1494 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1496         Remove -Werror which causes build to fail on some systems
1498         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1499         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1500         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
1502 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1504         trampoline for linux on 64-bit platform
1506         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1507         loader/i386/efi/linux_trampoline.S
1508         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
1509         declaration
1510         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1511         here
1512         * loader/i386/linux_trampoline.S: moved here
1513         * loader/i386/efi/linux.c (allocate_pages): reserve space for
1514         trampoline
1515         (jumpvector): removed
1516         (grub_linux_trampoline_start): new declaration
1517         (grub_linux_trampoline_end): likewise
1518         (grub_linux_boot): use trampoline when on 64-bit platform
1519         * loader/i386/linux.c: likewise
1521 2009-05-16  Pavel Roskin  <proski@gnu.org>
1523         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1524         const to avoid a warning.
1525         (grub_lua_setenv): Likewise.
1526         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1527         lmsg to fix a warning.
1529 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1531         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1532         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1533         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1534         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1535         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1536         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1537         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1538         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1540 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1542         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1544 2009-05-16  Bean  <bean123ch@gmail.com>
1546         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1547         (lua_mod_SOURCES): New variable.
1548         (lua_mod_CFLAGS): Likewise.
1549         (lua_mod_LDFLAGS): Likewise.
1551         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1552         (setjmp_mod_SOURCES): New variable.
1553         (setjmp_mod_CFLAGS): Likewise.
1554         (setjmp_LDFLAGS): Likewise.
1556         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1557         (setjmp_mod_SOURCES): New variable.
1558         (setjmp_mod_CFLAGS): Likewise.
1559         (setjmp_LDFLAGS): Likewise.
1561         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1562         (setjmp_mod_SOURCES): New variable.
1563         (setjmp_mod_CFLAGS): Likewise.
1564         (setjmp_LDFLAGS): Likewise.
1566         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1567         (setjmp_mod_SOURCES): New variable.
1568         (setjmp_mod_CFLAGS): Likewise.
1569         (setjmp_LDFLAGS): Likewise.
1571         * normal/i386/setjmp.S: Moved from here ...
1572         * lib/i386/setjmp.S: ... Moved here
1573         * normal/x86_64/setjmp.S: Moved from here ...
1574         * lib/x86_64/setjmp.S: ... Moved here
1575         * normal/powerpc/setjmp.S: Moved from here ...
1576         * lib/powerpc/setjmp.S: ... Moved here
1577         * normal/sparc64/setjmp.S: Moved from here ...
1578         * lib/sparc64/setjmp.S: ... Moved here
1580         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1581         returns_twice in mingw.
1583         * script/lua/grub_lib.c: New file.
1584         * script/lua/grub_lib.h: Likewise.
1585         * script/lua/grub_lua.h: Likewise.
1586         * script/lua/grub_main.c: Likewise.
1587         * script/lua/lapi.c: Likewise.
1588         * script/lua/lapi.h: Likewise.
1589         * script/lua/lauxlib.c: Likewise.
1590         * script/lua/lauxlib.h: Likewise.
1591         * script/lua/lbaselib.c: Likewise.
1592         * script/lua/lcode.c: Likewise.
1593         * script/lua/lcode.h: Likewise.
1594         * script/lua/ldblib.c: Likewise.
1595         * script/lua/ldebug.c: Likewise.
1596         * script/lua/ldebug.h: Likewise.
1597         * script/lua/ldo.c: Likewise.
1598         * script/lua/ldo.h: Likewise.
1599         * script/lua/ldump.c: Likewise.
1600         * script/lua/lfunc.c: Likewise.
1601         * script/lua/lfunc.h: Likewise.
1602         * script/lua/lgc.c: Likewise.
1603         * script/lua/lgc.h: Likewise.
1604         * script/lua/linit.c: Likewise.
1605         * script/lua/liolib.c: Likewise.
1606         * script/lua/llex.c: Likewise.
1607         * script/lua/llex.h: Likewise.
1608         * script/lua/llimits.h: Likewise.
1609         * script/lua/lmathlib.c: Likewise.
1610         * script/lua/lmem.c: Likewise.
1611         * script/lua/lmem.h: Likewise.
1612         * script/lua/loadlib.c: Likewise.
1613         * script/lua/lobject.c: Likewise.
1614         * script/lua/lobject.h: Likewise.
1615         * script/lua/lopcodes.c: Likewise.
1616         * script/lua/lopcodes.h: Likewise.
1617         * script/lua/loslib.c: Likewise.
1618         * script/lua/lparser.c: Likewise.
1619         * script/lua/lparser.h: Likewise.
1620         * script/lua/lstate.c: Likewise.
1621         * script/lua/lstate.h: Likewise.
1622         * script/lua/lstring.c: Likewise.
1623         * script/lua/lstring.h: Likewise.
1624         * script/lua/lstrlib.c: Likewise.
1625         * script/lua/ltable.c: Likewise.
1626         * script/lua/ltable.h: Likewise.
1627         * script/lua/ltablib.c: Likewise.
1628         * script/lua/ltm.c: Likewise.
1629         * script/lua/ltm.h: Likewise.
1630         * script/lua/lua.h: Likewise.
1631         * script/lua/luaconf.h: Likewise.
1632         * script/lua/lualib.h: Likewise.
1633         * script/lua/lundump.c: Likewise.
1634         * script/lua/lundump.h: Likewise.
1635         * script/lua/lvm.c: Likewise.
1636         * script/lua/lvm.h: Likewise.
1637         * script/lua/lzio.c: Likewise.
1638         * script/lua/lzio.h: Likewise.
1640 2009-05-16  Bean  <bean123ch@gmail.com>
1642         * include/grub/kernel.h (grub_module_header_types): Add type
1643         OBJ_TYPE_CONFIG.
1645         * kern/main.c (grub_load_config): New function.
1646         (grub_main): Call grub_load_config to read boot config.
1648         * grub-mkimage (generate_image): New parameter config_path.
1649         (options): New option --config.
1650         (main): Parse --config option, and pass it to generate_image.
1652 2009-05-14  Christian Franke  <franke@computer.org>
1654         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1655         This fixes build on Cygwin.
1657 2009-05-14  Pavel Roskin  <proski@gnu.org>
1659         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1660         jump.  This saves two bytes, so the typical case of 2 swapped
1661         drives would fit 32 bytes.
1663 2009-05-13  Pavel Roskin  <proski@gnu.org>
1665         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1666         grub_uint32_t to avoid a warning.
1668         * loader/i386/linux.c (allocate_pages): When assigning
1669         real_mode_mem, cast through grub_size_t to fix a warning.  The
1670         code already makes sure that the value would fit a pointer.
1671         (grub_linux_setup_video): Cast render_target->data to
1672         grub_size_t to fix a warning.
1674 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
1676         * commands/i386/pc/drivemap.c: New file - implement drivemap
1677         command.
1678         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1679         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1681 2009-05-13  Pavel Roskin  <proski@gnu.org>
1683         * util/i386/pc/grub-setup.c (setup): Remove unused variable
1684         embedding_area_exists.
1686 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
1688         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1689         it easier to understand / work with.
1690         Improve warning messages for cases where there's no embedding area,
1691         or when it is too small (or core.img too large).
1693 2009-05-13  Pavel Roskin  <proski@gnu.org>
1695         * loader/i386/pc/multiboot2.c: Add necessary includes for
1696         grub_multiboot2_real_boot().
1698         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1699         PX record is always little-endian.  We only need the lower 2
1700         bytes of the mode.
1702         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1703         facilitate code reuse.
1704         (grub_cpio_mount): Use "struct head", not a char buffer.  This
1705         fixes a warning reported by gcc 4.4.
1707         * kernel/disk.c (grub_disk_read): Use void pointer for the
1708         buffer.
1709         (grub_disk_write): Use const void pointer for the buffer.
1710         Adjust all callers.  Remove unnecessary casts.
1712 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
1714         * util/i386/pc/grub-install.in: Update copyright year.
1716 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1718         gptsync
1720         * commands/gptsync.c: new file
1721         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1722         (gptsync_mod_SOURCES): new variable
1723         (gptsync_mod_CFLAGS): likewise
1724         (gptsync_mod_LDFLAGS): likewise
1725         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1726         new definition
1727         (GRUB_PC_PARTITION_TYPE_HFS): likewise
1728         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1729         * conf/i386-ieee1275.rmk: likewise
1730         * conf/i386-pc.rmk: likewise
1731         * conf/powerpc-ieee1275.rmk: likewise
1733 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1735         Fixed grub-emu
1737         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1738         (grub_dl_ref): likewise
1740 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
1742         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1743         split in two functions (one for msdos and one for gpt).
1745 2009-05-08  Pavel Roskin  <proski@gnu.org>
1747         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1748         not modified.
1750         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1751         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
1752         Initialize them with -1.  Add sanity check for bad1.  Eliminate
1753         nerr variable.
1755 2009-05-08  David S. Miller  <davem@davemloft.net>
1757         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1759 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
1761         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1762         existence.
1764 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
1766         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1767         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1769 2009-05-05  David S. Miller  <davem@davemloft.net>
1771         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1773 2009-05-05  Pavel Roskin  <proski@gnu.org>
1775         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1776         of grub_dl_ref() and grub_dl_unref().
1777         * commands/parttool.c: Remove preprocessor conditionals around
1778         grub_dl_ref() and grub_dl_unref().
1779         * fs/affs.c: Likewise.
1780         * fs/afs.c: Likewise.
1781         * fs/cpio.c: Likewise.
1782         * fs/ext2.c: Likewise.
1783         * fs/fat.c: Likewise.
1784         * fs/hfs.c: Likewise.
1785         * fs/hfsplus.c: Likewise.
1786         * fs/iso9660.c: Likewise.
1787         * fs/jfs.c: Likewise.
1788         * fs/minix.c: Likewise.
1789         * fs/ntfs.c: Likewise.
1790         * fs/reiserfs.c: Likewise.
1791         * fs/sfs.c: Likewise.
1792         * fs/udf.c: Likewise.
1793         * fs/ufs.c: Likewise.
1794         * fs/xfs.c: Likewise.
1795         * include/grub/dl.h: Likewise.
1796         * loader/xnu.c: Likewise.
1798 2009-05-04  Pavel Roskin  <proski@gnu.org>
1800         * commands/acpi.c: Remove unused variable my_mod.
1801         * partmap/amiga.c: Likewise.
1802         * partmap/apple.c: Likewise.
1803         * partmap/gpt.c: Likewise.
1804         * partmap/pc.c: Likewise.
1805         * partmap/sun.c: Likewise.
1806         * term/gfxterm.c: Likewise.
1807         * term/i386/pc/vesafb.c: Likewise.
1808         * term/i386/pc/vga.c: Likewise.
1810 2009-05-04  David S. Miller  <davem@davemloft.net>
1812         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1813         pointer args to grub_ieee1275_get_property().
1815         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1817         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1818         devices, and do not traverse down under controller nodes.
1820         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1821         (grub_ofdisk_open): Use it to un-escape "," characters.
1822         * kern/disk.c (find_part_sep): New.
1823         (grub_disk_open): Use it to find the first non-escaped ','
1824         character in the disk name.
1825         * util/ieee1275/devicemap.c (escape_of_path): New.
1826         (grub_util_emit_devicemap_entry): Use it.
1827         * util/sparc64/ieee1275/grub-install.in: Update script to
1828         strip partition specifiers properly by not triggering on
1829         '\' escaped ',' characters.
1831 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1833         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1834         to 0x300.
1835         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1836         resolutions.
1837         (linux_vesafb_modes): Add a lot of additional modes to the list (based
1838         on documentation from Wikipedia).
1840 2009-05-04  Pavel Roskin  <proski@gnu.org>
1842         * disk/ata.c: Spelling fixes.
1843         * disk/raid.c: Likewise.
1844         * disk/usbms.c: Likewise.
1845         * disk/dmraid_nvidia.c: Likewise.
1846         * kern/ieee1275/openfw.c: Likewise.
1847         * kern/ieee1275/init.c: Likewise.
1848         * kern/ieee1275/cmain.c: Likewise.
1849         * boot/i386/pc/cdboot.S: Likewise.
1850         * video/readers/png.c: Likewise.
1851         * video/i386/pc/vbe.c: Likewise.
1852         * fs/udf.c: Likewise.
1853         * fs/hfs.c: Likewise.
1854         * fs/reiserfs.c: Likewise.
1855         * efiemu/runtime/efiemu.c: Likewise.
1856         * efiemu/main.c: Likewise.
1857         * efiemu/mm.c: Likewise.
1858         * include/grub/elf.h: Likewise.
1859         * include/grub/xnu.h: Likewise.
1860         * include/grub/usbdesc.h: Likewise.
1861         * include/grub/usb.h: Likewise.
1862         * include/grub/script_sh.h: Likewise.
1863         * include/grub/lib/LzmaEnc.h: Likewise.
1864         * include/grub/efiemu/efiemu.h: Likewise.
1865         * include/grub/command.h: Likewise.
1866         * normal/menu.c: Likewise.
1867         * normal/main.c: Likewise.
1868         * normal/datetime.c: Likewise.
1869         * bus/usb/uhci.c: Likewise.
1870         * mmap/i386/uppermem.c: Likewise.
1871         * mmap/mmap.c: Likewise.
1872         * commands/acpi.c: Likewise.
1873         * commands/test.c: Likewise.
1874         * partmap/apple.c: Likewise.
1875         * font/font.c: Likewise.
1876         * loader/sparc64/ieee1275/linux.c: Likewise.
1877         * loader/macho.c: Likewise.
1878         * loader/i386/bsd_trampoline.S: Likewise.
1879         * loader/i386/bsd.c: Likewise.
1880         * loader/xnu.c: Likewise.
1881         * term/i386/pc/vesafb.c: Likewise.
1882         * term/usb_keyboard.c: Likewise.
1883         * util/resolve.c: Likewise.
1884         * util/getroot.c: Likewise.
1886 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1888         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1890 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1892         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1893         build error.
1895 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1897         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1898         parameter only available on BIOS.
1900 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1902         Removed wrong semicolon in declaration
1904         * grub/misc.h (grub_dprintf): remove semicolon
1906 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1908         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1909         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1910         is done by grub_cmd_linux() now).
1911         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1912         restore video to text mode.
1913         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1914         indicates lack of "vga=" parameter.  "vga=0" is mapped to
1915         `GRUB_LINUX_VID_MODE_NORMAL'.
1917 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1919         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1920         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1921         and `normal/script.c'.  Add `kern/rescue_reader.c',
1922         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1923         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1924         `grub_script.tab.c'.
1926         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1927         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1928         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1929         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1930         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1932         * Makefile.in: Remove duplicated 2008 in Copyright line.
1934 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1936         * util/misc.c (grub_util_warn): New function.  Emits a warning
1937         unconditionally.
1938         * include/grub/util/misc.h (grub_util_warn): New declaration.
1940         * util/i386/pc/grub-install.in: Understand --force and pass it down
1941         to grub-setup.
1943         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1944         down to setup().
1945         (setup): Improve error messages and add warnings when requested to
1946         install in odd layouts.  Refuse to install using blocklists unless
1947         --force was set.
1949 2009-05-04  martin f. krafft  <madduck@madduck.net>
1951         * disk/raid.c (grub_raid_scan_device): Improve debug message.
1953 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1955         Updated copyright year
1957         * fs/hfsplus.c: updated copyright year
1959 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1961         HFS+ UUID
1963         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1964         in the space previously used by unused3
1965         (grub_hfsplus_uuid): new function
1966         (grub_hfsplus_fs): added uuid field
1968 2009-05-03  Pavel Roskin  <proski@gnu.org>
1970         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1971         suppress warnings.  It's no longer needed.
1972         * disk/host.c: Likewise.
1973         * disk/ata_pthru.c: Likewise.
1974         * disk/loopback.c: Likewise.
1975         * hook/datehook.c: Likewise.
1976         * parttool/pcpart.c: Likewise.
1977         * fs/i386/pc/pxe.c: Likewise.
1978         * fs/ntfscomp.c: Likewise.
1979         * efiemu/main.c: Likewise.
1980         * mmap/mmap.c: Likewise.
1981         * commands/crc.c: Likewise.
1982         * commands/hexdump.c: Likewise.
1983         * commands/hdparm.c: Likewise.
1984         * commands/acpi.c: Likewise.
1985         * commands/echo.c: Likewise.
1986         * commands/minicmd.c: Likewise.
1987         * commands/blocklist.c: Likewise.
1988         * commands/memrw.c: Likewise.
1989         * commands/loadenv.c: Likewise.
1990         * commands/usbtest.c: Likewise.
1991         * commands/lsmmap.c: Likewise.
1992         * commands/boot.c: Likewise.
1993         * commands/parttool.c: Likewise.
1994         * commands/configfile.c: Likewise.
1995         * commands/search.c: Likewise.
1996         * commands/ieee1275/suspend.c: Likewise.
1997         * commands/cat.c: Likewise.
1998         * commands/i386/pc/pxecmd.c: Likewise.
1999         * commands/i386/pc/play.c: Likewise.
2000         * commands/i386/pc/halt.c: Likewise.
2001         * commands/i386/pc/vbeinfo.c: Likewise.
2002         * commands/i386/pc/vbetest.c: Likewise.
2003         * commands/lspci.c: Likewise.
2004         * commands/date.c: Likewise.
2005         * commands/handler.c: Likewise.
2006         * commands/ls.c: Likewise.
2007         * commands/test.c: Likewise.
2008         * commands/cmp.c: Likewise.
2009         * commands/efi/loadbios.c: Likewise.
2010         * commands/efi/fixvideo.c: Likewise.
2011         * commands/halt.c: Likewise.
2012         * commands/help.c: Likewise.
2013         * commands/reboot.c: Likewise.
2014         * hello/hello.c: Likewise.
2015         * script/sh/main.c: Likewise.
2016         * loader/xnu.c: Likewise.
2017         * term/terminfo.c: Likewise.
2018         * term/i386/pc/serial.c: Likewise.
2019         * term/usb_keyboard.c: Likewise.
2021 2009-05-03  David S. Miller  <davem@davemloft.net>
2023         * normal/menu.c: Include grub/parser.h
2025 2009-05-03  Pavel Roskin  <proski@gnu.org>
2027         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
2028         not char*.
2029         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
2030         Suggested by Javier Martín <lordhabbit@gmail.com>
2032         * util/i386/pc/grub-mkrescue.in: Allow for the case when
2033         efiemu??.o doesn't exist.
2034         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
2035         copying.
2037 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
2039         FreeBSD 64-bit support
2041         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
2042         and loader/i386/bsd_trampoline.S
2043         (bsd_mod_ASFLAGS): new variable
2044         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
2045         (FREEBSD_MODTYPE_KERNEL64): likewise
2046         (grub_bsd64_trampoline_start): likewise
2047         (grub_bsd64_trampoline_end): likewise
2048         (grub_bsd64_trampoline_selfjump): likewise
2049         (grub_bsd64_trampoline_gdt): likewise
2050         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
2051         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
2052         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
2053         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
2054         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2055         of "attrib" member
2056         * loader/i386/bsd_pagetable.c: new file
2057         * loader/i386/bsd_trampoline.S: likewise
2058         * loader/i386/bsd.c (ALIGN_QWORD): new macro
2059         (ALIGN_VAR): likewise
2060         (entry_hi): new variable
2061         (kern_end_mdofs): likewise
2062         (is_64bit): likewise
2063         (grub_freebsd_add_meta): use ALIGN_VAR
2064         (grub_e820_mmap): new declaration
2065         (grub_freebsd_add_mmap): new function
2066         (grub_freebsd_add_meta_module): support 64 bit kernels
2067         (grub_freebsd_list_modules): use ALIGN_VAR
2068         (gdt_descriptor): new declaration
2069         (grub_freebsd_boot): support 64 bit kernels
2070         (grub_bsd_elf64_hook): new function
2071         (grub_bsd_load_elf): support elf64
2073 2009-05-03  Bean  <bean123ch@gmail.com>
2075         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
2076         after we get the result of if statement.
2078 2009-05-03  Bean  <bean123ch@gmail.com>
2080         * Makefile.in (enable_efiemu): New variable.
2082         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
2083         set.
2084         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
2085         path.
2086         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
2087         path, add -mno-red-zone option.
2088         (efiemu64_s.o): Likewise.
2089         (efiemu64.o): Use macro $^ for source file.
2091         * configure.ac (--enable-efiemu): New option.
2093 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
2095         xnu support
2097         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
2098         (pkglib_MODULES): add xnu.mod
2099         (xnu_mod_SOURCES): new variable
2100         (xnu_mod_CFLAGS): likewise
2101         (xnu_mod_LDFLAGS): likewise
2102         (xnu_mod_ASFLAGS): likewise
2103         * conf/i386-pc.rmk: likewise
2104         * conf/x86_64-efi.rmk: likewise
2105         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
2106         new declaration
2107         * include/grub/i386/macho.h: new file
2108         * include/grub/i386/xnu.h: likewise
2109         * include/grub/macho.h: likewise
2110         * include/grub/machoload.h: likewise
2111         * include/grub/x86_64/macho.h: likewise
2112         * include/grub/x86_64/xnu.h: likewise
2113         * include/grub/xnu.h: likewise
2114         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
2115         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
2116         * loader/i386/efi/xnu.c: new file
2117         * loader/i386/pc/xnu.c: likewise
2118         * loader/i386/xnu.c: likewise
2119         * loader/i386/xnu_helper.S: likewise
2120         * loader/macho.c: likewise
2121         * loader/xnu.c: likewise
2122         * loader/xnu_resume.c: likewise
2123         * util/grub-dumpdevtree: likewise
2124         * include/grub/i386/pit.h: include grub/err.h
2125         (grub_pit_wait): export
2126         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
2128 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2130         Efiemu
2132         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
2133         _linux_efi, linux_efi.
2134         new files in grub-emu
2135         new targets efiemu32.o and efiemu64.o
2136         * loader/linux_normal_efiemu.c: likewise
2137         * loader/i386/efi/linux.c: added preliminary efiemu support
2138         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
2139         files to copy
2140         * include/grub/autoefi.h: new file
2141         * include/grub/i386/efiemu.h: likewise
2142         * include/grub/i386/pc/efiemu.h: likewise
2143         * include/grub/efi/api.h: add LL suffix when necessary
2144         new definitions relating to tables
2145         * include/grub/efiemu/efiemu.h: new file
2146         * include/grub/efiemu/runtime.h: likewise
2147         * efiemu/prepare.c: likewise
2148         * efiemu/loadcore_common.c: likewise
2149         * efiemu/loadcore64.c: likewise
2150         * efiemu/runtime/efiemu.sh: likewise
2151         * efiemu/runtime/efiemu.S: likewise
2152         * efiemu/runtime/efiemu.c: likewise
2153         * efiemu/runtime/config.h: likewise
2154         * efiemu/prepare32.c: likewise
2155         * efiemu/main.c: likewise
2156         * efiemu/modules/pnvram.c: likewise
2157         * efiemu/modules/i386: likewise
2158         * efiemu/modules/i386/pc: likewise
2159         * efiemu/modules/acpi.c: likewise
2160         * efiemu/i386/pc/cfgtables.c: likewise
2161         * efiemu/i386/loadcore64.c: likewise
2162         * efiemu/i386/loadcore32.c: likewise
2163         * efiemu/prepare64.c: likewise
2164         * efiemu/loadcore.c: likewise
2165         * efiemu/symbols.c: likewise
2166         * efiemu/mm.c: likewise
2167         * efiemu/loadcore32.c: likewise
2169 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2171         ACPI spoofing
2173         * commands/acpi.c: new file
2174         * commands/i386/pc/acpi.c: likewise
2175         * commands/efi/acpi.c: likewise
2176         * include/grub/acpi.h: likewise
2177         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2178         (acpi_mod_SOURCES): new variable
2179         (acpi_mod_CFLAGS): likewise
2180         (acpi_mod_LDFLAGS): likewise
2181         * conf/i386-efi.rmk: likewise
2182         * conf/x86_64-efi.rmk: likewise
2184 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2186         Missing part from mmap patch
2188         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2189         (grub_mmap_unregister)
2190         (grub_mmap_free_and_unregister): use grub_mmap_register
2192 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2194         Mmap services
2196         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2197         * loader/i386/linux.c (find_mmap_size): likewise
2198         (allocate_pages): likewise
2199         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2200         (grub_fill_multiboot_mmap): likewise
2201         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2202         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2203         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2204         (OPENBSD_MMAP_RESERVED): likewise
2205         * include/grub/i386/pc/memory.h: include grub/memory.h
2206         (grub_lower_mem): removed
2207         (grub_upper_mem): likewise
2208         (GRUB_MACHINE_MEMORY_ACPI): new definition
2209         (GRUB_MACHINE_MEMORY_NVS): likewise
2210         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2211         (GRUB_MACHINE_MEMORY_HOLE): likewise
2212         (grub_machine_mmap_register): likewise
2213         (grub_machine_mmap_unregister): likewise
2214         (grub_machine_get_upper): likewise
2215         (grub_machine_get_lower): likewise
2216         (grub_machine_get_post64): likewise
2217         * include/grub/i386/efi/memory.h: new file
2218         * include/grub/x86_64/efi/memory.h: likewise
2219         * include/grub/efi/memory.h: likewise
2220         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2221         (mmap_mod_SOURCES): new variable
2222         (mmap_mod_LDFLAGS): likewise
2223         (mmap_mod_ASFLAGS): likewise
2224         * conf/i386-coreboot.rmk: likewise
2225         * conf/i386-ieee1275.rmk: likewise
2226         * conf/i386-efi.rmk: likewise
2227         * conf/x86_64-efi.rmk: likewise
2228         * include/grub/types.h (UINT_TO_PTR): new macro
2229         (PTR_TO_UINT32): likewise
2230         (PTR_TO_UINT64): likewise
2231         * include/grub/memory.h: new file
2232         * mmap/i386/pc/mmap.c: likewise
2233         * mmap/i386/pc/mmap_helper.S: likewise
2234         * mmap/i386/uppermem.c: likewise
2235         * mmap/mmap.c: likewise
2236         * mmap/efi/mmap.c: likewise
2237         * kern/i386/coreboot/init.c (grub_machine_init): don't use
2238         grub_upper_mem
2239         * kern/i386/pc/init.c (grub_lower_mem): removed variable
2240         (grub_upper_mem): likewise
2241         (grub_machine_init): don't use grub_upper_mem,
2242         make grub_lower_mem local
2243         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2244         grub_mmap_iterate and grub_mmap_get_upper
2245         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2247 2009-05-02  Bean  <bean123ch@gmail.com>
2249         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2250         script/sh/parser.y.
2251         (pkglib_MODULES): Add normal.mod and sh.mod.
2252         (normal_SOURCES): New variable.
2253         (normal_mod_CFLAGS): Likewise.
2254         (normal_mod_LDFLAGS): Likewise.
2255         (sh_mod_SOURCES): Likewise.
2256         (sh_mod_CFLAGS): Likewise.
2257         (sh_mod_LDFLAGS): Likewise.
2259         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2260         script/sh/lexer.c_DEPENDENCIES.
2261         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2262         kern/rescue_reader.c and kern/rescue_parser.c.
2263         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2264         (grub_emu_SOURCES): Change source files.
2265         (pkglib_MODULES): Remove normal.mod.
2266         (normal_SOURCES): Removed.
2267         (normal_mod_CFLAGS): Likewise.
2268         (normal_mod_LDFLAGS): Likewise.
2269         * conf/i386-coreboot.rmk: Likewise.
2270         * conf/i386-efi.rmk: Likewise.
2271         * conf/i386-ieee1276.rmk: Likewise.
2272         * conf/powerpc-ieee1275.rmk: Likewise.
2273         * conf/sparc64-ieee1275.rmk: Likewise.
2274         * conf/x86_64-efi.rmk: Likewise.
2276         * include/grub/command.h (grub_command_execute): New inline function.
2278         * include/grub/menu.h (grub_menu_entry): Removed commands field.
2280         * include/grub/normal.h: Remove <grub/setjmp.h>.
2281         (grub_fs_module_list): Moved to normal/autofs.c.
2282         (grub_exit_env): Removed.
2283         (grub_command_execute): Likewise.
2284         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2285         parameter script.
2286         (read_command_list): New function declaration.
2287         (read_fs_list): Likewise.
2289         * include/parser.h: Include <grub/reader.h>.
2290         (grub_parser_split_cmdline): Change type of getline parameter.
2291         (grub_parser): New structure.
2292         (grub_parser_class): New variable.
2293         (grub_parser_execute): New function declaration.
2294         (grub_register_rescue_parser): Likewise.
2295         (grub_parser_register): New inline function.
2296         (grub_parser_unregister): Likewise.
2297         (grub_parser_get_current): Likewise.
2298         (grub_parser_set_current): Likewise.
2300         * include/grub/reader.h: New file.
2301         * kern/reader.c: Likewise.
2302         * kern/rescue_parser.c: Likewise.
2303         * kern/rescue_reader.c: Likewise.
2304         * normal/autofs.c: Likewise.
2305         * normal/dyncmd.c: Likewise.
2307         * include/grub/rescue.h: Removed.
2308         * normal/command.h: Likewise.
2310         * include/grub/script.h: Moved to ...
2311         * include/grub/script_sh.h: ... Moved here.
2312         * normal/execute.c: Moved to ...
2313         * script/sh/execute.c: ... Moved here.
2314         * normal/function.c: Moved to ...
2315         * script/sh/function.c: ... Moved here.
2316         * normal/lexer.c: Moved to ...
2317         * script/sh/lexer.c: ... Moved here.
2318         * normal/parser.y: Moved to ...
2319         * script/sh/parser.y: ... Moved here.
2320         * normal/script.c: Moved to ...
2321         * script/sh/script.c: ... Moved here.
2323         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2324         <grub/reader.h>.
2325         (grub_exit_env): Removed.
2326         (fs_module_list): Moved to normal/autofs.c.
2327         (grub_file_getline): Don't handle comment here.
2328         (free_menu): Skip removed field entry->commands.
2329         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2330         script parameter.
2331         (read_config_file): Removed nested parameter, change getline function.
2332         (grub_enter_normal_mode): Removed.
2333         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2334         (read_command_list): Likewise.
2335         (autoload_fs_module): Moved to normal/autofs.c.
2336         (read_fs_list): Likewise.
2337         (reader_nested): New variable.
2338         (grub_normal_execute): Run parser.sh to switch to sh parser.
2339         (grub_cmd_rescue): Removed.
2340         (cmd_normal): Removed.
2341         (grub_cmd_normal): Unregister itself at the beginning. Don't register
2342         rescue command.
2343         (grub_cmdline_run): New function.
2344         (grub_normal_reader_init): Likewise.
2345         (grub_normal_read_line): Likewise.
2346         (grub_env_write_pager): Likewise.
2347         (cmdline): New variable.
2348         (grub_normal_reader): Likewise.
2349         (GRUB_MOD_INIT): Register normal reader and set as current, register
2350         pager hook, register normal command with grub_register_command_prio,
2351         so that it won't show up in command.lst.
2352         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2353         grub_fs_autoload_hook.
2355         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2356         (grub_menu_execute_entry): Replace grub_script_execute with
2357         grub_parser_execute, change parameter to grub_command_execute.
2359         * normal/menu_text.c: Remove <grub/script.h>.
2361         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2362         and <grub/parser.h>.
2363         (run): Change editor_getline to use new parser interface. Change
2364         parameter to grub_command_execute.
2366         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2367         <grub/reader.h> and <grub/parser.h>.
2368         (grub_load_normal_mode): Execute normal command.
2369         (grub_main): Call grub_register_core_commands,
2370         grub_register_rescue_parser and grub_register_rescue_reader, use
2371         grub_reader_loop to enter input loop.
2373         * kern/parser.c (grub_parser_split_cmdline): Change type of
2374         getline parameter.
2375         (grub_parser_class): New variable.
2376         (grub_parser_execute): New function.
2378         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2379         * loader/multiboot2.c: Likewise.
2380         * loader/sparc64/ieee1275/linux.c: Likewise.
2382         * util/grub-emu.c (read_command_list): New dummy function.
2384 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2386         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2387         count to 16 for CCISS and IDA.
2389 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2391         * normal/menu_text.c  (grub_wait_after_message): Print a newline
2392         after waiting for user input.
2394         * loader/i386/linux.c: Include `<grub/normal.h>'.
2395         (grub_cmd_linux): Improve the error message about `ask' mode, by
2396         waiting for user input so it's not missed (we can do this, since
2397         user requested interaction).
2399 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2401         Added missing lst to grub-mkrescue
2403         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2404         and ${input_dir}/parttool.lst
2406 2009-04-30  David S. Miller  <davem@davemloft.net>
2408         * util/hostdisk.c (device_is_wholedisk): New function.
2409         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2410         zero only if device_is_wholedisk() returns true.
2412         * util/hostdisk.c (convert_system_partition_to_system_disk):
2413         Handle virtual disk devices named /dev/vdiskX as found on sparc
2414         and powerpc.
2416         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2417         lettered partition specifier is found, convert to numbered.
2419 2009-04-29  David S. Miller  <davem@davemloft.net>
2421         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2422         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2424         * normal/command.c: Add missing newline at end of file.
2426         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2427         warnings.
2428         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2429         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2430         grub_ofdisk_read): Likewise, and deal similarly with the fact that
2431         ihandles have a 32-bit type but need to be stored in a "void *".
2433 2009-04-28  Pavel Roskin  <proski@gnu.org>
2435         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2436         not disk.  Adjust all dependencies.
2437         (grub_fs_uuid_close): Use grub_device_close(), not
2438         grub_disk_close().
2440         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2441         parent's partition, don't copy it by reference, as it gets freed
2442         on close.
2444 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2446         Preboot hooks support
2448         * commands/boot.c (struct grub_preboot_t): new declaration
2449         (preboots_head): new variable
2450         (preboots_tail): likewise
2451         (grub_loader_register_preboot_hook): new function
2452         (grub_loader_unregister_preboot_hook): likewise
2453         (grub_loader_set): launch preboot hooks
2454         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2455         (grub_loader_register_preboot_hook): new declaration
2456         (grub_loader_unregister_preboot_hook): likewise
2458 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2460         Warning fix
2462         * disk/scsi.c (grub_scsi_open): added missing cast when
2463         calling grub_dprintf
2465 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
2467         Bug and warning fixes
2469         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2470         declaration
2471         * commands/test.c (test_parse): fixed bug with file tests and corrected
2472         declaration of find_file
2474 2009-04-26  Pavel Roskin  <proski@gnu.org>
2476         * Makefile.in: Don't install empty manual pages if help2man is
2477         missing.  Use help2man option for output, not shell redirection.
2479 2009-04-26  David S. Miller  <davem@davemloft.net>
2481         * util/grub-mkdevicemap.c (make_device_map): Add missing
2482         NESTED_FUNC_ATTR to process_device().
2484 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2486         Test command
2488         * commands/test.c: rewritten to use bash-like test
2490 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2492         Parttool autoloading and improvements
2494         * Makefile.in (pkglib_DATA): add parttool.lst
2495         (parttool.lst): new target
2496         * genmk.rb: generate parttool-*
2497         (CLEANFILES): add #{parttool}
2498         (PARTTOOLFILES): new variable
2499         * genparttoollist.sh: new file
2500         * parttool/pcpart.c (grub_pcpart_boot): more feedback
2501         (grub_pcpart_type): likewise
2502         * commands/parttool.c (helpmsg): new variable
2503         (grub_cmd_parttool): output help if not enough arguments are supplied
2504         autoload modules
2505         (GRUB_MOD_INIT(parttool)): use helpmsg
2507 2009-04-24  David S. Miller  <davem@davemloft.net>
2509         Avoiding opening same device multiple times in device iterator.
2511         * kern/device.c: (grub_device_iterate): Define struct part_ent,
2512         and use it to build a list of partitions in iterate_disk() and
2513         iterate_partition().
2515         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2516         on disk->data.
2518         * disk/ieee1275/nand.c (grub_nand_iterate): Return
2519         grub_devalias_iterate() result instead of unconditional 0.
2520         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2521         Also, capture hook return value, either directly or via
2522         grub_children_iterate(), and propagate to caller.
2523         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2524         grub_children_iterate): Return value is now 'int' instead of
2525         'grub_err_t'.
2526         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2527         like a proper iterator, stopping when hooks return non-zero.
2528         (grub_devalias_iterate): Likewise.
2530 2009-04-23  David S. Miller  <davem@davemloft.net>
2532         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2534 2009-04-22  David S. Miller  <davem@davemloft.net>
2536         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2537         is larger than address_cells, use that value for address_cells too.
2539         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2540         IEEE1275_MAX_PATH_LEN): Define.
2541         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2542         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2543         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2544         'devtype'.  Explicitly NULL terminate devalias expansion.
2546         * util/sparc64/ieee1275/misc.c: New file.
2547         * util/sparc64/ieee1275/grub-setup.c: New file.
2548         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2549         * util/sparc64/ieee1275/grub-mkimage.c: New file.
2550         * util/sparc64/ieee1275/grub-install.in: New file.
2551         * util/ieee1275/ofpath.c: New file.
2552         * util/ieee1275/devicemap.c: New file.
2553         * util/devicemap.c: New file.
2554         * util/deviceiter.c: New file.
2555         * kern/sparc64/ieee1275/init.c: New file.
2556         * include/grub/util/ofpath.h: New file.
2557         * include/grub/util/deviceiter.h: New file.
2558         * util/grub-mkdevicemap.c: Include deviceiter.h.
2559         Implement using grub_util_emit_devicemap_entry and
2560         grub_util_iterate_devices.
2561         * conf/i386-corebook.rmk: Build util/deviceiter.c and
2562         util/devicemap.c into grub-mkdevicemap
2563         * conf/i386-efi.rmk: Likewise.
2564         * conf/i386-ieee1275.rmk: Likewise.
2565         * conf/i386-pc.rmk: Likewise.
2566         * conf/powerpc-ieee1275.rmk: Likewise.
2567         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2568         images and installation utilities.  Build kernel as image
2569         instead of as elf binary.  Use common rules as much as possible.
2571 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
2573         Correct GPT definition
2575         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2576         of "attrib" member
2578 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
2580         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2582 2009-04-19  David S. Miller  <davem@davemloft.net>
2584         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2585         (grub_rescue_cmd_linux): Rename to...
2586         (grub_cmd_linux): and fix prototype.
2587         (grub_rescue_cmd_initrd): Rename to...
2588         (grub_cmd_initrd): and fix prototype.
2589         (cmd_linux, cmd_initrd): New.
2590         (GRUB_MOD_INIT(linux)): Use grub_register_command().
2591         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2593 2009-04-17  Pavel Roskin  <proski@gnu.org>
2595         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2596         format.
2597         (grub_ohci_transfer): Likewise.
2599         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2601         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2602         return without a value.  Fix inconsistent indentation.
2604         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2605         match struct grub_fs.
2607         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2608         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2609         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2610         * commands/lspci.c (grub_lspci_iter): Likewise.
2612 2009-04-16  Bean  <bean123ch@gmail.com>
2614         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2615         value.
2617 2009-04-15  Pavel Roskin  <proski@gnu.org>
2619         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2620         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
2621         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2622         definitions.
2624 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2626         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2627         that no multiple data or metadata areas are supported and `Unknown
2628         metadata header'.
2630 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2632         Move loader out of the kernel
2634         * kern/loader.c: moved to ...
2635         * commands/boot.c: ... moved here
2636         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2637         * commands/boot.c (grub_cmd_boot): moved here. All users updated
2638         * include/grub/kernel.h (grub_machine_fini): export
2639         * include/grub/loader.h (grub_loader_is_loaded): update declaration
2640         (grub_loader_set): likewise
2641         (grub_loader_unset): likewise
2642         (grub_loader_boot): likewise
2643         * conf/common.rmk: new module boot.mod
2644         (pkglib_MODULES): add boot.mod
2645         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2646         (grub_emu_SOURCES): likewise
2647         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2648         (grub_emu_SOURCES): likewise
2649         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2650         (grub_emu_SOURCES): likewise
2651         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2652         (grub_emu_SOURCES): likewise
2653         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2654         (grub_emu_SOURCES): likewise
2655         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2656         (grub_emu_SOURCES): likewise
2657         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2658         (grub_emu_SOURCES): likewise
2660 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2662         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2664         * kern/misc.c (grub_itoa): Removed function
2665         (grub_ltoa): likewise
2666         (grub_vsprintf): use grub_lltoa
2668 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2670         Restore grub-emu
2672         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2673         * conf/i386-coreboot.rmk: likewise
2674         * conf/i386-ieee1275.rmk: likewise
2675         * conf/powerpc-ieee1275.rmk: likewise
2677 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2679         * INSTALL: Add that `./autogen.sh' needs to be run before
2680         `./configure.'.
2682 2009-04-14  Bean  <bean123ch@gmail.com>
2684         * Makefile.in (pkglib_DATA): Add handler.lst.
2685         (handler.lst): New rule.
2687         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2688         * conf/i386-coreboot.rmk: Likewise.
2689         * conf/i386-ieee1275.rmk: Likewise.
2690         * conf/i386-efi.rmk: Likewise.
2691         * conf/x86_64-efi.rmk: Likewise.
2692         * conf/powerpc-ieee1275.rmk: Likewise.
2693         * conf/sparc64-ieee1275.rmk: Likewise.
2695         * genhandlerlist.sh: New file.
2697         * genmk.rb: Add rules to generate handler.lst.
2699         * include/grub/normal.h (grub_file_getline): New function definition.
2700         (read_handler_list): Likewise.
2701         (free_handler_list): Likewise.
2703         * include/grub/term.h (grub_term_register_input): Add name parameter
2704         for auto generation of handler.lst.
2705         (grub_term_register_output): Likewise.
2707         * normal/handler.c: New file.
2709         * normal/main.c (get_line): Renamed to grub_file_getline.
2710         (read_config_file): Use the newly renamed grub_file_getline.
2711         (read_command_list): Likewise.
2712         (read_fs_list): Likewise.
2713         (grub_normal_execute): Call read_handler_list to parse handler.lst.
2714         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2716         * term/efi/console.c (grub_console_init): Add name parameter for auto
2717         generation of handler.lst.
2718         * term/gfxterm.c: Likewise.
2719         * term/i386/pc/at_keyboard.c: Likewise.
2720         * term/i386/pc/console.c: Likewise.
2721         * term/i386/pc/serial.c: Likewise.
2722         * term/i386/pc/vesafb.c: Likewise.
2723         * term/i386/pc/vga.c: Likewise.
2724         * term/i386/pc/vga_text.c: Likewise.
2725         * term/ieee1275/ofconsole.c: Likewise.
2726         * term/usb_keyboard.c: Likewise.
2728 2009-04-14  Bean  <bean123ch@gmail.com>
2730         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2731         properly with null character.
2733 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2735         * configure: Remove.
2736         * config.h.in: Likewise.
2737         * stamp-h.in: Likewise.
2738         * DISTLIST: Likewise.
2739         * conf/common.mk: Likewise.
2740         * conf/i386-coreboot.mk: Likewise.
2741         * conf/i386-efi.mk: Likewise.
2742         * conf/i386-ieee1275.mk: Likewise.
2743         * conf/i386.mk: Likewise.
2744         * conf/i386-pc.mk: Likewise.
2745         * conf/powerpc-ieee1275.mk: Likewise.
2746         * conf/sparc64-ieee1275.mk: Likewise.
2747         * conf/x86_64-efi.mk: Likewise.
2749         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2750         develop on GRUB.
2752 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
2753             David S. Miller  <davem@davemloft.net>
2755         * util/hostdisk.c (make_device_name): Fix buffer length
2756         calculations.
2758 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2760         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2761         <sys/param.h> and <sys/sysctl.h>.
2762         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2763         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2764         opening the device and reset them afterwards.
2766 2009-04-13  Pavel Roskin  <proski@gnu.org>
2768         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2769         Reported by John Stanley <jpsinthemix@verizon.net>
2771 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2773         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2774         that name for menuentries when appropriate.
2776 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2778         * util/grub.d/10_freebsd.in: Add a missing `fi'.
2780 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2782         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2783         to Linux, simply abort telling the user it's no longer supported.
2785 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2787         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2788         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
2789         `freebsd_loadenv' only when devices.hints exist.
2791 2009-04-13  Pavel Roskin  <proski@gnu.org>
2793         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2795 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2797         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2798         partition number.
2799         (grub_drive): Likewise.
2801 2009-04-13  David S. Miller  <davem@davemloft.net>
2803         * kern/sparc64/ieee1275/ieee1275.c: New file.
2804         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2805         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2806         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2807         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2808         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2809         grub_ieee1275_alloc_physmem): Declare new exported functions.
2811         * include/grub/sparc64/ieee1275/loader.h: New file.
2812         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2813         * include/grub/sparc64/kernel.h: Likewise.
2814         * loader/sparc64/ieee1275/linux.c: Likewise.
2816         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2817         (grub_fstest_SOURCES): Likewise.
2819         * util/hostdisk.c (make_device_name): Do not make any assumptions
2820         about the length of drive names.
2822         * kern/dl.c (grub_dl_load_file): Close file immediately when
2823         we are done using it.
2825 2009-04-12  David S. Miller  <davem@davemloft.net>
2827         * kern/misc.c (grub_ltoa): Fix cast when handling negative
2828         values.  Noticed by Pavel Roskin.
2830         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2831         target compiler.
2833         * genmk.rb: Add more flexible image type specification, also
2834         pass --strip-unneeded to objcopy.
2835         * conf/i386-pc.rmk: Use *_FORMAT.
2836         * conf/i386-pc.mk: Rebuilt.
2838         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2839         (OFDISK_HASH_SZ): Define.
2840         (ofdisk_hash): New hash table.
2841         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2842         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2843         instead of device phandle which is not unique.
2845         * kern/sparc64/ieee1275/init.c: Delete, replace with...
2846         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2847         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2848         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2849         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2850         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2851         GRUB_KERNEL_MACHINE_DATA_END): Define.
2852         (grub_kernel_image_size, grub_total_module_size): Declare.
2854 2009-04-12  Pavel Roskin  <proski@gnu.org>
2856          * configure.ac: Change the logic when we check for target tools.
2857          Do it when the target is specified and it's different from the
2858          specified value of the host.
2860 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
2862         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2863         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2864         GNU/kFreeBSD. Check if a device is a character device. Use
2865         DIOCGMEDIASIZE to get the size.
2866         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2867         support for GNU/kFreeBSD.
2868         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2869         is a character device instead of a block device. Add support for
2870         FreeBSD device names.
2872         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2873         is a character device instead of a block device.
2875         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2876         is a character device instead of a block device.
2878 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
2880         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2881         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2882         FreeBSD. Check if a device is a character device. Use
2883         DIOCGMEDIASIZE to get the size.
2884         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2885         support for FreeBSD.
2886         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2887         is a character device instead of a block device. Add support for
2888         FreeBSD device names.
2890         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2891         a character device instead of a block device.
2892         (grub_util_check_char_device): New function.
2894         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2895         a character device instead of a block device.
2897         * include/grub/util/getroot.h (grub_util_check_char_device): New
2898         prototype.
2900 2009-04-11  David S. Miller  <davem@davemloft.net>
2902         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2903         static libgcc.
2904         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2905         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2906         function, if present.
2907         (__bswapdi2): Likewise.
2909         * include/grub/sparc64/ieee1275/boot.h: New file.
2910         * boot/sparc64/ieee1275/boot.S: Likewise.
2911         * boot/sparc64/ieee1275/diskboot.S: Likewise.
2913         * kern/misc.c (grub_ltoa): New function.
2914         (grub_vsprintf): Use it to format 'long' integers.
2916 2009-04-10  David S. Miller  <davem@davemloft.net>
2918         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2919         slots are of type grub_ieee1275_cell_t.
2920         (grub_nand_read): Likewise.
2921         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2922         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2923         macros are used to compare values in arg/ret block of the call.
2924         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2925         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2926         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2927         grub_ieee1275_instance_to_path, grub_ieee1275_write,
2928         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2929         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2930         grub_ieee1275_close, grub_ieee1275_set_property,
2931         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2932         grub_ieee1275_cell_t.
2933         * kern/ieee1275/openfw.c (grub_map): Likewise.
2934         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2935         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2937         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2938         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2939         (grub_devalias_iterate): Likewise.
2941 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
2943         UFS improvements
2945         * fs/ufs.c (INODE_NBLOCKS): new definition
2946         (struct grub_ufs_dirent): added fields for non-BSD dirents
2947         (grub_ufs_get_file_block): fixed double indirect handling
2948         (grub_ufs_lookup_symlink): use more robust way to determine whether
2949         symlink is inline
2950         (grub_ufs_find_file): support for non-BSD dirents
2951         (grub_ufs_dir): support for non-BSD dirents
2953 2009-04-10  Bean  <bean123ch@gnail.com>
2955         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2956         attribute, otherwise the size would be wrong for i386 platform.
2958         * include/grub/pci.h (grub_pci_read_word): New inline function.
2959         (grub_pci_read_byte): Likewise.
2960         (grub_pci_write): Likewise.
2961         (grub_pci_write_word): Likewise.
2962         (grub_pci_write_byte): Likewise.
2964         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2966         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2967         (find_framebuf): Scan pci to locate the frame buffer address.
2969         * commands/efi/fixvideo.c: New file.
2971         * commands/efi/loadbios.c: Likewise.
2973         * commands/memrw.c: Likewise.
2975         * util/grub-dumpbios.in: Likewise.
2977         * conf/common.rmk (grub-dumpbios): New utility.
2978         (pkglib_MODULES): New module memrw.mod.
2979         (memrw_mod_SOURCE): New macro.
2980         (memrw_mod_CFLAGS): Likewise.
2981         (memrw_mod_LDFLAGS): Likewise.
2983         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2984         fixvideo.mod.
2985         (loadbios_mod_SOURCE): New macro.
2986         (loadbios_mod_CFLAGS): Likewise.
2987         (loadbios_mod_LDFLAGS): Likewise.
2988         (fixvideo_mod_SOURCE): Likewise.
2989         (fixvideo_mod_CFLAGS): Likewise.
2990         (fixvideo_mod_LDFLAGS): Likewise.
2992         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2993         fixvideo.mod.
2994         (loadbios_mod_SOURCE): New macro.
2995         (loadbios_mod_CFLAGS): Likewise.
2996         (loadbios_mod_LDFLAGS): Likewise.
2997         (fixvideo_mod_SOURCE): Likewise.
2998         (fixvideo_mod_CFLAGS): Likewise.
2999         (fixvideo_mod_LDFLAGS): Likewise.
3001 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
3003         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
3005 2009-04-07  David S. Miller  <davem@davemloft.net>
3007         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
3008         support for R_SPARC_OLO10 relocations.  Fix compile warning for
3009         R_SPARC_WDISP30 case.
3010         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
3012 2009-04-06  Pavel Roskin  <proski@gnu.org>
3014         * include/grub/misc.h (ARRAY_SIZE): New macro.
3015         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
3016         New macro.
3017         * loader/i386/linux.c (allocate_pages): Use free_pages().
3018         (grub_linux_unload): Don't use free_pages().
3019         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
3020         wrong index.  Treat all other modes as text modes.
3021         (grub_cmd_linux): Initialize vid_mode unconditionally to
3022         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
3024         * commands/help.c (print_command_help): Use cmd->prio, not
3025         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
3027 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
3029         Parttool
3031         * parttool/pcpart.c: new file
3032         * commands/parttool.c: likewise
3033         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
3034         (parttool_mod_SOURCES): new variable
3035         (parttool_mod_CFLAGS): likewise
3036         (parttool_mod_LDFLAGS): likewise
3037         (pcpart_mod_SOURCES): likewise
3038         (pcpart_mod_CFLAGS): likewise
3039         (pcpart_mod_LDFLAGS): likewise
3040         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
3041         and parttool/pcpart.c
3042         * conf/i386-efi.rmk: likewise
3043         * conf/i386-ieee1275.rmk: likewise
3044         * conf/i386-pc.rmk: likewise
3045         * conf/powerpc-ieee1275.rmk: likewise
3046         * conf/sparc64-ieee1275.rmk: likewise
3047         * conf/x86_64-ieee1275.rmk: likewise
3049 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
3051         Support for mtime and further expandability of dir command
3053         * include/grub/lib/datetime.h: moved to ...
3054         * include/grub/datetime.h: ... moved here and added
3055         declaration of grub_unixtime2datetime. All users updated
3056         * include/grub/fs.h: new syntax for dir and mtime functions in
3057         struct grub_fs
3058         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
3059         and GRUB_FSHELP_FLAGS_MASK
3060         * commands/ls.c (grub_ls_list_files): Write mtime in long format
3061         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
3062         (grub_ext2_mtime): new function
3063         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
3064         (grub_hfsplus_mtime): new function
3065         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
3066         (GRUB_UFS_ATTR_FILE): likewise
3067         (GRUB_UFS_ATTR_LNK): likewise
3068         (struct grub_ufs_sblock): new fields mtime
3069         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
3070         all users updated
3071         (grub_ufs_dir): mtime support
3072         (grub_ufs_mtime): new function
3073         * fs/affs.c (grub_affs_dir): use new dir syntax
3074         * fs/afs.c (grub_afs_dir): likewise
3075         * fs/cpio.c (grub_cpio_dir): likewise
3076         * fs/fat.c (grub_fat_find_dir): likewise
3077         * fs/hfs.c (grub_hfs_dir): likewise
3078         * fs/iso9660.c (grub_iso9660_dir): likewise
3079         * fs/jfs.c (grub_jfs_dir): likewise
3080         * fs/minix.c (grub_minix_dir): likewise
3081         * fs/ntfs.c (grub_ntfs_dir): likewise
3082         * fs/reiserfs.c (grub_reiserfs_dir): likewise
3083         * fs/sfs.c (grub_sfs_dir): likewise
3084         * fs/xfs.c (grub_xfs_dir): likewise
3085         * util/hostfs.c (grub_hostfs_dir): likewise
3086         * lib/datetime.c: moved to ...
3087         * normal/datetime.c: ... moved here
3088         (grub_unixtime2datetime): new function
3089         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
3090         * normal/completion.c (iterate_dir): use new dir syntax
3091         * normal/misc.c (grub_normal_print_device_info): tell the
3092         last modification time of a volume
3093         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
3094         * conf/common.rmk: added lib/datetime.c to ls.mod
3095         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
3096         (normal_mod_SOURCES): likewise
3097         (datetime_mod_SOURCES): Removed lib/datetime.c
3098         * conf/i386-efi.rmk: likewise
3099         * conf/i386-ieee1275.rmk: likewise
3100         * conf/i386-pc.rmk: likewise
3101         * conf/powerpc-ieee1275.rmk: likewise
3102         * conf/sparc64-ieee1275.rmk: likewise
3103         * conf/x86_64-efi.rmk: likewise
3105 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
3107         Trim trailing spaces in FAT label and support mtools-like labels
3109         * fs/fat.c (grub_fat_iterate_dir): New function based
3110         on grub_fat_find_dir
3111         (grub_fat_find_dir): use grub_fat_iterate_dir
3112         (grub_fat_label): likewise
3114 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
3116         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
3117         and command.h
3118         remove extraneous kernel_elf_HEADERS
3120 2009-04-04  Bean  <bean123ch@gnail.com>
3122         * include/grub/util/misc.h: Add dummy function fsync for mingw.
3124         * util/misc.c: Likewise.
3126 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
3128         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
3129         instead of grub_printf.
3131 2009-04-03  Robert Millan  <rmh@aybabtu.com>
3133         * loader/i386/linux.c (grub_linux_setup_video): Fill
3134         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
3135         values from `mode info' structure instead of hardcoded
3136         values.
3138 2009-04-01  Pavel Roskin  <proski@gnu.org>
3140         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
3141         unused now.
3142         * genmk.rb: Likewise.
3143         * configure.ac: Likewise.
3145 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
3147         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
3148         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
3150 2009-04-01  David S. Miller  <davem@davemloft.net>
3152         * normal/sparc64/setjmp.S: Fix setjmp implementation.
3153         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
3154         (grub_setjmp): Mark with 'returns_twice' attribute.
3155         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
3156         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
3157         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
3159 2009-04-01  Robert Millan  <rmh@aybabtu.com>
3161         Reapply fix from 2008-07-28 which was accidentally reverted; also
3162         perform the same fix to a similar check in same function.
3164         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3165         with the same number are found, just use issue a warning with
3166         grub_dprintf(), as this error has been reported to be non-fatal.
3168 2009-03-31  Pavel Roskin  <proski@gnu.org>
3170         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
3171         for cross-compilation.
3173 2009-03-30  Robert Millan  <rmh@aybabtu.com>
3175         Fix i386-ieee1275 build.
3177         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3178         Remove declaration.
3180 2009-03-30  Pavel Roskin  <proski@gnu.org>
3182         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3183         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
3184         zero-terminated, rely only on the strlen value.  Fix comparison
3185         of strings differing in length.
3187 2009-03-30  Robert Millan  <rmh@aybabtu.com>
3189         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3190         checking for abi version.  Improve error messages on BIOS to notify
3191         user about `linux16' command.
3193 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
3195         Leak fixes
3197         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3198         in case of collision
3199         * disk/scsi.c (grub_scsi_open): free scsi in case of error
3201 2009-03-29  Robert Millan  <rmh@aybabtu.com>
3203         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3204         set `vid_mode' accordingly.
3205         (grub_linux_boot): Process `vid_mode' and set video mode.
3207 2009-03-29  Robert Millan  <rmh@aybabtu.com>
3209         * util/grub.d/10_linux.in (linux_entry): New function.
3210         Factorize generation of Linux boot entries.
3212 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
3214         Make the format of Environment Block plain text. The boot loader
3215         part is not tested well yet.
3217         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3218         (buffer): Removed.
3219         (envblk): Likewise.
3220         (usage): Remove "info" and "clear". Add "unset". Update the
3221         description of "set", as this does not delete variables any
3222         longer.
3223         (create_envblk_file): Complete rewrite.
3224         (open_envblk_file): Likewise.
3225         (cmd_info): Removed.
3226         (cmd_list): Likewise.
3227         (cmd_set): Likewise.
3228         (cmd_clear): Likewise.
3229         (list_variables): New function.
3230         (write_envblk): Likewise.
3231         (set_variables): Likewise.
3232         (unset_variables): Likewise.
3233         (main): Complete rewrite.
3235         * commands/loadenv.c (buffer): Removed.
3236         (envblk): Likewise.
3237         (open_envblk_file): New function.
3238         (read_envblk_file): Complete rewrite.
3239         (grub_cmd_load_env): Likewise.
3240         (grub_cmd_list_env): Likewise.
3241         (struct blocklist): New struct.
3242         (free_blocklists): New function.
3243         (check_blocklists): Likewise.
3244         (write_blocklists): Likewise.
3245         (grub_cmd_save_env): Complete rewrite.
3247         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3248         a plain text signature.
3249         (GRUB_ENVBLK_MAXLEN): Removed.
3250         (struct grub_envblk): Complete rewrite.
3251         (grub_envblk_find): Removed.
3252         (grub_envblk_insert): Likewise.
3253         (grub_envblk_open): New prototype.
3254         (grub_envblk_set): Likewise.
3255         (grub_envblk_delete): Put const to VALUE.
3256         (grub_envblk_iterate): Put const to NAME and VALUE.
3257         (grub_envblk_close): New prototype.
3258         (grub_envblk_buffer): New inline function.
3259         (grub_envblk_size): Likewise.
3261         * lib/envblk.c: Include grub/mm.h.
3262         (grub_env_find): Removed.
3263         (grub_envblk_open): New function.
3264         (grub_envblk_close): Likewise.
3265         (escaped_value_len): Likewise.
3266         (find_next_line): Likewise.
3267         (grub_envblk_insert): Removed.
3268         (grub_envblk_set): New function.
3269         (grub_envblk_delete): Complete rewrite.
3270         (grub_envblk_iterate): Likewise.
3272 2009-03-28  Robert Millan  <rmh@aybabtu.com>
3274         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3275         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3276         variables.  Use 16-bit loader.
3277         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3278         loader.
3279         * kern/i386/loader.S (grub_linux_boot): Rename to ...
3280         (grub_linux16_boot): ... this.  Update all users.
3281         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3282         (grub_linux_boot): ... this.  Update all users.
3284         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3285         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
3286         commands to `linux16' and `initrd16'.
3287         (GRUB_MOD_FINI(linux)): Rename to ...
3288         (GRUB_MOD_FINI(linux16)): ... this.
3290 2009-03-24  Pavel Roskin  <proski@gnu.org>
3292         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3293         not just for compilation.
3295 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
3297         Move multiboot helper out of kernel
3299         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3300         `loader/i386/multiboot_helper.S'.
3301         * conf/i386-coreboot.rmk: Likewise
3302         * conf/i386-ieee1275.rmk: Likewise
3304         * kern/i386/loader.S: Move multiboot helpers from here...
3305         * loader/i386/multiboot_helper.S: ...moved here
3306         * include/grub/i386/loader.h: Move declarations of multiboot
3307         helpers from here...
3308         * include/grub/i386/multiboot.h: ...moved here
3309         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3311 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3313         * kern/env.c (grub_env_context_open): Added an argument to specify
3314         whether a new context inherits exported variables from current
3315         one. This is useful when making a sandbox to interpret a config
3316         file.
3317         All callers updated.
3319         * include/grub/env.h (grub_env_context_open): Updated the prototype.
3321 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3323         * kern/env.c (grub_env_context_close): Fix memory leaks.
3325 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3327         * normal/main.c (grub_normal_execute): Added an argument
3328         BATCH to specify if an interactive interface should be provided
3329         after reading a config file.
3330         All callers updated.
3331         (read_command_list): Prevent being executed twice.
3332         (read_fs_list): Likewise.
3334         * include/grub/normal.h (grub_normal_execute): Updated the
3335         prototype.
3337 2009-03-22  Pavel Roskin  <proski@gno.org>
3339         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3340         _start.
3341         * kern/i386/pc/startup.S: Likewise.
3342         * kern/i386/efi/startup.S: Likewise.
3343         * kern/i386/ieee1275/startup.S: Likewise.
3344         * kern/i386/coreboot/startup.S: Likewise.
3345         * kern/x86_64/efi/startup.S: Likewise.
3347         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3348         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3349         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3351 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
3353         Bugfixes in multiboot for bugs uncovered by solaris kernel.
3355         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3356         limit detection.
3357         Use vaddr of correct segment for entry_point.
3359 2009-03-21  Bean  <bean123ch@gmail.com>
3361         * commands/blocklist.c: Add include file <grub/command.h>, remove
3362         <grub/normal.h> and <grub/arg.h>.
3363         (grub_cmd_blocklist): Use the new command interface.
3364         (GRUB_MOD_INIT): Likewise.
3365         (GRUB_MOD_FINI): Likewise.
3366         * commands/boot.c: Likewise.
3367         * commands/cat.c: Likewise.
3368         * commands/cmp.c: Likewise.
3369         * commands/configfile.c: Likewise.
3370         * commands/crc.c: Likewise.
3371         * commands/echo.c: Likewise.
3372         * commands/halt.c: Likewise.
3373         * commands/handler.c: Likewise.
3374         * commands/hdparm.c: Likewise.
3375         * commands/help.c: Likewise.
3376         * commands/hexdump.c: Likewise.
3377         * commands/loadenv.c: Likewise.
3378         * commands/ls.c: Likewise.
3379         * commands/lsmmap.c: Likewise.
3380         * commands/lspci.c: Likewise.
3381         * commands/loadenv.c: Likewise.
3382         * commands/read.c: Likewise.
3383         * commands/reboot.c: Likewise.
3384         * commands/search.c: Likewise.
3385         * commands/sleep.c: Likewise.
3386         * commands/test.c: Likewise.
3387         * commands/usbtest.c: Likewise.
3388         * commands/videotest.c: Likewise.
3389         * commands/i386/cpuid.c: Likewise.
3390         * commands/i386/pc/halt.c: Likewise.
3391         * commands/i386/pc/play.c: Likewise.
3392         * commands/i386/pc/pxecmd.c: Likewise.
3393         * commands/i386/pc/vbeinfo.c: Likewise.
3394         * commands/i386/pc/vbetest.c: Likewise.
3395         * commands/ieee1275/suspend.c: Likewise.
3396         * disk/loopback.c: Likewise.
3397         * font/font_cmd.c: Likewise.
3398         * hello/hello.c: Likewise.
3399         * loader/efi/appleloader.c: Likewise.
3400         * loader/efi/chainloader.c: Likewise.
3401         * loader/i386/bsd.c: Likewise.
3402         * loader/i386/efi/linux.c: Likewise.
3403         * loader/i386/ieee1275/linux.c: Likewise.
3404         * loader/i386/linux.c: Likewise.
3405         * loader/i386/pc/chainloader.c: Likewise.
3406         * loader/i386/pc/linux.c: Likewise.
3407         * loader/powerpc/ieee1275/linux.c: Likewise.
3408         * loader/multiboot_loader.c: Likewise.
3409         * term/gfxterm.c: Likewise.
3410         * term/i386/pc/serial.c: Likewise.
3411         * term/terminfo.c: Likewise.
3413         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3414         * term/i386/pc/vga.c: Likewise.
3415         * video/readers/jpeg.c: Likewise.
3416         * video/readers/png.c: Likewise.
3417         * video/readers/tga.c: Likewise.
3419         * util/grub-fstest (cmd_loopback): Removed.
3420         (cmd_blocklist): Likewise.
3421         (cmd_ls): Likewise.
3422         (grub_register_command): Likewise.
3423         (grub_unregister_command): Likewise.
3424         (execute_command): Use grub_command_find to locate command and execute
3425         it.
3427         * include/grub/efi/chainloader.h: Removed.
3428         * loader/efi/chainloader_normal.c: Likewise.
3429         * loader/i386/bsd_normal.c: Likewise.
3430         * loader/i386/pc/chainloader_normal.c: Likewise.
3431         * loader/i386/pc/multiboot_normal.c: Likewise.
3432         * loader/linux_normal.c: Likewise.
3433         * loader/multiboot_loader_normal.c: Likewise.
3434         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3436         * gencmdlist.sh: Scan new registration command grub_register_extcmd
3437         and grub_register_command_p1.
3439         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3440         kern/command.c, lib/arg.c and commands/extcmd.c.
3441         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3442         (minicmd_mod_SOURCES): New variable.
3443         (minicmd_mod_CFLAGS): Likewise.
3444         (minicmd_mod_LDFLAGS): Likewise.
3445         (extcmd_mod_SOURCES): Likewise.
3446         (extcmd_mod_CFLAGS): Likewise.
3447         (extcmd_mod_LDFLAGS): Likewise.
3448         (boot_mod_SOURCES): Removed.
3449         (boot_mod_CFLAGS): Likewise.
3450         (boot_mod_LDFLAGS): Likewise.
3452         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3453         kern/corecmd.c.
3454         (kernel_img_HEADERS): Add command.h.
3455         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3456         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3457         and lib/arg.c.
3458         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3459         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3460         remove the corresponding normal mode command.
3461         (normal_mod_SOURCES): Remove normal/arg.c.
3462         * conf/i386-coreboot.rmk: Likewise.
3463         * conf/i386-efi.rmk: Likewise.
3464         * conf/i386-ieee1275.rmk: Likewise.
3465         * conf/powerpc-ieee1275.rmk: Likewise.
3466         * conf/x86_64-efi.rmk: Likewise.
3468         * include/grub/arg.h: Move from here ...
3469         * include/grub/lib/arg.h: ... to here.
3471         * normal/arg.c: Move from here ...
3472         * lib/arg.c: ... to here.
3474         * commands/extcmd.c: New file.
3475         * commands/minicmd.c: Likewise.
3476         * include/grub/command.h: Likewise.
3477         * include/grub/extcmd.h: Likewise.
3478         * kern/command.c: Likewise.
3479         * kern/corecmd.c: Likewise.
3481         * kern/list.c (grub_list_iterate): Return int instead of void.
3482         (grub_list_insert): New function.
3483         (grub_prio_list_insert): Likewise.
3485         * kern/rescue.c (grub_rescue_command): Removed.
3486         (grub_rescue_command_list): Likewise.
3487         (grub_rescue_register_command): Likewise.
3488         (grub_rescue_unregister_command): Likewise.
3489         (grub_rescue_cmd_boot): Move to minicmd.c
3490         (grub_rescue_cmd_help): Likewise.
3491         (grub_rescue_cmd_info): Likewise.
3492         (grub_rescue_cmd_boot): Likewise.
3493         (grub_rescue_cmd_testload): Likewise.
3494         (grub_rescue_cmd_dump): Likewise.
3495         (grub_rescue_cmd_rmmod): Likewise.
3496         (grub_rescue_cmd_lsmod): Likewise.
3497         (grub_rescue_cmd_exit): Likewise.
3498         (grub_rescue_print_devices): Moved to corecmd.c.
3499         (grub_rescue_print_files): Likewise.
3500         (grub_rescue_cmd_ls): Likewise.
3501         (grub_rescue_cmd_insmod): Likewise.
3502         (grub_rescue_cmd_set): Likewise.
3503         (grub_rescue_cmd_unset): Likewise.
3504         (attempt_normal_mode): Use grub_command_find to get normal module.
3505         (grub_enter_rescue_mode): Use grub_register_core_commands to register
3506         commands, remove grub_rescue_register_command calls.
3508         * normal/command.c (grub_register_command): Removed.
3509         (grub_unregister_command): Likewise.
3510         (grub_command_find): Likewise.
3511         (grub_iterate_commands): Likewise.
3512         (rescue_command): Likewise.
3513         (export_command): Moved to corecmd.c.
3514         (set_command): Removed.
3515         (unset_command): Likewise.
3516         (insmod_command): Likewise.
3517         (rmmod_command): Likewise.
3518         (lsmod_command): Likewise.
3519         (grub_command_init): Likewise.
3521         * normal/completion.c (iterate_command): Use cmd->prio to check for
3522         active command.
3523         (complete_arguments): Use grub_extcmd_t structure to find options.
3524         (grub_normal_do_completion): Change function grub_iterate_commands to
3525         grub_command_iterate.
3527         * normal/execute.c (grub_script_execute_cmd): No need to parse
3528         argument here.
3530         * normal/main.c (grub_dyncmd_dispatcher): New function.
3531         (read_command_list): Register unload commands as dyncmd.
3532         (grub_cmd_normal): Use new command interface, register rescue,
3533         unregister normal at entry, register normal, unregister rescue at exit.
3535         * include/grub/list.h (grub_list_test_t): New type.
3536         (grub_list_iterate): Return int instead of void.
3537         (grub_list_insert): New function.
3538         (GRUB_AS_NAMED_LIST_P): New macro.
3539         (GRUB_AS_PRIO_LIST): Likewise.
3540         (GRUB_AS_PRIO_LIST_P): Likewise.
3541         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3542         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3543         (grub_prio_list): New structure.
3544         (grub_prio_list_insert): New function.
3545         (grub_prio_list_remove): New inline function.
3547         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3548         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3549         (GRUB_COMMAND_FLAG_MENU): Likewise.
3550         (GRUB_COMMAND_FLAG_BOTH): Likewise.
3551         (GRUB_COMMAND_FLAG_TITLE): Likewise.
3552         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3553         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3554         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3555         (grub_command): Likewise.
3556         (grub_register_command): Likewise.
3557         (grub_command_find): Likewise.
3558         (grub_iterate_commands): Likewise.
3559         (grub_command_init): Likewise.
3560         (grub_arg_parse): Likewise.
3561         (grub_arg_show_help): Likewise.
3563         * include/grub/rescue.h (grub_rescue_register_command): Removed.
3564         (grub_rescue_unregister_command): Likewise.
3566         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3567         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3568         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3570         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3571         grub_rescue_cmd_initrd.
3572         * include/grub/i386/loader.h: Likewise.
3573         * include/grub/x86_64/loader.h: Likewise.
3575         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3577 2009-03-21  Bean  <bean123ch@gmail.com>
3579         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3580         instead of stat in mingw environment.
3582         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3584         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3586         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3587         AC_CONFIG_LINKS.
3589 2009-03-21  Bean  <bean123ch@gmail.com>
3591         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3592         out of range error.
3594 2009-03-18  Michel Dänzer  <michel@daenzer.net>
3596         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3597         checking inode flags for EXT4_EXTENTS_FLAG.
3599 2009-03-18  Robert Millan  <rmh@aybabtu.com>
3601         * loader/i386/linux.c: Include `<grub/video.h>' and
3602         `<grub/i386/pc/vbe.h>'..
3603         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
3604         (grub_linux32_boot): Attempt to configure video settings with
3605         grub_linux_setup_video().
3606         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3607         to avoid grub_console_fini() which would step out of graphical mode
3608         unconditionally.
3610 2009-03-14  Robert Millan  <rmh@aybabtu.com>
3612         Fix build on powerpc.
3613         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3615 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
3617         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3618         background image command.
3620 2009-03-12  Colin D Bennett  <colin@gibibit.com>
3622         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3623         (grub_gfxterm_putchar): Extract pairs of identical calls to
3624         draw_cursor out of conditional blocks.
3626 2009-03-11  Pavel Roskin  <proski@gnu.org>
3628         * fs/hfs.c (grub_hfs_strncasecmp): New function.
3629         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3631 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3633         * loader/i386/multiboot_elfxx.c
3634         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3636 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
3638         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3639         `kern/handler.c'.
3641 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3643         * loader/i386/multiboot.c (code_size): New variable.
3644         (grub_multiboot): Define offsets by adding to `code_size' rather
3645         than subtracting from `grub_multiboot_payload_size'.  Provide
3646         4-byte alignment to MBI and others by increasing
3647         `boot_loader_name_length' appropriately.
3649         * loader/i386/multiboot_elfxx.c
3650         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3652 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
3654         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3655         `fs/ext2.c'.
3657 2009-03-08  Robert Millan  <rmh@aybabtu.com>
3659         Make loader/i386/linux.c usable on i386-pc again.
3661         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3662         memory to heap.
3663         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3664         `#error' stanza.
3666 2009-03-07  Bean  <bean123ch@gmail.com>
3668         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3669         allocation.
3671 2009-03-06  Robert Millan  <rmh@aybabtu.com>
3673         Fix display issue on terminals with screen size other than 80x25
3674         (e.g. gfxterm with resolution higher than 640x480).
3676         * normal/main.c (grub_normal_init_page): Display title text in a
3677         position relative to the center of the terminal instead of relying
3678         on a hardcoded offset.
3680 2009-03-04  Robert Millan  <rmh@aybabtu.com>
3682         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3683         installed.
3685         * Makefile.in (host_kernel): New variable.
3686         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3687         scripts instead of just the windows one.
3688         * configure.ac: Initialize and AC_SUBST `host_kernel'.
3690 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3692         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3693         `kern/handler.c'.
3694         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3695         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3696         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3697         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3698         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3699         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3701 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3703         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3704         or if there's no space for the disk label and print the partition number on a
3705         invalid magic.
3707 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3709         * util/misc.c: Include <time.h>.
3710         (grub_millisleep): New function.
3712 2009-03-04  Bean  <bean123ch@gmail.com>
3714         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3715         another option -mno-red-zone.
3717         * commands/handler.c: Change module description.
3719         * kern/handler.c: Add missing space at the end of description line.
3721         * kern/list.c: Likewise.
3723 2009-03-03  Robert Millan  <rmh@aybabtu.com>
3725         Move more components to the relocation area, and fix mbi pointer
3726         handling to use the destination rather than the origin (thanks to
3727         Vladimir Serbinenko for spotting).
3729         * loader/i386/multiboot.c (mbi_dest): New variable.
3730         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3731         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3732         relocation area.
3734 2009-03-01  Bean  <bean123ch@gmail.com>
3736         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3737         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3738         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3739         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3741         * loader/i386/efi/linux.c (acpi_guid): New variable.
3742         (acpi_guid): Likewise.
3743         (EBDA_SEG_ADDR): New constant.
3744         (LOW_MEM_ADDR): Likewise.
3745         (FAKE_EBDA_SEG): Likewise.
3746         (fake_bios_data): New function.
3747         (grub_linux_boot): Call fake_bios_data.
3749 2009-03-01  Bean  <bean123ch@gmail.com>
3751         * commands/terminal.c: Removed.
3753         * commands/handler.c: New file.
3755         * include/grub/list.h: Likewise.
3757         * include/grub/handler.h: Likewise.
3759         * kern/list.c: Likewise.
3761         * kern/handler.c: Likewise.
3763         * kern/term.h: Include header file <grub/handler.h>.
3764         (grub_term_input): Move next field to the beginning.
3765         (grub_term_output): Likewise.
3766         (grub_term_input_class): New variable.
3767         (grub_term_output_class): Likewise.
3768         (grub_term_register_input): Changed to inline function.
3769         (grub_term_register_output): Likewise.
3770         (grub_term_unregister_input): Likewise.
3771         (grub_term_unregister_output): Likewise.
3772         (grub_term_set_current_input): Likewise.
3773         (grub_term_set_current_output): Likewise.
3774         (grub_term_get_current_input): Likewise.
3775         (grub_term_get_current_output): Likewise.
3776         (grub_term_iterate_input): Removed.
3777         (grub_term_iterate_output): Likewise.
3779         * kern/term.c (grub_term_list_input): Removed.
3780         (grub_term_list_output): Likewise.
3781         (grub_term_input_class): New variable.
3782         (grub_term_output_class): Likewise.
3783         (grub_cur_term_input): Change variable as macro.
3784         (grub_cur_term_output): Likewise.
3785         (grub_term_register_input): Removed.
3786         (grub_term_register_output): Likewise.
3787         (grub_term_unregister_input): Likewise.
3788         (grub_term_unregister_output): Likewise.
3789         (grub_term_set_current_input): Likewise.
3790         (grub_term_set_current_output): Likewise.
3791         (grub_term_iterate_input): Likewise.
3792         (grub_term_iterate_output): Likewise.
3793         (grub_term_get_current_input): Likewise.
3794         (grub_term_get_current_output): Likewise.
3796         * util/grub-editenv.c: Include header file <grub/handler.h>.
3797         (grub_term_get_current_input): Removed.
3798         (grub_term_get_current_output): Likewise.
3799         (grub_term_input_class): New variable.
3800         (grub_term_output_class): Likewise.
3802         * util/grub-fstest.c (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-probe.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/i386/pc/grub-setup.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         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3818         (terminal_mod_SOURCES): Likewise.
3819         (terminal_mod_CFLAGS): Likewise.
3820         (terminal_mod_LDFLAGS): Likewise.
3822         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3823         handler.c.
3824         (kernel_img_SOURCES): Add list.c and handler.c.
3825         (kernel_img_HEADERS): Add list.h and handler.h.
3827         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3828         handler.c.
3829         (kernel_mod_SOURCES): Add list.c and handler.c.
3830         (kernel_mod_HEADERS): Add list.h and handler.h.
3832         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3833         handler.c.
3834         (kernel_elf_SOURCES): Add list.c and handler.c.
3835         (kernel_elf_HEADERS): Add list.h and handler.h.
3837         * conf/i386-ieee1275.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/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3843         handler.c.
3844         (kernel_mod_SOURCES): Add list.c and handler.c.
3845         (kernel_mod_HEADERS): Add list.h and handler.h.
3847         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3848         handler.c.
3849         (kernel_elf_SOURCES): Add list.c and handler.c.
3850         (kernel_elf_HEADERS): Add list.h and handler.h.
3852 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3854         Factorize elf32 / elf64 code in Multiboot loader.  This will
3855         prevent it from getting out of sync again.
3857         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3858         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3859         grub_multiboot_load_elf64): Move from here ...
3860         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3861         grub_multiboot_load_elf): ... to here (new file).
3863 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3865         * util/grub.d/10_linux.in: Rename "single-user mode" to
3866         "recovery mode".
3868 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
3870         Don't leak in SCSI code.
3871         * disk/scsi.c (grub_scsi_close): free `scsi'.
3873 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3875         * loader/i386/pc/multiboot.c: Move from here ...
3876         * loader/i386/multiboot.c: ... to here.  Update all users.
3878 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3880         Patch from Alexandre Bique <bique.alexandre@gmail.com>
3881         * util/i386/pc/grub-setup.c (setup): Fix directory path.
3883 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
3885         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3886         b-tree.
3888 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3890         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3891         `0x' qualifier as 0 when base is specified as parameter).
3893 2009-02-24  Bean  <bean123ch@gmail.com>
3895         * configure.ac: Check for -mcmodel=large in x86_64 target.
3897         * include/grub/efi/api.h (efi_call_10): New macro.
3898         (efi_wrap_10): New function.
3900         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3901         (GRUB_PE32_REL_BASED_HIGH): Likewise.
3902         (GRUB_PE32_REL_BASED_LOW): Likewise.
3903         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3904         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3905         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3906         (GRUB_PE32_REL_BASED_SECTION): Likewise.
3907         (GRUB_PE32_REL_BASED_REL): Likewise.
3908         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3909         (GRUB_PE32_REL_BASED_DIR64): Likewise.
3910         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3912         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3913         issue.
3915         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3916         (efi_wrap_10): New function.
3918         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3920         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3921         MB/MBP model (NV chipset).
3922         (devdata_devs): Add devpath_5 to the list.
3924         * load/i386/efi/linux.c (video_base): Remove variable.
3925         (RGB_MASK): New macro.
3926         (RGB_MAGIC): Likewise.
3927         (LINE_MIN): Likewise.
3928         (LINE_MAX): Likewise.
3929         (FBTEST_STEP): Likewise.
3930         (FBTEST_COUNT): Likewise.
3931         (fb_list): New variable.
3932         (grub_find_video_card): Remove function.
3933         (find_framebuf): New function.
3934         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3935         line length.
3937         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3938         problem for x86_64.
3940 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
3942         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3944         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3945         coding tool name.
3947 2009-02-22  Robert Millan  <rmh@aybabtu.com>
3949         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3950         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3951         in our relocation, instead of using it directly from heap.  Also
3952         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3954 2009-02-21  Robert Millan  <rmh@aybabtu.com>
3956         Implement USB keyboard support (based on patch by Marco Gerards)
3958         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3959         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3960         (usb_keyboard_mod_LDFLAGS): New variables.
3962         * term/usb_keyboard.c: New file.
3964 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
3966         Corrected wrong declaration
3968         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3970 2009-02-14  Christian Franke  <franke@computer.org>
3972         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3973         (grub_lspci_iter): Print class code and programming interface byte.
3975 2009-02-14  Christian Franke  <franke@computer.org>
3977         * gendistlist.sh: Ignore `.svn' directories.
3979 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
3981         * fs/fat.c: Add 2009 to Copyright line.
3983 2009-02-14  Christian Franke  <franke@computer.org>
3985         * commands/hdparm.c: New file.  Provides `hdparm' command
3986         which sends ATA commands via grub_disk_ata_pass_through ().
3988         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3990         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
3991         and <grub/cpu/io.h> to include/grub/ata.h.
3992         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3993         (GRUB_CDROM_SECTOR_SIZE): Remove.
3994         (GRUB_ATA_*): Move to include/grub/ata.h.
3995         (GRUB_ATAPI_*): Likewise.
3996         (enum grub_ata_commands): Likewise.
3997         (enum grub_ata_timeout_milliseconds): Likewise.
3998         (struct grub_ata_device): Likewise.
3999         (grub_ata_regset): Likewise.
4000         (grub_ata_regget): Likewise.
4001         (grub_ata_regset2): Likewise.
4002         (grub_ata_regget2): Likewise.
4003         (grub_ata_check_ready): Likewise.
4004         (grub_ata_wait_not_busy): Remove static, exported in
4005         include/grub/ata.h.
4006         (grub_ata_wait_drq): Likewise.
4007         (grub_ata_pio_read): Likewise.
4009         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
4010         function for hdparm.mod.
4012         * include/grub/ata.h: New file, contains declarations from
4013         disk/ata.c.
4014         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
4016         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
4017         (grub_disk_ata_pass_through): New exported variable.
4019         * kern/disk.c (grub_disk_ata_pass_through): New variable.
4021 2009-02-13  Colin D Bennett  <colin@gibibit.com>
4023         Support multiple fallback entries, and provide an API to support
4024         executing default+fallback menu entries.  Renamed the `terminal' menu
4025         viewer to `text'.
4027         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
4028         variable declaration.
4029         (grub_menu_execute_callback): New structure declaration.
4030         (grub_menu_execute_callback_t): New typedef.
4031         (grub_menu_execute_with_fallback): New function declaration.
4032         (grub_menu_get_entry): Likewise.
4033         (grub_menu_get_timeout): Likewise.
4034         (grub_menu_set_timeout): Likewise.
4036         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
4038         * normal/menu.c (grub_wait_after_message): Moved to
4039         `normal/menu_text.c'.
4040         (draw_border): Likewise.
4041         (print_message): Likewise.
4042         (print_entry): Likewise.
4043         (print_entries): Likewise.
4044         (grub_menu_init_page): Likewise.
4045         (get_entry_number): Likewise.
4046         (print_timeout): Likewise.
4047         (run_menu): Likewise.
4048         (grub_menu_execute_entry): Likewise.
4049         (show_text_menu): Likewise.
4050         (get_and_remove_first_entry_number): New function.
4051         (grub_menu_execute_with_fallback): Likewise.
4052         (get_entry): Renamed to ...
4053         (grub_menu_get_entry): .. this and made it global.
4054         (get_timeout): Renamed to ...
4055         (grub_menu_get_timeout): ... this and made it global.
4056         (set_timeout): Renamed to ...
4057         (grub_menu_set_timeout): ... this and made it global.
4058         (grub_normal_terminal_menu_viewer): Renamed to ...
4059         (grub_normal_text_menu_viewer): ... this.
4061         * normal/menu_text.c: New file.  Extracted text-menu-specific code
4062         from normal/menu.c.
4064         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
4065         (normal_mod_SOURCES): Likewise.
4067         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4068         (normal_mod_SOURCES): Likewise.
4070         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4071         (normal_mod_SOURCES): Likewise.
4073         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
4074         (normal_mod_SOURCES): Likewise.
4076         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4077         (normal_mod_SOURCES): Likewise.
4079         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4080         (normal_mod_SOURCES): Likewise.
4082         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4083         (normal_mod_SOURCES): Likewise.
4085 2009-02-11  Robert Millan  <rmh@aybabtu.com>
4087         * util/grub.d/00_header.in: Update old reference to `font' command.
4089 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
4091         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
4093         Based on patch from Javier Martín.
4095 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
4097         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
4098         to avoid false positives with FAT.
4099         (grub_fstest_SOURCES): Likewise.
4100         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4101         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4102         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4103         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4104         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4105         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4107 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
4109         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
4110         bpb.version_specific.fat12_or_fat16.fstype and
4111         bpb.version_specific.fat32.fstype.
4113 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4115         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
4117 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4119         * Makefile.in (host_os, host_cpu): New variables.
4120         (target_os): Remove.  Update all users.
4122 2009-02-08  Marco Gerards  <marco@gnu.org>
4124         * Makefile.in (enable_grub_emu_usb): New variable.
4125         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
4126         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
4127         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
4128         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
4129         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
4130         `usbtest.mod' and `usbms.mod'.
4131         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
4132         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
4133         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
4134         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
4135         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
4136         variables.
4138         * disk/usbms.c: New file.
4140         * include/grub/usb.h: Likewise.
4142         * include/grub/usbtrans.h: Likewise.
4144         * include/grub/usbdesc.h: Likewise.
4146         * bus/usb/usbtrans.c: Likewise.
4148         * bus/usb/ohci.c: Likewise.
4150         * bus/usb/uhci.c: Likewise.
4152         * bus/usb/usbhub.c: Likewise.
4154         * bus/usb/usb.c: Likewise.
4156         * commands/usbtest.c: Likewise.
4158         * util/usb.c: Likewise.
4160         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
4162         * configure.ac: Test for libusb presence.
4164         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
4166 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
4168         * kern/mm.c: Add more comments.
4170 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4172         Patch from Javier Martín.
4173         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
4174         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
4176 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4178         * fs/cpio.c: Split tar functionality to ...
4179         * fs/tar.c: ... here (new file).  Update all users.
4181 2009-02-07  Robert Millan  <rmh@aybabtu.com>
4183         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4184         backward-incompatible features.
4186         Based on patch from Javier Martín, with some adjustments.
4188 2009-02-07  Michael Scherer  <misc@mandriva.org>
4190         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4192 2009-02-07  Robert Millan  <rmh@aybabtu.com>
4194         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4195         position of `disk/lvm.c' to ensure grub_init_all() always picks it
4196         after the RAID stuff.
4198 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
4200         Fixes problem when running vbetest command as reported by
4201         Vladimir Serbinenko <phcoder@gmail.com>.
4203         * (grub_vbe_set_video_mode): Fixed problem with text modes.
4205 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
4207         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4208         /dev/md/NpN style mdraid devices.
4210 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4212         * util/unifont2pff.rb: Remove.
4214 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4216         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4217         `#'.
4219 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4221         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4222         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4223         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4224         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4225         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4226         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4227         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4229 2009-02-02  Christian Franke  <franke@computer.org>
4231         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4233 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
4235         * INSTALL: Note that we now require at least autoconf 2.59 and
4236         that LZO is optional.
4238 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
4240         Base on patch on bug #24154 created by Tomas Tintera
4241         <trosos@seznam.cz>.
4243         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4245 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
4247         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
4248         <bero@arklinux.org>.
4250         * normal/parser.y (script_init): Add missing semicolon.
4252 2009-01-31  Colin D Bennett  <colin@gibibit.com>
4254         * normal/main.c: Add include to grub/menu_viewer.h.
4255         (free_menu_entry_classes): Added.
4256         (grub_normal_menu_addentry): Added class property handling.
4257         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4258         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4260         * normal/menu_viewer.c: New file.
4262         * normal/menu.c (run_menu_entry): Renamed to ...
4263         (grub_menu_execute_entry): ... this and made it as global.
4264         (grub_menu_run): Renamed to ...
4265         (show_text_menu): ... this and made it local.
4266         (show_text_menu): Adapt to new function names.
4267         (grub_normal_terminal_menu_viewer): New global variable.
4269         * include/grub/menu.h: New file.
4271         * include/grub/menu_viewer.h: New file.
4273         * include/grub/normal.h: Added include to grub/menu.h.
4274         (grub_menu_entry): Moved to include/grub/menu.h.
4275         (grub_menu_entry_t): Likewise.
4276         (grub_menu): Likewise.
4277         (grub_menu_t): Likewise.
4278         (grub_normal_terminal_menu_viewer): Added.
4279         (grub_menu_execute_entry): Likewise.
4280         (grub_menu_run): Removed.
4282         * DISTLIST: Added include/grub/menu.h.
4283         Added include/grub/menu_viewer.h.
4284         Added normal/menu_viewer.c.
4286 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
4288         * normal/execute.c (grub_script_execute_menuentry): Changed to use
4289         arglist for menutitle arguments.
4291         * normal/main.c (grub_normal_menu_addentry): Likewise.
4293         * normal/parser.y (menuentry): Likewise.
4295         * normal/script.c (grub_script_create_cmdmenu): Likewise.
4297         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4298         (grub_script_create_cmdmenu): Likewise.
4300         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4302         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4303         changes.
4305         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4307         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4309         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4311         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4313         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4315         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4317 2009-01-30  Christian Franke  <franke@computer.org>
4319         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4320         in option help text.
4322 2009-01-27  Pavel Roskin  <proski@gnu.org>
4324         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4326 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
4328         * commands/lsmmap.c: Add include to grub/machine/memory.h.
4330         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4332         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4333         unregister function.
4335 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
4337         * disk/scsi.c (grub_scsi_read): Fix sign problem.
4339         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4341         * util/grub-mkfont.c (usage): Fix typo.
4343         * util/elf/grub-mkimage.c (load_modules): Fix warning.
4345 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
4347         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4349         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4351         * kern/misc.c (grub_strcasecmp): New function.
4352         (grub_strcasecmp): Use grub_size_t instead of int for length.
4353         Fix return value.
4354         * include/grub/misc.h: Update function prototypes.
4356 2009-01-26  Robert Millan  <rmh@aybabtu.com>
4358         * configure.ac: Fix cross-compilation check.
4360 2009-01-22  Christian Franke  <franke@computer.org>
4362         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4363         (precision) digit string.  Allow `.format2' without `format1' (width).
4364         Limit input chars for `%s' output to `format2' if specified.  This is
4365         compatible with standard printf ().
4367 2009-01-22  Christian Franke  <franke@computer.org>
4369         * disk/ata.c (grub_ata_wait_status): Replace by ...
4370         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
4371         other status bits may be invalid while BSY is asserted.
4372         (grub_ata_check_ready): New function.
4373         (grub_ata_cmd): Removed.
4374         (grub_ata_wait_drq): New function.
4375         (grub_ata_strncpy): Remove inline.
4376         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
4377         and error check now done by grub_ata_wait_drq ().
4378         (grub_ata_pio_write): Likewise.
4379         (grub_atapi_identify): Set DEV before check for !BSY.  Use
4380         grub_ata_wait_drq () to wait for data.
4381         (grub_ata_device_initialize): Add status register check to
4382         detect missing SATA slave devices.  Add debug messages.
4383         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4384         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
4385         transfer loop by grub_ata_pio_write ().
4386         (grub_ata_identify): Set DEV before check for !BSY. Use
4387         grub_ata_wait_drq () to wait for data.
4388         (grub_ata_setaddress): Set DEV before check for !BSY.
4389         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4390         read/write in one loop.  Fix invalid command on write.  Fix incomplete
4391         command on (size % batch) == 0.  Add missing error check after write of
4392         last block.  Add debug messages.
4393         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
4395 2009-01-19  Christian Franke  <franke@computer.org>
4397         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4398         (GRUB_ATAPI_IREASON_*): Likewise.
4399         (grub_ata_pio_write): Fix timeout error return.
4400         (grub_atapi_identify): Add grub_ata_wait () after cmd.
4401         (grub_atapi_wait_drq): New function.
4402         (grub_atapi_packet): New parameter `size'.
4403         Use grub_atapi_wait_drq () and direct write instead of
4404         grub_ata_pio_write ().
4405         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4406         reads the number of bytes requested by the device for each DRQ
4407         assertion.
4408         (grub_atapi_write): Remove old implementation, return not
4409         implemented instead.
4411 2009-01-19  Christian Franke  <franke@computer.org>
4413         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4414         of 512 to calculate data size.
4415         (grub_scsi_read12): Likewise.
4416         (grub_scsi_write10): Likewise.
4417         (grub_scsi_write12): Likewise.
4418         (grub_scsi_read): Adjust size according to blocksize.
4419         Add checks for invalid blocksize and unaligned transfer.
4421 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
4423         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4425         * term/gfxterm.c (write_char): Fix background rendering for wide
4426         width glyphs.
4428 2009-01-19  Robert Millan  <rmh@aybabtu.com>
4430         * config.guess: Update to latest version from config git.
4431         * config.sub: Likewise.
4433 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
4435         * Makefile.in: Change font compilation to use new grub-mkfont instead
4436         of java version.
4438         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4439         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4440         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4441         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4442         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4443         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4444         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4445         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4446         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4448 2009-01-16  Christian Franke  <franke@computer.org>
4450         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4451         (enum grub_ata_timeout_milliseconds): New enum.
4452         (grub_ata_wait_status): Add parameter milliseconds.
4453         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
4454         recovery from timed-out commands.
4455         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
4456         return grub_errno instead of REG_ERROR.
4457         (grub_ata_pio_write): Add parameter milliseconds.
4458         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4459         Pass milliseconds to grub_ata_wait_status () and
4460         grub_ata_pio_read ().
4461         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4462         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
4463         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
4464         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4465         It is not suitable for device detection, because DEV bit is ignored,
4466         the command may run too long, and not all devices set the signature
4467         properly.
4468         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4469         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4470         Fix device selection, DEV bit must be set first to address the registers
4471         of the correct device.
4472         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4473         grub_ata_pio_read/write ().
4474         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4475         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4477 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
4479         * util/grub-editenv.c (main): Use fseeko(), not fseek().
4481 2009-01-13  Bean  <bean123ch@gmail.com>
4483         * util/grub-mkfont.c (write_font): forget to remove some debug code.
4485 2009-01-13  Bean  <bean123ch@gmail.com>
4487         * Makefile.in: (enable_grub_mkfont): New variable.
4488         (freetype_cflags): Likewise.
4489         (freetype_libs): Likewise.
4491         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4492         (grub_mkfont_SOURCES): New variable.
4493         (grub_mkfont_CFLAGS): Likewise.
4494         (grub_mkfont_LDFLAGS): Likewise.
4496         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4497         library if `--enable-grub-mkfont' is requested.
4498         (enable_grub_mkfont): New variable.
4499         (freetype_cflags): Likewise.
4500         (freetype_libs): Likewise.
4502         * util/grub-mkfont.c: New file.
4504 2009-01-12  Christian Franke  <franke@computer.org>
4506         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4507         mode check.  Fix setting of compat_use[].
4509 2009-01-10  Robert Millan  <rmh@aybabtu.com>
4511         Update a few copyright years which we forgot to do in 2008 (only for
4512         files whose changes made in 2008 were copyright-significant)
4514         * Makefile.in: Add 2008 to Copyright line.
4515         * disk/ieee1275/ofdisk.c: Likewise.
4516         * disk/efi/efidisk.c: Likewise.
4517         * kern/dl.c: Likewise.
4518         * kern/sparc64/ieee1275/init.c: Likewise.
4519         * kern/mm.c: Likewise.
4520         * kern/efi/mm.c: Likewise.
4521         * boot/i386/pc/boot.S: Likewise.
4522         * genfslist.sh: Likewise.
4523         * fs/iso9660.c: Likewise.
4524         * fs/hfs.c: Likewise.
4525         * fs/jfs.c: Likewise.
4526         * fs/minix.c: Likewise.
4527         * fs/ufs.c: Likewise.
4528         * gensymlist.sh.in: Likewise.
4529         * genkernsyms.sh.in: Likewise.
4530         * include/grub/misc.h: Likewise.
4531         * include/grub/types.h: Likewise.
4532         * include/grub/symbol.h: Likewise.
4533         * include/grub/elf.h: Likewise.
4534         * include/grub/kernel.h: Likewise.
4535         * include/grub/disk.h: Likewise.
4536         * include/grub/dl.h: Likewise.
4537         * include/grub/i386/linux.h: Likewise.
4538         * include/grub/i386/pc/biosdisk.h: Likewise.
4539         * include/grub/efi/api.h: Likewise.
4540         * include/grub/efi/pe32.h: Likewise.
4541         * include/grub/util/misc.h: Likewise.
4542         * normal/execute.c: Likewise.
4543         * normal/arg.c: Likewise.
4544         * normal/completion.c: Likewise.
4545         * normal/lexer.c: Likewise.
4546         * normal/parser.y: Likewise.
4547         * normal/misc.c: Likewise.
4548         * commands/i386/pc/vbeinfo.c: Likewise.
4549         * commands/hexdump.c: Likewise.
4550         * commands/terminal.c: Likewise.
4551         * commands/ls.c: Likewise.
4552         * commands/help.c: Likewise.
4553         * partmap/pc.c: Likewise.
4554         * loader/efi/chainloader.c: Likewise.
4555         * loader/multiboot_loader.c: Likewise.
4556         * loader/i386/pc/multiboot2.c: Likewise.
4557         * term/efi/console.c: Likewise.
4558         * term/i386/pc/serial.c: Likewise.
4559         * util/lvm.c: Likewise.
4560         * util/console.c: Likewise.
4561         * util/i386/efi/grub-mkimage.c: Likewise.
4562         * util/raid.c: Likewise.
4564 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
4566         * commands/videotest.c: Removed include to grub/machine/memory.h.
4568         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4569         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4570         (video_mod_SOURCES): Removed.
4571         (video_mod_CFLAGS): Likewise.
4572         (video_mod_LDFLAGS): Likewise.
4573         (gfxterm_mod_SOURCES): Likewise.
4574         (gfxterm_mod_CFLAGS): Likewise.
4575         (gfxterm_mod_LDFLAGS): Likewise.
4576         (videotest_mod_SOURCES): Likewise.
4577         (videotest_mod_CFLAGS): Likewise.
4578         (videotest_mod_LDFLAGS): Likewise.
4579         (bitmap_mod_SOURCES): Likewise.
4580         (bitmap_mod_CFLAGS): Likewise.
4581         (bitmap_mod_LDFLAGS): Likewise.
4582         (tga_mod_SOURCES): Likewise.
4583         (tga_mod_CFLAGS): Likewise.
4584         (tga_mod_LDFLAGS): Likewise.
4585         (jpeg_mod_SOURCES): Likewise.
4586         (jpeg_mod_CFLAGS): Likewise.
4587         (jpeg_mod_LDFLAGS): Likewise.
4588         (png_mod_SOURCES): Likewise.
4589         (png_mod_CFLAGS): Likewise.
4590         (png_mod_LDFLAGS): Likewise.
4592         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4593         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4594         (video_mod_SOURCES): Added.
4595         (video_mod_CFLAGS): Likewise.
4596         (video_mod_LDFLAGS): Likewise.
4597         (videotest_mod_SOURCES): Likewise.
4598         (videotest_mod_CFLAGS): Likewise.
4599         (videotest_mod_LDFLAGS): Likewise.
4600         (bitmap_mod_SOURCES): Likewise.
4601         (bitmap_mod_CFLAGS): Likewise.
4602         (bitmap_mod_LDFLAGS): Likewise.
4603         (tga_mod_SOURCES): Likewise.
4604         (tga_mod_CFLAGS): Likewise.
4605         (tga_mod_LDFLAGS): Likewise.
4606         (jpeg_mod_SOURCES): Likewise.
4607         (jpeg_mod_CFLAGS): Likewise.
4608         (jpeg_mod_LDFLAGS): Likewise.
4609         (png_mod_SOURCES): Likewise.
4610         (png_mod_CFLAGS): Likewise.
4611         (png_mod_LDFLAGS): Likewise.
4612         (gfxterm_mod_SOURCES): Likewise.
4613         (gfxterm_mod_CFLAGS): Likewise.
4614         (gfxterm_mod_LDFLAGS): Likewise.
4616         * term/gfxterm.c: Removed include to grub/machine/memory.h,
4617         grub/machine/console.h.
4619 2009-01-04  Jerone Young  <jerone@gmail.com>
4621         Make on screen instructions clearer
4623         Based on patch created by Jidanni <jidanni@jidanni.org>
4625         * normal/menu.c: print clearer instructions on the screen
4627 2009-01-02  Colin D Bennett  <colin@gibibit.com>
4629         New font engine.
4631         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4632         build system and fixed gfxterm.c to work with different sized fonts.
4634         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4636         * configure: Re-generated.
4638         * DISTLIST: Removed font/manager.c.
4639         Added font/font.c.
4640         Added font/font_cmd.c.
4642         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
4643         compilation.
4645         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
4647         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4649         * kern/term.c: Changed users of grub_utf8_to_ucs4.
4651         * normal/menu.c: Likewise.
4653         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4654         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4656         * include/grub/font.h: Replaced with new file.
4658         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4659         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4660         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4661         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4662         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4663         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4664         fg_red, fg_green, fg_blue, fg_alpha.
4665         (grub_video_adapter): Removed blit_glyph.
4666         (grub_video_blit_glyph): Removed.
4668         * font/manager.c: Removed file.
4670         * font/font.c: New file.
4672         * font/font_cmd.c: Likewise.
4674         * video/video.c (grub_video_blit_glyph): Removed.
4676         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4677         (grub_video_vbe_map_rgba): Likewise.
4678         (grub_video_vbe_unmap_color_int): Likewise.
4679         (grub_video_vbe_blit_glyph): Removed.
4680         (grub_video_vbe_adapter): Removed blit_glyph.
4682         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4683         (get_pixel): Likewise.
4684         (set_pixel): Likewise.
4686         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4688         * term/gfxterm.c: Adapted to new font engine.
4690         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
4692         * term/i386/pc/vga.c: Likewise.
4694         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4696         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4698         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4700         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4702         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4704         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4706         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4708         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4710         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4712         * util/grub.d/00_header.in: Changed to use new loadfont command.
4714         * util/grub-mkconfig_lib.in: Changed font extension.
4716 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
4718         * util/getroot.c (grub_util_get_grub_dev): Add support for
4719         /dev/md/dNNpNN style partitionable mdraid devices.
4721 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
4723         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4724         at a time limit of the PXE TFTP API correctly.
4725         (grub_pxefs_close): Likewise.
4727 2008-11-29  Robert Millan  <rmh@aybabtu.com>
4729         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4730         grub_ata_device_initialize() calls.
4732 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
4734         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4735         iteration failed.
4736         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4738 2008-11-28  Robert Millan  <rmh@aybabtu.com>
4740         Fix build on powerpc-ieee1275.  Based on patch created by
4741         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4742         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4743         `kern/ieee1275/mmap.c'.
4744         * include/grub/powerpc/ieee1275/memory.h: New file.
4746         Provide grub-install on coreboot.
4747         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4748         (grub_install_SOURCES): New variable.
4749         * util/i386/pc/grub-install.in: Add a few condition checks to make it
4750         usable on coreboot.
4752 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
4754         * util/grub-fstest.c (grub_term_get_current_input): Change return type
4755         to `grub_term_input_t'.
4756         (grub_term_get_current_output): Change return type to
4757         `grub_term_output_t'.
4759 2008-11-22  Robert Millan  <rmh@aybabtu.com>
4761         Fix breakage on coreboot due to declaration mismatch.
4762         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4763         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4764         grub_vga_text_cls().
4766         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4767         comments.  Avoid copying one more byte than necessary (just in case).
4769         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4770         to 0x200000 (avoids trouble with some OFW implementations, and matches
4771         with the one in Yaboot).
4772         Reported by Manoel Abranches
4774 2008-11-20  Robert Millan  <rmh@aybabtu.com>
4776         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4777         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4779         * util/grub-mkconfig_lib.in (grub_warn): New function.
4780         (convert_system_path_to_grub_path): Use grub_warn() when issuing
4781         warnings, to obtain consistent formatting.
4782         * util/grub.d/00_header.in: Likewise.
4783         * util/update-grub_lib.in: Likewise.
4785         * loader/i386/linux.c (allocate_pages): Fix a warning.
4786         Move comment text to `#error' stanza.
4788         Harmonize ieee1275's grub_available_iterate() with the generic
4789         grub_machine_mmap_iterate() interface (fixes a recently-introduced
4790         build problem on i386-ieee1275):
4791         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4792         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
4793         parameter `type'.  Update all users of this function.
4794         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4795         `kern/ieee1275/mmap.c'.
4796         * kern/ieee1275/init.c
4797         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4798         with ...
4799         (grub_machine_mmap_iterate): ... this.
4800         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4801         return type to `grub_err_t'.  Update all implementations of this
4802         function prototype.
4803         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4804         Likewise.
4806         Add `lsmmap' command (lists firmware-provided memory map):
4807         * commands/lsmmap.c: New file.
4808         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4809         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4810         variables.
4811         * conf/powerpc-ieee1275.rmk: Likewise.
4812         * conf/i386-coreboot.rmk: Likewise.
4813         * conf/i386-ieee1275.rmk: Likewise.
4815 2008-11-19  Robert Millan  <rmh@aybabtu.com>
4817         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4818         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4819         constraints to initrd allocation (based on code from
4820         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
4821         for Linux to find it.
4823 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4825         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4826         order to cope with duplicate slashes.
4828 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4830         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4831         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
4832         don't want to mess with lower memory, because it is used in the Linux
4833         loader.
4835         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4836         an appropriate place in lower memory, between 0x10000 and 0x90000,
4837         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
4838         is in our heap (probably as a result of it being corrupted during
4839         decompression).  Add #error instance with comment to explain why this
4840         loader isn't currently usable on PC/BIOS.
4842 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4844         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4845         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4847 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4849         Make loader/i386/linux.c buildable on i386-pc (although disabled).
4851         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4852         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4853         from here ...
4854         * include/grub/i386/pc/memory.h: ... to here.
4856 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4858         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4859         split).
4861         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4862         (grub_console_cur_color, grub_console_real_putchar)
4863         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4864         (grub_console_setcolorstate, grub_console_setcolor)
4865         (grub_console_getcolor): Move from here ...
4866         * include/grub/i386/vga_common.h: ... to here (new file).
4868         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4869         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4870         `<grub/i386/io.h>'.
4871         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4872         `<grub/i386/vga_common.h>'.
4874 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4876         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4877         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4878         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4879         variables.
4880         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4881         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4883         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4884         grub_console_init() with call to grub_vga_text_init().
4885         (grub_machine_fini): Replace call to
4886         grub_console_fini() with call to grub_vga_text_fini() and
4887         grub_at_keyboard_fini().
4889         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4890         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4891         (grub_console_setcolorstate, grub_console_setcolor)
4892         (grub_console_getcolor): New function prototypes.
4894         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4895         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4896         (grub_vga_text_setcursor): Static-ize.
4897         (grub_vga_text_term): New structure.
4898         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4900         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4901         (grub_console_cur_color, grub_console_standard_color)
4902         (grub_console_normal_color, grub_console_highlight_color)
4903         (map_char, grub_console_putchar, grub_console_getcharwidth)
4904         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4905         (grub_console_getcolor): Move from here ...
4906         * term/i386/vga_common.c: ... to here (same function names).
4908 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4910         Use newly-added Multiboot support in coreboot.
4912         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4913         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4915         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4916         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4917         (codestart): Store the MBI in `startup_multiboot_info' when we're
4918         being loaded using Multiboot.
4920         * kern/i386/coreboot/init.c (grub_machine_init): Move
4921         grub_at_keyboard_init() call to beginning of function (useful for
4922         debugging).  Call grub_machine_mmap_init() before attempting to use
4923         grub_machine_mmap_iterate().
4924         (grub_lower_mem, grub_upper_mem): Move from here ...
4925         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4926         here (new file).
4928         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4929         function prototype.
4931 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4933         Fix a regression introduced by the at_keyboard.mod split.  Because
4934         some terminals are default on some platforms and non-default on
4935         others, the first terminal being registered determines which is
4936         going to be default.
4938         * kern/term.c (grub_term_register_input): If this is the first
4939         terminal being registered, set it as the current one.
4940         (grub_term_register_output): Likewise.
4942         * term/efi/console.c (grub_console_init): Do not call
4943         grub_term_set_current_output() or grub_term_set_current_input().
4944         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4945         * term/i386/pc/console.c (grub_console_init): Likewise.
4946         (grub_console_fini): Do not call grub_term_set_current_input()
4947         (but leave grub_term_set_current_output() to restore text mode).
4949 2008-11-10  Robert Millan  <rmh@aybabtu.com>
4951         * util/grub.d/00_header.in: Add backward compatibility check for
4952         versions of terminal.mod that don't understand `terminal_input' or
4953         `terminal_output'.
4955 2008-11-09  Robert Millan  <rmh@aybabtu.com>
4957         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4958         `terminal_input' / `terminal_output', not `terminal'.
4960 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4962         * Makefile.in (include_DATA): Fix srcdir=. assumption.
4963         (DISTCLEANFILES): Add `build_env.mk'.
4965 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4967         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4968         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
4969         members.  Update all users.
4970         * util/console.c (grub_ncurses_term): Split in ...
4971         (grub_ncurses_term_input): ... this, and ...
4972         (grub_ncurses_term_output): ... this.  Update all users.
4973         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4975 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4977         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4978         (PKGDATA): Add $(pkgdata_SRCDIR).
4979         (pkglib_BUILDDIR): New variable.
4980         (pkgdata_SRCDIR): New variable.
4981         (build_env.mk): New target.
4982         (include_DATA): New variable.
4983         (install-local): Install $(include_DATA) files in $(includedir).
4985 2008-11-07  Pavel Roskin  <proski@gnu.org>
4987         * gendistlist.sh: Use C locale for sorting to ensure consistent
4988         output on all systems.
4990         * util/grub.d/00_header.in: Remove incorrect space before
4991         "serial".
4993 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4995         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4996         per specification.
4997         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4998         * loader/multiboot_loader.c (find_multi_boot2_header): New function
4999         (based on find_multi_boot1_header).
5000         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
5001         using find_multi_boot2_header(), and abort if neither Multiboot or
5002         Multiboot headers were found.
5004 2008-11-07  Robert Millan  <rmh@aybabtu.com>
5006         Modularize at_keyboard.mod:
5008         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
5009         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
5010         (at_keyboard_mod_LDFLAGS): New variables.
5012         Actual terminal split:
5014         * include/grub/term.h (struct grub_term): Split in ...
5015         (struct grub_term_input): ... this, and ...
5016         (struct grub_term_output): ... this.  Update all users.
5017         (grub_term_set_current): Split in ...
5018         (grub_term_set_current_input): ... this, and ...
5019         (grub_term_set_current_output): ... this.
5020         (grub_term_get_current): Split in ...
5021         (grub_term_get_current_input): ... this, and ...
5022         (grub_term_get_current_output): ... this.
5023         (grub_term_register): Split in ...
5024         (grub_term_register_input): ... this, and ...
5025         (grub_term_register_output): ... this.
5026         (grub_term_unregister): Split in ...
5027         (grub_term_unregister_input): ... this, and ...
5028         (grub_term_unregister_output): ... this.
5029         (grub_term_iterate): Split in ...
5030         (grub_term_iterate_input): ... this, and ...
5031         (grub_term_iterate_output): ... this.
5033         * kern/term.c (grub_term_list): Split in ...
5034         (grub_term_list_input): ... this, and ...
5035         (grub_term_list_output): ... this.  Update all users.
5036         (grub_cur_term): Split in ...
5037         (grub_cur_term_input): ... this, and ...
5038         (grub_cur_term_output): ... this.  Update all users.
5039         (grub_term_set_current): Split in ...
5040         (grub_term_set_current_input): ... this, and ...
5041         (grub_term_set_current_output): ... this.
5042         (grub_term_get_current): Split in ...
5043         (grub_term_get_current_input): ... this, and ...
5044         (grub_term_get_current_output): ... this.
5045         (grub_term_register): Split in ...
5046         (grub_term_register_input): ... this, and ...
5047         (grub_term_register_output): ... this.
5048         (grub_term_unregister): Split in ...
5049         (grub_term_unregister_input): ... this, and ...
5050         (grub_term_unregister_output): ... this.
5051         (grub_term_iterate): Split in ...
5052         (grub_term_iterate_input): ... this, and ...
5053         (grub_term_iterate_output): ... this.
5055         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
5056         a check for input and one for output (and only attempt to get keys
5057         from user when input works).
5059         * util/grub-probe.c (grub_term_get_current): Split in ...
5060         (grub_term_get_current_input): ... this, and ...
5061         (grub_term_get_current_output): ... this.
5062         * util/grub-fstest.c: Likewise.
5063         * util/i386/pc/grub-setup.c: Likewise.
5064         * util/grub-editenv.c: Likewise.
5066         Portability adjustments:
5068         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
5069         `term/i386/pc/at_keyboard.c'.
5070         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
5071         grub_keyboard_controller_init() (now handled by terminal .init).
5072         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
5073         grub_at_keyboard_init().
5074         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
5075         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
5076         at_keyboard.mod via input terminal interface).
5077         * include/grub/i386/coreboot/console.h: Convert into a stub for
5078         `<grub/i386/pc/console.h>'.
5080         Migrate full terminals to new API:
5082         * term/efi/console.c (grub_console_term): Split into ...
5083         (grub_console_term_input): ... this, and ...
5084         (grub_console_term_output): ... this.  Update all users.
5085         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
5086         (grub_ofconsole_init): Split into ...
5087         (grub_ofconsole_init_input): ... this, and ...
5088         (grub_ofconsole_init_output): ... this.
5089         (grub_ofconsole_term): Split into ...
5090         (grub_ofconsole_term_input): ... this, and ...
5091         (grub_ofconsole_term_output): ... this.  Update all users.
5092         * term/i386/pc/serial.c (grub_serial_term): Split into ...
5093         (grub_serial_term_input): ... this, and ...
5094         (grub_serial_term_output): ... this.  Update all users.
5095         * term/i386/pc/console.c (grub_console_term): Split into ...
5096         (grub_console_term_input): ... this, and ...
5097         (grub_console_term_output): ... this.  Update all users.
5098         (grub_console_term_input): Only enable it on PC/BIOS platform.
5099         (grub_console_init): Remove grub_keyboard_controller_init() call.
5101         Migrate input terminals to new API:
5103         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
5104         `i386' and `i386/pc' to enable build on x86_64 (this driver is
5105         i386-specific anyway).
5106         (grub_console_checkkey): Rename to ...
5107         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
5108         users.
5109         (grub_keyboard_controller_orig): New variable.
5110         (grub_console_getkey): Rename to ...
5111         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
5112         users.
5113         (grub_keyboard_controller_init): Static-ize.  Save original
5114         controller value so that it can be restored ...
5115         (grub_keyboard_controller_fini): ... here (new function).
5116         (grub_at_keyboard_term): New structure.
5117         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
5118         functions.
5120         Migrate output terminals to new API:
5122         * term/i386/pc/vga.c (grub_vga_term): Change type to
5123         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
5124         members.  Update all users.
5125         * term/gfxterm.c (grub_video_term): Change type to
5126         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
5127         members.  Update all users.
5128         * include/grub/i386/pc/console.h (grub_console_checkkey)
5129         (grub_console_getkey): Do not export (no longer needed by gfxterm,
5130         etc).
5132         Migrate `terminal' command and userland tools to new API:
5134         * commands/terminal.c (grub_cmd_terminal): Split into ...
5135         (grub_cmd_terminal_input): ... this, and ...
5136         (grub_cmd_terminal_output): ... this.
5137         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
5138         `terminal_input' and `terminal_output'.
5139         * util/grub.d/00_header.in: Adjust `terminal' calls to new
5140         `terminal_input' / `terminal_output' API.
5141         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
5142         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
5143         provided ${GRUB_TERMINAL}, convert it).
5145 2008-11-04  Robert Millan  <rmh@aybabtu.com>
5147         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
5148         for FreeBSD.
5149         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
5151 2008-11-03  Bean  <bean123ch@gmail.com>
5153         * kern/elf.c (grub_elf32_load): Revert to previous code.
5154         (grub_elf64_load): Likewise.
5156         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
5158 2008-11-01  Robert Millan  <rmh@aybabtu.com>
5160         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
5161         (TARGET_CPPFLAGS): Likewise.
5162         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
5164 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
5166         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
5168 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
5170         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
5171         addition of objects until the code is not going to be able to fail.
5173 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
5175         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
5176         (add a missing NULL check, and correct them by moving the pointer
5177         operations after the actual check).
5179 2008-10-29  Robert Millan  <rmh@aybabtu.com>
5181         * util/i386/pc/grub-install.in: Handle empty string as output from
5182         make_system_path_relative_to_its_root().
5184 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
5186         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5187         circular metadata worst case scenario. If the metadata is circular
5188         then copy the wrap in place.
5189         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5190         project lib/format_text/layout.h
5191         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5193 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
5195         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
5197 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
5199         * util/update-grub_lib.in: Mention filename in warning message.
5201 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
5203         * NEWS: Update for rename of update-grub to grub-mkconfig.
5205 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
5207         * util/update-grub_lib.in: Copy to ...
5208         * util/grub-mkconfig_lib.in: ... this.  Update all users.
5209         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
5210         * util/update-grub.in: Rename to ...
5211         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
5212         option. Add `--output' option to allow users to specify the generated
5213         configuration file.  Default to stdout.
5214         (update_grub_dir): Rename to ...
5215         (grub_mkconfig_dir): ... this.
5216         (grub_cfg): Default to an empty string.
5217         * conf/common.rmk (update-grub): Rename to ...
5218         (grub-mkconfig): ... this.
5219         (update-grub_lib): Copy to ...
5220         (grub-mkconfig_lib): ... this.
5221         (update-grub_SCRIPTS): Copy to ...
5222         (grub-mkconfig_SCRIPTS): ... this. Update all users.
5223         (update-grub_DATA): Rename to ...
5224         (grub-mkconfig_DATA): ... this.
5226 2008-09-28  Robert Millan  <rmh@aybabtu.com>
5228         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5229         to `modified'.  Add the real `created' field.
5230         (grub_iso9660_uuid): Use `modified' rather than `created' for
5231         constructing the UUID.
5233 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
5235         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5236         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5238 2008-09-28  Bean  <bean123ch@gmail.com>
5240         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5241         Thanks to Christian Franke for finding this bug.
5243 2008-09-25  Robert Millan  <rmh@aybabtu.com>
5245         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5246         instances of grub_util_get_disk_name() (see previous commit).
5248 2008-09-25  Robert Millan  <rmh@aybabtu.com>
5250         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5251         `util/i386/get_disk_name.c'.
5252         * conf/i386-efi.rmk: Likewise.
5253         * conf/x86_64-efi.rmk: Likewise.
5254         * conf/i386-coreboot.rmk: Likewise.
5255         * conf/i386-ieee1275.rmk: Likewise.
5256         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5257         `util/ieee1275/get_disk_name.c'.
5258         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5259         * util/ieee1275/get_disk_name.c: Remove file.
5260         * util/i386/get_disk_name.c: Remove file.
5261         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5262         "hd%d" for device.map entries, rather than using
5263         grub_util_get_disk_name().
5265 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
5267         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5268         warning.
5269         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5271 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
5273         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5274         Changed to 0x5100.
5275         (GRUB_TERM_PPAGE): Changed to 0x4900.
5277 2008-09-24  Robert Millan  <rmh@aybabtu.com>
5279         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5280         macros (they were i386-pc specific).
5281         * include/grub/sparc64/ieee1275/console.h: Likewise.
5282         * include/grub/efi/console.h: Likewise.
5284 2008-09-22  Bean  <bean123ch@gmail.com>
5286         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5287         resident and in attribute list.
5289         * include/grub/ntfs.h (BMP_LEN): Removed.
5291 2008-09-22  Bean  <bean123ch@gmail.com>
5293         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
5294         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5296         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5297         error occurs, as grub_disk_open will call grub_disk_close, which will
5298         call p->close (scsi).
5300 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
5302         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5303         (AC_PREREQ): Bumped to 2.59.
5304         (AC_TRY_COMPILE): Replace obsolete macro with ...
5305         (AC_COMPILE_IFELSE): ... this.
5306         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5307         (AC_LINK_IFELSE): ... this.
5309 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
5311         * autogen.sh: Add a call to `gendistlist.sh'.
5313 2008-09-19  Christian Franke  <franke@computer.org>
5315         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5316         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5317         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5318         Export __enable_execute_stack() to modules.
5319         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5320         New function.
5322 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
5324         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5325         Sort the list.
5327 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
5329         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
5330         #include <grub/util/hostdisk.h>.
5332 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5334         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5335         segments when their filesz is zero (grub_file_read() interprets
5336         zero-size as "read until EOF", which results in memory corruption).
5337         Use `lowest_segment' rather than 0 for calculating the current
5338         segment load address.
5340 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5342         * util/hostdisk.c (open_device): Replace a grub_util_info() call
5343         with grub_dprintf("hostdisk", ...), as it was so verbose that it
5344         clobbered useful information.
5346 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5348         * include/grub/util/biosdisk.h: Move to ...
5349         * include/grub/util/hostdisk.h: ... here.  Update all users.
5350         * util/biosdisk.c: Move to ...
5351         * util/hostdisk.c: ... here.  Update all users.
5353 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5355         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5356         variables.
5357         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5358         and length can be stored directly in the `mbi->mmap_addr' and
5359         `mbi->mmap_length' struct fields.
5361 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5363         * conf/i386.rmk: New file.  Provides declaration for building
5364         `cpuid.mod'.
5365         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5366         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5367         variables.
5368         Include `conf/i386.mk'.
5369         * conf/i386-efi.rmk: Likewise.
5370         * conf/x86_64-efi.rmk: Likewise.
5371         * conf/i386-coreboot.rmk: Likewise.
5372         * conf/i386-ieee1275.rmk: Likewise.
5374 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
5376         Based on patch created by Colin D Bennett <colin@gibibit.com>.
5377         Adds optimization support for BGR based modes.
5379         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5380         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5381         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5382         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5383         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5384         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5385         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5386         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5387         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5388         (grub_video_i386_vbeblit_index_index): Likewise.
5389         (grub_video_i386_vbeblit_replace_directN): Added.
5390         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5391         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5392         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5393         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5394         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5395         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5396         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5397         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5398         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5399         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5400         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5401         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5402         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5404         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5405         (grub_video_i386_vbefill_R8G8B8): Likewise.
5406         (grub_video_i386_vbefill_index): Likewise.
5407         (grub_video_i386_vbefill_direct32): Added.
5408         (grub_video_i386_vbefill_direct24): Likewise.
5409         (grub_video_i386_vbefill_direct16): Likewise.
5410         (grub_video_i386_vbefill_direct8): Likewise.
5412         * include/grub/video.h (grub_video_blit_format): Removed
5413         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5414         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5415         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5416         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5417         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5419         * video/video.c (grub_video_get_blit_format): Updated to use new
5420         blit formats.  Added handling for 16 bit color modes.
5422         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5423         fillers.
5424         (common_blitter): Updated to use new blitters.
5426         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5427         Removed.
5428         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5429         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5430         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5431         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5432         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5433         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5434         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5435         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5436         (grub_video_i386_vbeblit_index_index): Likewise.
5437         (grub_video_i386_vbeblit_replace_directN): Added.
5438         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5439         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5440         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5441         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5442         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5443         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5444         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5445         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5446         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5447         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5448         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5449         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5450         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5452         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5453         (grub_video_i386_vbefill_R8G8B8): Likewise.
5454         (grub_video_i386_vbefill_index): Likewise.
5455         (grub_video_i386_vbefill_direct32): Added.
5456         (grub_video_i386_vbefill_direct24): Likewise.
5457         (grub_video_i386_vbefill_direct16): Likewise.
5458         (grub_video_i386_vbefill_direct8): Likewise.
5460         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5461         types.
5463         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5464         types.
5466         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5467         blitter types.
5469         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5470         types.
5472 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5474         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5475         RAID level 1.
5477 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5479         * fs/iso9660.c (grub_iso9660_date): New structure.
5480         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5481         (grub_iso9660_uuid): New function.
5483 2008-09-05  Bean  <bean123ch@gmail.com>
5485         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5487         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5488         insensitive bit for names in Win32 and Win32 & DOS namespace.
5490         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5492         * include/grub/types.h (LONG_MAX): Likewise.
5494 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5496         * util/getroot.c: Include <config.h>.
5497         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5498         add support for /dev/md/N devices and handle LVM double dash escaping.
5500 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5502         * config.guess: Update to latest version from config git.
5503         * config.sub: Likewise.
5505 2008-09-03  Robert Millan  <rmh@aybabtu.com>
5507         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5508         `disk->total_sectors'.
5510 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5512         * include/grub/normal.h: Fixed incorrect comment for
5513         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5515 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5517         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5518         values with defines.
5520         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5521         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5522         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5523         (GRUB_VBE_MODEATTR_COLOR): Likewise.
5524         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5525         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5526         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5527         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5528         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5529         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5530         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5531         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5532         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5533         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5534         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5535         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5536         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5537         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5538         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5540 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5542         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5543         declaration.
5544         (grub_multiboot): Fix a few warnings.
5546 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5548         * loader/i386/pc/multiboot.c: Update comment not to say that
5549         boot_device support is unimplemented.
5551 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5553         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5554         or memory map support are unimplemented.
5556 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5558         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5560 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5562         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5563         total video memory in 'vbeinfo' output; show color format details for
5564         each video mode.
5566 2008-08-30  Pavel Roskin  <proski@gnu.org>
5568         * util/genmoddep.c: Remove for real this time.
5569         * DISTLIST: Remove util/genmoddep.c.
5571 2008-08-30  Robert Millan  <rmh@aybabtu.com>
5573         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5574         as required by Multiboot spec (it was already 4-byte aligned, but
5575         only by chance).
5577 2008-08-29  Pavel Roskin  <proski@gnu.org>
5579         * kern/powerpc/ieee1275/crt0.S: Rename to ...
5580         * kern/powerpc/ieee1275/startup.S: ... this.
5581         * conf/powerpc-ieee1275.rmk: Adjust for the above.
5582         * DISTLIST: Likewise.
5584         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5585         grub/cpu/kernel.h.  Add start label for consistency with other
5586         platforms.  Add grub_prefix immediately after start.  Add jump
5587         to the code after grub_prefix.
5588         * include/grub/powerpc/kernel.h: Provide valid values for
5589         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5591 2008-08-29  Bean  <bean123ch@gmail.com>
5593         * configure.ac: Change host_os to cygwin for mingw.
5594         (asprintf): New check for function.
5596         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5597         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5599         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5600         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5601         sync, sleep and grub_util_get_disk_size for mingw.
5603         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5604         to get size in mingw.
5605         (open_device): Use flag O_BINARY if it's defined.
5606         (find_root_device): Add dummy code for mingw.
5608         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5609         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5610         (get_scsi_disk_name): Return 0 for mingw.
5612         * util/hostfs.c: #include <grub/util/misc.h>.
5613         (grub_hostfs_open): Use "rb" flag to open file, use
5614         grub_util_get_disk_size to get disk size for mingw.
5616         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5617         (asprintf): New function if HAVE_ASPRINTF is not set.
5618         (sync): New function for mingw.
5619         (sleep): Likewise.
5620         (grub_util_get_disk_size): Likewise.
5622 2008-08-28  Pavel Roskin  <proski@gnu.org>
5624         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5625         kern/time.c.
5627 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5629         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5631 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5633         Change find_grub_drive() syntax so it doesn't prevent it from
5634         detecting NULL names as errors.
5636         * util/biosdisk.c (find_grub_drive): Move free slot search code
5637         from here ...
5638         (find_free_slot): ... to here.
5639         (read_device_map): Use find_free_slot() to search for free slots.
5641 2008-08-27  Marco Gerards  <marco@gnu.org>
5643         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5644         (scsi_mod_SOURCES): New variable.
5645         (scsi_mod_CFLAGS): Likewise
5646         (scsi_mod_LDFLAGS): Likewise.
5648         * disk/scsi.c: New file.
5650         * include/grub/scsi.h: Likewise.
5652         * include/grub/scsicmd.h: Likewise.
5654         * disk/ata.c: Include <grub/scsi.h>.
5655         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5656         instead.
5657         (grub_ata_iterate): Skip ATAPI devices.
5658         (grub_ata_open): Only handle ATAPI devices.
5659         (struct grub_atapi_read): Removed.
5660         (grub_atapi_readsector): Likewise.
5661         (grub_ata_read): No longer handle ATAPI devices.
5662         (grub_ata_write): Likewise.
5663         (grub_atapi_iterate): New function.
5664         (grub_atapi_read): Likewise.
5665         (grub_atapi_write): Likewise.
5666         (grub_atapi_open): Likewise.
5667         (grub_atapi_close): Likewise.
5668         (grub_atapi_dev): New variable.
5669         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5670         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5672         * include/grub/disk.h (enum grub_disk_dev_id): Add
5673         `GRUB_DISK_DEVICE_SCSI_ID'.
5675 2008-08-26  Robert Millan  <rmh@aybabtu.com>
5677         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5678         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5679         descriptive.
5681 2008-08-23  Bean  <bean123ch@gmail.com>
5683         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5684         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5685         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5686         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5687         dm_nv.mod.
5688         (raid5rec_mod_SOURCES): New macro.
5689         (raid5rec_mod_CFLAGS): Likewise.
5690         (raid5rec_mod_LDFLAGS): Likewise.
5691         (raid6rec_mod_SOURCES): Likewise.
5692         (raid6rec_mod_CFLAGS): Likewise.
5693         (raid6rec_mod_LDFLAGS): Likewise.
5694         (mdraid_mod_SOURCES): Likewise.
5695         (mdraid_mod_CFLAGS): Likewise.
5696         (mdraid_mod_LDFLAGS): Likewise.
5697         (dm_nv_mod_SOURCES): Likewise.
5698         (dm_nv_mod_CFLAGS): Likewise.
5699         (dm_nv_mod_LDFLAGS): Likewise.
5701         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5702         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
5703         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5705         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5706         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5708         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5710         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5712         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5714         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5716         * disk/raid5_recover.c: New file.
5718         * disk/raid6_recover.c: Likewise.
5720         * disk/mdraid_linux.c: Likewise.
5722         * disk/dmraid_nvidia.c: Likewise.
5724         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5725         ULONG_MAX.
5727         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5728         calculate the size of raid device.
5729         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5730         different layout of raid5.
5731         (grub_raid_scan_device): Remove code specific to mdraid.
5732         (grub_raid_list): New variable.
5733         (free_array): New function.
5734         (grub_raid_register): Likewise.
5735         (grub_raid_unregister): Likewise.
5736         (grub_raid_rescan): Likewise.
5737         (GRUB_MOD_INIT): Don't iterate device here.
5738         (GRUB_MOD_FINI): Use free_array to release resource.
5740         * include/grub/raid.h: Remove macro and structure specific to mdraid.
5741         (grub_raid5_recover_func_t): New function variable type.
5742         (grub_raid6_recover_func_t): Likewise.
5743         (grub_raid5_recover_func): New variable.
5744         (grub_raid6_recover_func): Likewise.
5745         (grub_raid_register): New function.
5746         (grub_raid_unregister): Likewise.
5747         (grub_raid_rescan): Likewise.
5748         (grub_raid_block_xor): Likewise.
5750         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5751         (CMD_CRC): New macro.
5752         (part): Removed.
5753         (read_file): Handle device as well as file.
5754         (cmd_crc): New function.
5755         (fstest): Handle multiple disks.
5756         (options): Remove part, raw and long, add root and diskcount.
5757         (usage): Add crc, remove -p, -r, -l, add -r and -c.
5758         (main): Find the first non option entry and ignore subsequent options,
5759         add handling for the new options, support multiple disks.
5761         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5763 2008-08-23  Bean  <bean123ch@gmail.com>
5765         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5767         * genfslist.sh: Ignore kernel.mod.
5769         * genpartmaplist.sh: Likewise.
5771 2008-08-23  Robert Millan  <rmh@aybabtu.com>
5773         * util/getroot.c (find_root_device): Skip anything that starts with
5774         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
5776 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
5778         * util/update-grub.in (GRUB_GFXMODE): Export variable.
5779         * util/grub.d/00_header.in: Allow the administrator to change default
5780         gfxmode via ${GRUB_GFXMODE}.
5782 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
5784         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5786 2008-08-21  Robert Millan  <rmh@aybabtu.com>
5788         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
5789         loader.
5790         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5791         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5793 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
5795         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5796         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5798 2008-08-19  Robert Millan  <rmh@aybabtu.com>
5800         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5801         (struct grub_virtual_screen): Remove `cursor_color'.
5802         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5803         initialization.
5804         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5806 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5808         Unify (identical) linux_normal.c files.
5809         * loader/i386/efi/linux_normal.c: Move from here ...
5810         * loader/linux_normal.c: ... to here.  Update all users.
5811         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
5812         * loader/i386/ieee1275/linux_normal.c: Likewise.
5814 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5816         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5817         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5818         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5819         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5820         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5821         New macros.
5822         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5823         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5824         (GRUB_LINUX_CL_END_OFFSET): ... to here.
5825         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5826         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
5827         (GRUB_EFI_CL_END_OFFSET): Rename to ...
5828         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
5829         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5830         Initialize `params->video_cursor_x' and `params->video_cursor_y'
5831         portably using grub_getxy().
5832         Replace `-EFI' with `-bzImage' in boot message.
5834 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5836         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5838 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5840         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5842         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5843         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5844         (grub_machine_mmap_iterate): New function declaration.
5845         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5846         structure.
5847         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5848         macros.
5850         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5851         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5852         Move e820 parsing from here ...
5853         * kern/i386/pc/mmap.c: New file.
5854         (grub_machine_mmap_iterate): ... to here.
5856         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5857         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5858         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
5859         (grub_available_iterate): Redeclare to return `void', and redeclare
5860         its hook to use grub_uint64_t as addr and size parameters, and rename
5861         to ...
5862         (grub_machine_mmap_iterate): ... this.  Update all users.
5864         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5865         to make it more readable.  Rename to ...
5866         (grub_machine_mmap_iterate): ... this.
5868         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5869         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5870         (grub_multiboot): Allocate an extra region after the payload, and fill
5871         it with a Multiboot memory map.  Adjust a.out loader to calculate size
5872         with the extra space.
5873         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5874         with the extra space.
5876 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
5878         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5880 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
5882         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5883         mdate-sh to the list `find' searches for.
5884         * DISTLIST: Regenerated.
5886 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
5888         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5889         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5890         genmoddep.awk, gensymlist.sh.in.
5891         (DISTDIRS): Add bus, docs, hook, lib.
5892         * DISTLIST: Regenerated.
5893         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5895 2008-08-16  Robert Millan  <rmh@aybabtu.com>
5897         * disk/raid.c (grub_raid_init): Handle/report errors set by
5898         grub_device_iterate().
5899         * disk/lvm.c (grub_lvm_init): Likewise.
5901 2008-08-15  Bean  <bean123ch@gmail.com>
5903         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5904         and datehook.mod.
5905         (datetime_mod_SOURCES): New macro.
5906         (datetime_mod_CFLAGS): Likewise.
5907         (datetime_mod_LDFLAGS): Likewise.
5908         (date_mod_SOURCES): Likewise.
5909         (date_mod_CFLAGS): Likewise.
5910         (date_mod_LDFLAGS): Likewise.
5911         (datehook_mod_SOURCES): Likewise.
5912         (datehook_mod_CFLAGS): Likewise.
5913         (datehook_mod_LDFLAGS): Likewise.
5915         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5916         and datehook.mod.
5917         (datetime_mod_SOURCES): New macro.
5918         (datetime_mod_CFLAGS): Likewise.
5919         (datetime_mod_LDFLAGS): Likewise.
5920         (date_mod_SOURCES): Likewise.
5921         (date_mod_CFLAGS): Likewise.
5922         (date_mod_LDFLAGS): Likewise.
5923         (datehook_mod_SOURCES): Likewise.
5924         (datehook_mod_CFLAGS): Likewise.
5925         (datehook_mod_LDFLAGS): Likewise.
5927         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5928         and datehook.mod.
5929         (datetime_mod_SOURCES): New macro.
5930         (datetime_mod_CFLAGS): Likewise.
5931         (datetime_mod_LDFLAGS): Likewise.
5932         (date_mod_SOURCES): Likewise.
5933         (date_mod_CFLAGS): Likewise.
5934         (date_mod_LDFLAGS): Likewise.
5935         (datehook_mod_SOURCES): Likewise.
5936         (datehook_mod_CFLAGS): Likewise.
5937         (datehook_mod_LDFLAGS): Likewise.
5939         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5940         and datehook.mod.
5941         (datetime_mod_SOURCES): New macro.
5942         (datetime_mod_CFLAGS): Likewise.
5943         (datetime_mod_LDFLAGS): Likewise.
5944         (date_mod_SOURCES): Likewise.
5945         (date_mod_CFLAGS): Likewise.
5946         (date_mod_LDFLAGS): Likewise.
5947         (datehook_mod_SOURCES): Likewise.
5948         (datehook_mod_CFLAGS): Likewise.
5949         (datehook_mod_LDFLAGS): Likewise.
5951         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5952         and datehook.mod.
5953         (datetime_mod_SOURCES): New macro.
5954         (datetime_mod_CFLAGS): Likewise.
5955         (datetime_mod_LDFLAGS): Likewise.
5956         (date_mod_SOURCES): Likewise.
5957         (date_mod_CFLAGS): Likewise.
5958         (date_mod_LDFLAGS): Likewise.
5959         (datehook_mod_SOURCES): Likewise.
5960         (datehook_mod_CFLAGS): Likewise.
5961         (datehook_mod_LDFLAGS): Likewise.
5963         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5965         * commands/date.c: New file.
5967         * hook/datehook.c: Likewise.
5969         * include/grub/lib/datetime.h: Likewise.
5971         * include/grub/i386/cmos.h: Likewise.
5973         * lib/datetime.c: Likewise.
5975         * lib/i386/datetime.c: Likewise.
5977         * lib/efi/datetime.c: Likewise.
5979 2008-08-14  Robert Millan  <rmh@aybabtu.com>
5981         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5982         (grub_mkelfimage_SOURCES): New variable.
5983         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5985         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5986         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5987         * conf/powerpc-ieee1275.rmk: Likewise.
5988         * conf/i386-ieee1275.rmk: Likewise.
5990         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5991         * kern/i386/coreboot/init.c: Likewise.
5993         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5994         with `<grub/cpu/kernel.h>'.
5995         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5996         to ...
5997         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5998         * kern/i386/coreboot/startup.S: Likewise.
6000         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
6001         (GRUB_MOD_GAP): Remove.
6002         * include/grub/powerpc/kernel.h: New file.
6003         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
6004         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6005         * include/grub/i386/kernel.h: New file.
6006         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
6007         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
6008         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6010         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
6011         `grub-mkelfimage'.
6012         Use --directory when invoking grub_mkimage.
6014         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
6015         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
6016         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
6017         and GRUB_KERNEL_CPU_PREFIX.
6019 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
6021         * include/grub/err.h (grub_err_printf): New function prototype.
6022         * util/misc.c (grub_err_printf): New function.
6023         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
6024         grub_printf.
6025         * kern/err.c (grub_print_error): Use grub_err_printf.
6027 2008-08-13  Robert Millan  <rmh@aybabtu.com>
6029         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
6031 2008-08-13  Robert Millan  <rmh@aybabtu.com>
6033         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
6034         boot entry.
6036 2008-08-12  Robert Millan  <rmh@aybabtu.com>
6038         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
6039         of the relocation code from here ...
6040         (grub_multiboot): ... to here.
6041         (forward_relocator, backward_relocator): Move from here ...
6042         * kern/i386/loader.S (grub_multiboot_forward_relocator)
6043         (grub_multiboot_backward_relocator): ... to here.
6044         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
6045         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
6046         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
6047         (grub_multiboot_forward_relocator_end)
6048         (grub_multiboot_backward_relocator)
6049         (grub_multiboot_backward_relocator_end): New variables.
6051 2008-08-12  Bean  <bean123ch@gmail.com>
6053         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
6055 2008-08-11  Robert Millan  <rmh@aybabtu.com>
6057         * kern/i386/linuxbios/startup.S: Move from here ...
6058         * kern/i386/coreboot/startup.S: ... to here.
6060         * kern/i386/linuxbios/init.c: Move from here ...
6061         * kern/i386/coreboot/init.c: ... to here.
6063         * kern/i386/linuxbios/table.c: Move from here ...
6064         * kern/i386/coreboot/mmap.c: ... to here.
6066         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
6068 2008-08-11  Robert Millan  <rmh@aybabtu.com>
6070         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
6071         errors.  Leave it to the upper layer to handle them.
6073 2008-08-09  Christian Franke  <franke@computer.org>
6075         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
6076         * conf/common.rmk: Install `grub-pe2elf' only if requested.
6077         Install `grub.d/10_windows' only on Cygwin.
6078         * configure.ac: Add subst of `target_os'.
6079         Check `target_os' also before setting TARGET_OBJ2ELF.
6080         Add `--enable-grub-pe2elf'.
6082 2008-08-08  Robert Millan  <rmh@aybabtu.com>
6084         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6085         (grub_last_time): Change type to grub_uint64_t.
6086         (grub_disk_open): Migrate code from to using grub_get_time_ms().
6087         (grub_disk_close): Likewise.
6089         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6090         (run_menu): Migrate code from to using grub_get_time_ms().
6092         * util/misc.c (grub_get_time_ms): New function.
6094 2008-08-08  Marco Gerards  <marco@gnu.org>
6096         * disk/ata.c (grub_ata_regget): Change return type to
6097         `grub_uint8_t'.
6098         (grub_ata_regget2): Likewise.
6099         (grub_ata_wait_status): New function.
6100         (grub_ata_wait_busy): Removed function, updated all users to use
6101         `grub_ata_wait_status'.
6102         (grub_ata_wait_drq): Likewise.
6103         (grub_ata_cmd): New function.
6104         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
6105         error handling.
6106         (grub_ata_pio_write): Add error handling.
6107         (grub_atapi_identify): Likewise.
6108         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
6109         handling.
6110         (grub_ata_identify): Use `grub_ata_cmd' and improve error
6111         handling.  Actually use the detected registers.  Reorder the
6112         detection logic such that it is easier to read.
6113         (grub_ata_pciinit): Do not assign the same ID to each controller.
6114         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
6115         handling.
6116         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
6118         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
6120 2008-08-08  Marco Gerards  <marco@gnu.org>
6122         * NEWS: Update.
6124 2008-08-07  Bean  <bean123ch@gmail.com>
6126         * include/grub/x86_64/pci.h: New file.
6128 2008-08-07  Christian Franke  <franke@computer.org>
6130         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
6131         (TIMER2_GATE): Likewise.
6132         (grub_pit_wait): Add enable/disable of the timer2 gate
6133         bit of port 0x61.  This fixes a possible infinite loop.
6135 2008-08-07  Bean  <bean123ch@gmail.com>
6137         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
6138         kern/i386/tsc.c and kern/i386/pit.c.
6140         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
6141         x86_64 platform.
6143         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
6144         <grub/i386/tsc.h>.
6146         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
6148 2008-08-07  Bean  <bean123ch@gmail.com>
6150         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
6152         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
6154         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
6155         multiple inclusion. Add #include <grub/types.h>.
6157 2008-08-06  Christian Franke  <franke@computer.org>
6159         * conf/common.rmk: Build and install `10_windows'.
6160         * util/grub.d/10_windows.in: New script.
6162 2008-08-06  Pavel Roskin  <proski@gnu.org>
6164         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
6166 2008-08-06  Robert Millan  <rmh@aybabtu.com>
6168         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
6169         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
6171 2008-08-06  Bean  <bean123ch@gmail.com>
6173         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
6174         (grub_pxefs_fs_int): Remove dummy definition.
6175         (grub_pxefs_open): Use data->block_size to store the current block
6176         size setting.
6177         (grub_pxefs_read): Use block size stored in data->block_size. As the
6178         value of grub_pxe_blksize can be changed after the file is opened.
6180 2008-08-06  Bean  <bean123ch@gmail.com>
6182         * fs/i386/pc/pxe.c (curr_file): new variable.
6183         (grub_pxefs_open): Simply the handling of pxe file system. Don't
6184         require the dummy internal file system anymore.
6185         (grub_pxefs_read): Removed.
6186         (grub_pxefs_close): Likewise.
6187         (grub_pxefs_fs_int): Likewise.
6188         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6189         connection when we switch file.
6190         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6192 2008-08-06  Robert Millan  <rmh@aybabtu.com>
6194         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6195         `halt.mod'.
6196         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6197         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6199         * kern/i386/halt.c: New file.
6200         * kern/i386/reboot.c: Likewise.
6201         * include/grub/i386/reboot.h: Likewise.
6202         * include/grub/i386/halt.h: Likewise.
6204         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6205         Include `<grub/cpu/halt.h>'.
6206         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6207         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6209         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6210         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6211         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6212         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6213         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6214         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6215         from here ...
6216         * include/grub/i386/at_keyboard.h: ... to here.
6218 2008-08-05  Robert Millan  <rmh@aybabtu.com>
6220         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6221         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6222         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6223         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6224         `kern/generic/millisleep.c'.
6226         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6227         instead of grub_get_rtc().
6228         (grub_tsc_init): Initialize `tsc_boot_time'.
6230         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6231         (grub_machine_init): Use grub_tsc_init() rather than
6232         installing an RTC-based handler via grub_install_get_time_ms().
6234         * kern/i386/pit.c: New file.
6235         * include/grub/i386/pit.h: Likewise.
6237 2008-08-05  Bean  <bean123ch@gmail.com>
6239         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6241         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6242         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6243         (pxe_mod_SOURCES): New macro.
6244         (pxe_mod_CFLAGS): Likewise.
6245         (pxe_mod_LDFLAGS): Likewise.
6246         (pxecmd_mod_SOURCES): Likewise.
6247         (pxecmd_mod_CFLAGS): Likewise.
6248         (pxecmd_mod_LDFLAGS): Likewise.
6250         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6251         (grub_pxe_call): Likewise.
6253         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6255         * commands/i386/pc/pxecmd.c: New file.
6257         * fs/i386/pc/pxe.c: Likewise.
6259         * include/grub/i386/pc/pxe.h: Likewise.
6261 2008-08-05  Bean  <bean123ch@gmail.com>
6263         * util/console.c (grub_console_cur_color): New variable.
6264         (grub_console_standard_color): Likewise.
6265         (grub_console_normal_color): Likewise.
6266         (grub_console_highlight_color): Likewise.
6267         (color_map): Likewise.
6268         (use_color): Likewise.
6269         (NUM_COLORS): New macro.
6270         (grub_ncurses_setcolorstate): Handle color properly.
6271         (grub_ncurses_setcolor): Don't change color here, just remember the
6272         settings, color will be set in grub_ncurses_setcolorstate.
6273         (grub_ncurses_getcolor): New function.
6274         (grub_ncurses_init): Initialize color pairs.
6275         (grub_ncurses_term): New member grub_ncurses_getcolor.
6277 2008-08-05  Colin D Bennett  <colin@gibibit.com>
6279         High resolution timer support.  Implemented for x86 CPUs using TSC.
6280         Extracted generic grub_millisleep() so it's linked in only as needed.
6281         This requires a Pentium compatible CPU; if the RDTSC instruction is
6282         not supported, then it falls back on the generic grub_get_time_ms()
6283         implementation that uses the machine's RTC.
6285         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6286         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6287         `kern/generic/millisleep.c'.
6289         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6290         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6292         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6293         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6295         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6297         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6298         `kern/generic/millisleep.c'.
6300         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6302         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6304         * kern/generic/rtc_get_time_ms.c: New file.
6306         * kern/generic/millisleep.c: New file.
6308         * kern/misc.c: Don't include
6309         <kern/time.h> anymore.
6310         (grub_millisleep_generic): Removed.
6312         * commands/sleep.c (grub_interruptible_millisleep): Uses
6313         grub_get_time_ms() instead of grub_get_rtc().
6315         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
6316         function.
6317         (grub_cpu_is_cpuid_supported): New inline function.
6318         (grub_cpu_is_tsc_supported): New inline function.
6319         (grub_tsc_init): New function prototype.
6320         (grub_tsc_get_time_ms): New function prototype.
6322         * kern/i386/tsc.c (grub_get_time_ms): New file.
6324         * include/grub/time.h: Include <grub/types.h.
6325         (grub_millisleep_generic): Removed.
6326         (grub_get_time_ms): New prototype.
6327         (grub_install_get_time_ms): New prototype.
6328         (grub_rtc_get_time_ms): New prototype.
6330         * kern/time.c (grub_get_time_ms): New function.
6331         (grub_install_get_time_ms): New function.
6333         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
6334         <grub/time.h> anymore.
6335         (grub_millisleep): Removed.
6336         (grub_machine_init): Call grub_tsc_init.
6338         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6339         get_time_ms() implementation.
6341         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6342         (ieee1275_get_time_ms): New function.
6343         (grub_machine_init): Install get_time_ms() implementation.
6345         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6346         (grub_machine_init): Call grub_tsc_init().
6347         (grub_millisleep): Removed.
6349         * kern/ieee1275/init.c (grub_millisleep): Removed.
6350         (grub_machine_init): Install ieee1275_get_time_ms()
6351         implementation.
6352         (ieee1275_get_time_ms): New function.
6353         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6354         real work.
6356 2008-08-05  Marco Gerards  <marco@gnu.org>
6358         * disk/ata.c: Include <grub/pci.h>.
6359         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6360         (grub_ata_initialize): Rewritten.
6361         (grub_ata_device_initialize): New function.
6363 2008-08-04  Pavel Roskin  <proski@gnu.org>
6365         * kern/main.c: Include grub/mm.h.
6367 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6369         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6370         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6371         corruption problem).
6373 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6375         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6376         warnings introduced in my last commit.
6378 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6380         Make PCI available on all i386 architectures.
6382         * include/grub/i386/pc/pci.h: Move from here ...
6383         * include/grub/i386/pci.h: ... to here.
6385         * include/grub/i386/pc/pci.h: Remove.
6386         * include/grub/i386/efi/pci.h: Remove.
6387         * include/grub/x86_64/efi/pci.h: Remove.
6389         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6390         `<grub/cpu/pci.h>'.
6392         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6393         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6394         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6396         * conf/i386-ieee1275.rmk: Likewise.
6398 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6400         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6401         (grub_console_setcursor): Make it possible to set cursor off.
6403 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6405         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
6406         of modules instead of assuming which platform provides what.
6407         * util/update-grub.in: Likewise.
6409 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6411         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6412         instead of `grub_install_dos_part' to determine whether a drive needs
6413         to be prepended to prefix (`grub_install_dos_part' is not reliable,
6414         because it can be overridden when loading GRUB via Multiboot).
6416 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6418         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6420 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6422         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6423         of informational grub_dprintf() calls.
6425 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6427         * disk/memdisk.c (memdisk_size): Don't initialize.
6428         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6430         * include/grub/i386/pc/kernel.h
6431         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6432         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6433         (grub_memdisk_image_size, grub_arch_memdisk_addr)
6434         (grub_arch_memdisk_size): Remove.
6436         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6437         field (was only used to transfer a constant).  Add `type' field to
6438         support multiple module types.
6439         (grub_module_iterate): New function.
6441         * kern/device.c (grub_device_open): Do not hide error messages
6442         when grub_disk_open() fails.  Use grub_print_error() instead.
6444         * kern/i386/pc/init.c (grub_arch_modules_addr)
6445         (grub_arch_memdisk_size): Remove functions.
6446         (grub_arch_modules_addr): Return the module address in high memory
6447         (now that it isn't copied anymore).
6449         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6450         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6451         decompression routine (grub_total_module_size already includes that
6452         now).  Don't copy modules back to low memory.
6454         * kern/main.c: Include `<grub/mm.h>'.
6455         (grub_load_modules): Split out (and use) ...
6456         (grub_module_iterate): ... this function, which iterates through
6457         module objects and runs a hook.
6458         Comment out grub_mm_init_region() call, as it would cause non-ELF
6459         modules to be overwritten.
6461         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6462         the memdisk image in its own region, make it part of the module list.
6463         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6464         (main): Parse --memdisk|-m option, and pass user-provided path as
6465         parameter to generate_image().
6466         (add_segments): Pass `memdisk_path' down to load_modules().
6467         (load_modules): Embed memdisk image in module section when requested.
6468         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6469         `header.type' instead of `header.offset'.
6471         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6472         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6473         (memdisk_mod_LDFLAGS): New variables.
6474         * conf/i386-coreboot.rmk: Likewise.
6475         * conf/i386-ieee1275.rmk: Likewise.
6477 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6479         * loader/i386/pc/multiboot.c (playground, forward_relocator)
6480         (backward_relocator): New variables.  Used to allocate and relocate
6481         the payload, respectively.
6482         (grub_multiboot_load_elf32): Load into heap instead of requested
6483         address, install the appropriate relocator code in each bound of
6484         the payload, and set the entry point such that
6485         grub_multiboot_real_boot() will jump to one of them.
6487         * kern/i386/loader.S (grub_multiboot_payload_size)
6488         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6489         (grub_multiboot_payload_entry_offset): New variables.
6490         (grub_multiboot_real_boot): Set cpu context to what the relocator
6491         expects, and jump to the relocator instead of the payload.
6493         * include/grub/i386/loader.h (grub_multiboot_payload_size)
6494         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6495         (grub_multiboot_payload_entry_offset): Export.
6497 2008-08-01  Bean  <bean123ch@gmail.com>
6499         * normal/menu_entry.c (editor_getline): Don't return the original
6500         string as result, as it will be released by lexer once it has done
6501         using it.
6503 2008-08-01  Robert Millan  <rmh@aybabtu.com>
6505         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6506         within menuentries, not before them.
6507         util/grub.d/10_hurd.in: Likewise.
6509 2008-08-01  Bean  <bean123ch@gmail.com>
6511         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6512         (bufio_mod_SOURCES): New macro.
6513         (bufio_mod_CFLAGS): Likewise.
6514         (bufio_mod_LDFLAGS): Likewise.
6516         * include/grub/bufio.h: New file.
6518         * io/bufio.c: Likewise.
6520         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6521         (grub_video_reader_png): Use grub_buffile_open to open file.
6523         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6524         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6526         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6527         (grub_video_reader_tga): Use grub_buffile_open to open file.
6529         * font/manager.c: Include <grub/bufio.h>.
6530         (add_font): Use grub_buffile_open to open file.
6532 2008-07-31  Robert Millan  <rmh@aybabtu.com>
6534         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6535         ELF segments, use a macro for arbitrarily accessing any of them instead
6536         of preparing a pointer that allows access to one at a time.
6537         (grub_multiboot_load_elf64): Likewise.
6539 2008-07-31  Bean  <bean123ch@gmail.com>
6541         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6542         GRUB_KERNEL_MACHINE_DATA_END.
6544 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6546         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6547         Increase from 0x50 to 0x60.
6548         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6549         use UUIDs to identify the root drive for them.  If that's not
6550         possible, abort.
6551         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6552         check, for cross-disk installs.
6554 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6556         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6557         is non-empty, use it to set the `prefix' environment variable instead
6558         of the usual approach.
6559         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6560         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6561         environment variable instead of dummy make_install_device().
6563         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6564         (start): Insert a data section, with `grub_prefix' variable.
6565         * kern/i386/linuxbios/startup.S: Likewise.
6567         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6568         New variable reference.
6569         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6570         New macro.  Defines offset of `grub_prefix' within startup.S (relative
6571         to `start').
6572         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
6573         section within startup.S (relative to `start').
6574         * include/grub/i386/coreboot/kernel.h: Likewise.
6576         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6577         Overwrite grub_prefix with its contents, at the beginning of the
6578         first segment.
6579         (main): Understand -p|--prefix.
6581 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6583         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6585 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6587         * term/i386/pc/vga_text.c (grub_console_cls): Use
6588         grub_console_gotoxy() to go back to beginning of the screen.
6589         Found by Patrick Georgi <patrick.georgi@coresystems.de>
6591 2008-07-29  Christian Franke  <franke@computer.org>
6593         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6594         Add conversion of emulated mount points on Cygwin.
6596 2008-07-29  Christian Franke  <franke@computer.org>
6598         * util/update-grub.in: Add a check for admin
6599         group on Cygwin.
6600         Remove old `grub.cfg.new' before creation.
6601         Add `-f' to `mv' to handle the different filesystem
6602         semantics of Windows.
6604 2008-07-29  Bean  <bean123ch@gmail.com>
6606         * normal/main.c (get_line): Fix buffer overflow bug.
6608 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6610         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6611         (struct grub_apple_header): New struct.  Describes the layout of
6612         the partmap header.
6613         (apple_partition_map_iterate): Check the header magic as well as the
6614         partition magic (which was already being checked).
6616 2008-07-28  Pavel Roskin  <proski@gnu.org>
6618         * genmk.rb: Add a warning to the beginning of the output that
6619         it's a generated file and should not be edited.
6621 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6623         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6624         with the same number are found, just use issue a warning with
6625         grub_dprintf(), as this error has been reported to be non-fatal.
6627 2008-07-27  Robert Millan  <rmh@aybabtu.com>
6629         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6630         information.
6632 2008-07-27  Bean  <bean123ch@gmail.com>
6634         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6635         (grub_fat_find_dir): Ignore case when comparing filename.
6637 2008-07-27  Bean  <bean123ch@gmail.com>
6639         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6640         smallino, as it's more descriptive, and i8count can be confused with
6641         the other field count.
6642         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6643         inode type.
6645 2008-07-27  Bean  <bean123ch@gmail.com>
6647         * commands/crc.c: New file.
6649         * lib/crc.c: Likewise.
6651         * include/grub/lib/crc.h: Likewise.
6653         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6655         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6656         (hexdump): Move this function to ...
6658         * lib/hexdump.c: ... here.
6660         * include/grub/hexdump.h: Renamed to ...
6662         * include/grub/lib/hexdump.h: ... this.
6664         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6666         * util/grub-editenv.c: Likewise.
6668         * include/envblk.h: Renamed to ...
6670         * include/lib/envblk.h: ... this.
6672         * util/envblk.c: Renamed to ...
6674         * lib/envblk.c: ... this.
6676         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6677         lib/hexdump.c.
6678         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6679         (pkglib_MODULES): Add crc.mod.
6680         (hexdump_mod_SOURCES): Add lib/hexdump.c.
6681         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6682         (crc_mod_SOURCES): New macro.
6683         (crc_mod_CFLAGS): Likewise.
6684         (crc_mod_LDFLAGS): Likewise.
6686         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6688         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6690         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6692         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6694         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6696 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
6698         * commands/help.c: Include <grub/term.h>.
6699         (TERM_WIDTH): Removed.  Updated all users.
6701 2008-07-27  Pavel Roskin  <proski@gnu.org>
6703         * util/getroot.c (find_root_device): Rephrase a comment to avoid
6704         spurious warnings about a comment within a comment.
6706 2008-07-25  Robert Millan  <rmh@aybabtu.com>
6708         * util/getroot.c (find_root_device): Skip devices that match
6709         /dev/dm-[0-9].  This lets the real device be found for any type of
6710         abstraction (LVM, EVMS, RAID..).
6711         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6712         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
6713         device is found first, find_root_device() will now skip it.
6715 2008-07-24  Pavel Roskin  <proski@gnu.org>
6717         * include/grub/types.h: Use __builtin_bswap32() and
6718         __builtin_bswap64() with gcc 4.3 and newer.
6720 2008-07-24  Christian Franke  <franke@computer.org>
6722         * util/i386/pc/grub-install.in: If `--debug' is specified,
6723         pass `--verbose' to grub-setup.
6724         Abort script if make_system_path_relative_to_its_root() fails.
6726 2008-07-24  Bean  <bean123ch@gmail.com>
6728         * configure.ac: Fixed a bug caused by the previous cygwin patch,
6729         variable `target_platform' should be `platform'.
6731 2008-07-24  Bean  <bean123ch@gmail.com>
6733         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6734         (grub_png_init_fixed_block): New function.
6735         (grub_png_decode_image_data): Handle fixed huffman code compression.
6737 2008-07-24  Bean  <bean123ch@gmail.com>
6739         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6740         (grub_pe2elf_SOURCES): New macro.
6741         (CLEANFILES): Add grub-pe2elf.
6743         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6744         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6745         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6746         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6747         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6748         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6749         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6750         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6751         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6752         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6753         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6754         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6755         (GRUB_PE32_DT_FUNCTION): Likewise.
6756         (GRUB_PE32_REL_I386_DIR32): Likewise.
6757         (GRUB_PE32_REL_I386_REL32): Likewise.
6758         (grub_pe32_symbol): New structure.
6759         (grub_pe32_reloc): Likewise.
6761         * util/grub-pe2elf.c: New file.
6763         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6764         start symbol in non pc platform.
6766         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6768         The following patches are from Christian Franke.
6770         * include/grub/dl.h: Remove .previous, gas supports this only
6771         for ELF format.
6773         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6774         Remove .type, gas supports this only for ELF format.
6776         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6777         nullbytes in symbol table. This fixes an infinite loop if table is
6778         zero filled.
6780         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6781         TARGET_IMG_LDFLAGS and EXEEXT.
6783         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6784         TARGET_IMG_LDFLAGS_AC.
6785         (grub_CHECK_STACK_ARG_PROBE): New function.
6787         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6789         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6791         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6792         to set TARGET_IMG_LD* accordingly.
6793         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6794         Add call to grub_CHECK_STACK_ARG_PROBE.
6795         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6797         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6799         * genmk.rb: Add EXEEXT to CLEANFILES.
6801 2008-07-23  Robert Millan  <rmh@aybabtu.com>
6803         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6804         define the codes for arrows and lines used for the menu).
6805         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6806         as well.
6808         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6809         fonts, because the latter are too slow.
6811 2008-07-21  Bean  <bean123ch@gmail.com>
6813         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6814         a20. Run keyboard test last, as it will cause macbook to halt.
6816 2008-07-18  Pavel Roskin  <proski@gnu.org>
6818         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
6819         load foreign architecture modules correctly anyway.  Keep
6820         support for loading host architecture modules, whether we
6821         compile them or not.
6823 2008-07-17  Pavel Roskin  <proski@gnu.org>
6825         * configure.ac: Use -m32 or -m64 regardless of whether we had to
6826         change target_cpu.  The compiler default can mismatch target_cpu
6827         in any case.
6829         * disk/efi/efidisk.c: Fix format warnings on x86_64.
6830         * kern/efi/efi.c: Likewise.
6832         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
6833         target compiler is functional.
6834         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6835         are set up.
6837         * configure.ac: Default to efi platform for x86_64-apple.  Allow
6838         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
6839         adjustments from the rest, only do them if target is not
6840         explicitly given.  Merge other adjustments with the final sanity
6841         check.  Remove an extraneous check for supported CPU.  Be
6842         specific which CPU and which platform is not supported.
6844         * configure.ac: Default to pc platform for x86_64.
6846 2008-07-17  Robert Millan  <rmh@aybabtu.com>
6848         Partial LinuxBIOS -> Coreboot rename.
6850         * conf/i386-linuxbios.rmk: Renamed to ...
6851         * conf/i386-coreboot.rmk: ... this.
6852         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6853         * configure.ac: Accept "coreboot" as input platform (but maintain
6854         compatibility with "linuxbios").
6855         * include/grub/i386/linuxbios: Renamed to ...
6856         * include/grub/i386/coreboot: ... this.
6858 2008-07-17  Bean  <bean123ch@gmail.com>
6860         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6861         (appleldr_mod_SOURCE): New variable.
6862         (appleldr_mod_CFLAGS): Likewise.
6863         (appleldr_mod_LDFLAGS): Likewise.
6864         (pci_mod_SOURCES): Likewise.
6865         (pci_mod_CFLAGS): Likewise.
6866         (pci_mod_LDFLAGS): Likewise.
6867         (lspci_mod_SOURCES): Likewise.
6868         (lspci_mod_CFLAGS): Likewise.
6869         (lspci_mod_LDFLAGS): Likewise.
6871         * conf/x86_64-efi.rmk: New file.
6873         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6874         macro.
6875         (grub_efidisk_write): Likewise.
6877         * include/efi/api.h (efi_call_0): New macro.
6878         (efi_call_1): Likewise.
6879         (efi_call_2): Likewise.
6880         (efi_call_3): Likewise.
6881         (efi_call_4): Likewise.
6882         (efi_call_5): Likewise.
6883         (efi_call_6): Likewise.
6885         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6886         grub_rescue_cmd_chainloader.
6888         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6889         (grub_pe32_optional_header): Change some fields based on i386 or
6890         x86_64 platform.
6891         (GRUB_PE32_PE32_MAGIC): Likewise.
6893         * include/grub/efi/uga_draw.h: New file.
6895         * include/grub/elf.h (STN_ABS): New constant.
6896         (R_X86_64_NONE): Relocation constant for x86_64.
6897         (R_X86_64_64): Likewise.
6898         (R_X86_64_PC32): Likewise.
6899         (R_X86_64_GOT32): Likewise.
6900         (R_X86_64_PLT32): Likewise.
6901         (R_X86_64_COPY): Likewise.
6902         (R_X86_64_GLOB_DAT): Likewise.
6903         (R_X86_64_JUMP_SLOT): Likewise.
6904         (R_X86_64_RELATIVE): Likewise.
6905         (R_X86_64_GOTPCREL): Likewise.
6906         (R_X86_64_32): Likewise.
6907         (R_X86_64_32S): Likewise.
6908         (R_X86_64_16): Likewise.
6909         (R_X86_64_PC16): Likewise.
6910         (R_X86_64_8): Likewise.
6911         (R_X86_64_PC8): Likewise.
6913         * include/grub/i386/efi/pci.h: New file.
6915         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6916         Change it value based on platform.
6917         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6918         (GRUB_E820_RAM): Likewise.
6919         (GRUB_E820_RESERVED): Likewise.
6920         (GRUB_E820_ACPI): Likewise.
6921         (GRUB_E820_NVS): Likewise.
6922         (GRUB_E820_EXEC_CODE): Likewise.
6923         (GRUB_E820_MAX_ENTRY): Likewise.
6924         (grub_e820_mmap): New structure.
6925         (linux_kernel_header): Change the efi field according to different
6926         kernel version, also field from linux_kernel_header.
6928         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6930         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6931         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6932         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6933         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6934         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6935         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6936         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6937         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6938         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6939         (GRUB_PCI_ADDR_IO_MASK): Likewise.
6941         * include/grub/x86_64/efi/kernel.h: New file.
6943         * include/grub/x86_64/efi/loader.h: Likewise.
6945         * include/grub/x86_64/efi/machine.h: Likewise.
6947         * include/grub/x86_64/efi/pci.h: Likewise.
6949         * include/grub/x86_64/efi/time.h: Likewise.
6951         * include/grub/x86_64/linux.h: Likewise.
6953         * include/grub/x86_64/setjmp.h: Likewise.
6955         * include/grub/x86_64/time.h: Likewise.
6957         * include/grub/x86_64/types.h: Likewise.
6959         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6960          GRUB_TARGET_SIZEOF_VOID_P.
6962         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6963         (grub_efi_locate_handle): Likewise.
6964         (grub_efi_open_protocol): Likewise.
6965         (grub_efi_set_text_mode): Likewise.
6966         (grub_efi_stall): Likewise.
6967         (grub_exit): Likewise.
6968         (grub_reboot): Likewise.
6969         (grub_halt): Likewise.
6970         (grub_efi_exit_boot_services): Likewise.
6971         (grub_get_rtc): Likewise.
6973         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6974         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6975         (grub_efi_allocate_pages): Wrap efi calls.
6976         (grub_efi_free_pages): Wrap efi calls.
6977         (grub_efi_get_memory_map): Wrap efi calls.
6979         * kern/x86_64/dl.c: New file.
6981         * kern/x86_64/efi/callwrap.S: Likewise.
6983         * kern/x86_64/efi/startup.S: Likewise.
6985         * loader/efi/appleloader.c: Likewise.
6987         * loader/efi/chainloader.c (cmdline): New variable.
6988         (grub_chainloader_unload): Wrap efi calls.
6989         (grub_chainloader_boot): Likewise.
6990         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6991         command line.
6993         * loader/efi/chainloader_normal.c (chainloader_command):
6994         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6995         command line.
6997         * loader/i386/efi/linux.c (allocate_pages): Change allocation
6998         method.
6999         (grub_e820_add_region): New function.
7000         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
7001         booting.
7002         (grub_find_video_card): New function.
7003         (grub_linux_setup_video): New function.
7004         (grub_rescue_cmd_linux): Probe for video information.
7006         * normal/x86_64/setjmp.S: New file.
7008         * term/efi/console.c (map_char): New function.
7009         (grub_console_putchar): Map unicode char.
7010         (grub_console_checkkey): Wrap efi calls.
7011         (grub_console_getkey): Likewise.
7012         (grub_console_getwh): Likewise.
7013         (grub_console_gotoxy): Likewise.
7014         (grub_console_cls): Likewise.
7015         (grub_console_setcolorstate): Likewise.
7016         (grub_console_setcursor): Likewise.
7018         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
7020 2008-07-16  Pavel Roskin  <proski@gnu.org>
7022         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
7023         format strings.
7025         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
7026         pointer, not an integer.  This fixes a warning and prevents
7027         precision loss on 64-bit systems.
7028         (relocate_addresses): Remove unneeded cast.
7030 2008-07-15  Pavel Roskin  <proski@gnu.org>
7032         * kern/i386/ieee1275/init.c: Include grub/cache.h.
7034         * term/ieee1275/ofconsole.c: Disable code unused on i386.
7036         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
7037         Fix comparison between signed and unsigned.
7039         * include/grub/i386/ieee1275/console.h: Declare
7040         grub_console_init() and grub_console_fini().
7042         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
7043         It's empty and unused.
7045         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
7046         beginning to avoid warnings with some compilers.
7048         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
7049         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
7051 2008-07-14  Pavel Roskin  <proski@gnu.org>
7053         * kern/env.c (grub_register_variable_hook): Don't copy empty
7054         string, it leaks memory.  Pass "" to grub_env_set(), it should
7055         handle constant strings.
7057         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
7058         * commands/cmp.c (grub_cmd_cmp): Likewise.
7059         * kern/dl.c (grub_dl_flush_cache): Likewise.
7060         (grub_dl_load_core): Likewise.
7061         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
7062         (grub_elf64_load_phdrs): Likewise.
7064 2008-07-13  Pavel Roskin  <proski@gnu.org>
7066         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
7067         between signed and unsigned.
7068         (LzmaEnc_Finish): Fix warning about an unused parameter.
7070 2008-07-13  Bean  <bean123ch@gmail.com>
7072         * Makefile.in (enable_lzo): New rule.
7074         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
7076         * configure.ac (ENABLE_LZO): New option --enable-lzo.
7078         * boot/i386/pc/lnxboot.S: #include <config.h>.
7080         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
7081         its value according to the compression algorithm used, lzo or lzma.
7083         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
7084         compression algorithm according to configure macro.
7086         * kern/i386/pc/startup.S (codestart): Likewise.
7088         * kern/i386/pc/lzma_decode.S: New file.
7090         * include/grub/lib/LzFind.h: Likewise.
7092         * include/grub/lib/LzHash.h: Likewise.
7094         * include/grub/lib/LzmaDec.h: Likewise.
7096         * include/grub/lib/LzmaEnc.h: Likewise.
7098         * include/grub/lib/LzmaTypes.h: Likewise.
7100         * lib/LzFind.c: Likewise.
7102         * lib/LzmaDec.c: Likewise.
7104         * lib/LzmaEnc.c: Likewise.
7106 2008-07-13  Bean  <bean123ch@gmail.com>
7108         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
7109         (grub_ext4_extent_header): New structure.
7110         (grub_ext4_extent): Likewise.
7111         (grub_ext4_extent_idx): Likewise.
7112         (grub_ext4_find_leaf): New function.
7113         (grub_ext2_read_block): Handle extents.
7115 2008-07-12  Robert Millan  <rmh@aybabtu.com>
7117         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
7119 2008-07-11  Robert Millan  <rmh@aybabtu.com>
7121         * util/grub.d/40_custom.in: New file. Example on how to add custom
7122         entries to /etc/grub.d.
7123         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
7124         40_custom (implicitly, by merging all the grub.d rules).
7126 2008-07-11  Pavel Roskin  <proski@gnu.org>
7128         * commands/read.c (grub_getline): Fix invalid memory access.
7129         Don't add newline to the variable value.
7131         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
7132         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
7133         (serial_hw_get_port): Check validity of the port number.
7134         (grub_cmd_serial): Check return value of serial_hw_get_port().
7136 2008-07-07  Pavel Roskin  <proski@gnu.org>
7138         * boot/i386/pc/diskboot.S (notification_string): Replace
7139         "Loading kernel" with just "loading".  This is shorter, less
7140         confusing and saves a few bytes for possible future changes.
7142 2008-07-05  Pavel Roskin  <proski@gnu.org>
7144         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
7145         size for ATAPI devices, they are undefined.  Output sector
7146         number in decimal form.
7148         * disk/ata.c: Use named constants for status bits.
7150 2008-07-04  Pavel Roskin  <proski@gnu.org>
7152         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
7153         grub_addr_t before casting it to the void pointer to fix a
7154         warning.  Non-addressable regions are discarded earlier.
7155         (grub_arch_modules_addr): Cast _end to grub_addr_t.
7156         * kern/i386/linuxbios/table.c: Include grub/misc.h.
7157         (check_signature): Don't shadow table_header.
7158         (grub_linuxbios_table_iterate): Cast numeric constants to
7159         grub_linuxbios_table_header_t.
7160         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
7161         grub_stop().
7163         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
7164         prevent warnings.
7166         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
7167         pointer, which can cause warnings.  Support 64-bit addresses.
7169         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
7170         of sizeof(long).  This fixes PowerPC image generation on x86_64.
7172 2008-07-04  Robert Millan  <rmh@aybabtu.com>
7174         This fixes a performance issue when pc & gpt partmap iterators
7175         didn't abort iteration even after our hook found what it was
7176         looking for (often causing expensive probes of non-existent drives).
7178         Some callers relied on previous buggy behaviour, since they would
7179         raise an error when their own hooks caused early abortion of its
7180         iteration.
7182         * kern/device.c (grub_device_open): Improve error message.
7183         * disk/lvm.c (grub_lvm_open): Likewise.
7184         * disk/raid.c (grub_raid_open): Likewise.
7186         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7187         when hook requests it, independently of grub_errno.
7188         (pc_partition_map_probe): Do not fail when find_func() caused
7189         early abortion of pc_partition_map_iterate().
7191         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7192         when hook requests it, independently of grub_errno.
7193         (gpt_partition_map_probe): Do not fail when find_func() caused
7194         early abortion of gpt_partition_map_iterate().
7196         * kern/partition.c (grub_partition_iterate): Abort parent iteration
7197         when hook requests it, independently of grub_errno.  Do not fail when
7198         part_map_iterate_hook() caused early abortion of p->iterate().
7200         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7201         when grub_partition_iterate() returned with non-zero.
7203 2008-07-03  Pavel Roskin  <proski@gnu.org>
7205         * disk/ata.c (grub_ata_pio_write): Check status before writing,
7206         like we do in grub_ata_pio_read().
7207         (grub_ata_readwrite): Always write individual sectors.  Fix the
7208         sector count for the remainder.
7209         (grub_ata_write): Enable writing to ATA devices.  Correctly
7210         report error for ATAPI devices.
7212 2008-07-02  Pavel Roskin  <proski@gnu.org>
7214         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7215         warning.
7217         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7218         for every read sector, we already increment it for the whole
7219         batch.  This fixes reading more than 256 sectors at once.
7221         * util/grub-editenv.c (cmd_info): Cast argument to long
7222         explicitly.  ptrdiff_t reduces to int on i386.
7224         * util/grub-editenv.c (main): Be specific which parameter is
7225         missing.
7227         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7228         (memdisk): Make memdisk_orig_addr a pointer.
7230         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7231         for file offsets, use grub_off_t instead.  Fix printf format
7232         warnings.
7234         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7235         there.  Real unexpected warnings should not drown in the noise
7236         about known problems.
7238         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7239         grub_disk_addr_t for memory addresses.
7241         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7242         explicitly to fix a warning.
7244         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7246         * Makefile.in (MODULE_LDFLAGS): New variable.
7247         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
7248         the linker accepts --build-id=none.
7249         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
7250         MODULE_LDFLAGS.
7251         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7253         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7254         those in Linux XFS code.  Provide a way to access 64-bit parent
7255         inode.
7256         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
7257         the end of struct grub_xfs_dir_header.
7259 2008-07-02  Bean  <bean123ch@gmail.com>
7261         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7262         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7263         and GRUB_IEEE1275_FLAG_NO_ANSI.
7265         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7266         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7267         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7269         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7270         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7272         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7273         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7275         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7276         esc sequence on non ANSI terminal.
7277         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7279         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7280         beginning of file.
7282 2008-07-02  Bean  <bean123ch@gmail.com>
7284         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7285         (grub_editenv_SOURCES): New variable.
7286         (pkglib_MODULES): Add loadenv.mod.
7287         (loadenv_mod_SOURCES): New variable.
7288         (loadenv_mod_CFLAGS): Likewise.
7289         (loadenv_mod_LDFLAGS): Likewise.
7291         * include/grub/envblk.h: New file.
7293         * util/envblk.c: New file.
7295         * util/grub-editenv.c: New file.
7297         * commands/loadenv.c: New file.
7299 2008-07-01  Pavel Roskin  <proski@gnu.org>
7301         * include/multiboot2.h (struct multiboot_tag_module): Use char,
7302         not unsigned char.  This fixes warnings and is consistent with
7303         other tags.
7305         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7307         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7309         * term/tparm.c (analyze): Always set *popcount.
7311         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7312         cast to fix a warning.
7314         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7315         cast to suppress a warning.
7317         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7318         grub_fshelp_read_file() expects.
7320         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
7321         write uuid as a 32-bit value in CPU byte order, so declare and
7322         use it as such.
7324         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7325         long if the format specifier expects it.
7326         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7327         * partmap/pc.c (pc_partition_map_iterate): Likewise.
7328         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7329         long to fix a warning.
7330         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7331         grub_dprintf() arguments to fix warnings.
7333 2008-06-30  Pavel Roskin  <proski@gnu.org>
7335         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7336         install_bsd_part immediately before core.img is embedded or
7337         modified on disk.  This fixes core.img verification if core.img
7338         cannot be embedded.
7340         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7341         core_path to calculate the blocklist.
7342         Patch from Javier Martín <lordhabbit@gmail.com>
7344 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7346         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
7347         block to disk block.
7348         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7349         Patch from Niels Böhm <bitbucket@arcor.de>
7351 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7353         * util/update-grub_lib.in (font_path): Search for fonts in
7354         /boot/grub first, which is more likely to be readable (we aren't
7355         deciding where fonts live, just looking for them).
7357 2008-06-26  Pavel Roskin  <proski@gnu.org>
7359         * util/biosdisk.c (read_device_map): Don't leave dead map
7360         entries for devices failing stat() check.
7362         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7363         core_path_dev for the core.img path on the target device.
7365 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7367         * disk/fs_uuid.c: New file.
7368         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7369         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7370         (fs_uuid_mod_LDFLAGS): New variables.
7371         * include/grub/disk.h (grub_disk_dev_id): Add
7372         `GRUB_DISK_DEVICE_UUID_ID'.
7373         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7374         implement iterate().
7376 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7378         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7379         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7380         Linux image includes no initrd.
7382 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
7384         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7385         call to resolve the core image location that effectively appended the
7386         name twice.
7388 2008-06-21  Robert Millan  <rmh@aybabtu.com>
7390         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7391         call from here ...
7393         * util/grub.d/10_hurd.in: ... to here ...
7394         * util/grub.d/10_linux.in: ... and here.
7396 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7398         * kern/main.c (grub_main): Export `prefix' variable immediately
7399         after it has been set by grub_machine_set_prefix().
7401 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7403         * commands/search.c (search_label, search_fs_uuid, search_file): Print
7404         search result when not saving to variable, not the other way around.
7405         When saving to variable, abort iteration as soon as a match is found.
7407 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7409         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7410         check for partition that provides /boot/grub.  Its logic is flawed,
7411         as it prevents prepare_grub_to_access_device() from being called
7412         multiple times.
7414 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7416         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7417         "insmod" command directly when abstraction modules are needed,
7418         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7419         since it had already been processed).
7421 2008-06-19  Pavel Roskin  <proski@gnu.org>
7423         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7424         changed.  This is needed in case GRUB_LIBDIR changes.
7425         * conf/i386-ieee1275.rmk: Likewise.
7426         * conf/i386-linuxbios.rmk: Likewise.
7427         * conf/i386-pc.rmk: Likewise.
7428         * conf/powerpc-ieee1275.rmk: Likewise.
7430 2008-06-18  Pavel Roskin  <proski@gnu.org>
7432         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7433         kernel_elf_symlist.c to symlist.c for consistency with other
7434         architectures.  Update all users.
7435         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7437 2008-06-18  Robert Millan  <rmh@aybabtu.com>
7439         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7440         it in prefix.
7442         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
7443         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
7444         a RAID device, run setup() for all members independently on whether
7445         LVM abstraction is being used.
7446         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7447         If grub-mkimage has set `*install_dos_part == -2', don't override this
7448         value.
7449         Perform *install_dos_part adjustments independently on whether
7450         we're embedding or not.
7451         Clarify error message when image is too big for embedding.
7452         Remove duplicate *install_dos_part stanza.
7454 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7456         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7457         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7458         variables.
7459         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7460         values in grub_ofconsole_normal_color and
7461         grub_ofconsole_highlight_color (they're not directly related to
7462         background and foreground).
7463         (grub_ofconsole_setcolorstate): Extract background and foreground
7464         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7466 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7468         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7469         /boot/grub for the check in last commit, not /boot (they could be
7470         different partitions).
7472 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7474         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7475         asked to setup access for the same partition that provides /boot,
7476         don't bother using UUIDs since our root already has the value we
7477         want.
7479 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7481         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7482         I2O devices.
7483         Patch from Sven Mueller <sven@debian.org>.
7485 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7487         * util/update-grub.in: Check for $EUID instead of $UID.
7488         Reported by Vincent Zweije.
7490 2008-06-16  Bean  <bean123ch@gmail.com>
7492         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
7493         (grub_ext2_read_block): Likewise.
7494         (grub_ext2_read_inode): Likewise.
7495         (grub_ext2_mount): Likewise.
7496         (grub_ext2_close): Likewise.
7497         (grub_ext3_get_journal): Removed.
7499         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
7500         (grub_reiserfs_read_symlink): Likewise.
7501         (grub_reiserfs_mount): Likewise.
7502         (grub_reiserfs_open): Likewise.
7503         (grub_reiserfs_read): Likewise.
7504         (grub_reiserfs_close): Likewise.
7505         (grub_reiserfs_get_journal): Removed.
7507         * fs/fshelp.c (grub_fshelp_read): Removed.
7508         (grub_fshelp_map_block): Likewise.
7510         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7511         (grub_fshelp_journal): Likewise.
7512         (grub_fshelp_read): Likewise.
7513         (grub_fshelp_map_block): Likewise.
7515 2008-06-16  Pavel Roskin  <proski@gnu.org>
7517         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7518         floating point anymore.
7519         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7521 2008-06-15  Pavel Roskin  <proski@gnu.org>
7523         * commands/ls.c (grub_ls_list_files): Use integer calculations
7524         for human readable format, avoid floating point use.
7525         * kern/misc.c (grub_ftoa): Remove.
7526         (grub_vsprintf): Remove floating point support.
7528 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7530         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7531         devices.
7532         Reported by Max Vozeler.
7534 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7536         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7537         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7538         skipped later.
7539         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7540         the beginning of the prefix.
7542         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7543         It is assumed that if we have a memdisk, grub-mkimage has set
7544         grub_prefix to include the "(memdisk)" drive in it.
7546 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7548         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7549         Initialize keyboard controller after registering the terminal, so that
7550         grub_printf() can be called from grub_keyboard_controller_init().
7552 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7554         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7555         extent-btree which is written as big endian on disk.
7556         Reported by Alain Greppin  <al@chilibi.org>.
7558 2008-06-14  Robert Millan  <rmh@aybabtu.com>
7560         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7561         * util/i386/pc/grub-install.in (modules): Likewise.
7563 2008-06-13  Pavel Roskin  <proski@gnu.org>
7565         * commands/ls.c (grub_ls_list_files): Fix format warnings.
7567 2008-06-13  Bean  <bean123ch@gmail.com>
7569         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7571         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7573         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7574         to indicate sparse block.
7576 2008-06-12  Pavel Roskin  <proski@gnu.org>
7578         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7579         number, grub_fshelp_read() does it for us.
7581         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
7582         linear disk read with journal translation.
7583         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7584         * include/grub/fshelp.h: Declare grub_fshelp_read().
7586 2008-06-09  Pavel Roskin  <proski@gnu.org>
7588         * fs/minix.c (grub_minix_mount): Handle error reading
7589         superblock.
7591 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7593         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7594         don't append the RAID prefix afterwards.
7595         Reported by Clint Adams.
7597 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7599         Based on description from Pavel:
7600         * kern/disk.c (grub_disk_check_range): Rename to ...
7601         (grub_disk_adjust_range): ... this.  Add a comment explaining the
7602         tasks performed by this function.
7604 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7606         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7607         `num_serial' (for consistency with other variables).
7608         (struct grub_ntfs_data): Add `uuid' member.
7609         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7610         (grub_ntfs_uuid): New function.
7611         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7613 2008-06-07  Pavel Roskin  <proski@gnu.org>
7615         * util/biosdisk.c (open_device): Revert last change to the
7616         function, it broke installation.  The sector needs to be
7617         different dependent on which device is opened.
7619 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7621         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7622         rest of GRUB, and breakage doesn't happen if its value were modified.
7624         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7625         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7626         a constant (same value).
7627         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7628         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7630 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7632         * util/biosdisk.c (open_device): Do not modify sector offset when
7633         accessing a partition.  kern/disk.c already handles this for us.
7635 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7637         * util/grub-emu.c (grub_machine_init): Move code in this function from
7638         here ...
7639         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7640         segfault in case grub_printf() is called).
7642         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7643         grub_probe.  Update all users not to explicitly add it again.
7644         (grub_device): New variable; contains corresponding device for grubdir.
7645         (fs_module, partmap_module, devabstraction_module): Pass
7646         `--device ${grub_device}' to grub_probe to avoid traversing /dev
7647         every time.
7649 2008-06-05  Robert Millan  <rmh@aybabtu.com>
7651         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7652         is found, print it (same layout as with labels).
7654 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7656         * util/biosdisk.c (get_drive): Rename to ...
7657         (find_grub_drive): ... this.  Update all users.
7659         (get_os_disk): Rename to ...
7660         (convert_system_partition_to_system_disk): ... this.  Update all users.
7662         (find_drive): Rename to ...
7663         (find_system_device): ... this.  Update all users.
7665 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7667         * util/biosdisk.c (get_os_disk): Handle IDA devices.
7668         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7669         (make_device_map): Likewise.
7671 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7673         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7674         before dereferencing it.
7676         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7677         union with fat12/fat16-specific ones.  Add some new fields, including
7678         `num_serial' for both versions.
7679         (struct grub_fat_data): Add `uuid' member.
7680         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7681         names.  Initialize `data->uuid' using `num_serial'.
7682         (grub_fat_uuid): New function.
7683         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7685         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7686         (grub_reiserfs_uuid): New function.
7687         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7688         member.
7690         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7691         (grub_xfs_uuid): New function.
7692         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7694 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7696         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7697         code that is backward compatible with pre-uuid search command.
7699 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7701         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7702         floppies after everything else, to ensure floppy drive isn't accessed
7703         unnecessarily (patch from Bean).
7705 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7707         * commands/search.c (search_label, search_fs_uuid, search_file): Do
7708         not print device names when we were asked to set a variable.
7710 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7712         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7713         using "cursor-on" and "cursor-off" commands (understood at least by
7714         the Open Firmware flavour on OLPC).
7716 2008-05-31  Michael Gorven  <michael@gorven.za.net>
7718         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7719         on and off sequences.
7721 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7723         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7724         * util/update-grub.in: Likewise.
7726 2008-05-30  Pavel Roskin  <proski@gnu.org>
7728         * util/biosdisk.c (linux_find_partition): Simplify logic and
7729         make the code more universal.  Keep special processing for
7730         devfs, but use a simple rule for all other devices.  If the
7731         device ends with a number, append 'p' and the partition number.
7732         Otherwise, append only the partition number.
7734 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7736         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7737         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7738         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7739         the `root' parameter to Linux.
7741 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7743         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7744         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7745         --fs_uuid with --fs-uuid.
7746         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7747         all filesystems support them).
7749 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7751         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7752         grub_printf() flags, since we're printing in units of 2 bytes.
7754 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7756         * util/grub.d/00_header.in: Remove obsolete comment referencing
7757         convert_system_path_to_grub_path().
7758         * util/update-grub.in: Likewise.
7759         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7760         (convert_system_path_to_grub_path): Add a warning message explaining
7761         that this function is deprecated.  Rely on is_path_readable_by_grub()
7762         for the readability checks.
7763         (font_path): Use is_path_readable_by_grub() for the readability
7764         check rather than convert_system_path_to_grub_path().
7766 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7768         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7769         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7770         converting it first.
7771         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7772         grub.cfg for access to font file, and afterwards call it again to set
7773         the root device.
7775 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7777         * commands/search.c (options): Add --fs_uuid option.
7778         (search_fs_uuid): New function.
7779         (grub_cmd_search): Fix --set argument passing.
7780         Use search_fs_uuid() when requested via --fs_uuid.
7781         (grub_search_init): Update help message.
7782         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7783         and redeclare it as an array of 16-bit words.
7784         (grub_ext2_uuid): New function.
7785         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7786         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7787         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7788         (GRUB_DEVICE_BOOT_UUID): New variables.
7789         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7790         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7791         whenever possible.
7792         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
7793         just assume `root' variable has the right value.
7794         * util/grub.d/10_linux.in: Likewise.
7795         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7796         via PRINT_FS_UUID.
7797         (main): Recognise `-t fs_uuid' argument.
7799 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7801         * util/biosdisk.c (map): Redefine structure to hold information
7802         about GRUB drive name.
7803         (get_drive): Reimplement without assuming (and verifying) BIOS-like
7804         drive names.
7805         (call_hook): Remove.
7806         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7807         member.  Assume drive has partitions.
7808         (grub_util_biosdisk_open): Access device names via `.device' struct
7809         member.
7810         (open_device): Likewise.
7811         (find_drive): Likewise.
7812         (read_device_map): Adjust map[] usage to match the new struct
7813         definition.  Don't check for duplicates (still possible, but not cheap
7814         anymore).
7815         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7816         (make_device_name): Remove assumption of BIOS-like drive names.
7818 2008-05-30  Pavel Roskin  <proski@gnu.org>
7820         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7821         compiling execute.c doesn't need grub_script.tab.h anymore.
7822         (normal/command.c_DEPENDENCIES): Likewise.
7823         (normal/function.c_DEPENDENCIES): Likewise.
7824         * conf/i386-ieee1275.rmk: Likewise.
7825         * conf/i386-linuxbios.rmk: Likewise.
7826         * conf/i386-pc.rmk: Likewise.
7827         * conf/powerpc-ieee1275.rmk: Likewise.
7828         * conf/sparc64-ieee1275.rmk: Likewise.
7830 2008-05-29  Pavel Roskin  <proski@gnu.org>
7832         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7833         when scanning metadata for volume group name.
7835         * include/grub/script.h: Don't include grub_script.tab.h.  It's
7836         a generated file, which may only be included from the files with
7837         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
7838         use union YYSTYPE, as the later allows forward declaration.
7839         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7841 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7843         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7844         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7845         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7846         (grub_console_checkkey): Add grub_dprintf() call to report unknown
7847         scan codes.
7849 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7851         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7852         control key combinations.
7854 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7856         * util/powerpc/ieee1275/grub-install.in: Move from here ...
7857         * util/ieee1275/grub-install.in: ... to here.
7858         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7859         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7860         (grub_install_SOURCES): Likewise.
7862 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7864         * fs/affs.c: Update copyright year.
7865         * fs/ext2.c: Likewise.
7866         * fs/fshelp.c: Likewise.
7867         * fs/hfsplus.c: Likewise.
7868         * fs/ntfs.c: Likewise.
7869         * fs/xfs.c: Likewise.
7870         * include/grub/fshelp.h: Likewise.
7871         * util/grub-mkdevicemap.c: Likewise.
7873 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7875         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7876         might need to be fatfs to support some firmware implementations
7877         (e.g. OFW or EFI).
7879 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7881         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7882         devices.
7883         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7884         (make_device_map): Likewise.
7886 2008-05-20  Bean  <bean123ch@gmail.com>
7888         * fs/fshelp.c (grub_fshelp_map_block): New function.
7889         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7890         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7892         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7893         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7894         (grub_fshelp_journal): New structure.
7895         (grub_fshelp_map_block): New function prototype.
7896         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7897         (grub_fshelp_map_block): Likewise.
7899         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7900         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7901         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7902         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7903         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7904         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7905         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7906         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7907         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7908         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7909         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7910         (grub_ext2_sblock): New members for journal support.
7911         (grub_ext3_journal_header): New structure.
7912         (grub_ext3_journal_revoke_header): Likewise.
7913         (grub_ext3_journal_block_tag): Likewise.
7914         (grub_ext3_journal_sblock): Likewise.
7915         (grub_fshelp_node): New members logfile and journal.
7916         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7917         grub_fshelp_map_block to get real block number.
7918         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7919         number.
7920         (grub_ext2_read_inode): Likewise.
7921         (grub_ext3_get_journal): New function.
7922         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7923         (grub_ext2_close): Release memory used by journal.
7925         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7926         (REISERFS_MAGIC_DESC_BLOCK): New macro.
7927         (grub_reiserfs_transaction_header): Renamed to
7928         grub_reiserfs_description_block, replace field data with real_blocks.
7929         (grub_reiserfs_commit_block): New structure.
7930         (grub_reiserfs_data): New member journal.
7931         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7932         number.
7933         (grub_reiserfs_read_symlink): Likewise.
7934         (grub_reiserfs_iterate_dir): Likewise.
7935         (grub_reiserfs_open): Likewise.
7936         (grub_reiserfs_read): Likewise.
7937         (grub_reiserfs_get_journal): New function.
7938         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7939         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7940         using grub_reiserfs_get_journal.
7941         (grub_reiserfs_close): Release memory used by journal.
7943         * fs/affs.c (grub_affs_read_block): Change block type to
7944         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7946         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7948         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7950         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7952         * fs/udf.c (grub_udf_read_block): Change block type to
7953         grub_disk_addr_t. Use type cast to avoid warning.
7955         * fs/xfs.c (grub_xfs_read_block): Likewise.
7957 2008-05-16  Christian Franke  <franke@computer.org>
7959         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7960         to ensure that break with ESC will always work.
7961         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7962         Remove ESC from keyboard queue.
7964 2008-05-16  Christian Franke  <franke@computer.org>
7966         * util/biosdisk.c: [__CYGWIN__] Add includes.
7967         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7968         (get_os_disk): Move variable declarations to OS specific
7969         parts to avoid warning.
7970         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7971         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7972         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7973         Cygwin.
7974         * util/getroot.c: [__CYGWIN__] Add includes.
7975         (strip_extra_slashes): Fix "/" case.
7976         [__CYGWIN__] (get_win32_path): New function.
7977         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7978         [__CYGWIN__] (find_root_device): Disable.
7979         [__CYGWIN__] (get_bootsec_serial): New function.
7980         [__CYGWIN__] (find_cygwin_root_device): Likewise.
7981         [__linux__] (grub_guess_root_device): Add early returns to simplify
7982         structure.
7983         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7984         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7985         check for Linux only.
7987 2008-05-15  Bean  <bean123ch@gmail.com>
7989         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7990         keyboard hang problem in apple's intel mac.
7992 2008-05-09  Robert Millan  <rmh@aybabtu.com>
7994         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7995         devices.
7996         * util/grub-mkdevicemap.c (get_virtio_disk_name)
7997         (make_device_map): Likewise.
7998         Reported by Aurelien Jarno <aurel32@debian.org>
8000 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
8002         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
8003         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
8004         (make_device_map): Output entries for xvd type disks.
8006 2008-05-07  Robert Millan  <rmh@aybabtu.com>
8008         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
8009         devices.
8010         * util/grub-mkdevicemap.c (get_cciss_disk_name)
8011         (make_device_map): Likewise.
8012         Reported by Roland Dreier <rdreier@cisco.com>
8014 2008-05-07  Robert Millan  <rmh@aybabtu.com>
8016         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
8017         grub_strstr() call.  Correct a few mistakes in failure path handling.
8019 2008-05-06  Robert Millan  <rmh@aybabtu.com>
8021         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8022         Do not print a trailing slash (therefore, the root directory is an
8023         empty string).
8024         (convert_system_path_to_grub_path): Do not remove trailing slash
8025         from make_system_path_relative_to_its_root() output.
8027         * util/i386/pc/grub-install.in: Add trailing slash to output from
8028         make_system_path_relative_to_its_root().
8030 2008-05-06  Robert Millan  <rmh@aybabtu.com>
8032         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
8033         ensures that output lines aren't intermangled with those sent to
8034         stderr (via grub_util_info()).
8035         * util/grub-probe.c (grub_refresh): Likewise.
8036         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
8038 2008-05-05  Christian Franke  <franke@computer.org>
8040         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
8041         Add Cygwin device names.
8042         (get_ide_disk_name) [__CYGWIN__]: Likewise.
8043         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
8044         (check_device): Return error instead of success on empty name.
8045         (make_device_map): Move label inside linux specific code to
8046         prevent compiler warning.
8048 2008-04-30  Robert Millan  <rmh@aybabtu.com>
8050         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
8051         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
8052         first boot option.
8053         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
8055 2008-04-29  Robert Millan  <rmh@aybabtu.com>
8057         * docs/grub.cfg: New file (example GRUB configuration).
8059 2008-04-26  Robert Millan  <rmh@aybabtu.com>
8061         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
8062         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
8063         and `disk/ieee1275/nand.c'.
8065 2008-04-25  Bean  <bean123ch@gmail.com>
8067         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
8068         i386-linuxbios.
8070         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
8071         change the buffer size to 4096 for cdrom device.
8073         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
8074         and nand.mod.
8075         (_linux_mod_SOURCES): New variable.
8076         (_linux_mod_CFLAGS): Likewise.
8077         (_linux_mod_LDFLAGS): Likewise.
8078         (linux_mod_SOURCES): Likewise.
8079         (linux_mod_CFLAGS): Likewise.
8080         (linux_mod_LDFLAGS): Likewise.
8081         (nand_mod_SOURCES): Likewise.
8082         (nand_mod_CFLAGS): Likewise.
8083         (nand_mod_LDFLAGS): Likewise.
8085         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
8086         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
8087         type property. (nand device in olpc don't have this property)
8089         * include/grub/disk.h (grub_disk_dev_id): New macro
8090         GRUB_DISK_DEVICE_NAND_ID.
8092         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
8093         function prototype.
8094         (grub_rescue_cmd_initrd): Likewise.
8096         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
8097         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
8098         ofw_cif_handler and ofw_idt, adjust padding number.
8100         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
8101         GRUB_MACHINE_IEEE1275 is defined.
8103         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
8104         Use NESTED_FUNC_ATTR attribute on the hook parameter.
8106         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
8107         on nested function heap_init.
8108         (grub_upper_mem): New variable for i386-ieee1275.
8109         (grub_get_extended_memory): New function for i386-ieee1275.
8110         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
8112         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
8113         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
8114         property.
8116         * loader/i386/ieee1275/linux.c: New file.
8118         * loader/i386/ieee1275/linux_normal.c: New file.
8120         * disk/ieee1275/nand.c: New file.
8122 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
8124         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
8125         value.
8126         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
8128 2008-04-18  Robert Millan  <rmh@aybabtu.com>
8130         Restructures early code path on ieee1275 to unify grub_main() as
8131         the first C function that is executed in every platform.
8133         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
8134         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
8135         cmain().
8136         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
8137         * kern/ieee1275/cmain.c (cmain): Rename to ...
8138         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
8139         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
8140         at the beginning.
8142 2008-04-18  Robert Millan  <rmh@aybabtu.com>
8144         * util/update-grub.in: Fix syntax error when setting
8145         `GRUB_PRELOAD_MODULES'.
8146         Reported by Stephane Chazelas <stephane@artesyncp.com>
8148 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
8150         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
8151         section into account, newer toolchains generate unique build ids
8152         * configure.ac: remove the test for --build-id=none acceptance,
8153         we want build ids to be preserved
8154         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
8155         far from other sections don't cause the raw binary images grow
8156         size
8158 2008-04-15  Robert Millan  <rmh@aybabtu.com>
8160         * disk/lvm.c: Update copyright year.
8161         * kern/misc.c: Likewise.
8163 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
8165         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
8166         there is no memory left for physical volume name.
8168 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
8170         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
8171         volume name mapping to support bigger than 9 character names properly.
8173 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8175         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
8176         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8178 2008-04-13  Christian Franke  <franke@computer.org>
8180         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8181         to create a floppy emulation boot CD when non emulation mode
8182         does not work.
8183         Enable Joliet CD filesystem extension.
8185 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8187         * kern/misc.c (grub_strncat): Fix off-by-one error.
8188         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8190         * kern/env.c (grub_env_context_close): Clear current context, not
8191         previous one.
8192         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8194         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8196 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8198         Improve robustness when handling LVM.
8200         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
8201         (and leave `*p' unmodified).
8202         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8203         through it.
8204         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8205         iterating through it.
8206         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8207         through it.
8208         (grub_lvm_scan_device): Check the return value (and fail gracefully
8209         when due) on each grub_lvm_getvalue() or grub_strstr() call.
8210         Don't assume `vg->pvs != NULL' when iterating through it.
8212 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8214         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8215         * genmk.rb (partmap): New variable.
8216         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8217         (#{partmap}): New target rule.
8218         * genpartmaplist.sh: New file.
8219         * Makefile.in (pkglib_DATA): Add partmap.lst.
8220         (partmap.lst): New target rule.
8221         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8222         modules (including all partition maps), instead of preloading them.
8224 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
8226         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8227         `linux-boot-prober' (if installed) to detect other operating
8228         systems which are installed on the computer and add them to
8229         the boot menu.
8230         * conf/common.rmk: Build and install 30_os-prober.
8232 2008-04-12  Robert Millan  <rmh@aybabtu.com>
8234         * kern/powerpc/ieee1275/init.c: Move from here ...
8235         * kern/ieee1275/init.c: ... to here.  Update all users.
8237         * kern/powerpc/ieee1275/cmain.c: Move from here ...
8238         * kern/ieee1275/cmain.c: ... to here.  Update all users.
8240         * kern/powerpc/ieee1275/openfw.c: Move from here ...
8241         * kern/ieee1275/openfw.c: ... to here.  Update all users.
8243         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8244         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
8246 2008-04-10  Pavel Roskin  <proski@gnu.org>
8248         * configure.ac: Always use "_cv_" in cache variables for
8249         compatibility with Autoconf 2.62.
8251 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8253         Revert grub/machine/init.h addition by Pavel (since it breaks on
8254         i386-ieee1275 and others):
8255         * util/i386/pc/misc.c: Remove grub/machine/init.h.
8256         * util/powerpc/ieee1275/misc.c: Likewise.
8258 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8260         * util/grub-probe.c (probe): Improve error message.
8262 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8264         * util/biosdisk.c (read_device_map): Skip devices that don't exist
8265         (this prevents the presence of a bogus entry from ruining the whole
8266         thing).
8268 2008-04-06  Pavel Roskin  <proski@gnu.org>
8270         * util/biosdisk.c: Include grub/util/biosdisk.h.
8271         * util/grub-fstest.c (execute_command): Make static.
8272         * util/grub-mkdevicemap.c (check_device): Likewise.
8273         * util/i386/pc/misc.c: Include grub/machine/init.h.
8274         * util/powerpc/ieee1275/misc.c: Likewise.
8275         * util/lvm.c: Include grub/util/lvm.h.
8276         * util/misc.c: Include grub/kernel.h, grub/misc.h and
8277         grub/cache.h.
8278         * util/raid.c: Include grub/util/raid.h.
8279         (grub_util_getdiskname): Make static.
8281         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8282         grub_hostfs_fini(), as they are called from grub_init_all() and
8283         grub_fini_all() respectively.  This fixes an infinite loop in
8284         grub-fstest due to double registration of hostfs.
8285         Reported by Christian Franke <Christian.Franke@t-online.de>
8287 2008-04-05  Pavel Roskin  <proski@gnu.org>
8289         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8290         all 8 functions.  Otherwise, probe function 0 only.
8292 2008-04-04  Pavel Roskin  <proski@gnu.org>
8294         * commands/lspci.c (grub_lspci_iter): Print the bus number
8295         correctly.
8297         * commands/lspci.c (grub_pci_classes): Fix typos.
8298         (grub_lspci_iter): Don't print func twice.  Print vendor ID
8299         before device ID, as it's normally done.
8301         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8302         Fix signedness warnings.
8303         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8304         Likewise.
8305         * util/ieee1275/get_disk_name.c: Include config.h so that
8306         _GNU_SOURCE is defined and getline() is declared.  Mark an
8307         unused argument as such.  Fix a signedness warning.
8309 2008-04-02  Pavel Roskin  <proski@gnu.org>
8311         * genkernsyms.sh.in: Use more robust assignments for CC and
8312         srcdir.  Quote srcdir.
8313         * gensymlist.sh.in: Likewise.  Assert at the compile time that
8314         the symbol table is not empty.
8316         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8317         * fs/cpio.c (grub_cpio_read): Likewise.
8319 2008-04-01  Pavel Roskin  <proski@gnu.org>
8321         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8322         * disk/host.c (grub_host_open): Likewise.
8323         * disk/loopback.c (grub_loopback_open): Likewise.
8324         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8325         disk->id as in disk/host.c, not a multi-character constant.
8327         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
8328         later is obsolete, potentially dangerous and sets a bad example.
8329         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8330         * util/misc.c (grub_util_get_image_size): Likewise.
8332         * disk/loopback.c (options): Improve help for "--partitions".
8334         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8335         options to align them with the short options, e.g. "echo -e".
8337 2008-03-31  Bean  <bean123ch@gmail.com>
8339         * video/reader/png.c (grub_png_data): New member is_16bit and
8340         image_data.
8341         (grub_png_decode_image_header): Detect 16 bit png image.
8342         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8343         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8344         (grub_video_reader_png): Release memory occupied by image_data.
8346         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8347         4096 bytes.
8348         (grub_nfs_mount): Skip the test for sector per cluster.
8350         * include/grub/ntfs.h (MAX_SPC): Removed.
8352 2008-03-31  Bean  <bean123ch@gmail.com>
8354         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8355         (grub_probe_SOURCES): Add fs/afs.c.
8356         (grub_fstest_SOURCES): Likewise.
8357         (afs_mod_SOURCES): New variable.
8358         (afs_mod_CFLAGS): Likewise.
8359         (afs_mod_LDFLAGS): Likewise.
8361         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8362         (grub_emu_SOURCES): Likewise.
8364         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8366         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8368         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8370         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8372         * fs/afs.c: New file.
8374 2008-03-30  Pavel Roskin  <proski@gnu.org>
8376         * disk/host.c: Include grub/misc.h to fix a warning.
8377         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8378         warnings about implicit declarations.
8380         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8381         variable.
8382         * include/grub/i386/loader.h: Change declaration of
8383         grub_linux_boot() to match what grub_loader_set() expects.
8384         * util/getroot.c (grub_guess_root_device): Return const char* to
8385         fix a warning.
8386         * util/grub-probe.c (probe): Fix a warning about uninitialized
8387         abstraction_name variable.
8388         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8389         second argument as unused to fix a warning.
8391         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8392         missing grub_error() call.
8394         * util/update-grub_lib.in: Define datarootdir, since Autoconf
8395         2.60 and newer uses it to define datadir.
8397         * commands/sleep.c: Fix warning about implicit declaration.
8398         * disk/memdisk.c: Likewise.
8399         * loader/aout.c: Likewise.
8400         * loader/i386/bsd_normal.c: Likewise.
8401         * util/grub-probe.c: Likewise.
8403         * commands/i386/cpuid.c (has_longmode): Make static.
8404         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8405         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8407         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8408         GDT.  This is more robust, as %ds can change.
8409         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8410         calling real_to_prot().
8411         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8413 2008-03-28  Pavel Roskin  <proski@gnu.org>
8415         * kern/i386/pc/startup.S: Assert that uncompressed functions
8416         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8417         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8418         code, as they push parts of the code (error handlers) beyond
8419         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
8420         code as correctness and size.
8422 2008-03-28  Pavel Roskin  <proski@gnu.org>
8424         * kern/i386/pc/startup.S
8425         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8426         data block address to the real mode, keep offset minimal.  This
8427         works around a bug in AWARD BIOS on old Athlon systems, which
8428         makes CD detection hang.
8430 2008-03-26  Pavel Roskin  <proski@gnu.org>
8432         * normal/color.c (grub_parse_color_name_pair): Make `name' a
8433         const.
8434         * include/grub/normal.h: Add grub_parse_color_name_pair()
8435         declaration.
8437 2008-03-24  Bean  <bean123ch@gmail.com>
8439         * disk/i386/pc/biosdisk.c (cd_start): Removed.
8440         (cd_count): Removed.
8441         (cd_drive): New variable.
8442         (grub_biosdisk_get_drive): Don't check for (cdN) device.
8443         (grub_biosdisk_call_hook): Likewise.
8444         (grub_biosdisk_iterate): Change cdrom detection method.
8445         (grub_biosdisk_open): Replace cd_start with cd_drive.
8446         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8447         detect cdrom device.
8449         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8450         Removed.
8451         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8452         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8453         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8454         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8455         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8456         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8457         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8458         (grub_biosdisk_cdrp): New structure.
8459         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8461         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8463         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8464         device.
8466         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8467         New function.
8469 2008-03-20  Robert Millan  <rmh@aybabtu.com>
8471         Remove 2 TiB limit in ata.mod.
8472         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8473         (grub_ata_dumpinfo): Print sector count with 0x%llx.
8474         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8475         grub_uint64_t instead of grub_uint32_t.
8477 2008-03-05  Bean  <bean123ch@gmail.com>
8479         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8480         (grub_multiboot): Set boot device.
8482         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8484 2008-03-02  Bean  <bean123ch@gmail.com>
8486         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8487         symlink_buffer.
8489 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
8491         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8492         texinfo.tex.
8494         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8495         modified.
8497         * docs/fdl.texi: New file.
8499         * docs/mdate-sh: New file. Copied from gnulib.
8500         * docs/texinfo.tex: Likewise.
8502         * config.guess: Updated from gnulib.
8503         * install-sh: Likewise.
8505 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8507         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8508         (aout_mod_SOURCES): New variable.
8509         (aout_mod_CFLAGS): Likewise.
8510         (aout_mod_LDFLAGS): Likewise.
8512         * conf/i386-ieee1275.rmk: Likewise.
8514 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8516         * util/update-grub.in: Reorganise terminal validity check.  Accept
8517         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8518         Based on suggestion by Franklin PIAT.
8520 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
8522         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8523         function.
8524         * util/getroot.c (grub_util_check_block_device): New function that
8525         returns the given argument if it is a block device and returns NULL else.
8526         * util/grub-probe.c (argument_is_device): New variable.
8527         (probe): Promote device_name from a variable to an argument. Receive
8528         device_name from grub_util_check_block_device() if path is NULL and from
8529         grub_guess_root_device() else. Do not free() device_name anymore.
8530         (options): Introduce new parameter '-d, --device'.
8531         (main): Add description of the new parameter to the help screen.
8532         Rename path variable to argument. Set argument_is_device if the '-d'
8533         option is given. Pass argument to probe() depending on
8534         argument_is_device.
8536 2008-02-24  Bean  <bean123ch@gmail.com>
8538         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8539         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8540         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8541         (GRUB_ISO9660_VOLDESC_PART): Likewise.
8542         (GRUB_ISO9660_VOLDESC_END): Likewise.
8543         (grub_iso9660_primary_voldesc): New member escape.
8544         (grub_iso9660_data): New member joliet.
8545         (grub_iso9660_convert_string): New function.
8546         (grub_iso9660_mount): Detect joliet extension.
8547         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8548         (grub_iso9660_iso9660_label): Likewise.
8550         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8551         (grub_setup_SOURCES): Add fs/udf.c.
8552         (grub_fstest_SOURCES): Likewise.
8553         (udf_mod_SOURCES): New variable.
8554         (udf_mod_CFLAGS): Likewise.
8555         (udf_mod_LDFLAGS): Likewise.
8557         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8558         (grub_emu_SOURCES): Likewise.
8560         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8562         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8564         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8566         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8568         * fs/udf.c: New file.
8570 2008-02-24  Robert Millan  <rmh@aybabtu.com>
8572         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8573         (normal/lexer.c_DEPENDENCIES): New variables.
8574         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8575         (normal/lexer.c_DEPENDENCIES): Likewise.
8576         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8577         (normal/lexer.c_DEPENDENCIES): Likewise.
8578         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8579         (normal/lexer.c_DEPENDENCIES): Likewise.
8580         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8581         (normal/lexer.c_DEPENDENCIES): Likewise.
8582         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8583         (normal/lexer.c_DEPENDENCIES): Likewise.
8585 2008-02-23  Robert Millan  <rmh@aybabtu.com>
8587         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8588         since they were intended to be in hex.  This didn't break previously
8589         because of a bug in gpt_partition_map_iterate() (see below).
8591         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8592         when checking the validity of GPT header.
8593         Remove `partno', since it always provides the same information as `i'.
8595 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
8597         * include/grub/efi/time.h: Fix a wrong comment.
8599 2008-02-19  Pavel Roskin  <proski@gnu.org>
8601         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8602         message.
8604 2008-02-19  Bean  <bean123ch@gmail.com>
8606         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8607         (aout_mod_SOURCES): New variable.
8608         (aout_mod_CFLAGS): Likewise.
8609         (aout_mod_LDFLAGS): Likewise.
8610         (_bsd_mod_SOURCES): New variable.
8611         (_bsd_mod_CFLAGS): Likewise.
8612         (_bsd_mod_LDFLAGS): Likewise.
8613         (bsd_mod_SOURCES): New variable.
8614         (bsd_mod_CFLAGS): Likewise.
8615         (bsd_mod_LDFLAGS): Likewise.
8617         * include/grub/aout.h: New file.
8619         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8621         * include/grub/i386/bsd.h: New file.
8623         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8624         to make it public.
8626         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8627         function is called, so that it's possible to change it inside the hook.
8628         (grub_elf64_load): Likewise.
8629         (grub_elf_file): Don't close the file if elf header is not found.
8630         (grub_elf_close): Close the file if grub_elf_file fails (The new
8631         grub_elf_file won't close it).
8632         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8633         (grub_elf64_size): Likewise.
8635         * kern/i386/loader.S (grub_unix_real_boot): New function.
8637         * loader/aout.c: New file.
8639         * loader/i386/bsd.c: New file.
8641         * loader/i386/bsd_normal.c: New file.
8643         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8645         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8646         can test other formats.
8648 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8650         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8651         (grub_gpt_partition_type_empty): Redefine with macro from
8652         `<grub/gpt_partition.h>'.
8653         (gpt_partition_map_iterate): Adjust partition type comparison.
8655         Export `entry' as partmap-specific `part.data' struct.
8656         (grub_gpt_header, grub_gpt_partentry): Move from here ...
8658         * include/grub/gpt_partition.h (grub_gpt_header)
8659         (grub_gpt_partentry): ... to here (new file).
8661         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8663         (grub_gpt_partition_type_bios_boot): New const variable, defined
8664         with macro from `<grub/gpt_partition.h>'.
8666         (setup): Replace `first_start' with `embed_region', which keeps
8667         track of the embed region (and is partmap-agnostic).
8669         Replace find_first_partition_start() with find_usable_region(),
8670         which finds a usable region for embedding using partmap-specific
8671         knowledge (supports PC/MSDOS and GPT).
8673         Fix all assumptions that the embed region start at sector 1, using
8674         `embed_region.start' from now on.  Similarly, use `embed_region.end'
8675         rather than `first_start' to calculate available size.
8677         In grub_util_info() message, replace "into after the MBR" with an
8678         indication of the specific sector our embed region starts at.
8680 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8682         * DISTLIST: Replace `commands/ieee1275/halt.c' and
8683         `commands/ieee1275/reboot.c' with `commands/halt.c' and
8684         `commands/reboot.c'.
8685         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8686         (halt_mod_SOURCES): Likewise.
8687         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8688         (halt_mod_SOURCES): Likewise.
8690 2008-02-17  Christian Franke  <franke@computer.org>
8692         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8694 2008-02-17  Robert Millan  <rmh@aybabtu.com>
8696         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8697         set `first_start' to 0 for non-PC/MSDOS partition maps.
8699 2008-02-16  Robert Millan  <rmh@aybabtu.com>
8701         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8702         do not assume partition map is PC/MSDOS before performing checks that
8703         are specific to that layout.
8705 2008-02-13  Robert Millan  <rmh@aybabtu.com>
8707         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8708         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8709         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8711 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
8713         * configure.ac: Only a cosmetic change on the handling of
8714         -fno-stack-protector.
8716 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
8718         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8719         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8720         reboot.c.
8721         (grub_install_SOURCES): Add halt.mod and reboot.mod.
8722         (halt_mod_SOURCES): New variable.
8723         (halt_mod_CFLAGS): Likewise.
8724         (halt_mod_LDFLAGS): Likewise.
8725         (reboot_mod_SOURCES): Likewise.
8726         (reboot_mod_CFLAGS): Likewise.
8727         (reboot_mod_LDFLAGS): Likewise.
8729         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8730         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8731         reboot.c.
8732         (halt_mod_SOURCES): Likewise.
8733         (reboot_mod_SOURCES): Likewise.
8735         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8736         commands/i386/pc/reboot.c by commands/reboot.c.
8737         (reboot_mod_SOURCES): Likewise.
8739         * commands/i386/pc/reboot.c: merge this file ...
8741         * commands/ieee1275/reboot.c: ... and this file ...
8743         * commands/reboot.c: ... to this file.
8744         Add some precompiler directive to include the correct header for
8745         each machine.
8747         * commands/ieee1275/halt.c: move this file ...
8749         * commands/halt.c: ... to here.
8750         Add some precompiler directive to include the correct header for
8751         each machine.
8753         * include/grub/efi/efi.h (grub_reboot): New function declaration.
8754         (grub_halt): Likewise.
8756         * kern/efi/efi.c (grub_reboot): New function.
8757         (grub_halt): Likewise.
8759 2008-02-12  Robert Millan  <rmh@aybabtu.com>
8761         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8762         /dev (like it is done for /dev/mapper).  This doesn't provide support
8763         for EVMS, but at least it is now easy to identify the problem when it
8764         arises.
8766 2008-02-11  Robert Millan  <rmh@aybabtu.com>
8768         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8769         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8770         comparing it with -1, not 0.
8772 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8774         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8775         `disk/lvm.c'.
8776         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8777         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8779         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8780         `disk/lvm.c' to the end of the list.
8781         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8782         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8784 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8786         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
8787         grub_print_error() instead.  This will let user know why we're entering
8788         rescue mode.
8789         Based on suggestions from Sam Morris.
8791 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
8793         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8794         on remaining N args, instead of "--" arg N times.
8796 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
8798         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8799         (fill_with_default_glyph): Changed to use unknown_glyph for fill
8800         pattern for unknown glyphs.
8802 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8804         * configure.ac: Probe for `help2man'.
8805         * Makefile.in (builddir): New variable.
8806         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
8807         or otherwise add a few flags/options to it.
8808         (install-local): For every executable utility or script that is
8809         installed, invoke $(HELP2MAN) to install a manpage based on --help
8810         output.
8812         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8813         that it doesn't prevent --help from working in build tree.
8815         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8816         with `bug-grub@gnu.org'.
8817         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8818         * util/update-grub.in (usage): New function.
8819         Implement proper argument check, with support for --help and --version
8820         (as well as existing -y).
8822 2008-02-09  Christian Franke  <franke@computer.org>
8824         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8825         avoid overwriting previous output.
8826         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8828 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8830         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8831         drawing the menu.
8833 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8835         * commands/sleep.c: New file.
8836         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8837         (sleep_mod_SOURCES): New variable.
8838         (sleep_mod_CFLAGS): Likewise.
8839         (sleep_mod_LDFLAGS): Likewise.
8841 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8843         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8844         situations in which we can deduce the RAID size and the superblock
8845         doesn't match it.
8847 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8849         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
8850         and return a grub_diskmemberlist_t composed of LVM physical volumes.
8851         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8853         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
8854         and return a grub_diskmemberlist_t composed of physical array members.
8855         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8857         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8858         prototype.
8859         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8860         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8861         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8863         * util/grub-probe.c (probe): Move partmap probing code from here ...
8864         (probe_partmap): ... to here.
8865         (probe): Use probe_partmap() once for the disk we're probing, and
8866         additionally, when such disk contains a memberlist() struct member,
8867         once for each disk that is contained in the structure returned by
8868         memberlist().
8870 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8872         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8873         environment variable to 'all' in order to obtain debug output from
8874         non-util/ code.
8875         * util/i386/pc/grub-setup.c (main): Likewise.
8877 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8879         * disk/raid.c (grub_raid_scan_device): Check for
8880         `array->device[sb.this_disk.number]' rather than for
8881         `array->device[sb.this_disk.number]->name', since the latter is not
8882         guaranteed to be accessible.
8884 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8886         * disk/raid.c: Update copyright.
8887         * fs/cpio.c: Likewise.
8888         * include/grub/raid.h: Likewise.
8889         * loader/i386/pc/multiboot.c: Likewise.
8890         * util/hostfs.c: Likewise.
8892 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8894         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8895         to a grub_disk_t array.
8896         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8897         `device[x]'.
8898         (grub_raid_scan_device): Replace `device[x].name' accesses with
8899         `device[x]->name'.  Simplify initialization of `array->device[x]'.
8901 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8903         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8904         grub_dprintf() calls.
8905         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8906         error message.
8908 2008-02-07  Christian Franke  <franke@computer.org>
8910         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8911         instead of fseek and ftell to support large files.
8912         (grub_hostfs_read): Likewise.
8914 2008-02-07  Robert Millan  <rmh@aybabtu.com>
8916         Patch from Jeroen Dekkers.
8917         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8918         failure, since successfully reading all array members might not be
8919         required.
8921 2008-02-06  Robert Millan  <rmh@aybabtu.com>
8923         * util/grub-probe.c (probe): Simplify partmap probing (with the
8924         assumption that the first word up to the underscore equals to
8925         the module name).
8927 2008-02-06  Christian Franke  <franke@computer.org>
8929         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8930         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8931         last block of a cpio or tar stream.
8932         Check for "TRAILER!!!" instead of any empty data
8933         block to detect last block of a cpio stream.
8934         (grub_cpio_dir): Fix constness of variable np.
8935         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8936         cpio or tar trailer is detected.  This fixes a crash
8937         on open of a non existing file.
8939 2008-02-05  Bean  <bean123ch@gmail.com>
8941         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8942         address of entry.
8943         (grub_multiboot_load_elf64): Likewise.
8944         (grub_multiboot): Initialize mbi structure.
8946         * util/grub-fstest.c: Don't include unused header file script.h.
8948         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8949         of file.
8950         (grub_fstest_SOURCES): Likewise.
8952 2008-02-05  Robert Millan  <rmh@aybabtu.com>
8954         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8955         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8956         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8957         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8959         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8960         (translation_table): Replace hardcoded values with macros
8961         provided by `<grub/term.h>'.
8963         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8964         (keyboard_map): Correct/add a few values, with macros provided
8965         by `<grub/term.h>'.
8966         (keyboard_map_shift): Zero values that don't differ from their
8967         `keyboard_map' equivalents.
8968         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8969         Discard the second scan code that is always sent by Caps lock.
8970         Only use `keyboard_map_shift' when it provides a non-zero value,
8971         otherwise fallback to `keyboard_map'.
8973 2008-02-04  Bean  <bean123ch@gmail.com>
8975         * Makefile.in (enable_grub_fstest): New variable.
8977         * conf/common.rmk (grub_fstest_init.lst): New rule.
8978         (grub_fstest_init.h): Likewise.
8979         (grub_fstest_init.c): Likewise.
8980         (util/grub-fstest.c_DEPENDENCIES): New variable.
8981         (grub_fstest_SOURCES): Likewise.
8983         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8985         * util/grub-fstest.c: New file.
8987 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8989         Make grub-setup handle a separate root device.
8991         * util/i386/pc/grub-setup.c (setup): Always open the root device,
8992         so that the root device can be compared with the destination
8993         device.
8994         When embedding the core image, if the root and destination devices
8995         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8996         0xFF.
8997         When not embedding, set ROOT_DRIVE to 0xFF.
8999 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
9001         Add support for having a grub directory in a different drive. This
9002         is still only the data handling part.
9004         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
9005         (codestart): Save %dh in GRUB_ROOT_DRIVE.
9006         (grub_root_drive): New variable.
9008         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
9009         instead of GRUB_BOOT_DRIVE to construct a device name. Set
9010         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
9011         as it was.
9013         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
9015         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
9016         macro.
9017         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
9019         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
9020         is bogus, because PXE booting does not specify any drive
9021         correctly.
9023         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
9024         am not sure if this is really correct.
9026         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
9027         is always identical to the boot drive when booting from a CD.
9029         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
9030         longer.
9031         (root_drive): New variable.
9032         (real_start): Unconditionally set %dh to ROOT_DRIVE.
9033         (setup_sectors): Push %dx right after popping it, because %dh will
9034         be modified later.
9035         (copy_buffer): Restore %dx.
9037 2008-02-03  Robert Millan  <rmh@aybabtu.com>
9039         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
9040         use `cdboot.img' for cdrom images.
9042 2008-02-03  Robert Millan  <rmh@aybabtu.com>
9044         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
9045         only setup gfxterm when `font' command has succeeded.
9047 2008-02-03  Robert Millan  <rmh@aybabtu.com>
9049         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
9050         (grub_rescue_cmd_multiboot_loader)
9051         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
9053 2008-02-03  Pavel Roskin  <proski@gnu.org>
9055         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
9056         %edx and %esi from stack only after grub_gate_a20() is called.
9057         grub_gate_a20() clobbers %edx.
9059 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
9061         * configure.ac (AC_INIT): Bumped to 1.96.
9063         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
9064         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
9065         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
9066         video/readers/png.c.
9068 2008-02-03  Bean  <bean123ch@gmail.com>
9070         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
9071         (cdboot_img_SOURCES): New variable.
9072         (cdboot_img_ASFLAGS): New variable.
9073         (cdboot_img_LDFLAGS): New variable.
9075         * boot/i386/pc/cdboot.S: New file.
9077         * disk/i386/pc/biosdisk.c (cd_start): New variable.
9078         (cd_count): Likewise.
9079         (grub_biosdisk_get_drive): Add support for cd device.
9080         (grub_biosdisk_call_hook): Likewise.
9081         (grub_biosdisk_iterate): Likewise.
9082         (grub_biosdisk_open): Likewise.
9083         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
9084         (grub_biosdisk_rw): Support reading from cd device.
9085         (GRUB_MOD_INIT): Iterate cd devices.
9087         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
9088         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
9089         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
9091         * kern/i386/pc/init.c (make_install_device): Check for cd device.
9093 2008-02-02  Robert Millan  <rmh@aybabtu.com>
9095         * commands/read.c: New file.
9096         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
9097         (read_mod_SOURCES): New variable.
9098         (read_mod_CFLAGS): Likewise.
9099         (read_mod_LDFLAGS): Likewise.
9101 2008-02-02  Robert Millan  <rmh@aybabtu.com>
9103         * normal/main.c (grub_normal_execute): Check for `menu->size' when
9104         determining whether menu has to be displayed.
9106 2008-02-02  Marco Gerards  <marco@gnu.org>
9108         * bus/pci.c: New file.
9110         * include/grub/pci.h: Likewise.
9112         * include/grub/i386/pc/pci.h: Likewise.
9114         * commands/lspci.c: Likewise.
9116         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
9117         `lspci.mod'.
9118         (pci_mod_SOURCES): New variable.
9119         (pci_mod_CFLAGS): Likewise.
9120         (pci_mod_LDFLAGS): Likewise.
9121         (lspci_mod_SOURCES): Likewise.
9122         (lspci_mod_CFLAGS): Likewise.
9123         (lspci_mod_LDFLAGS): Likewise.
9125 2008-02-02  Bean  <bean123ch@gmail.com>
9127         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
9128         (grub_ufs_get_file_block): Fix indirect block calculation problem.
9130         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
9131         (grub_xfs_btree_node): New structure.
9132         (grub_xfs_btree_root): New structure.
9133         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
9134         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
9135         (GRUB_XFS_EXTENT_BLOCK): Likewise.
9136         (GRUB_XFS_EXTENT_SIZE): Likewise.
9137         (grub_xfs_read_block): Support btree format type.
9138         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
9139         Use directory block as basic unit.
9141         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
9143         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
9144         __attribute__ ((__regparm__ (1))).
9146 2008-02-01  Robert Millan  <rmh@aybabtu.com>
9148         Correct a mistake in previous commit.
9150         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
9151         top.
9152         (normal/command.c_DEPENDENCIES): New variable.
9154 2008-02-01  Robert Millan  <rmh@aybabtu.com>
9156         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
9157         top.
9158         (normal/command.c_DEPENDENCIES): New variable.
9159         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
9160         * conf/i386-ieee1275.rmk: Likewise.
9161         * conf/i386-linuxbios.rmk: Likewise.
9162         * conf/i386-pc.rmk: Likewise.
9163         * conf/sparc64-ieee1275.rmk: Likewise.
9164         * conf/powerpc-ieee1275.rmk: Likewise.
9165         (grub_emu_SOURCES): Add `fs/fshelp.c'.
9167         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
9169 2008-02-01  Robert Millan  <rmh@aybabtu.com>
9171         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
9172         call at beginning of function.
9174 2008-01-31  Pavel Roskin  <proski@gnu.org>
9176         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
9177         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9178         (grub_mkrescue_SOURCES): Likewise.
9179         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9181 2008-01-30  Robert Millan  <rmh@aybabtu.com>
9183         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9184         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9185         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9186         (grub_probe_SOURCES): ... to here.
9188         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9189         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9190         * conf/i386-ieee1275.rmk: Likewise.
9191         * conf/i386-linuxbios.rmk: Likewise.
9192         * conf/powerpc-ieee1275.rmk: Likewise.
9194 2008-01-30  Tristan Gingold  <gingold@free.fr>
9196         * kern/rescue.c: Silently accept empty lines.
9198 2008-01-29  Bean  <bean123ch@gmail.com>
9200         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9201         (real_code_2): Code cleanup and change comment style.
9202         (move_memory): Avoid using 32-bit address mode.
9204 2008-01-29  Bean  <bean123ch@gmail.com>
9206         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9207         (png_mod_SOURCES): New variable.
9208         (png_mod_CFLAGS): Likewise.
9209         (png_mod_LDFLAGS): Likewise.
9211         * video/readers/png.c: New file.
9213 2008-01-28  Robert Millan  <rmh@aybabtu.com>
9215         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9216         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9217         `ifndef GRUB_MOD_GAP' hack.
9218         * util/elf/grub-mkimage.c (add_segments): Likewise.
9220 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9222         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9223         `GRUB_MOD_GAP' for platforms in which it's not defined.
9224         * util/elf/grub-mkimage.c (add_segments): Likewise.
9226 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9228         Get grub-emu to build again (including parallel builds).
9230         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9231         Split into ...
9232         (util/grub-emu.c_DEPENDENCIES): ... this, ...
9233         (normal/execute.c_DEPENDENCIES): ... this, ...
9234         (grub-emu_DEPENDENCIES): ... and this.
9236         * conf/i386-efi.rmk: Likewise.
9237         * conf/i386-linuxbios.rmk: Likewise.
9238         * conf/i386-ieee1275.rmk: Likewise.
9239         * conf/powerpc-ieee1275.rmk: Likewise.
9240         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9242 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9244         * NEWS: Add a few items.
9246 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9248         Fix parallel builds with grub-emu.  Based on earlier commit for
9249         grub-probe and grub-setup.
9251         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9252         (util/grub-emu.c_DEPENDENCIES): ... this.
9253         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9254         (util/grub-emu.c_DEPENDENCIES): ... this.
9255         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9256         (util/grub-emu.c_DEPENDENCIES): ... this.
9257         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9258         (util/grub-emu.c_DEPENDENCIES): ... this.
9259         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9260         (util/grub-emu.c_DEPENDENCIES): ... this.
9262 2008-01-27  Pavel Roskin  <proski@gnu.org>
9264         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9265         to create a gap between _end and the modules added to the image
9266         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
9267         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9268         * util/elf/grub-mkimage.c (add_segments): Likewise.
9270 2008-01-26  Pavel Roskin  <proski@gnu.org>
9272         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9273         just return an error.
9275 2008-01-26  Bean  <bean123ch@gmail.com>
9277         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9278         (grub_reiserfs_get_item): Save offset of the next item.
9279         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9281 2008-01-25  Robert Millan  <rmh@aybabtu.com>
9283         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9284         make all filesystem sources appear together (possibly fixing omissions
9285         while at it).
9286         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9287         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9288         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9289         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9291         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
9292         add `kern/file.c'.
9293         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9294         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9295         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9296         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9298         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9299         (probe): Add a sanity check to make sure of our ability to read
9300         requested files when probing for filesystem type.
9302         * genmk.rb: Update copyright year (2007).
9304         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9305         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9306         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9307         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9308         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9309         : Remove function prototypes.
9311 2008-01-25  Robert Millan  <rmh@aybabtu.com>
9313         Revert my previous commits (based on wrong assumption of how grub_errno
9314         works).
9316         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
9317         * kern/file.c (grub_file_open): Likewise.
9319 2008-01-24  Pavel Roskin  <proski@gnu.org>
9321         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9322         that hang if GRUB tries to setup colors.
9323         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9324         colors for firmwares that don't support it.
9325         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9326         Recognize Open Hack'Ware, set flags to work around its
9327         limitations.
9329 2008-01-24  Robert Millan  <rmh@aybabtu.com>
9331         * kern/file.c (grub_file_open): Do not account previous failures of
9332         unrelated functions when grub_errno is checked for.
9333         Reported by Oleg Strikov.
9335 2008-01-24  Bean  <bean123ch@gmail.com>
9337         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9338         (grub_ufs_sblock): New member volume name.
9339         (grub_ufs_find_file): Fix string copy bug.
9340         (grub_ufs_label): Implement this function properly.
9342         * fs/hfs.c (grub_hfs_cnid_type): New enum.
9343         (grub_hfs_iterate_records): Use the correct file number for extents
9344         and catalog file. Fix problem in next index calculation.
9345         (grub_hfs_find_node): Replace recursive function call with loop.
9346         (grub_hfs_iterate_dir): Replace recursive function call with loop.
9348 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9350         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9351         `<grub/symbol.h>' and `<grub/multiboot.h>'.
9352         (grub_multiboot2_real_boot): New function prototype.
9354         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9355         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9357         * kern/i386/ieee1275/init.c (grub_os_area_addr)
9358         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9360 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9362         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9363         #ifdef'ed out grub_printf().
9365 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9367         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9368         grub_dprintf calls, since they make "debug=all" mode unusable.
9369         (grub_console_checkkey): Likewise.
9371 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9373         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9374         `term/i386/pc/at_keyboard.c'.
9375         (pkglib_MODULES): Add `serial.mod'.
9376         (serial_mod_SOURCES): New variable.
9377         (serial_mod_CFLAGS): Likewise.
9378         (serial_mod_LDFLAGS): Likewise.
9380         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
9381         `<grub/powerpc/ieee1275/console.h>'.
9382         (grub_keyboard_controller_init): New function prototype.
9383         (grub_console_checkkey): Likewise.
9384         (grub_console_getkey): Likewise.
9386         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9387         keyboard on i386.
9389         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9390         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9392 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9394         * kern/i386/pc/init.c (make_install_device): When memdisk image is
9395         present, "(memdisk)/boot/grub" becomes the default prefix.
9397         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9398         a memdisk tarball with all the modules.  Add --overlay=DIR option that
9399         allows users to overlay additional files into the image.
9401 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9403         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9404         and `machine/memory.h'.
9405         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9406         (_multiboot_mod_SOURCES): New variable.
9407         (_multiboot_mod_CFLAGS): Likewise.
9408         (_multiboot_mod_LDFLAGS): Likewise.
9409         (multiboot_mod_SOURCES): Likewise.
9410         (multiboot_mod_CFLAGS): Likewise.
9411         (multiboot_mod_LDFLAGS): Likewise.
9413         * include/grub/i386/ieee1275/loader.h: New file.
9415         * include/grub/i386/ieee1275/machine.h: Likewise.
9417         * include/grub/i386/ieee1275/memory.h: Likewise.
9419         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9420         variable declaration.
9421         (grub_os_area_size): Likewise.
9423         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9424         (grub_lower_mem, grub_upper_mem): New variables.
9425         (grub_stop_floppy): New function (just to make
9426         grub_multiboot2_real_boot() happy).
9428         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9429         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9430         (grub_stop): New function.
9431         Include `"../realmode.S"' and `"../loader.S"'.
9433         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9434         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9436         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9437         rely on grub_multiboot2_real_boot() for final boot.
9439 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9441         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9442         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9443         device that doesn't look like an SD card.
9444         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9445         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9446         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9447         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9448         found.
9450 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9452         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9453         avoid claiming over our own code.
9455 2008-01-22  Bean  <bean123ch@gmail.com>
9457         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9458         (jpeg_mod_SOURCES): New variable.
9459         (jpeg_mod_CFLAGS): Likewise.
9460         (jpeg_mod_LDFLAGS): Likewise.
9462         * video/readers/jpeg.c : New file.
9464 2008-01-22  Bean  <bean123ch@gmail.com>
9466         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9467         there are no more items.
9469 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9471         * kern/mm.c (grub_mm_init_region): Improve debug message.
9473 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9475         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9476         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9477         address.
9478         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9479         a C macro.
9480         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9481         Indicates start of upper memory.
9482         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9483         (generate_image): Abort when image size is big enough to corrupt
9484         upper memory.
9486         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9487         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9488         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9489         instead of hardcoding 0xA0000.
9490         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9491         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9492         instead of hardcoding 0xA0000.
9494 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9496         * disk/memdisk.c (memdisk_size): New variable.
9497         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9498         `memdisk_size'.
9499         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
9500         image to dynamic memory.
9501         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9502         `memdisk_size'.  Free memdisk block.
9504 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9506         Fix detection of very small filesystems (like tar).
9508         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9509         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9510         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9511         a problem with this disk).
9513 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9515         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9516         on grub_biosdisk_rw_standard() error.
9518 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9520         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9521         recent changes.
9522         * kern/elf.c: Likewise.
9523         * kern/ieee1275/ieee1275.c: Likewise.
9524         * kern/powerpc/ieee1275/openfw.c: Likewise.
9525         * term/ieee1275/ofconsole.c: Likewise.
9527 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9529         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9531         * include/grub/kernel.h (grub_arch_memdisk_addr)
9532         (grub_arch_memdisk_size): Moved from here ...
9534         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9535         (grub_arch_memdisk_size): ... to here.
9537 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9539         Mostly based on bugfix from Bean.
9541         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9542         attribute with hook() parameter.
9543         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9544         declaration.
9545         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9546         attribute with hook() parameter.
9547         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9548         declaration.
9550 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9552         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9553         (pkglib_MODULES): Add `memdisk.mod'.
9554         (memdisk_mod_SOURCES): New variable.
9555         (memdisk_mod_CFLAGS): Likewise.
9556         (memdisk_mod_LDFLAGS): Likewise.
9558         * disk/memdisk.c: New file.
9560         * include/grub/disk.h (grub_disk_dev_id): Add
9561         `GRUB_DISK_DEVICE_MEMDISK_ID'.
9563         * include/grub/i386/pc/kernel.h
9564         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9565         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9566         (grub_kernel_image_size): New variable declaration.
9567         (grub_total_module_size): Likewise.
9568         (grub_memdisk_image_size): Likewise.
9570         * include/grub/i386/pc/memory.h
9571         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9573         * include/grub/kernel.h: Include `<grub/symbol.h>'.
9574         (grub_arch_memdisk_addr): New variable declaration.
9575         (grub_arch_memdisk_size): Likewise.
9577         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9578         (grub_arch_memdisk_size): Likewise.
9580         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9581         (codestart): Replace hardcoded `0x100000' with
9582         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9584         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9585         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
9586         not NULL, append the contents of the file it refers to, at the end of
9587         the compressed kernel image.  Initialize `grub_memdisk_image_size'
9588         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9589         (options): Add "memdisk"|'m' option.
9590         (main): Parse --memdisk|-m option, and pass user-provided path as
9591         parameter to generate_image().
9593 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9595         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9596         grub_dprintf() calls from here ...
9597         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9599 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9601         Fix detection of "real mode" when /options/real-mode? doesn't exist.
9603         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9604         declaration.
9605         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9606         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9607         `GRUB_IEEE1275_FLAG_REAL_MODE'.
9608         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9609         property).
9610         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9611         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9613 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9615         Get rid of confusing function (superseded by
9616         `grub_ieee1275_get_integer_property')
9617         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9618         prototype.
9619         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9620         function.
9621         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9622         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9623         in native endianness from grub_ieee1275_get_integer_property().
9625 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9627         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9628         command after "shut-down", since implementations differ on which
9629         the command for halt is.
9631 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9633         * include/grub/i386/linuxbios/console.h: Add header protection.
9634         (grub_keyboard_controller_init): New function prototype.
9635         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9636         (KEYBOARD_COMMAND_READ): Likewise.
9637         (KEYBOARD_COMMAND_WRITE): Likewise.
9638         (KEYBOARD_SCANCODE_SET1): Likewise.
9639         (grub_keyboard_controller_write): New function.
9640         (grub_keyboard_controller_read): Likewise.
9641         (grub_keyboard_controller_init): Likewise.
9643         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9644         (grub_console_init): On coreboot/LinuxBIOS, call
9645         grub_keyboard_controller_init().
9647 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9649         PowerPC changes provided by Pavel Roskin.
9651         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9652         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9653         don't rely on cmain() doing it.
9654         * kern/i386/ieee1275/startup.S (_start): Store %eax in
9655         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9657 2008-01-16  Robert Millan  <rmh@aybabtu.com>
9659         * include/grub/i386/linuxbios/memory.h
9660         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9661         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9662         receive `table_header' as argument.  Instead, probe for it in the
9663         known memory ranges where it can be present.
9664         (grub_available_iterate): Do not pass a fixed `table_header' address
9665         to grub_linuxbios_table_iterate().
9667 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9669         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9670         * conf/i386-ieee1275.rmk: New file.
9671         * include/grub/i386/ieee1275/console.h: Likewise.
9672         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9673         * include/grub/i386/ieee1275/kernel.h: Likewise.
9674         * include/grub/i386/ieee1275/time.h: Likewise.
9675         * kern/i386/ieee1275/init.c: Likewise.
9676         * kern/i386/ieee1275/startup.S: Likewise.
9678 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9680         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9681         when pointers are 32-bit (but still do set it to one when they are
9682         64-bit).
9684 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9686         * include/grub/ieee1275/ieee1275.h
9687         (grub_ieee1275_get_integer_property): New function prototype.
9689         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9690         (grub_ieee1275_get_integer_property): New function.  Wraps around
9691         grub_ieee1275_get_property() to handle endianness.
9693         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9694         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9695         where appropriate.
9696         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9697         (grub_map): Likewise.
9698         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9700 2008-01-15  Bean  <bean123ch@gmail.com>
9702         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9703         (grub_script_execute_cmdline): Reset grub_errno.
9705         * normal/main.c (read_config_file): Reset grub_errno.
9707         * normal/parse.y (script_init): New.
9708         (script): Move function and menuentry here.
9709         (delimiter): New.
9710         (command): Add delimiter at the end of command.
9711         (commands): Adjust to match the new command.
9712         (commandblock): Remove grub_script_lexer_record_start.
9713         (menuentry): Add grub_script_lexer_record_start, use the new commands.
9714         (if): Use the new commands.
9716         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9718 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9720         * normal/menu.c (run_menu): Move timeout message from here ...
9721         (print_timeout): ... to here.
9722         (run_menu): Use print_timeout() once during initial draw to print
9723         the whole message, and again in every clock tick to update only
9724         the number of seconds.
9726 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9728         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9729         actual size of `available' from grub_ieee1275_get_property(), and
9730         restrict parsing to that bound.
9732 2008-01-15  Christian Franke  <franke@computer.org>
9734         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9735         (argp_program_version): Remove variable.
9736         (argp_program_bug_address): Likewise.
9737         (options): Convert from struct argp_option to struct option.
9738         (struct arguments): Remove.
9739         (parse_opt): Remove.
9740         (usage): New function.
9741         (main): Replace struct args members by simple variables.
9742         Replace argp_parse() by getopt_long().
9743         Add switch to evaluate options.
9744         Add missing "(...)" around root_dev in prefix string.
9746 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9748         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9749         for grub_ieee1275_exit(), in order to improve portability.
9751 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9753         * util/grub.d/10_linux.in (prefix): Define.
9754         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
9756 2008-01-13  Pavel Roskin  <proski@gnu.org>
9758         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9759         grub_errno if no errors have been detected.
9761 2008-01-12  Robert Millan  <rmh@aybabtu.com>
9763         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9764         (grub_util_get_dev_abstraction): New function prototype.
9766         * util/getroot.c: Include `<grub/util/getroot.h>'
9767         (grub_util_get_grub_dev): Move detection of abstraction type to ...
9768         (grub_util_get_dev_abstraction): ... here (new function).
9770         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
9771         `PRINT_ABSTRACTION'.
9772         (probe): Probe for abstraction type when requested.
9773         (main): Understand `--target=abstraction'.
9775         * util/i386/efi/grub-install.in: Add abstraction module to core
9776         image when it is found to be necessary.
9777         * util/i386/pc/grub-install.in: Likewise.
9778         * util/powerpc/ieee1275/grub-install.in: Likewise.
9780         * util/update-grub_lib.in (font_path): Return system path without
9781         converting to GRUB path.
9782         * util/update-grub.in: Convert system path returned by font_path()
9783         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
9784         abstraction module is needed for loading fonts (if any).  Export
9785         that as `GRUB_PRELOAD_MODULES'.
9786         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9787         insmod commands).
9789 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
9791         Remove some unused code from reiserfs.
9793         * fs/reiserfs.c (struct grub_reiserfs_key)
9794         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9795         (struct grub_reiserfs_node_body): Removed.
9796         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9797         Likewise.
9798         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9799         Likewise.
9800         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9801         Likewise.
9802         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9803         Likewise.
9804         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9805         Likewise.
9806         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9807         Likewise.
9808         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9809         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9810         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9812 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9814         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9815         Determines if a file is garbage left by packaging systems, etc.
9816         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9817         for processing /etc/grub.d scripts.
9818         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9819         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
9820         as a condition for processing Linux images.
9822 2008-01-10  Pavel Roskin  <proski@gnu.org>
9824         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
9825         to compile reiserfs.c on PowerPC.
9827 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9829         * kern/device.c (grub_device_iterate): Do not abort device iteration
9830         when one of the devices cannot be opened.
9831         * kern/disk.c (grub_disk_open): Do not account previous failures of
9832         unrelated functions when grub_errno is checked for.
9834 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9836         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9837         `! grub_linux_is_bzimage', change order of address comparison to make
9838         it more intuitive, and improve "too big zImage" error message.
9840 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9842         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9843         `$(update-grub_DATA)'.
9844         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9845         targets.
9847 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9849         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9850         which instruction is modified by grub-setup during installation
9851         (since it wasn't obvious by only looking at this file).
9853 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9855         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
9856         listing actual TODO items.
9858 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9860         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9861         correctly.
9862         (grub_reiserfs_get_key_offset): Likewise.
9863         (grub_reiserfs_set_key_offset): Likewise.
9864         (grub_reiserfs_set_key_type): Likewise.
9865         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9867         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9868         better to remove the bitfield version completely.
9870 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9872         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9873         allocated from the heap, due to the fshelp implementation.
9874         (grub_reiserfs_dir): Free NODE, due to the same reason.
9876 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9878         Mostly from Vincent Pelletier:
9880         * fs/reiserfs.c: New file.
9882         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9883         (reiserfs_mod_SOURCES): New variable.
9884         (reiserfs_mod_CFLAGS): Likewise.
9885         (reiserfs_mod_LDFLAGS): Likewise.
9887         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9888         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9889         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9890         normal/color.c.
9892 2008-01-06  Robert Millan  <rmh@aybabtu.com>
9894         * normal/color.c: Remove `<grub/env.h>'.
9896 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
9898         * include/grub/normal.h: Include <grub/env.h>.
9900 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9902         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9903         usage example with `(hd0,1)'.
9904         Reported by Samuel Thibault.
9906 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9908         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9909         (grub_linux_boot_zimage): Rename to ...
9910         (grub_linux_boot): ... this.
9911         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9912         (grub_linux_boot_zimage): Conditionalize zImage copy.
9914         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9915         (grub_linux_boot_bzimage): Remove prototype.
9916         (grub_linux_boot_zimage): Rename to ...
9917         (grub_linux_boot): ... this.
9919         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9920         (grub_linux_boot): Remove function.
9922 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9924         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9925         (grub_env_write_color_highlight): Likewise.
9926         (grub_wait_after_message): Likewise.
9928         * normal/color.c: New file.
9930         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9931         (normal_mod_DEPENDENCIES): Likewise.
9933         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9934         (normal_mod_DEPENDENCIES): Likewise.
9936         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9937         (normal_mod_DEPENDENCIES): Likewise.
9939         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9940         (normal_mod_DEPENDENCIES): Likewise.
9942         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9943         for waiting after a message is printed.
9944         * normal/main.c (read_config_file): Likewise.
9945         (grub_normal_init): Register grub_env_write_color_normal() and
9946         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
9947         `color_highlight' variables as global.
9949         * normal/menu.c (grub_wait_after_message): New function.
9950         (grub_color_menu_normal): New variable.  Replaces ...
9951         (GRUB_COLOR_MENU_NORMAL): ... this macro.
9952         (grub_color_menu_highlight): New variable.  Replaces ...
9953         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9954         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9955         `GRUB_TERM_COLOR_STANDARD'.
9956         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
9957         `normal_code' and `highlight_code' to `old_color_normal' and
9958         `old_color_highlight', respectively.
9959         (grub_menu_init_page): Update colors when drawing the menu, based on
9960         `menu_color_normal' and `menu_color_highlight' variables.
9961         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9962         a message is printed.
9964 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9966         * kern/env.c (grub_env_context_open): Propagate hooks for global
9967         variables to new context.
9969         * kern/main.c (grub_set_root_dev): Export `root' variable.
9971 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9973         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9974         discs unconditionally, since udev and others have options to provide
9975         them.
9977 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9979         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9981 2008-01-04  Christian Franke  <franke@computer.org>
9983         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9984         of eisa_mmap.
9986 2008-01-03  Pavel Roskin  <proski@gnu.org>
9988         * kern/i386/linuxbios/init.c: Put "void" to all function
9989         declarations with no arguments.
9990         * kern/powerpc/ieee1275/init.c: Likewise.
9991         * term/i386/pc/at_keyboard.c: Likewise.
9992         * term/i386/pc/vga_text.c: Likewise.
9993         * util/grub-mkdevicemap.c: Likewise.
9995 2008-01-02  Robert Millan  <rmh@aybabtu.com>
9997         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9998         message when loaded image is out of bounds.
9999         (grub_multiboot_load_elf64): Likewise.
10001 2008-01-02  Pavel Roskin  <proski@gnu.org>
10003         * util/grub.d/10_linux.in: Try version without ".old" when
10004         looking for initrd.  It's better to use initrd from the newer
10005         kernel of the same version than no initrd at all.
10007 2008-01-01  Robert Millan  <rmh@aybabtu.com>
10009         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
10011 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
10013         * include/grub/video.h: Added grub_video_unmap_color and
10014         grub_video_get_active_render_target.
10015         (grub_video_adapter): Added unmap_color and get_active_render_target.
10017         * video/video.c: Added grub_video_unmap_color and
10018         grub_video_get_active_render_target.
10019         (grub_video_get_info): Changed method to accept NULL pointer as an
10020         argument to allow detection of active video adapter.
10022         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
10023         grub_video_vbe_unmap_color_int.
10024         Added grub_video_vbe_unmap_color and
10025         grub_video_vbe_get_active_render_target.
10026         (grub_video_vbe_adapter): Added unmap_color and
10027         get_active_render_target.
10029         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
10030         with grub_video_vbe_unmap_color_int.
10032         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
10033         (DEFAULT_NORMAL_COLOR): Likewise.
10034         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
10035         (DEFAULT_FG_COLOR): Removed.
10036         (DEFAULT_BG_COLOR): Likewise.
10037         (DEFAULT_CURSOR_COLOR): Changed value.
10038         (grub_virtual_screen): Added standard_color_setting,
10039         normal_color_setting, highlight_color_setting and term_color.
10040         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
10041         (bitmap_width): Added.
10042         (bitmap_height): Likewise.
10043         (bitmap): Likewise.
10044         (set_term_color): Likewise.
10045         (grub_virtual_screen_setup): Changed to use new terminal coloring
10046         settings.
10047         (grub_gfxterm_init): Added init for bitmap.
10048         (grub_gfxterm_fini): Added destroy for bitmap.
10049         (redraw_screen_rect): Updated to use background bitmap and new
10050         terminal coloring.
10051         (scroll_up): Added optimization for case when there is no bitmap.
10052         (grub_gfxterm_cls): Fixed to use correct background color.
10053         (grub_virtual_screen_setcolorstate): Changed to use new terminal
10054         coloring.
10055         (grub_virtual_screen_setcolor): Likewise.
10056         (grub_virtual_screen_getcolor): Added.
10057         (grub_gfxterm_background_image_cmd): Likewise.
10058         (grub_video_term): Added setcolor and getcolor.
10059         (MOD_INIT): Added registration of background_image command.
10060         (MOD_TERM): Added unregistration for background_image command.
10062 2007-12-30  Pavel Roskin  <proski@gnu.org>
10064         * loader/multiboot_loader.c: Fix multiboot command
10065         unregistration.  Fix all typos in the word "multiboot".
10067 2007-12-29  Pavel Roskin  <proski@gnu.org>
10069         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
10070         support for initrd names used in Fedora.
10072 2007-12-26  Bean  <bean123ch@gmail.com>
10074         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
10075         (cpio_mod_SOURCES): New variable.
10076         (cpio_mod_CFLAGS): Likewise.
10077         (cpio_mod_LDFLAGS): Likewise.
10079         * fs/cpio.c: New file.
10081         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
10083         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10085         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10087         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10089 2007-12-25  Robert Millan  <rmh@aybabtu.com>
10091         * include/grub/term.h (struct grub_term): Add `getcolor' function.
10092         (grub_getcolor): New function.
10094         * kern/term.c (grub_getcolor): New function.
10095         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
10096         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
10097         (print_entry): Set normal and highlight colors to
10098         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
10099         respectively, before printing and restore them to old
10100         values afterwards.
10101         (grub_menu_init_page): Likewise.  Fill an additional colored space
10102         that would otherwise be left blank.
10104         * term/efi/console.c (grub_console_getcolor): New function.
10105         (struct grub_console_term.getcolor): New variable.
10106         * term/i386/pc/console.c (grub_console_getcolor): New function.
10107         (struct grub_console_term.getcolor): New variable.
10108         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
10109         (struct grub_console_term.getcolor): New variable.
10111         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
10112         (struct grub_console_term.setcolor): Remove variable.
10113         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
10114         (struct grub_console_term.setcolor): Remove variable.
10115         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
10116         (struct grub_console_term.setcolor): Remove variable.
10117         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
10118         (struct grub_console_term.setcolor): Remove variable.
10120 2007-12-25  Robert Millan  <rmh@aybabtu.com>
10122         * configure.ac: Search for possible unifont.hex locations, and
10123         define UNIFONT_HEX if found.
10125         * Makefile.in (UNIFONT_HEX): Define variable.
10126         (DATA): Rename to ...
10127         (PKGLIB): ... this.  Update all users.
10128         (PKGDATA): New variable.
10129         (pkgdata_IMAGES): Rename to ...
10130         (pkglib_IMAGES): ... this. Update all users.
10131         (pkgdata_MODULES): Rename to ...
10132         (pkglib_MODULES): ... this. Update all users.
10133         (pkgdata_PROGRAMS): Rename to ...
10134         (pkglib_PROGRAMS): ... this. Update all users.
10135         (pkgdata_DATA): Rename to ...
10136         (pkglib_DATA): ... this. Update all users.
10137         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
10138         (unicode.pff, ascii.pff): New rules.
10139         (all-local): Add `$(PKGDATA)' dependency.
10140         (install-local): Process `$(PKGDATA)'.
10142         * util/update-grub_lib.in (font_path): Search for *.pff files in
10143         a few more locations, including `${pkgdata}'.
10145 2007-12-23  Robert Millan  <rmh@aybabtu.com>
10147         Patch from Bean  <bean123ch@gmail.com>:
10148         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
10149         `size'.
10151 2007-12-21  Bean  <bean123ch@gmail.com>
10153         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
10154         (ntfscomp_mod_SOURCES): New variable.
10155         (ntfscomp_mod_CFLAGS): Likewise.
10156         (ntfscomp_mod_LDFLAGS): Likewise.
10158         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
10159         (grub_probe_SOURCES): Likewise.
10160         (grub_emu_SOURCES): Likewise.
10162         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10163         (grub_emu_SOURCES): Likewise.
10165         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10166         (grub_emu_SOURCES): Likewise.
10168         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10169         (grub_emu_SOURCES): Likewise.
10171         * fs/ntfs.c (grub_ntfscomp_func): New variable.
10172         (read_run_list): Renamed to grub_ntfs_read_run_list.
10173         (decomp_nextvcn): Moved to ntfscomp.c.
10174         (decomp_getch): Likewise.
10175         (decomp_get16): Likewise.
10176         (decomp_block): Likewise.
10177         (read_block): Likewise.
10178         (read_data): Partially moved to ntfscomp.c.
10179         (fixup): Change unsigned to grub_uint16_t.
10180         (read_mft): Change unsigned long to grub_uint32_t.
10181         (read_attr): Likewise.
10182         (read_data): Likewise.
10183         (read_run_data): Likewise.
10184         (read_run_list): Likewise.
10185         (read_mft): Likewise.
10187         * fs/ntfscomp.c: New file.
10189         * include/grub/ntfs.h: New file.
10191 2007-12-16  Robert Millan  <rmh@aybabtu.com>
10193         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10194         IDE disk check, since Linux is known to support 20 IDE disks.
10195         Reported by Colin Watson.
10197 2007-12-15  Bean  <bean123ch@gmail.com>
10199         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10200         (lnxboot_img_SOURCES): New variable.
10201         (lnxboot_img_ASFLAGS): Likewise.
10202         (lnxboot_img_LDFLAGS): Likewise.
10204         * boot/i386/pc/lnxboot.S: New file.
10206 2007-11-24  Pavel Roskin  <proski@gnu.org>
10208         * configure.ac: Test if '--build-id=none' is supported by the
10209         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
10210         objcopy to generate incorrect binary files (binutils
10211         2.17.50.0.18-1 as shipped by Fedora 8).
10212         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10213         linking, so that build ID doesn't break the test.
10215 2007-11-24  Pavel Roskin  <proski@gnu.org>
10217         * include/grub/i386/time.h: use "void" in the argument list
10218         of grub_cpu_idle().
10219         * include/grub/powerpc/time.h: Likewise.
10220         * include/grub/sparc64/time.h: Likewise.
10222 2007-11-18  Christian Franke  <franke@computer.org>
10224         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10225         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10226         This fixes the problem that function keys did not work in grub-emu.
10228 2007-11-18  Christian Franke  <franke@computer.org>
10230         * disk/host.c (grub_host_open): Remove attribute unused from
10231         name parameter. Add check for "host". This fixes the problem
10232         that grub-emu does not find partitions.
10234 2007-11-18  Christian Franke  <franke@computer.org>
10236         * util/hostfs.c (is_dir): New function.
10237         (grub_hostfs_dir):  Handle missing dirent.d_type case.
10238         (grub_hostfs_read): Add missing fseek().
10239         (grub_hostfs_label): Clear label pointer.  This fixes a crash
10240         of grub-emu on "ls (host)".
10242 2007-11-18  Christian Franke  <franke@computer.org>
10244         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10245         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10246         to 64 bit boundary by default.
10248 2007-11-18  Bean  <bean123ch@gmail.com>
10250         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10251         (hexdump_mod_SOURCES): New variable.
10252         (hexdump_mod_CFLAGS): Likewise.
10253         (hexdump_mod_LDFLAGS): Likewise.
10255         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10257         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10259         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10261         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10263         * include/grub/hexdump.h: New file.
10265         * commands/hexdump.c: New file.
10267 2007-11-10  Robert Millan  <rmh@aybabtu.com>
10269         * commands/i386/pc/play.c (beep_off): Switch order of arguments
10270         in grub_outb() calls.
10271         (beep_on): Likewise.
10273 2007-11-10  Christian Franke  <franke@computer.org>
10275         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10276         (grub_menu_run): Likewise.
10278 2007-11-10  Robert Millan  <rmh@aybabtu.com>
10280         * include/grub/i386/efi/machine.h: New file.
10281         * include/grub/i386/linuxbios/machine.h: Likewise.
10282         * include/grub/i386/pc/machine.h: Likewise.
10283         * include/grub/powerpc/ieee1275/machine.h: Likewise.
10284         * include/grub/sparc64/ieee1275/machine.h: Likewise.
10286         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10287         (serial_hw_io_addr): New variable.
10288         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10289         instead of `(unsigned short *) 0x400'.
10291 2007-11-10  Bean  <bean123ch@gmail.com>
10293         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10295 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
10297         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10298         (vga_mod_SOURCES): Added.
10299         (vga_mod_CFLAGS): Likewise.
10300         (vga_mod_LDFLAGS): Likewise.
10302         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10303         grub_outb() calls.
10304         (set_map_mask): Likewise.
10305         (set_read_map): Likewise.
10306         (set_read_address): Likewise.
10307         (vga_font): Removed variable.
10308         (get_vga_glyph): Removed function.
10309         (invalidate_char): Likewise.
10310         (write_char): Changed to use grub_font_get_glyph() for font
10311         information.
10312         (grub_vga_putchar): Likewise.
10313         (grub_vga_getcharwidth): Likewise.
10315 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
10317         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10318         flags.
10319         (pxeboot_img_LDFLAGS): Likewise.
10320         (diskboot_img_LDFLAGS): Likewise.
10321         (kernel_img_LDFLAGS): Likewise.
10323 2007-11-06  Robert Millan  <rmh@aybabtu.com>
10325         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10326         in grub_outb() calls.
10327         (serial_hw_init): Likewise.
10329 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10331         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10332         spaces.  Skip non-regular files.
10334 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10336         * kern/disk.c (grub_disk_firmware_fini)
10337         (grub_disk_firmware_is_tainted): New variables.
10339         * include/grub/disk.h (grub_disk_firmware_fini)
10340         (grub_disk_firmware_is_tainted): Likewise.
10342         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10343         (grub_disk_biosdisk_fini): ... to here.
10344         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10345         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10346         is set.  Register grub_disk_biosdisk_fini() in
10347         `grub_disk_firmware_fini'.
10349         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10350         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10351         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10352         to finish existing firmware disk interface.
10354         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10355         (ata_mod_SOURCES): New variable.
10356         (ata_mod_CFLAGS): Likewise.
10357         (ata_mod_LDFLAGS): Likewise.
10359 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10361         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
10362         (grub_ata_wait): Reimplement using grub_millisleep().
10364         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10365         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10367 2007-11-03  Marco Gerards  <marco@gnu.org>
10369         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10370         (CRTC_ADDR_PORT): New macro.
10371         (CRTC_DATA_PORT): Likewise.
10372         (CRTC_CURSOR): Likewise.
10373         (CRTC_CURSOR_ADDR_HIGH): Likewise.
10374         (CRTC_CURSOR_ADDR_LOW): Likewise.
10375         (update_cursor): New function.
10376         (grub_console_real_putchar): Call `update_cursor'.
10377         (grub_console_gotoxy): Likewise.
10378         (grub_console_cls): Set the default color when clearing the
10379         screen.
10380         (grub_console_setcursor): Implemented.
10382 2007-11-03  Marco Gerards  <marco@gnu.org>
10384         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10385         become activate.
10386         (grub_ata_pio_write): Likewise.
10388         (grub_atapi_identify): Wait after issuing an ATA command.
10389         (grub_atapi_packet): Likewise.
10390         (grub_ata_identify): Likewise.
10391         (grub_ata_readwrite): Likewise.
10393 2007-11-03  Marco Gerards  <marco@gnu.org>
10395         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10396         (grub_ata_pio_write): Likewise.
10397         (grub_ata_readwrite): Use `grub_error', instead of
10398         returning `grub_errno'.
10400 2007-11-03  Marco Gerards  <marco@gnu.org>
10402         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10403         grub_ata_pio_write once for every single sector, instead of for
10404         multiple sectors.
10406 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10408         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10410         * conf/i386-linuxbios.rmk: New file.
10412         * kern/i386/pc/hardware.c: Likewise.
10413         * term/i386/pc/at_keyboard.c: Likewise.
10414         * term/i386/pc/vga_text.c: Likewise.
10416         * include/grub/i386/linuxbios/boot.h: Likewise.
10417         * include/grub/i386/linuxbios/console.h: Likewise.
10418         * include/grub/i386/linuxbios/init.h: Likewise.
10419         * include/grub/i386/linuxbios/kernel.h: Likewise.
10420         * include/grub/i386/linuxbios/loader.h: Likewise.
10421         * include/grub/i386/linuxbios/memory.h: Likewise.
10422         * include/grub/i386/linuxbios/serial.h: Likewise.
10423         * include/grub/i386/linuxbios/time.h: Likewise.
10425         * kern/i386/linuxbios/init.c: Likewise.
10426         * kern/i386/linuxbios/startup.S: Likewise.
10427         * kern/i386/linuxbios/table.c: Likewise.
10429 2007-10-31  Marco Gerards  <marco@gnu.org>
10431         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10432         (ata_mod_SOURCES): New variable.
10433         (ata_mod_CFLAGS): Likewise.
10434         (ata_mod_LDFLAGS): Likewise.
10436         * disk/ata.c: New file.
10438         * include/grub/disk.h (grub_disk_dev_id): Add
10439         `GRUB_DISK_DEV_ATA_ID'.
10441 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10443         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10444         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10446         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10447         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10449         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10450         `<grub/types.h>'.
10452         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10454 2007-10-27  Robert Millan  <rmh@aybabtu.com>
10456         * include/grub/types.h (ULONG_MAX): Define macro.
10458 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10460         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
10461         `"../realmode.S"'.
10462         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
10464 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10466         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10467         (pkgdata_MODULES): Add `biosdisk.mod'.
10468         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10469         variables.
10471         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10472         (grub_biosdisk_init): Replace with ...
10473         (GRUB_MOD_INIT(biosdisk)): ... this.
10474         (grub_biosdisk_fini): Replace with ...
10475         (GRUB_MOD_FINI(biosdisk)): ... this.
10477         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10478         (grub_machine_init): Remove call to grub_biosdisk_init().
10479         (grub_machine_fini): Remove call to grub_machine_fini().
10481         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10483 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10485         * include/grub/time.h: New file.
10486         * include/grub/i386/time.h: Likewise.
10487         * include/grub/powerpc/time.h: Likewise.
10488         * include/grub/sparc64/time.h: Likewise.
10490         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10491         instances to ...
10492         (KERNEL_MACHINE_TIME_HEADER): ... this.
10493         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10494         instances to ...
10495         (KERNEL_MACHINE_TIME_HEADER): ... this.
10496         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10497         instances to ...
10498         (KERNEL_MACHINE_TIME_HEADER): ... this.
10500         * kern/i386/efi/init.c: Include `<grub/time.h>'.
10501         (grub_millisleep): New function.
10502         * kern/i386/pc/init.c: Include `<grub/time.h>'.
10503         (grub_millisleep): New function.
10504         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10505         Remove `grub/machine/time.h' include.
10506         (grub_millisleep): New function.
10507         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10508         Remove `grub/machine/time.h' include.
10509         (grub_millisleep): New function.
10511         * include/grub/misc.h (grub_div_roundup): New function.
10513         * kern/misc.c: Include `<grub/time.h>'.
10514         (grub_millisleep_generic): New function.
10516         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10517         Add `time.h'.
10518         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10519         Add `time.h'.
10520         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10521         `machine/time.h'.  Add `time.h'.
10522         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10524 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10526         * include/grub/misc.h (grub_max): New function.
10528 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10530         * util/misc.c (grub_util_info): Call fflush() before returning.
10532 2007-10-20  Robert Millan  <rmh@aybabtu.com>
10534         * genmk.rb (Image): Copy `extra_flags' from here ...
10535         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
10537         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10538         to `argc' and `args' arguments.
10540 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10542         * kern/i386/loader.S: New file.
10544         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10545         * kern/i386/loader.S (grub_linux_prot_size)... to here.
10546         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10547         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10548         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10549         * kern/i386/loader.S (grub_linux_real_addr)... to here.
10550         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10551         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10552         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10553         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10554         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10555         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10556         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10557         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10559         * kern/i386/realmode.S: New file.
10561         * kern/i386/pc/startup.S (protstack): Moved from here ...
10562         * kern/i386/realmode.S (protstack)... to here.
10563         * kern/i386/pc/startup.S (gdt): Moved from here ...
10564         * kern/i386/realmode.S (gdt)... to here.
10565         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10566         * kern/i386/realmode.S (prot_to_real)... to here.
10568         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10569         `kern/i386/realmode.S'.
10571 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10573         * include/grub/i386/loader.h: New file.
10575         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10576         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10577         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10578         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10579         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10580         * include/grub/i386/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): ... to here.
10586         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10588 2007-10-15  Robert Millan  <rmh@aybabtu.com>
10590         * normal/misc.c (grub_normal_print_device_info): Do not probe for
10591         filesystem when dev->disk is unset.
10592         Do probe for filesystem even when dev->disk->has_partitions is set.
10593         In case a filesystem is found, always report it.
10594         In case it isn't, if dev->disk->has_partitions is set, report that
10595         a partition table was found instead of reporting that no filesystem
10596         could be identified.
10598 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10600         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10601         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10603         * include/grub/types.h (grub_host_to_target16): New macro.
10604         (grub_host_to_target32): Likewise.
10605         (grub_host_to_target64): Likewise.
10606         (grub_target_to_host16): Likewise.
10607         (grub_target_to_host32): Likewise.
10608         (grub_target_to_host64): Likewise.
10610         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10611         Renamed from to ...
10612         (GRUB_MOD_ALIGN): ...this.  Update all users.
10614         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10615         grub_host_to_target32.
10616         Replace grub_be_to_cpu32 with grub_target_to_host32.
10617         (load_modules): Likewise.
10618         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10619         Replace grub_be_to_cpu32 with grub_target_to_host32.
10620         Replace grub_cpu_to_be16 with grub_host_to_target16.
10621         Replace grub_cpu_to_be32 grub_host_to_target32.
10623 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10625         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10626         * util/elf/grub-mkimage.c: ... here.
10628         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
10629         `util/powerpc/ieee1275/grub-mkimage.c'.
10631 2007-10-07  Robert Millan  <rmh@aybabtu.com>
10633         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10634         and make it easier to figure out.
10635         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10636         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10637         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10638         leave us with less than HEAP_MIN_SIZE total heap.
10639         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10641 2007-10-03  Robert Millan  <rmh@aybabtu.com>
10643         * include/grub/i386/io.h: New file.
10644         * commands/i386/pc/play.c (inb): Removed.
10645         (outb): Removed.
10646         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10647         with grub_outb().
10648         * term/i386/pc/serial.c  (inb): Removed.
10649         (outb): Removed.
10650         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10651         with grub_outb().
10652         * term/i386/pc/vga.c  (inb): Removed.
10653         (outb): Removed.
10654         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10655         with grub_outb().
10657 2007-10-02  Robert Millan  <rmh@aybabtu.com>
10659         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10660         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10661         Reported by Marcin Kurek.
10663 2007-09-07  Robert Millan  <rmh@aybabtu.com>
10665         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10666         SmartFirmware version updates (as released by Sven Luther), and avoid
10667         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10668         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10669         known broken.
10671 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10673         From Hitoshi Ozeki:
10674         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10675         when merging two regions.
10677 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10679         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10680         * normal/completion.c (grub_normal_do_completion): Likewise.
10681         Reported by Hitoshi Ozeki.
10683 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10685         Do not use devices at boot in chainloading.
10687         * loader/i386/pc/chainloader.c (boot_drive): New variable.
10688         (boot_part_addr): Likewise.
10689         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10690         with BOOT_DRIVE and BOOT_PART_ADDR.
10691         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10692         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10694 2007-08-29  Robert Millan  <rmh@aybabtu.com>
10696         Patch from Simon Peter <dn.tlp@gmx.net>:
10697         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10698         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10699         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
10700         util/i386/pc/grub-setup.c_DEPENDENCIES.
10701         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10702         util/grub-probe.c_DEPENDENCIES.
10703         * conf/powerpc-ieee1275.rmk: Likewise.
10705 2007-08-28  Robert Millan  <rmh@aybabtu.com>
10707         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
10708         to tell grub-mkdevicemap how to name devices.
10709         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10710         feature).
10712         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10713         util/i386/get_disk_name.c.
10714         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10715         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10716         util/ieee1275/get_disk_name.c.
10718         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10720         * DISTLIST: Add util/i386/get_disk_name.c and
10721         util/ieee1275/get_disk_name.c.
10723         * util/grub-mkdevicemap.c: Replace device naming logic with
10724         grub_util_get_disk_name() calls.
10726 2007-08-20  Robert Millan  <rmh@aybabtu.com>
10728         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10729         (so that it works for both plural and singular quantities).
10731 2007-08-05  Robert Millan  <rmh@aybabtu.com>
10733         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10734         so that [xz] isn't taken into account when determining order.
10736 2007-08-02  Marco Gerards  <marco@gnu.org>
10738         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10739         `include/multiboot2.h', `include/grub/elfload.h',
10740         `include/multiboot.h', `include/grub/multiboot.h',
10741         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10742         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10743         `kern/elf.c', `loader/multiboot_loader.c',
10744         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10745         `loader/i386/pc/multiboot2.c',
10746         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10747         `util/i386/pc/grub-mkrescue.in'.  Remove
10748         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10749         `include/grub/i386/pc/util/biosdisk.h' and
10750         `include/grub/powerpc/ieee1275/multiboot.h'.
10752 2007-08-02  Bean  <bean123ch@gmail.com>
10754         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10755         (ntfs_mod_SOURCES): New variable.
10756         (ntfs_mod_CFLAGS): Likewise.
10757         (ntfs_mod_LDFLAGS): Likewise.
10759         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10760         (grub_probe_SOURCES): Likewise.
10761         (grub_emu_SOURCES): Likewise.
10763         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10764         (grub_emu_SOURCES): Likewise.
10766         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10767         (grub_emu_SOURCES): Likewise.
10769         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10771         * fs/ntfs.c: New file.
10773 2007-08-02  Bean  <bean123ch@gmail.com>
10775         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10777         * file.h (grub_file): Likewise.
10779         * fshelp.h (grub_fshelp_read_file): Likewise.
10781         * util/i386/pc/grub-setup.c (setup): Likewise.
10782         (save_first_sector): Likewise.
10783         (save_blocklists): Likewise.
10785         * fs/affs.c (grub_affs_read_file): Likewise.
10787         * fs/ext2.c (grub_ext2_read_file): Likewise.
10789         * fs/fat.c (grub_fat_read_data): Likewise.
10791         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10793         * fs/hfs.c (grub_hfs_read_file): Likewise.
10795         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10797         * fs/jfs.c (grub_jfs_read_file): Likewise.
10799         * fs/minix.c (grub_minix_read_file): Likewise.
10801         * fs/sfs.c (grub_sfs_read_file): Likewise.
10803         * fs/ufs.c (grub_ufs_read_file): Likewise.
10805         * fs/xfs.c (grub_xfs_read_file): Likewise.
10807         * command/blocklist.c (read_blocklist): Likewise.
10808         (print_blocklist): Likewise.
10810 2007-08-02  Marco Gerards  <marco@gnu.org>
10812         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10813         `util/hostfs.c'.
10815         * disk/host.c: New file.
10817         * util/hostfs.c: Likewise.
10819         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10820         return `GRUB_ERR_BAD_FS'.
10821         * fs/sfs.c (grub_sfs_mount): Likewise.
10822         * fs/xfs.c (grub_xfs_mount): Likewise.
10824         * include/grub/disk.h (enum grub_disk_dev_id): Add
10825         `GRUB_DISK_DEVICE_HOST_ID'.
10827         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10829 2007-07-24  Jerone Young  <jerone@gmail.com>
10831         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10832         modules for compilation.
10833         * conf/powerpc-ieee1275.rmk: Likewise.
10835         * include/multiboot.h: Move multiboot definitions to one file. Rename
10836         many definitions to not get grub specific.
10837         * include/multiboot2.h: Create header with multiboot 2 definitions.
10838         * include/grub/multiboot.h: Header for grub specific function
10839         prototypes and definitions.
10840         * include/grub/multiboot2.h: Likewise.
10841         * include/grub/multiboot_loader.h: Likewise.
10842         * include/grub/i386/pc/multiboot.h: Removed.
10843         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10845         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10846         and 2 to allow for one multiboot and module commands.
10847         * loader/multiboot2.c: Add multiboot2 functionality.
10848         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10849         and definition names.
10850         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10851         2 functions.
10852         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10853         ieee1275 specific multiboot2 code.
10855         * kern/i386/pc/startup.S: Change headers and definition names for
10856         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10858 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10860         * geninitheader.sh: Process file specified in first parameter rather
10861         than hardcoding grub_modules_init.lst.
10862         * geninit.sh: Likewise.  Also, construct header name dynamically rather
10863         than hardcoding grub_modules_init.h.
10865         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10866         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
10867         grub_probe_init.[ch] and grub_setup_init.[ch].
10869         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10870         grub_modules_init.h with grub_emu_init.h.
10871         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10872         grub_probe_init.[ch] files.
10873         * conf/i386-efi.rmk: Likewise.
10874         * conf/i386-pc.rmk: Likewise.
10875         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10876         grub_setup_init.[ch] files.
10878         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10879         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
10880         to initialize modules rather than a list of hardcoded functions.
10881         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
10882         grub_init_all() to initialize modules rather than a list of hardcoded
10883         functions.
10885 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10887         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10888         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10890 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10892         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10893         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10894         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10895         flag when running on SmartFirmware.
10896         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10897         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10898         was set.
10900         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10901         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10902         rather than decreasing it.
10904         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10905         there's not enough space to do it, fail in the same way as when it
10906         can't be done because there are no partitions.
10908         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10909         when nvsetenv failed.
10911 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10913         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10914         because this rule is automatically generated.
10915         (grub-mkrescue): Removed for the same reason as above.
10917 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10919         Migrate to GNU General Public License Version 3.
10921         * COPYING: Replaced with the plain text version of GPLv3.
10923         * config.guess: Updated from gnulib.
10924         * config.sub: Likewise.
10926         * geninit.sh: Output a GPLv3 copyright notice.
10927         * geninitheader.sh: Likewise.
10928         * genmodsrc.sh: Likewise.
10929         * gensymlist.sh.in: Likewise.
10931         * boot/i386/pc/boot.S: Upgraded to GPLv3.
10932         * boot/i386/pc/diskboot.S: Likewise.
10933         * boot/i386/pc/pxeboot.S: Likewise.
10934         * commands/blocklist.c: Likewise.
10935         * commands/boot.c: Likewise.
10936         * commands/cat.c: Likewise.
10937         * commands/cmp.c: Likewise.
10938         * commands/configfile.c: Likewise.
10939         * commands/echo.c: Likewise.
10940         * commands/help.c: Likewise.
10941         * commands/ls.c: Likewise.
10942         * commands/search.c: Likewise.
10943         * commands/terminal.c: Likewise.
10944         * commands/test.c: Likewise.
10945         * commands/videotest.c: Likewise.
10946         * commands/i386/cpuid.c: Likewise.
10947         * commands/i386/pc/halt.c: Likewise.
10948         * commands/i386/pc/play.c: Likewise.
10949         * commands/i386/pc/reboot.c: Likewise.
10950         * commands/i386/pc/vbeinfo.c: Likewise.
10951         * commands/i386/pc/vbetest.c: Likewise.
10952         * commands/ieee1275/halt.c: Likewise.
10953         * commands/ieee1275/reboot.c: Likewise.
10954         * commands/ieee1275/suspend.c: Likewise.
10955         * disk/loopback.c: Likewise.
10956         * disk/lvm.c: Likewise.
10957         * disk/raid.c: Likewise.
10958         * disk/efi/efidisk.c: Likewise.
10959         * disk/i386/pc/biosdisk.c: Likewise.
10960         * disk/ieee1275/ofdisk.c: Likewise.
10961         * font/manager.c: Likewise.
10962         * fs/affs.c: Likewise.
10963         * fs/ext2.c: Likewise.
10964         * fs/fat.c: Likewise.
10965         * fs/fshelp.c: Likewise.
10966         * fs/hfs.c: Likewise.
10967         * fs/hfsplus.c: Likewise.
10968         * fs/iso9660.c: Likewise.
10969         * fs/jfs.c: Likewise.
10970         * fs/minix.c: Likewise.
10971         * fs/sfs.c: Likewise.
10972         * fs/ufs.c: Likewise.
10973         * fs/xfs.c: Likewise.
10974         * hello/hello.c: Likewise.
10975         * include/grub/acorn_filecore.h: Likewise.
10976         * include/grub/arg.h: Likewise.
10977         * include/grub/bitmap.h: Likewise.
10978         * include/grub/boot.h: Likewise.
10979         * include/grub/cache.h: Likewise.
10980         * include/grub/device.h: Likewise.
10981         * include/grub/disk.h: Likewise.
10982         * include/grub/dl.h: Likewise.
10983         * include/grub/elfload.h: Likewise.
10984         * include/grub/env.h: Likewise.
10985         * include/grub/err.h: Likewise.
10986         * include/grub/file.h: Likewise.
10987         * include/grub/font.h: Likewise.
10988         * include/grub/fs.h: Likewise.
10989         * include/grub/fshelp.h: Likewise.
10990         * include/grub/gzio.h: Likewise.
10991         * include/grub/hfs.h: Likewise.
10992         * include/grub/kernel.h: Likewise.
10993         * include/grub/loader.h: Likewise.
10994         * include/grub/lvm.h: Likewise.
10995         * include/grub/misc.h: Likewise.
10996         * include/grub/mm.h: Likewise.
10997         * include/grub/net.h: Likewise.
10998         * include/grub/normal.h: Likewise.
10999         * include/grub/parser.h: Likewise.
11000         * include/grub/partition.h: Likewise.
11001         * include/grub/pc_partition.h: Likewise.
11002         * include/grub/raid.h: Likewise.
11003         * include/grub/rescue.h: Likewise.
11004         * include/grub/script.h: Likewise.
11005         * include/grub/setjmp.h: Likewise.
11006         * include/grub/symbol.h: Likewise.
11007         * include/grub/term.h: Likewise.
11008         * include/grub/terminfo.h: Likewise.
11009         * include/grub/tparm.h: Likewise.
11010         * include/grub/types.h: Likewise.
11011         * include/grub/video.h: Likewise.
11012         * include/grub/efi/api.h: Likewise.
11013         * include/grub/efi/chainloader.h: Likewise.
11014         * include/grub/efi/console.h: Likewise.
11015         * include/grub/efi/console_control.h: Likewise.
11016         * include/grub/efi/disk.h: Likewise.
11017         * include/grub/efi/efi.h: Likewise.
11018         * include/grub/efi/pe32.h: Likewise.
11019         * include/grub/efi/time.h: Likewise.
11020         * include/grub/i386/linux.h: Likewise.
11021         * include/grub/i386/setjmp.h: Likewise.
11022         * include/grub/i386/types.h: Likewise.
11023         * include/grub/i386/efi/kernel.h: Likewise.
11024         * include/grub/i386/efi/loader.h: Likewise.
11025         * include/grub/i386/efi/time.h: Likewise.
11026         * include/grub/i386/pc/biosdisk.h: Likewise.
11027         * include/grub/i386/pc/boot.h: Likewise.
11028         * include/grub/i386/pc/chainloader.h: Likewise.
11029         * include/grub/i386/pc/console.h: Likewise.
11030         * include/grub/i386/pc/init.h: Likewise.
11031         * include/grub/i386/pc/kernel.h: Likewise.
11032         * include/grub/i386/pc/loader.h: Likewise.
11033         * include/grub/i386/pc/memory.h: Likewise.
11034         * include/grub/i386/pc/multiboot.h: Likewise.
11035         * include/grub/i386/pc/serial.h: Likewise.
11036         * include/grub/i386/pc/time.h: Likewise.
11037         * include/grub/i386/pc/vbe.h: Likewise.
11038         * include/grub/i386/pc/vbeblit.h: Likewise.
11039         * include/grub/i386/pc/vbefill.h: Likewise.
11040         * include/grub/i386/pc/vbeutil.h: Likewise.
11041         * include/grub/i386/pc/vga.h: Likewise.
11042         * include/grub/ieee1275/ieee1275.h: Likewise.
11043         * include/grub/ieee1275/ofdisk.h: Likewise.
11044         * include/grub/powerpc/libgcc.h: Likewise.
11045         * include/grub/powerpc/setjmp.h: Likewise.
11046         * include/grub/powerpc/types.h: Likewise.
11047         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
11048         * include/grub/powerpc/ieee1275/console.h: Likewise.
11049         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
11050         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
11051         * include/grub/powerpc/ieee1275/loader.h: Likewise.
11052         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
11053         * include/grub/powerpc/ieee1275/time.h: Likewise.
11054         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
11055         * include/grub/sparc64/libgcc.h: Likewise.
11056         * include/grub/sparc64/setjmp.h: Likewise.
11057         * include/grub/sparc64/types.h: Likewise.
11058         * include/grub/sparc64/ieee1275/console.h: Likewise.
11059         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11060         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11061         * include/grub/sparc64/ieee1275/time.h: Likewise.
11062         * include/grub/util/biosdisk.h: Likewise.
11063         * include/grub/util/getroot.h: Likewise.
11064         * include/grub/util/lvm.h: Likewise.
11065         * include/grub/util/misc.h: Likewise.
11066         * include/grub/util/raid.h: Likewise.
11067         * include/grub/util/resolve.h: Likewise.
11068         * io/gzio.c: Likewise.
11069         * kern/device.c: Likewise.
11070         * kern/disk.c: Likewise.
11071         * kern/dl.c: Likewise.
11072         * kern/elf.c: Likewise.
11073         * kern/env.c: Likewise.
11074         * kern/err.c: Likewise.
11075         * kern/file.c: Likewise.
11076         * kern/fs.c: Likewise.
11077         * kern/loader.c: Likewise.
11078         * kern/main.c: Likewise.
11079         * kern/misc.c: Likewise.
11080         * kern/mm.c: Likewise.
11081         * kern/parser.c: Likewise.
11082         * kern/partition.c: Likewise.
11083         * kern/rescue.c: Likewise.
11084         * kern/term.c: Likewise.
11085         * kern/efi/efi.c: Likewise.
11086         * kern/efi/init.c: Likewise.
11087         * kern/efi/mm.c: Likewise.
11088         * kern/i386/dl.c: Likewise.
11089         * kern/i386/efi/init.c: Likewise.
11090         * kern/i386/efi/startup.S: Likewise.
11091         * kern/i386/pc/init.c: Likewise.
11092         * kern/i386/pc/lzo1x.S: Likewise.
11093         * kern/i386/pc/startup.S: Likewise.
11094         * kern/ieee1275/ieee1275.c: Likewise.
11095         * kern/powerpc/cache.S: Likewise.
11096         * kern/powerpc/dl.c: Likewise.
11097         * kern/powerpc/ieee1275/cmain.c: Likewise.
11098         * kern/powerpc/ieee1275/crt0.S: Likewise.
11099         * kern/powerpc/ieee1275/init.c: Likewise.
11100         * kern/powerpc/ieee1275/openfw.c: Likewise.
11101         * kern/sparc64/cache.S: Likewise.
11102         * kern/sparc64/dl.c: Likewise.
11103         * kern/sparc64/ieee1275/init.c: Likewise.
11104         * kern/sparc64/ieee1275/openfw.c: Likewise.
11105         * loader/efi/chainloader.c: Likewise.
11106         * loader/efi/chainloader_normal.c: Likewise.
11107         * loader/i386/efi/linux.c: Likewise.
11108         * loader/i386/efi/linux_normal.c: Likewise.
11109         * loader/i386/pc/chainloader.c: Likewise.
11110         * loader/i386/pc/chainloader_normal.c: Likewise.
11111         * loader/i386/pc/linux.c: Likewise.
11112         * loader/i386/pc/linux_normal.c: Likewise.
11113         * loader/i386/pc/multiboot.c: Likewise.
11114         * loader/i386/pc/multiboot_normal.c: Likewise.
11115         * loader/powerpc/ieee1275/linux.c: Likewise.
11116         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11117         * normal/arg.c: Likewise.
11118         * normal/cmdline.c: Likewise.
11119         * normal/command.c: Likewise.
11120         * normal/completion.c: Likewise.
11121         * normal/execute.c: Likewise.
11122         * normal/function.c: Likewise.
11123         * normal/lexer.c: Likewise.
11124         * normal/main.c: Likewise.
11125         * normal/menu.c: Likewise.
11126         * normal/menu_entry.c: Likewise.
11127         * normal/misc.c: Likewise.
11128         * normal/parser.y: Likewise.
11129         * normal/script.c: Likewise.
11130         * normal/i386/setjmp.S: Likewise.
11131         * normal/powerpc/setjmp.S: Likewise.
11132         * normal/sparc64/setjmp.S: Likewise.
11133         * partmap/acorn.c: Likewise.
11134         * partmap/amiga.c: Likewise.
11135         * partmap/apple.c: Likewise.
11136         * partmap/gpt.c: Likewise.
11137         * partmap/pc.c: Likewise.
11138         * partmap/sun.c: Likewise.
11139         * term/gfxterm.c: Likewise.
11140         * term/terminfo.c: Likewise.
11141         * term/efi/console.c: Likewise.
11142         * term/i386/pc/console.c: Likewise.
11143         * term/i386/pc/serial.c: Likewise.
11144         * term/i386/pc/vesafb.c: Likewise.
11145         * term/i386/pc/vga.c: Likewise.
11146         * term/ieee1275/ofconsole.c: Likewise.
11147         * util/biosdisk.c: Likewise.
11148         * util/console.c: Likewise.
11149         * util/genmoddep.c: Likewise.
11150         * util/getroot.c: Likewise.
11151         * util/grub-emu.c: Likewise.
11152         * util/grub-mkdevicemap.c: Likewise.
11153         * util/grub-probe.c: Likewise.
11154         * util/lvm.c: Likewise.
11155         * util/misc.c: Likewise.
11156         * util/raid.c: Likewise.
11157         * util/resolve.c: Likewise.
11158         * util/update-grub.in: Likewise.
11159         * util/update-grub_lib.in: Likewise.
11160         * util/grub.d/00_header.in: Likewise.
11161         * util/grub.d/10_hurd.in: Likewise.
11162         * util/grub.d/10_linux.in: Likewise.
11163         * util/i386/efi/grub-install.in: Likewise.
11164         * util/i386/efi/grub-mkimage.c: Likewise.
11165         * util/i386/pc/grub-install.in: Likewise.
11166         * util/i386/pc/grub-mkimage.c: Likewise.
11167         * util/i386/pc/grub-mkrescue.in: Likewise.
11168         * util/i386/pc/grub-setup.c: Likewise.
11169         * util/i386/pc/misc.c: Likewise.
11170         * util/powerpc/ieee1275/grub-install.in: Likewise.
11171         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
11172         * util/powerpc/ieee1275/misc.c: Likewise.
11173         * video/bitmap.c: Likewise.
11174         * video/video.c: Likewise.
11175         * video/i386/pc/vbe.c: Likewise.
11176         * video/i386/pc/vbeblit.c: Likewise.
11177         * video/i386/pc/vbefill.c: Likewise.
11178         * video/i386/pc/vbeutil.c: Likewise.
11179         * video/readers/tga.c: Likewise.
11181 2007-07-02  Robert Millan  <rmh@aybabtu.com>
11183         * conf/i386-efi.rmk: Replace obsolete reference to
11184         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11185         with util/getroot.c.
11186         * conf/powerpc-ieee1275.rmk: Likewise.
11187         * conf/sparc64-ieee1275.rmk: Likewise.
11189         * util/grub-emu.c (main): Fix unchecked pointer handling.
11191 2007-07-02  Robert Millan  <rmh@aybabtu.com>
11193         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11194         invocation to fail, in order to support partition-less media.
11196         * util/i386/pc/grub-install.in: Likewise.
11198         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11199         which fs or partmap modules are needed (akin to its sister scripts).
11201         Also use grub-probe to get rid of unportable /proc/mounts check.
11203         Print the same informational message that the other scripts do, before
11204         exiting.
11206 2007-06-23  Robert Millan  <rmh@aybabtu.com>
11208         * util/update-grub_lib.in (font_path): New function.  Determine whether
11209         a font file can be found and, if so, echo the GRUB path to it.
11211         * util/update-grub.in: Handle multiple terminals depending on user
11212         input, platform availability and font file presence.  Propagate
11213         variables of our findings to /etc/grub.d/ children.
11215         * util/grub.d/00_header.in: Handle multiple terminals, based on
11216         environment setup by update-grub.
11218 2007-06-23  Robert Millan  <rmh@aybabtu.com>
11220         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
11222 2007-06-21  Robert Millan  <rmh@aybabtu.com>
11224         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11225         indicate end of data section in kernel image.
11226         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11227         GRUB_KERNEL_MACHINE_DATA_END.
11229         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11230         space for it.
11231         * kern/i386/efi/startup.S: Likewise.
11233         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11234         during image generation.  Implement --prefix option to override this
11235         patch.
11236         * util/i386/efi/grub-mkimage.c: Likewise.
11238         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11239         code to make path relative to its root into a separate function.
11241         * util/i386/pc/grub-install.in: Use newly provided
11242         make_system_path_relative_to_its_root() to convert ${grubdir}, then
11243         pass the result to grub-install --prefix.
11245 2007-06-13  Robert Millan  <rmh@aybabtu.com>
11247         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11248         DEFAULT_DEVICE_MAP.
11249         * util/grub-emu.c: Use above definitions from misc.h instead of
11250         defining them.
11251         * util/grub-mkdevicemap.c: Likewise.
11252         * util/i386/pc/grub-setup.c: Likewise.
11253         * util/grub-probe.c: Likewise.
11254         (probe): Abort with grub_util_error() when either
11255         grub_guess_root_device or grub_util_get_grub_dev fails.
11257 2007-06-12  Robert Millan  <rmh@aybabtu.com>
11259         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11260         "pager" assignment.
11261         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11262         "pcdata".
11263         * util/grub-probe.c (probe): Likewise for "drive_name".
11265 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11267         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11268         not just the cdrom one.
11270 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11272         * util/i386/pc/grub-mkrescue.in: Add "set -e".
11273         Add --pkglibdir=DIR option to override pkglibdir.
11274         Mention --image-type=TYPE in help output.
11275         Fix --grub-mkimage (it was a no-op).
11276         Abort gracefully when no parameter is given.
11278 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11280         * util/i386/pc/grub-mkrescue.in: New file.
11281         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
11282         * Makefile.in: Handle bin_SCRIPTS.
11284 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
11286         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11287         list of video modes.
11289 2007-06-06  Robert Millan  <rmh@aybabtu.com>
11291         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11292         file doesn't exist, or if it is in a filesystem grub can't read.
11294         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
11295         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
11296         header comment to fit in 80 columns when the variables are resolved.
11298         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11299         could be identified by update-grub.  Remove redundant check for
11300         unifont.pff existence (since convert_system_path_to_grub_path now
11301         handles that).
11303 2007-06-04  Robert Millan  <rmh@aybabtu.com>
11305         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11307         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11309         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11311 2007-06-04  Robert Millan  <rmh@aybabtu.com>
11313         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11315         * include/grub/partition.h: Declare grub_apple_partition_map_init and
11316         grub_apple_partition_map_fini.
11318         * util/biosdisk.c
11319         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11320         to access >2 TiB disks).
11322         Print disk->total_sectors with %llu instead of %lu, since this
11323         variable is always 64-bit (prevents wrong disk size from being displayed
11324         on either >2 TiB disk or big-endian CPU).
11326         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11327         into a generic case that supports all (sane) partition maps.
11329         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11330         breaks big-endian.
11332         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11333         and grub_apple_partition_map_fini() after that.
11335 2007-06-01  Robert Millan  <rmh@aybabtu.com>
11337         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11339         * util/grub.d/00_header.in: Only enable gfxterm when
11340         convert_system_path_to_grub_path() succeeds.
11342 2007-05-20  Robert Millan  <rmh@aybabtu.com>
11344         * util/update-grub_lib.in: New file.
11345         * DISTLIST: Add update-grub_lib.in.
11346         * conf/common.rmk: Generate update-grub_lib and install it in
11347         $(lib_DATA).
11348         * Makefile.in: Add install routine for $(lib_DATA).
11350         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11351         function provided by update-grub_lib to support arbitrary paths of
11352         unifont.pff.
11353         * util/update-grub.in: Use convert_system_path_to_grub_path() to
11354         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11356 2007-05-19  Robert Millan  <rmh@aybabtu.com>
11358         * commands/i386/cpuid.c: New module.
11359         * DISTLIST: Add it.
11360         * conf/i386-efi.rmk: Enable cpuid.mod.
11361         * conf/i386-pc.rmk: Likewise.
11363 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11365         * kern/disk.c (grub_disk_read): Check return value of
11366         grub_realloc().
11368 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11370         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11371         arrays.
11372         * disk/raid.c (grub_raid_open): Likewise.
11374 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11376         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11377         stack instead of on the heap.
11379         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11380         before doing a read on it.
11382         * configure.ac: Only use -fno-stack-protector for the target
11383         environment.
11385 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11387         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11388         __attribute_ ((unused)) to mode_type argument.
11390         * util/getroot.c (grub_guess_root_device): Fix #endif.
11392         * kern/misc.c (memcmp): Fix prototype.
11394         * include/grub/partition.h [GRUB_UTIL]
11395         (grub_gpt_partition_map_init): Add prototype.
11396         (grub_gpt_partition_map_fini): Likewise.
11398         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11399         at the right place.
11401         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11402         (grub_fat_read_data): Likewise.
11403         (grub_fat_find_dir): Likewise.
11405         * font/manager.c (find_glyph): Make table a const.
11406         (grub_font_get_glyph): Remove bitmap from if statement.
11408 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
11410         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11411         code, first search for device in /dev/mapper, then in /dev.
11412         (grub_util_get_grub_dev): New function.
11413         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11414         prototype.
11415         * util/grub-probe.c (probe): Remove check for RAID, call
11416         grub_util_get_grub_dev() instead of
11417         grub_util_biosdisk_get_grub_dev().
11418         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11419         grub_util_biosdisk_get_grub_dev().
11420         * util/i386/pc/grub-setup.c (main): Likewise.
11422 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11424         * DISTLIST: Update for the latest changes.
11425         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11426         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11427         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11428         grub/util/biosdisk.h.
11429         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11430         grub/util/biosdisk.h.
11432 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11434         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11436 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11438         * util/i386/efi/grub-install.in: New.
11439         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11440         newly added grub-install.
11441         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11442         include.
11443         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11444         grub/util/biosdisk.h.
11445         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11446         grub/util/biosdisk.h.
11448 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11450         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11451         * include/grub/util/biosdisk.h: ... here.
11452         * util/i386/pc/biosdisk.c: Moved to ...
11453         * util/biosdisk.c: ... here.
11454         * util/i386/pc/getroot.c: Moved to ...
11455         * util/getroot.c: ... here.
11456         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11457         * util/grub-mkdevicemap.c: ... here.
11458         * util/i386/pc/grub-probe.c: Moved to ...
11459         * util/grub-probe.c: ... here.
11461 2007-05-15  Robert Millan  <rmh@aybabtu.com>
11463         * util/update-grub.in: Remove duplicated line in grub.cfg header
11464         message.
11466 2007-05-13  Robert Millan  <rmh@aybabtu.com>
11468         * util/update-grub.in: Fix a few assumptions about the devices holding
11469         /, /boot and /boot/grub being the same.
11470         * util/grub.d/00_header.in: Likewise.
11471         * util/grub.d/10_hurd.in: Likewise.
11472         * util/grub.d/10_linux.in: Likewise.
11474         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11475         patterns.  Use that to define the `.old' suffix as older than `'.
11477         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11479         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11480         the grub.cfg header message.
11482 2007-05-11  Robert Millan  <rmh@aybabtu.com>
11484         * util/update-grub.in: Create device.map if it doesn't already exist,
11485         before attempting to run grub-probe.
11486         Check for grub-probe and grub-mkdevicemap with the same code
11487         grub-install is using.
11488         Remove test mode.
11490 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11492         * Makefile.in: Add the datarootdir autoconf variable.
11494 2007-05-09  Robert Millan  <rmh@aybabtu.com>
11496         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
11497         fail gracefully if dev->disk->partition == NULL.
11499 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11501         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11502         determine partition map module.
11503         * util/i386/pc/grub-install.in: Use this feature to decide which
11504         partition module to load, instead of hardcoding pc and gpt.
11506 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11508         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11509         source directory differs from build directory.
11511 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11513         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11514         initialisation.
11516 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11518         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11520 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11522         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11523         command-line arguments via ${GRUB_CMDLINE_LINUX}.
11525 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11527         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11528         (grub_probe_SOURCES): Likewise.
11529         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11530         GPT and initialize dos_part and bsd_part accordingly.
11531         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11532         install_bsd_part.
11533         (main): Activate gpt module for use during partition identification,
11534         and deactivate it afterwards.
11535         * util/i386/pc/grub-install.in: Add gpt module to core.img.
11536         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11537         partition identification, and deactivate it afterwards.
11539 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11541         * term/i386/pc/console.c (grub_console_fini): Call
11542         grub_term_set_current() before grub_term_unregister().
11544 2007-05-04  Robert Millan  <rmh@aybabtu.com>
11546         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11547         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11548         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
11549         and update-grub_DATA.
11550         * conf/common.rmk: Build and install update-grub components.
11551         * conf/common.mk: Regenerate.
11552         * util/update-grub.in: New.  Core of update-grub.
11553         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
11554         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
11555         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
11556         * util/grub.d/README: New.  Document grub.d directory layout.
11558 2007-05-01  Robert Millan  <rmh@aybabtu.com>
11560         * util/grub-emu.c: Move initialization functions
11561         grub_util_biosdisk_init() and grub_init_all() before
11562         grub_util_biosdisk_get_grub_dev(), which relies on them.
11564 2007-04-19  Robert Millan  <rmh@aybabtu.com>
11566         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11567         it is used later.
11569 2007-04-18  Jerone Young  <jerone@gmail.com>
11571         * kernel/elf.c: Add missing parenthesis for conditional statement
11572         stanza.
11574 2007-04-10  Jerone Young  <jerone@gmail.com>
11576         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11577         continue on and look for device node with real device name.
11579 2007-04-10  Jerone Young  <jerone@gmail.com>
11581         * configure.ac: Add argument for autoconf to use transformation
11582         ability.
11583         * Makefile.in: Add autoconf package transformation code.
11584         * util/i386/pc/grub-install.in: Likewise.
11585         * util/powerpc/ieee1275/grub-install.in: Likewise.
11587 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
11589         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11590         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11591         (EXT2_REVISION): Likewise.
11592         (EXT2_INODE_SIZE): Likewise.
11593         (struct grub_ext2_block_group): Added a missing member
11594         "used_dirs".
11595         (grub_ext2_read_inode): Divide by the inode size in a superblock
11596         instead of 128 to obtain INODES_PER_BLOCK.
11597         Use the macro EXT2_INODE_SIZE instead of directly using
11598         SBLOCK->INODE_SIZE.
11600 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
11602         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11603         superblock instead of the structure size to compute an
11604         offset. This fixes the problem that GRUB could not read a
11605         filesystem when inode size is different from 128-byte.
11607 2007-03-05  Marco Gerards  <marco@gnu.org>
11609         * normal/main.c (read_config_file): When "menu" is not set, create
11610         an initial context.
11612 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11614         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11615         (HEAP_LIMIT): New macro.
11616         (grub_claim_heap): Claim memory up to `heaplimit'.
11618 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11620         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11621         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11622         (_start): Likewise.
11623         (grub_arch_modules_addr): Return address after `_end'.
11624         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11625         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11626         (add_segments): Calculate `_end' from phdr size and location.
11627         (ALIGN_UP): Moved to ...
11628         * include/grub/misc.h: here.
11629         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11630         New macro.
11631         (GRUB_IEEE1275_MODULE_BASE): Removed.
11633 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11635         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11636         loop boundary.
11638 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11640         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11641         All users updated.
11642         (grub_elf64_load_hook_t): Likewise.
11643         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11644         debug output.
11646 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11648         * kern/mm.c: Update copyright.
11649         (grub_mm_debug): Correct syntax error.
11650         (grub_mm_dump_free): New function.
11651         (grub_debug_free): Call `grub_free'.
11652         * include/grub/mm.h: Update copyright.
11653         (grub_mm_dump_free): Add declaration.
11655 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11657         * include/grub/ieee1275/ieee1275.h: Update copyright.
11658         * kern/powerpc/ieee1275/init.c: Likewise.
11659         * kern/powerpc/ieee1275/openfw.c: Likewise.
11661         * loader/powerpc/ieee1275/linux.c: Likewise.
11662         * include/grub/elfload.h: Likewise.
11663         * kern/elf.c: Likewise.
11664         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
11665         callers.
11666         (grub_elf64_load): Likewise.
11667         (grub_elf32_load_segment): Move to a nested function.
11668         (grub_elf64_load_segment): Likewise.
11670 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11672         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11673         prototype.
11674         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11675         (grub_heap_len): Likewise.
11676         (HEAP_SIZE): New macro.
11677         (grub_claim_heap): New function.
11678         (grub_machine_init): Don't claim heap directly.  Call
11679         `grub_claim_heap'.
11680         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11681         (grub_available_iterate): New function.
11683 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
11685         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11686         * configure.ac: Use it for testing the HOST and TARGET compilers.
11688 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
11690         * Makefile.in (enable_grub_emu): New variable.
11691         * configure.ac (--enable-grub-emu): New option.
11692         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11693         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11694         * conf/i386-pc.rmk: Likewise.
11695         * conf/powerpc-ieee1275.rmk: Likewise.
11696         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11698 2006-12-12  Marco Gerards  <marco@gnu.org>
11700         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11702         * kern/env.c (grub_env_unset): Don't free the member `value' when
11703         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11704         pointer.
11706         * normal/main.c (current_menu): Removed.
11707         (free_menu): Unset the `menu' environment variable.
11708         (grub_normal_menu_addentry): Make use of the environment variable
11709         `menu', instead of using the global `current_menu'.  Allocate
11710         memory for the sourcecode of this entry.
11711         (read_config_file): New argument `nested', changed all callers.
11712         Only in the case of a new context, initialize a new menu.  Set the
11713         `menu' environment variable.
11714         (grub_normal_execute): Don't set and unset the environment
11715         variable `menu' here anymore.  Only free the menu when leaving the
11716         context.
11718         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11719         leak.
11721 2006-12-11  Marco Gerards  <marco@gnu.org>
11723         * normal/menu_entry.c (run): Fix off by one bug so the last line
11724         is executed.  Move the loader check to outside the loop.
11726 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
11728         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11730 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
11732         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11733         the number of sectors.  Reported by Andrey Shuvikov
11734         <mr_hyro@yahoo.com>.
11736 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
11738         * kern/disk.c (grub_disk_read): When there is a read error, always
11739         try to read only the necessary data.
11741         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11742         disk/raid.c.
11743         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11744         prototype.
11745         [GRUB_UTIL] (grub_raid_fini): Likewise.
11746         [GRUB_UTIL] (grub_lvm_init): Likewise.
11747         [GRUB_UTIL] (grub_lvm_fini): Likewise.
11748         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11749         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11750         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11751         and grub_raid_fini().
11753 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11755         * include/grub/types.h (__unused): Rename to UNUSED.
11756         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11757         (grub_elf64_size): Likewise.
11759 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11761         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11762         grub_error_push and grub_error_pop in the error-handling path.
11763         (grub_elf32_load_segment): Only call grub_file_read with non-zero
11764         length.
11766 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11768         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11769         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11770         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11771         (kernel_elf_SOURCES): Likewise.
11772         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11773         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11774         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11775         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11776         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11777         (elf_mod_SOURCES): New variable.
11778         (elf_mod_CFLAGS): Likewise.
11779         (elf_mod_LDFLAGS): Likewise.
11780         * include/grub/types.h (__unused): New macro.
11781         * include/grub/elfload.h: New file.
11782         * kern/elf.c: Likewise.
11783         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11784         (ELF32_LOADMASK): New macro.
11785         (ELF64_LOADMASK): Likewise.
11786         (vmlinux): Removed.
11787         (grub_linux_load32): New function.
11788         (grub_linux_load64): Likewise.
11789         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11790         Use grub_elf_t instead of grub_file_t.
11792 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
11794         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11795         `catch_result' to struct set_color_args.
11797 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
11799         * normal/menu.c: Include grub/script.h.
11800         * normal/menu_entry.c: Likewise.
11801         * include/grub/normal.h: Do not include grub/script.h.
11803 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11805         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11807 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11809         * kern/disk.c (grub_disk_open): Print debug messages when opening a
11810         disk.
11811         (grub_disk_close): Print debug messages when closing a disk.
11812         (grub_disk_read): Print debug messages when disk read fails.
11813         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11814         filesystem type.
11815         * kern/partition.c: Include misc.h.
11816         (grub_partition_iterate): Print debug messages when detecting
11817         partition type.
11819 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11821         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11822         is negative.
11823         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11825 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
11827         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11828         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11830 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
11832         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11833         instead of sizeof(lv). Patch by Michael Guntsche.
11835 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11837         * disk/lvm.c: Rename VGS to VG_LIST.
11838         (grub_lvm_iterate): Change VGS->LV to VG-LV.
11839         (grub_lvm_open): Likewise.
11840         Thanks to Michael Guntsche for finding this bug.
11842 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11844         * configure.ac (AC_INIT): Bumped to 1.95.
11846 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11848         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11849         with "/dev/.static/dev/md".
11851 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11853         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11854         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11855         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11856         DRIVE_NAME are always freed.
11858         * util/i386/pc/biosdisk.c (make_device_name): Add one into
11859         DOS_PART, as a DOS partition is counted from one instead of zero
11860         now. Reported by Robert Millan.
11862 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11864         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11865         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11866         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11867         string returned by grub_guess_root_device.
11868         * util/i386/pc/grub-setup.c: Likewise.
11869         * util/i386/pc/grub-probefs.c: Likewise.
11871         * util/i386/pc/grub-probefs.c: Rename to ...
11872         * util/i386/pc/grub-probe.c: ... this.
11873         * DISTLIST: Remove grub-probefs, add grub-probe.
11874         * conf/i386-efi.rmk: Likewise.
11875         * conf/i386-pc.rmk: Likewise.
11876         * util/i386/pc/grub-install.in: Likewise.
11878         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11879         choose which information we want to print.
11881 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11883         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11884         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11885         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11886         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11887         video/readers/tga.c and video/i386/pc/vbeutil.c.
11889 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
11891         Added support for RAID and LVM.
11893         * disk/lvm.c: New file.
11894         * disk/raid.c: Likewise.
11895         * include/grub/lvm.h: Likewise.
11896         * include/grub/raid.h: Likewise.
11897         * include/grub/util/lvm.h: Likewise.
11898         * include/grub/util/raid.h: Likewise.
11899         * util/lvm.c: Likewise.
11900         * util/raid.c: Likewise.
11902         * include/grub/disk.h (grub_disk_dev_id): Add
11903         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11904         (grub_disk_get_size): New prototype.
11905         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11906         returns a partition.
11907         (grub_disk_get_size): New function.
11909         * kern/i386/pc/init.c (make_install_device): Copy the prefix
11910         verbatim if grub_install_dos_part is -2.
11912         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11913         and LVM devices.
11915         * util/i386/pc/grub-setup.c (setup): New argument
11916         MUST_EMBED. Force embedding of GRUB when the argument is
11917         true. Close FILE before returning.
11918         (main): Add support for RAID and LVM.
11920         * conf/common.rmk: Add RAID and LVM modules.
11921         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11922         util/lvm.c.
11923         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11925         * kern/misc.c (grub_strstr): New function.
11926         * include/grub/misc.h (grub_strstr): New prototype.
11928 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
11930         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11932 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
11934         * kern/misc.c (grub_strtoull): Guess the base only if not
11935         specified.
11937 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11939         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11940         PowerMac support.
11942 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11944         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11946         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11947         Remove `flags' argument.  All callers changed.
11948         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11949         (IEEE1275_IHANDLE_INVALID): New variable.
11950         (IEEE1275_CELL_INVALID): New variable.
11951         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11952         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11953         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11954         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11955         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11956         codes from Open Firmware.  All callers updated.
11957         (grub_ieee1275_next_property): Directly return Open Firmware return
11958         code.
11959         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11960         Standardize error checking from `grub_ieee1275_get_property'.
11961         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11962         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
11964 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11966         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11967         `instance_to_package_args' to `instance_to_path_args'.
11969         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11970         `grub_ieee1275_chosen'.
11972         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11973         `grub_ieee1275_interpret'.
11975 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11977         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11979 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11981         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11982         (__cmpdi): Likewise.
11984         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11985         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
11986         `grub_ssize_t'.
11988         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11990         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11991         to type `grub_ssize_t'.
11992         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11994 2006-09-22  Marco Gerards  <marco@gnu.org>
11996         * normal/script.c (grub_script_create_cmdmenu): Skip leading
11997         newlines.
11999 2006-09-22  Marco Gerards  <marco@gnu.org>
12001         * commands/echo.c: New file.
12003         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
12005         * conf/common.rmk (echo_mod_SOURCES): New variable.
12006         (echo_mod_CFLAGS): Likewise.
12007         (echo_mod_LDFLAGS): Likewise.
12009 2006-09-22  Marco Gerards  <marco@gnu.org>
12011         * normal/main.c (get_line): Malloc memory instead of using
12012         preallocated memory.  Removed the arguments `cmdline' and
12013         `max_len'.  Updated all callers.
12015 2006-09-22  Marco Gerards  <marco@gnu.org>
12017         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
12018         (normal_mod_DEPENDENCIES): Likewise.
12020         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
12021         (normal_mod_DEPENDENCIES): Likewise.
12023         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
12025 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
12027         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
12028         programs.
12029         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
12030         (normal_mod_DEPENDENCIES): Likewise.
12031         * conf/i386-pc.mk: Regenerate.
12032         * conf/i386-efi.mk: Likewise
12033         * conf/common.mk: Likewise.
12034         * conf/powerpc-ieee1275.mk: Likewise.
12035         * conf/sparc64-ieee1275.mk: Likewise.
12037 2006-09-22  Robert Millan  <rmh@aybabtu.com>
12039         Sync with i386 version.
12040         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
12041         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
12043 2006-09-21  Robert Millan  <rmh@aybabtu.com>
12045         Import from GRUB Legacy (lib/device.c):
12046         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
12047         (init_device_map) [__linux__]: Add support for I2O devices.
12049 2006-09-14  Marco Gerards  <marco@gnu.org>
12051         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
12052         `-melf_i386'.
12054 2006-09-14  Robert Millan  <rmh@aybabtu.com>
12056         * util/i386/pc/grub-install.in: Skip menu.lst when removing
12057         /boot/grub/*.lst.
12059         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
12061         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
12062         before adding it to device.map.
12064 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
12066         * genmk.rb: Let GCC generate dependencies the first time it
12067         compiles a file; using the -MD option.
12068         * conf/common.mk: Regenerate.
12069         * conf/i386-pc.mk: Likewise.
12070         * conf/i386-efi.mk: Likewise.
12071         * conf/powerpc-ieee1275.mk: Likewise.
12072         * conf/sparc64-ieee1275.mk: Likewise.
12074 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
12076         Move the prototypes of grub_setjmp and grub_longjmp to
12077         cpu/setjmp.h, so that each architecture may specify different
12078         attributes.
12080         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
12081         (grub_longjmp): Likewise.
12082         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
12083         (grub_longjmp): Likewise.
12084         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
12085         (grub_longjmp): Likewise.
12087         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
12088         [!GRUB_UTIL] (grub_longjmp): Removed.
12090 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
12092         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
12093         "color!" method does not return any value.
12095 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12097         * include/grub/bitmap.h: New file.
12099         * include/grub/i386/pc/vbeutil.h: Likewise.
12101         * video/bitmap.c: Likewise.
12103         * video/readers/tga.c: Likewise.
12105         * video/i386/pc/vbeutil.c: Likewise.
12107         * commands/videotest.c: Code cleanup and updated to reflect to new
12108         video API.
12110         * term/gfxterm.c: Likewise.
12112         * video/video.c: Likewise.
12114         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
12115         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
12116         (bitmap_mod_SOURCES): New entry.
12117         (bitmap_mod_CFLAGS): Likewise.
12118         (bitmap_mod_LDFLAGS): Likewise.
12119         (tga_mod_SOURCES): Likewise.
12120         (tga_mod_CFLAGS): Likewise.
12121         (tga_mod_LDFLAGS): Likewise.
12123         * include/grub/video.h (grub_video_blit_operators): New enum type.
12124         (grub_video_render_target): Changed as forward declaration and moved
12125         actual definition to be video driver specific.
12126         (grub_video_adapter.blit_bitmap): Added blitting operator.
12127         (grub_video_adapter.blit_render_target): Likewise.
12128         (grub_video_blit_bitmap): Likewise.
12129         (grub_video_blit_render_target): Likewise.
12131         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
12132         driver specific render target definition.
12133         (grub_video_vbe_map_rgba): Added driver internal helper.
12134         (grub_video_vbe_unmap_color): Updated to use
12135         grub_video_i386_vbeblit_info.
12136         (grub_video_vbe_get_video_ptr): Likewise.
12138         * include/grub/i386/pc/vbeblit.h
12139         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
12140         grub_video_i386_vbeblit_info.
12141         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
12142         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
12143         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
12144         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
12145         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
12146         (grub_video_i386_vbeblit_index_index): Likewise.
12147         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
12148         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
12149         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
12150         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
12151         operator.
12152         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
12153         operator.
12155         * video/i386/pc/vbeblit.c: Updated to reflect changes on
12156         include/grub/i386/pc/vbeblit.h.
12158         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
12159         Updated to use grub_video_i386_vbeblit_info.
12160         (grub_video_i386_vbefill_R8G8B8): Likewise.
12161         (grub_video_i386_vbefill_index): Likewise.
12162         (grub_video_i386_vbefill): Added generic filler.
12164         * video/i386/pc/vbefill.c: Updated to reflect changes on
12165         include/grub/i386/pc/vbefill.h.
12167         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
12168         grub_video_i386_vbeblit_info.
12169         (grub_video_vbe_unmap_color): Likewise.
12170         (grub_video_vbe_blit_glyph): Likewise.
12171         (grub_video_vbe_scroll): Likewise.
12172         (grub_video_vbe_draw_pixel): Removed function.
12173         (grub_video_vbe_get_pixel): Likewise.
12174         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
12175         updated code to use it.
12176         (common_blitter): Added common blitter for render target and bitmap.
12177         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12178         (grub_video_vbe_blit_render_target): Likewise.
12180 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
12182         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12183         is in text mode if there is no console control protocol instance
12184         available.
12186 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12188         * include/grub/video.h: Code cleanup.
12190         * include/grub/i386/pc/vbe.h: Likewise.
12192         * video/i386/pc/vbe.c: Likewise.
12194         * video/i386/pc/vbeblit.c: Likewise.
12196         * video/i386/pc/vbefill.c: Likewise.
12198         * video/video.c: Likewise.  Also added more comments.
12200 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12202         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12203         (struct grub_biosdisk_dap): Likewise.
12205         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
12206         linkage settings for all functions.
12208 2006-07-12  Marco Gerards  <marco@gnu.org>
12210         * configure.ac (--enable-mm-debug): Fix typo.
12212         * genkernsyms.sh.in: Use proper quoting for `CC'.
12214 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
12216         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12217         (normal_mod_ASFLAGS): Remove "-m32".
12219 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
12221         * util/misc.c: Include config.h.
12222         [!HAVE_MEMALIGN]: Do not include malloc.h.
12223         (grub_memalign): Use posix_memalign, if present. Then, use
12224         memalign, if present. Otherwise, emit an error.
12226         * util/grub-emu.c: Do not include malloc.h.
12228         * include/grub/util/misc.h: Include unistd.h. This is required for
12229         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12230         D. Eades III <hde@foobar-qux.org>.
12232         * configure.ac (AC_GNU_SOURCE): Added.
12233         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12234         type.
12236 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
12238         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12239         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12241 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
12243         * include/grub/types.h (grub_host_addr_t): Rename to
12244         grub_target_addr_t.
12245         (grub_host_off_t): Rename to grub_target_off_t.
12246         (grub_host_size_t): Rename to grub_target_size_t.
12247         (grub_host_ssize_t): Rename to grub_target_ssize_t.
12248         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12250         * include/grub/kernel.h (struct grub_module_header): Change type
12251         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12252         (grub_module_info): Likewise.
12254 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
12256         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12257         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12258         Velazquez <jesus.velazquez@gmail.com>.
12260 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
12262         Count partitions from 1 instead of 0 in the string representation
12263         of partitions. Still use 0-based internally.
12265         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12266         (sun_partition_map_iterate): Use grub_partition_t instead of
12267         struct grub_partition *. Cast DESC->START_CYLINDER to
12268         grub_uint64_t after converting the endian.
12269         (sun_partition_map_probe): Subtract 1 for PARTNUM.
12270         (sun_partition_map_get_name): Add 1 to P->INDEX.
12272         * partmap/pc.c (grub_partition_parse): Subtract 1 for
12273         PCDATA->DOS_PART.
12274         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12276         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12277         zero instead of one.
12278         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12279         (gpt_partition_map_get_name): Add 1 into P->INDEX.
12281         * partmap/apple.c (apple_partition_map_iterate): Change the type
12282         of POS to unsigned.
12283         (apple_partition_map_probe): Subtract 1 for PARTNUM.
12284         (apple_partition_map_get_name): Add 1 into P->INDEX.
12286         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12287         of POS to unsigned.
12288         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12289         calculate the offset of a partition.
12290         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12291         (amiga_partition_map_get_name): Add 1 into P->INDEX.
12293         * partmap/acorn.c (acorn_partition_map_find): Change the type of
12294         SECTOR to grub_disk_addr_t.
12295         (acorn_partition_map_iterate): Likewise.
12296         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12297         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12298         top.
12299         (acorn_partition_map_get_name): Add 1 into P->INDEX.
12301         * kern/i386/pc/init.c (make_install_device): Add 1 into
12302         GRUB_INSTALL_DOS_PART.
12304         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12305         conditional.
12307 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12309         Clean up the code to support 64-bit addressing in disks and
12310         files. This change is not enough for filesystems yet.
12312         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12313         type of "start" to grub_uint64_t.
12314         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12315         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12316         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12317         convert addresses.
12319         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12320         to grub_disk_addr_t.
12322         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12323         string.
12325         * partmap/pc.c (pc_partition_map_iterate): Likewise.
12327         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12328         to char *.
12330         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12332         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12334         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12336         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12337         to grub_off_t, to detect an error from grub_file_seek.
12338         (grub_multiboot_load_elf32): Likewise.
12340         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12341         maximum unsigned long value when an overflow is detected.
12342         (grub_strtoull): New function.
12343         (grub_divmod64): Likewise.
12344         (grub_lltoa): use grub_divmod64.
12346         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12347         grub_disk_addr_t.
12348         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12349         the pointer to next character. Use grub_strtoull instead of
12350         grub_strtoul.
12351         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12352         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12353         respectively.
12355         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
12356         return value is signed.
12357         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12358         test if OFFSET is less than zero, as OFFSET is unsigned now.
12360         * kern/disk.c (struct grub_disk_cache): Change the type of
12361         "sector" to grub_disk_addr_t.
12362         (grub_disk_cache_get_index): Change the type of SECTOR to
12363         grub_disk_addr_t. Calculate the hash with SECTOR casted to
12364         unsigned after shifting.
12365         (grub_disk_cache_invalidate): Change the type of SECTOR to
12366         grub_disk_addr_t.
12367         (grub_disk_cache_unlock): Likewise.
12368         (grub_disk_cache_store): Likewise.
12369         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12370         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12371         grub_disk_addr_t and grub_uint64_t, respectively.
12372         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12373         body, as the value of OFFSET is tweaked by
12374         grub_disk_check_range. Change the types of START_SECTOR, LEN and
12375         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12376         respectively.
12377         (grub_disk_write): 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 LEN and N to
12380         grub_size_t.
12382         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12383         and "saved_offset" to grub_off_t.
12384         (test_header): Cast BUF to char *.
12385         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12386         to char *.
12387         (grub_gzio_read): Change the types of OFFSET and SIZE to
12388         grub_off_t and grub_size_t, respectively.
12390         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12391         Removed.
12392         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12393         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12394         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12395         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12396         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12398         * include/grub/types.h (grub_off_t): Unconditionally set to
12399         grub_uint64_t.
12400         (grub_disk_addr_t): Changed to grub_uint64_t.
12402         * include/grub/partition.h (struct grub_partition): Change the
12403         types of "start", "len" and "offset" to grub_disk_addr_t,
12404         grub_uint64_t and grub_disk_addr_t, respectively.
12405         (grub_partition_get_start): Return grub_disk_addr_t.
12406         (grub_partition_get_len): Return grub_uint64_t.
12408         * include/grub/misc.h (grub_strtoull): New prototype.
12409         (grub_divmod64): Likewise.
12411         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12412         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12413         grub_off_t, respectively.
12414         All callers and references changed.
12416         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12417         grub_size_t in "read".
12418         All callers and references changed.
12420         * include/grub/file.h (struct grub_file): Change the types of
12421         "offset" and "size" to grub_off_t and grub_off_t,
12422         respectively. Change the type of SECTOR to grub_disk_addr_t in
12423         "read_hook".
12424         (grub_file_read): Change the type of LEN to grub_size_t.
12425         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12426         grub_off_t.
12427         (grub_file_size): Return grub_off_t.
12428         (grub_file_tell): Likewise.
12429         All callers and references changed.
12431         * include/grub/disk.h (struct grub_disk_dev): Change the types of
12432         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12433         "write".
12434         (struct grub_disk): Change the type of "total_sectors" to
12435         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12436         "read_hook".
12437         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12438         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12439         (grub_disk_write): Likewise.
12440         All callers and references changed.
12442         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12443         char * for grub_strncmp to silence gcc.
12444         (grub_iso9660_mount): Likewise.
12445         (grub_iso9660_mount): Likewise.
12446         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12447         return statement.
12448         (grub_iso9660_iterate_dir): Likewise.
12449         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12451         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12452         LEN to grub_disk_addr_t and grub_size_t, respectively.
12454         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12456         * fs/jfs.c (grub_jfs_read_file): Likewise.
12458         * fs/minix.c (grub_jfs_read_file): Likewise.
12460         * fs/sfs.c (grub_jfs_read_file): Likewise.
12462         * fs/ufs.c (grub_jfs_read_file): Likewise.
12464         * fs/xfs.c (grub_jfs_read_file): Likewise.
12466         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12467         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12468         respectively.
12470         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12471         BLKNR to -1 instead of returning GRUB_ERRNO.
12472         (grub_ext2_read_file): Change the types of SECTOR and
12473         LEN to grub_disk_addr_t and grub_size_t, respectively.
12475         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12476         LEN to grub_disk_addr_t and grub_size_t, respectively.
12478         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12479         grub_file_read.
12481         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12482         string. Do not cast SECTOR explicitly.
12484         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12485         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12486         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12487         grub_disk_addr_t and grub_size_t, respectively. If the sector is
12488         over 2TB and LBA mode is not supported, raise an error.
12489         (get_safe_sectors): New function.
12490         (grub_biosdisk_read): Use get_safe_sectors.
12491         (grub_biosdisk_write): Likewise.
12493         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12494         (grub_efidisk_write): Likewise.
12496         * disk/loopback.c (delete_loopback): Cosmetic changes.
12497         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12498         correctly.
12499         (grub_loopback_open): Likewise.
12500         (grub_loopback_read): Likewise. Also, change the type of POS to
12501         grub_off_t, and fix the usage of grub_memset.
12503         * commands/i386/pc/play.c: Include grub/machine/time.h.
12505         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12506         print FILE->SIZE.
12508         * commands/configfile.c: Include grub/env.h.
12510         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12511         GRUB_ERRNO directly instead. Change the type of POS to
12512         grub_off_t. Follow the coding standard.
12514         * commands/blocklist.c: Include grub/partition.h.
12515         (grub_cmd_blocklist): Return an error if the underlying device is
12516         not a disk. Take the starting sector of a partition into account,
12517         if a partition is used.
12519         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12520         a length field.
12521         (lba_mode): Support 64-bit addresses.
12522         (chs_mode): Likewise.
12523         (copy_buffer): Adapted to the new offsets of a length field and a
12524         segment field.
12525         (blocklist_default_start): Allocate 64-bit space.
12527         * boot/i386/pc/boot.S (force_lba): Removed.
12528         (boot_drive): Moved to under KERNEL_SECTOR.
12529         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12530         space.
12531         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12532         is useless.
12533         (lba_mode): Refactored to support a 64-bit address. More size
12534         optimization.
12535         (setup_sectors): Likewise.
12537 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12539         * DISTLIST: Added include/grub/i386/linux.h. Removed
12540         include/grub/i386/pc/linux.h
12542         * configure.ac (AC_INIT): Bumped to 1.94.
12544         * config.guess: Updated from gnulib.
12545         * config.sub: Likewise.
12546         * install-sh: Likewise.
12547         * mkinstalldirs: Likewise.
12549 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12551         * conf/common.rmk (grub_modules_init.lst): Depended on
12552         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12553         MODSRCFILES.
12555         * genmk.rb (PModule::rule): Reverted the previous change.
12557 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12559         * conf/common.rmk (grub_modules_init.lst): Depends on
12560         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12561         that the target does not exist before producing.
12562         (grub_modules_init.h): Remove the target before generating.
12563         (grub_emu_init.c): Likewise.
12565         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12567 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
12569         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12570         for the target-specific tests. Make sure that we also have the
12571         up-to-date target variables for those tests.
12573 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12575         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12576         (PModule::rule): Likewise.
12578 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12580         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12581         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12582         target-specific flags should be prefixed.
12583         (PModule::rule): Likewise.
12585 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
12587         * configure.ac (CMP): Check if cmp is available explicitly.
12589 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
12591         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12592         (target_cpu): New variable.
12593         (pkglibdir): Use target_cpu instead of host_cpu.
12595         * util/i386/pc/grub-install.in (host_cpu): Removed.
12596         (target_cpu): New variable.
12597         (pkglibdir): Use target_cpu instead of host_cpu.
12599         * util/genmoddep.c: Removed.
12601         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12602         instead of GRUB_HOST_SIZEOF_VOID_P.
12603         * kern/dl.c: Likewise.
12605         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12606         ...
12607         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12608         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12609         (GRUB_TARGET_SIZEOF_LONG): ... this.
12610         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12611         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12612         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12613         to ...
12614         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12615         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12616         (GRUB_TARGET_SIZEOF_LONG): ... this.
12617         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12618         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12619         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12620         to ...
12621         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12622         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12623         (GRUB_TARGET_SIZEOF_LONG): ... this.
12624         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12625         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12627         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12628         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12629         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12630         instead of GRUB_HOST_SIZEOF_LONG.
12631         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12632         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12633         GRUB_CPU_WORDS_BIGENDIAN.
12634         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12635         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12636         grub_host_ssize_t.
12638         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12639         (genmoddep_SOURCES): Likewise.
12640         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12641         (genmoddep_SOURCES): Likewise.
12642         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12643         (genmoddep_SOURCES): Likewise.
12644         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12645         Likewise.
12646         (genmoddep_SOURCES): Likewise.
12648         * genmoddep.awk: New file.
12650         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12651         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12652         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12653         (PModule::rule): Likewise.
12654         (Program::rule): Likewise.
12655         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12656         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12657         respectively.
12659         * configure.ac: Rewritten intensively to use host and target
12660         instead of build and host, respectively.
12662         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12663         (host_cpu): Removed.
12664         (target_cpu): New variable.
12665         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12666         (BUILD_CC): Removed.
12667         (BUILD_CFLAGS): Likewise.
12668         (BUILD_CPPFLAGS): Likewise.
12669         (TARGET_CC): New variable.
12670         (TARGET_CFLAGS): Likewise.
12671         (TARGET_CPPFLAGS): Likewise.
12672         (TARGET_LDFLAGS): Likewise.
12673         (AWK): Likewise.
12674         (include): Use target_cpu instead of host_cpu.
12675         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12677         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12679 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
12681         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12682         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
12683         field 'false' to 'exec_on_false'.
12684         (grub_script_create_cmdif): Renamed argument names to reflect above
12685         changes.
12687         * normal/execute.c (grub_script_execute_cmdif): Likewise.
12689         * normal/script.c (grub_script_create_cmdif): Likewise.
12691 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
12693         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12694         top.
12695         (grub_hfsplus_btree_recptr): Likewise.
12696         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12697         FILEBLOCK both to pass a block number and store next block
12698         number.
12699         (grub_hfsplus_read_block): Rewritten heavily to support an extent
12700         overflow file correctly. Specify errors appropriately, because
12701         fshelp expects that GRUB_ERRNO is set when fails. Reuse
12702         grub_hfsplus_btree_recptr to get the pointer to a found key.
12703         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12704         is found.
12706         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12707         linux.mod.
12708         (_linux_mod_SOURCES): New variable.
12709         (_linux_mod_CFLAGS): Likewise.
12710         (_linux_mod_LDFLAGS): Likewise.
12711         (linux_mod_SOURCES): Likewise.
12712         (linux_mod_CFLAGS): Likewise.
12713         (linux_mod_LDFLAGS): Likewise.
12715         * DISTLIST: Added loader/i386/efi/linux.c,
12716         loader/i386/efi/linux_normal.c and
12717         include/grub/i386/efi/loader.h.
12719         * loader/i386/efi/linux.c: New file.
12720         * loader/i386/efi/linux_normal.c: Likewise.
12721         * include/grub/i386/efi/loader.h: Likewise.
12723 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
12725         * commands/blocklist.c: New file.
12727         * DISTLIST: Added commands/blocklist.c.
12729         * term/efi/console.c (grub_console_highlight_color): Use a lighter
12730         color for the background, and a darker color for the foreground.
12731         (grub_console_checkkey): Return READ_KEY.
12732         (grub_console_cls): Set the background to
12733         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12735         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12737         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12738         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12740         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12741         prototype.
12743         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12744         BG. The spec is wrong again.
12746         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12747         prototype.
12748         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12750         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12751         commands/blocklist.c.
12752         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12754         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12755         (blocklist_mod_SOURCES): New variable.
12756         (blocklist_mod_CFLAGS): Likewise.
12757         (blocklist_mod_LDFLAGS): Likewise.
12759 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
12761         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12762         duplication.
12763         (lba_mode): Use %eax more intensively to reduce the code size.
12765 2006-05-20  Marco Gerards  <marco@gnu.org>
12767         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12769         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
12770         for `menuentry'.
12771         (script): Accept leading newlines.
12772         (newlines): New rule to describe 0 or more newlines.
12773         (commands): Accept `command' with trailing newline.  Fixed the
12774         order in which arguments were passed to `grub_script_add_cmd'.
12775         Accept commands separated by newlines.
12776         (function): Changed to accept newlines.
12777         (menuentry) Rewritten.
12779         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12780         front of the list, instead of to the end.
12782 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
12784         * util/i386/pc/grub-install.in (bindir): New variable.
12785         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12786         Shaver <lbgwjl@gmail.com>.
12788 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
12790         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12791         grub/machine/linux.h
12792         * loader/i386/pc/linux.c: Likewise.
12794         * include/grub/i386/pc/linux.h: Moved to ...
12795         * include/grub/i386/linux.h: ... here.
12797         * include/grub/i386/linux.h (struct linux_kernel_params): New
12798         struct.
12800 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
12802         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12803         checking.
12804         (grub_video_vbe_blit_glyph): Likewise.
12805         (grub_video_vbe_blit_bitmap): Likewise.
12806         (grub_video_vbe_blit_render_target): Likewise.
12808 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
12810         * configure.ac (--with-platform): Properly quote the square
12811         brackets.
12813 2006-05-08  Marco Gerards  <marco@gnu.org>
12815         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12816         this...
12817         (kernel_elf_HEADERS): ...to this.  Updated all users.
12818         (grubof_symlist.c): Renamed from this...
12819         (kernel_elf_symlist.c): ...to this.  Updated all users.
12820         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12821         (grubof_SOURCES): Renamed from this...
12822         (kernel_elf_SOURCES): ...to this.
12823         (grubof_HEADERS): Renamed from this...
12824         (kernel_elf_HEADERS): ...to this.
12825         (grubof_CFLAGS): Renamed from this...
12826         (kernel_elf_CFLAGS): ...to this.
12827         (grubof_ASFLAGS): Renamed from this...
12828         (kernel_elf_ASFLAGS): ...to this.
12829         (grubof_LDFLAGS): Renamed from this...
12830         (kernel_elf_LDFLAGS): ...to this.
12832         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12833         this...
12834         (kernel_elf_HEADERS): ...to this.  Updated all users.
12835         (grubof_symlist.c): Renamed from this...
12836         (kernel_elf_symlist.c): ...to this.  Updated all users.
12837         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12838         (grubof_SOURCES): Renamed from this...
12839         (kernel_elf_SOURCES): ...to this.
12840         (grubof_HEADERS): Renamed from this...
12841         (kernel_elf_HEADERS): ...to this.
12842         (grubof_CFLAGS): Renamed from this...
12843         (kernel_elf_CFLAGS): ...to this.
12844         (grubof_ASFLAGS): Renamed from this...
12845         (kernel_elf_ASFLAGS): ...to this.
12846         (grubof_LDFLAGS): Renamed from this...
12847         (kernel_elf_LDFLAGS): ...to this.
12849         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12850         `kernel.elf' instead of `grubof'.
12852 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
12854         Add --with-platform to configure. Use pkglibdir instead of
12855         pkgdatadir. This is reported by Roger Leigh.
12857         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12858         (host_vendor): Likewise.
12859         (host_os): Likewise.
12860         (pkgdatadir): Likewise.
12861         (platform): New variable.
12862         (pkglibdir): Likewise.
12863         Use PKGLIBDIR instead of PKGDATADIR.
12865         * util/i386/pc/grub-install.in (datadir): Removed.
12866         (host_vendor): Likewise.
12867         (host_os): Likewise.
12868         (pkgdatadir): Likewise.
12869         (platform): New variable.
12870         (pkglibdir): Likewise.
12871         Use PKGLIBDIR instead of PKGDATADIR.
12873         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12874         instead of GRUB_DATADIR.
12875         (main): Likewise.
12876         * util/i386/pc/grub-mkimage.c (usage): Likewise.
12877         (main): Likewise.
12878         * util/i386/efi/grub-mkimage.c (usage): Likewise.
12879         (main): Likewise.
12881         * configure.ac (--with-platform): New option.
12882         Use PLATFORM instead of HOST_VENDOR to specify a platform.
12884         * Makefile.in: Include a makefile based on PLATFORM instead of
12885         HOST_VENDOR.
12886         (pkgdatadir): Not appended by the machine type.
12887         (pkglibdir): Appended by the machine type.
12888         (host_vendor): Removed.
12889         (platform): New variable.
12890         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12891         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12892         (uninstall): Likewise.
12894 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
12896         Use the environment context in the menu. Remove the commands
12897         "default" and "timeout", and use variables instead.
12899         * normal/menu.c: Include grub/env.h.
12900         (print_entry): Cast TITLE to silence gcc.
12901         (get_timeout): New function.
12902         (set_timeout): Likewise.
12903         (get_entry_number): Likewise.
12904         (run_menu): Use a default entry, a fallback entry and a timeout
12905         in the environment variables "default", "fallback" and
12906         "timeout". Also, tweak the default entry if it is not within the
12907         current menu entries.
12908         (grub_menu_run): Use a fallback entry in the environment variable
12909         "fallback".
12911         * normal/main.c (read_config_file): Do not initialize
12912         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12913         NEWMENU->TIMEOUT.
12914         (grub_normal_execute): Use a data slot to store the menu.
12916         * include/grub/normal.h (struct grub_menu): Removed default_entry,
12917         fallback_entry and timeout.
12918         (struct grub_menu_list): Removed.
12919         (grub_menu_list_t): Likewise.
12920         (struct grub_context): Likewise.
12921         (grub_context_t): Likewise.
12922         (grub_context_get): Likewise.
12923         (grub_context_get_current_menu): Likewise.
12924         (grub_context_push_menu): Likewise.
12925         (grub_context_pop_menu): Likewise.
12926         (grub_default_init): Likewise.
12927         (grub_default_fini): Likewise.
12928         (grub_timeout_init): Likewise.
12929         (grub_timeout_fini): Likewise.
12931         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12932         and timeout.mod.
12933         (normal_mod_SOURCES): Removed normal/context.c.
12935         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12936         commands/default.c, commands/timeout.c and normal/context.c.
12937         (normal_mod_SOURCES): Removed normal/context.c.
12939         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12940         commands/timeout.c and normal/context.c.
12941         (normal_mod_SOURCES): Removed normal/context.c.
12943         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12944         commands/default.c, commands/timeout.c and normal/context.c.
12945         (normal_mod_SOURCES): Removed normal/context.c.
12947         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12948         timeout.mod.
12949         (default_mod_SOURCES): Removed.
12950         (default_mod_CFLAGS): Likewise.
12951         (default_mod_LDFLAGS): Likewise.
12952         (timeout_mod_SOURCES): Removed.
12953         (timeout_mod_CFLAGS): Likewise.
12954         (timeout_mod_LDFLAGS): Likewise.
12956         * DISTLIST: Removed commands/default.c, commands/timeout.c and
12957         normal/context.c.
12959         * commands/default.c: Removed.
12960         * commands/timeout.c: Likewise.
12961         * normal/context.c: Likewise.
12963 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
12965         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12967 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
12969         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12970         "next" to "prev" for readability.
12971         (struct grub_env_sorted_var): New struct.
12972         (grub_env_context): Renamed to ...
12973         (initial_context): ... this.
12974         (grub_env_var_context): Renamed to ...
12975         (current_context): ... this.
12976         (grub_env_find): Look only at CURRENT_CONTEXT.
12977         (grub_env_context_open): Rewritten to copy exported variables from
12978         previous context.
12979         (grub_env_context_close): Rewritten according to the new
12980         scheme. Also, add an assertion to prevent the initial context from
12981         removed.
12982         (grub_env_insert): Removed the code for the sorted list.
12983         (grub_env_remove): Likewise.
12984         (grub_env_export): Simply mark the variable with
12985         GRUB_ENV_VAR_GLOBAL.
12986         (grub_env_set): A cosmetic change for naming consistency.
12987         (grub_env_get): Likewise.
12988         (grub_env_unset): Likewise.
12989         (grub_env_iterate): Rewritten to sort variables within this
12990         function.
12991         (grub_register_variable_hook): Fixed for naming consistency. Call
12992         grub_env_find again, only if NAME is not found at the first time.
12993         (mangle_data_slot_name): New function.
12994         (grub_env_set_data_slot): Likewise.
12995         (grub_env_get_data_slot): Likewise.
12996         (grub_env_unset_data_slot): Likewise.
12998         * include/grub/env.h (grub_env_var_type): New enum.
12999         (GRUB_ENV_VAR_LOCAL): New constant.
13000         (GRUB_ENV_VAR_GLOBAL): Likewise.
13001         (GRUB_ENV_VAR_DATA): Likewise.
13002         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
13003         "type".
13004         (grub_env_set): Replace VAR with NAME for consistency.
13005         (grub_register_variable_hook): Likewise.
13006         (grub_env_export): Specify the name of the argument.
13007         (grub_env_set_data_slot): New prototype.
13008         (grub_env_get_data_slot): Likewise.
13009         (grub_env_unset_data_slot): Likewise.
13011 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
13013         Extend the loader so that GRUB can accept a loader which comes
13014         back to GRUB when a loaded image exits. Also, this change adds
13015         support for a chainloader on EFI.
13017         * term/efi/console.c: Include grub/misc.h.
13018         (grub_console_checkkey): Display a scan code on the top for
13019         debugging. This will be removed once the EFI port gets stable.
13020         Correct the scan code mapping.
13022         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
13023         allocate memory from larger regions, in order to reduce the number
13024         of allocated regions. Otherwise, the MacOSX loader panics.
13025         (filter_memory_map): Avoid less than 1MB for compatibility with
13026         other loaders.
13027         (add_memory_regions): Allocate from the tail of a region, if
13028         possible, to avoid allocating a region near to 1MB, for the MacOSX
13029         loader.
13031         * kern/efi/init.c (grub_efi_set_prefix): Specify
13032         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
13034         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
13035         argument IMAGE_HANDLE and specify it to get a loaded image.
13036         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
13037         grub_efi_get_loaded_image.
13038         (grub_efi_get_filename): Divide the length by the size of
13039         grub_efi_char16_t.
13040         (grub_efi_get_device_path): New function.
13041         (grub_efi_print_device_path): Print End Device Path nodes. Divide
13042         the length by the size of grub_efi_char16_t for a file path device
13043         path node.
13045         * kern/loader.c (grub_loader_noreturn): New variable.
13046         (grub_loader_set): Accept a new argument NORETURN. Set
13047         GRUB_LOADER_NORETURN to NORETURN.
13048         All callers changed.
13049         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
13050         grub_machine_fini.
13052         * include/grub/efi/efi.h (grub_efi_get_device_path): New
13053         prototype.
13054         (grub_efi_get_loaded_image): Take an argument to specify an image
13055         handle.
13057         * include/grub/loader.h (grub_loader_set): Added one more argument
13058         NORETURN.
13060         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
13061         instead of grub_efi_open_protocol.
13062         (grub_efidisk_get_device_name): Likewise.
13063         (grub_efidisk_close): Print a newline.
13064         (grub_efidisk_get_device_handle): Fixed to use
13065         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
13066         GRUB_EFI_DEVICE_PATH_TYPE.
13068         * disk/efi/efidisk.c (device_path_guid): Moved to ...
13069         * kern/efi/efi.c (device_path_guid): ... here.
13071         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
13072         chain.mod.
13073         (kernel_mod_HEADERS): Added efi/disk.h.
13074         (_chain_mod_SOURCES): New variable.
13075         (_chain_mod_CFLAGS): Likewise.
13076         (_chain_mod_LDFLAGS): Likewise.
13077         (chain_mod_SOURCES): Likewise.
13078         (chain_mod_CFLAGS): Likewise.
13079         (chain_mod_LDFLAGS): Likewise.
13081         * DISTLIST: Added include/grub/efi/chainloader.h,
13082         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
13084         * include/grub/efi/chainloader.h: New file.
13085         * loader/efi/chainloader.c: Likewise.
13086         * loader/efi/chainloader_normal.c: Likewise.
13088 2006-04-30  Marco Gerards  <marco@gnu.org>
13090         * commands/configfile.c (grub_cmd_source): New function.
13091         (GRUB_MOD_INIT): Register the commands `source' and `.'.
13092         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
13094 2006-04-30  Marco Gerards  <marco@gnu.org>
13096         * normal/execute.c (grub_script_execute_cmd): Change the return
13097         type to `grub_err_t'.  Correctly return the error.
13098         (grub_script_execute_cmdline): In case a command line is not a
13099         command or a function, try to interpret it as an assignment.
13101 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
13103         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
13104         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
13105         skip a node whose name is obviously invalid as UTF-16,
13106         i.e. contains a NUL character. Stop the iteration when the last
13107         directory entry is found. Instead of using the return value of
13108         grub_hfsplus_btree_iterate_node, store the value in RET and use
13109         it, because the iterator can be stopped by the last directory
13110         entry.
13112 2006-04-30  Marco Gerards  <marco@gnu.org>
13114         * include/grub/env.h (grub_env_export): New prototype.  Reported
13115         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
13117 2006-04-30  Marco Gerards  <marco@gnu.org>
13119         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
13120         size of the extents in a catalog file record.
13122 2006-04-29  Marco Gerards  <marco@gnu.org>
13124         * commands/configfile.c (grub_cmd_configfile): Execute the
13125         configfile within its own context.
13127         * include/grub/env.h (grub_env_context_open): New prototype.
13128         (grub_env_context_close): Likewise.
13130         * kern/env.c (grub_env): Removed.
13131         (grub_env_sorted): Likewise.
13132         (grub_env_context): New variable.
13133         (grub_env_var_context): Likewise.
13134         (grub_env_find): Search both the active context and the global
13135         context.
13136         (grub_env_context_open): New function.
13137         (grub_env_context_close): Likewise.
13138         (grub_env_insert): Likewise.
13139         (grub_env_remove): Likewise.
13140         (grub_env_export): Likewise.
13141         (grub_env_set): Changed to use helper functions to avoid code
13142         duplication.
13143         (grub_env_iterate): Rewritten so both the current context and the
13144         global context are being used.
13146         * normal/command.c (export_command): New function.
13147         (grub_command_init): Register the `export' function.
13149 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
13151         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
13152         explicitly to suppress gcc's warnings.
13153         * fs/fat.c (grub_fat_find_dir): Likewise.
13154         (grub_fat_label): Likewise.
13155         * fs/xfs.c (grub_xfs_read_inode): Likewise.
13156         (grub_xfs_mount): Likewise.
13157         (grub_xfs_label): Likewise.
13158         * fs/affs.c (grub_affs_mount): Likewise.
13159         (grub_affs_label): Likewise.
13160         (grub_affs_iterate_dir): Likewise.
13161         * fs/sfs.c (grub_sfs_mount): Likewise.
13162         (grub_sfs_iterate_dir): Likewise.
13163         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
13164         * fs/hfs.c (grub_hfs_mount): Likewise.
13165         (grub_hfs_cmp_catkeys): Likewise.
13166         (grub_hfs_find_dir): Likewise.
13167         (grub_hfs_dir): Likewise.
13168         (grub_hfs_label): Likewise.
13169         * fs/jfs.c (grub_jfs_mount): Likewise.
13170         (grub_jfs_opendir): Likewise.
13171         (grub_jfs_getent): Likewise.
13172         (grub_jfs_lookup_symlink): Likewise.
13173         (grub_jfs_label): Likewise.
13174         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
13175         (grub_hfsplus_iterate_dir): Likewise.
13176         (grub_hfsplus_btree_iterate_node): Made static.
13178         * util/grub-emu.c (prefix): New variable.
13179         (grub_machine_set_prefix): New function.
13180         (main): Do not set the environment variable "prefix" here. Only
13181         set PREFIX, which is used later by grub_machine_set_prefix.
13183         * include/grub/video.h: Do not include grub/symbol.h.
13184         (grub_video_register): Not exported. This symbol is not defined in
13185         the kernel.
13186         (grub_video_unregister): Likewise.
13187         (grub_video_iterate): Likewise.
13188         (grub_video_setup): Likewise.
13189         (grub_video_restore): Likewise.
13190         (grub_video_get_info): Likewise.
13191         (grub_video_get_blit_format): Likewise.
13192         (grub_video_set_palette): Likewise.
13193         (grub_video_get_palette): Likewise.
13194         (grub_video_set_viewport): Likewise.
13195         (grub_video_get_viewport): Likewise.
13196         (grub_video_map_color): Likewise.
13197         (grub_video_map_rgb): Likewise.
13198         (grub_video_map_rgba): Likewise.
13199         (grub_video_fill_rect): Likewise.
13200         (grub_video_blit_glyph): Likewise.
13201         (grub_video_blit_bitmap): Likewise.
13202         (grub_video_blit_render_target): Likewise.
13203         (grub_video_scroll): Likewise.
13204         (grub_video_swap_buffers): Likewise.
13205         (grub_video_create_render_target): Likewise.
13206         (grub_video_delete_render_target): Likewise.
13207         (grub_video_set_active_render_target): Likewise.
13209         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13210         Undefined.
13211         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13213         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13214         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13215         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13216         instead of $(srcdir)/genkernsyms.sh.
13218         * conf/powerpc-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/i386-pc.rmk (symlist.c): Depended on config.h. Use
13224         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-efi.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         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13234         genkernsyms.sh.
13236         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13237         genkernsyms.sh.
13238         (gensymlist.sh): New target.
13239         (genkernsyms.sh): Likewise.
13241         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13242         genkernsyms.sh.in and gensymlist.sh.in.
13244         * genkernsyms.sh: Removed.
13245         * gensymlist.sh: Likewise.
13247         * genkernsyms.sh.in: New file.
13248         * gensymlist.sh.in: Likewise.
13250 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
13252         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13253         clobber "prefix", since we may have already set it manually.
13255 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
13257         * kern/misc.c (abort): New alias for grub_abort.
13259 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
13261         A new machine-specific function "grub_machine_set_prefix" is
13262         defined. This is called after loading modules, so that a prefix
13263         initialization can use modules. Also, this change adds an
13264         intensive debugging feature for the memory manager via the
13265         configure option "--enable-mm-debug".
13267         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13268         PART.LEN.
13270         * kern/sparc64/ieee1275/init.c (abort): Removed.
13271         (grub_stop): Likewise.
13272         (grub_exit): New function.
13273         (grub_set_prefix): Renamed to ...
13274         (grub_machine_set_prefix): ... this.
13275         (grub_machine_init): Do not call grub_set_prefix.
13277         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13278         (grub_machine_set_prefix): ... this.
13279         (grub_machine_init): Do not call grub_set_prefix.
13281         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13282         (grub_machine_init): Do not set the prefix here.
13284         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13286         * kern/efi/init.c: Include grub/mm.h.
13287         (grub_efi_set_prefix): New function.
13289         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13290         (grub_efi_get_filename): New function.
13291         (grub_print_device_path): Renamed to ...
13292         (grub_efi_print_device_path): ... this.
13294         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13295         [MM_DEBUG] (grub_realloc): Likewise.
13296         [MM_DEBUG] (grub_free): Likewise.
13297         [MM_DEBUG] (grub_memalign): Likewise.
13298         [MM_DEBUG] (grub_mm_debug): New variable.
13299         [MM_DEBUG] (grub_debug_malloc): New function.
13300         [MM_DEBUG] (grub_debug_free): New function.
13301         [MM_DEBUG] (grub_debug_realloc): New function.
13302         [MM_DEBUG] (grub_debug_memalign): New function.
13304         * kern/misc.c (grub_abort): Print a newline to distinguish
13305         the message.
13307         * kern/main.c (grub_main): Call grub_machine_set_prefix and
13308         grub_set_root_dev after loading modules. This is necessary when
13309         setting a prefix depends on modules.
13311         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13312         (grub_efi_print_device_path): ... this.
13313         (grub_efi_get_filename): New prototype.
13314         (grub_efi_set_prefix): Likewise.
13316         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13317         and grub/disk.h.
13318         (grub_efidisk_get_device_handle): New prototype.
13319         (grub_efidisk_get_device_name): Likewise.
13321         * include/grub/mm.h: Include config.h.
13322         (MM_DEBUG): Removed.
13323         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13324         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13325         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13326         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13327         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13328         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13329         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13330         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13331         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13333         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13335         * disk/efi/efidisk.c: Include grub/partition.h.
13336         (iterate_child_devices): New function.
13337         (add_device): First, compare only last device path nodes, so that
13338         devices are sorted by the types.
13339         (grub_efidisk_get_device_handle): New function.
13340         (grub_efidisk_get_device_name): Likewise.
13342         * configure.ac (--enable-mm-debug): New option to enable the
13343         memory manager debugging feature. This makes the binary much
13344         bigger, so is disabled by default.
13346 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
13348         Use grub_abort instead of grub_stop, and grub_exit must be
13349         define in each architecture now. Also, this change adds support
13350         for EFI disks.
13352         * util/i386/pc/grub-probefs.c: Include grub/term.h.
13353         (grub_getkey): New function.
13354         (grub_term_get_current): Likewise.
13356         * util/i386/pc/grub-setup.c: Include grub/term.h.
13357         (grub_getkey): New function.
13358         (grub_term_get_current): Likewise.
13360         * util/misc.c (grub_stop): Renamed to ...
13361         (grub_exit): ... this.
13363         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13364         (grub_exit): ... this.
13365         (grub_machine_init): Use grub_abort instead of abort.
13366         (grub_stop): Removed.
13368         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13369         abort.
13371         * kern/i386/pc/startup.S (grub_exit): New function.
13372         (cold_reboot): New label.
13374         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13375         (grub_efi_init): Call grub_efidisk_init.
13376         (grub_efi_fini): Call grub_efidisk_fini.
13378         * kern/efi/efi.c: Include grub/mm.h.
13379         (grub_efi_console_control_guid): Renamed to ...
13380         (console_control_guid): ... this.
13381         (grub_efi_loaded_image_guid): Renamed to ...
13382         (loaded_image_guid): ... this.
13383         (grub_efi_locate_handle): New function.
13384         (grub_efi_open_protocol): Likewise.
13385         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13386         GRUB_EFI_CONSOLE_CONTROL_GUID.
13387         (grub_efi_exit): Removed.
13388         (grub_stop): Likewise.
13389         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13390         (grub_exit): New function.
13391         (grub_print_device_path): Likewise.
13393         * kern/rescue.c (grub_rescue_cmd_exit): New function.
13394         (grub_enter_rescue_mode): Register "exit".
13396         * kern/misc.c (grub_real_dprintf): A cosmetic change.
13397         (grub_abort): New function.
13399         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13401         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13403         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13405         * include/grub/efi/efi.h (grub_efi_exit): Removed.
13406         (grub_print_device_path): New prototype.
13407         (grub_efi_locate_handle): Likewise.
13408         (grub_efi_open_protocol): Likewise.
13410         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13411         * disk/efi/efidisk.c: Likewise.
13413         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13415         * include/grub/efi/console_control.h
13416         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13418         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13419         last 8 bytes as an array.
13420         (GRUB_EFI_DISK_IO_GUID): New macro.
13421         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13422         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13423         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13424         grub_uint8_t.
13425         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13426         (struct grub_efi_device_path): Rename the member "sub_type" to
13427         "subtype".
13428         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13429         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13430         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13431         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13432         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13433         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13434         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13435         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13436         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13437         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13438         (struct grub_efi_pci_device_path): New structure.
13439         (grub_efi_pci_device_path_t): New type.
13440         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13441         (struct grub_efi_pccard_device_path): New structure.
13442         (grub_efi_pccard_device_path_t): New type.
13443         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13444         (struct grub_efi_memory_mapped_device_path): New structure.
13445         (grub_efi_memory_mapped_device_path_t): New type.
13446         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13447         (struct grub_efi_vendor_device_path): New structure.
13448         (grub_efi_vendor_device_path_t): New type.
13449         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13450         (struct grub_efi_controller_device_path): New structure.
13451         (grub_efi_controller_device_path_t): New type.
13452         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13453         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13454         (struct grub_efi_acpi_device_path): New structure.
13455         (grub_efi_acpi_device_path_t): New type.
13456         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13457         (struct grub_efi_expanded_acpi_device_path): New structure.
13458         (grub_efi_expanded_acpi_device_path_t): New type.
13459         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13460         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13461         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13462         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13463         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13464         (struct grub_efi_atapi_device_path): New structure.
13465         (grub_efi_atapi_device_path_t): New type.
13466         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13467         (struct grub_efi_fibre_channel_device_path): New structure.
13468         (grub_efi_fibre_channel_device_path_t): New type.
13469         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13470         (struct grub_efi_1394_device_path): New structure.
13471         (grub_efi_1394_device_path_t): New type.
13472         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13473         (struct grub_efi_usb_device_path): New structure.
13474         (grub_efi_usb_device_path_t): New type.
13475         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13476         (struct grub_efi_usb_class_device_path): New structure.
13477         (grub_efi_usb_class_device_path_t): New type.
13478         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13479         (struct grub_efi_i2o_device_path): New structure.
13480         (grub_efi_i2o_device_path_t): New type.
13481         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13482         (struct grub_efi_mac_address_device_path): New structure.
13483         (grub_efi_mac_address_device_path_t): New type.
13484         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13485         (struct grub_efi_ipv4_device_path): New structure.
13486         (grub_efi_ipv4_device_path_t): New type.
13487         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13488         (struct grub_efi_ipv6_device_path): New structure.
13489         (grub_efi_ipv6_device_path_t): New type.
13490         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13491         (struct grub_efi_infiniband_device_path): New structure.
13492         (grub_efi_infiniband_device_path_t): New type.
13493         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13494         (struct grub_efi_uart_device_path): New structure.
13495         (grub_efi_uart_device_path_t): New type.
13496         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13497         (struct grub_efi_vendor_messaging_device_path): New structure.
13498         (grub_efi_vendor_messaging_device_path_t): New type.
13499         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13500         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13501         (struct grub_efi_hard_drive_device_path): New structure.
13502         (grub_efi_hard_drive_device_path_t): New type.
13503         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13504         (struct grub_efi_cdrom_device_path): New structure.
13505         (grub_efi_cdrom_device_path_t): New type.
13506         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13507         (struct grub_efi_vendor_media_device_path): New structure.
13508         (grub_efi_vendor_media_device_path_t): New type.
13509         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13510         (struct grub_efi_file_path_device_path): New structure.
13511         (grub_efi_file_path_device_path_t): New type.
13512         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13513         (struct grub_efi_protocol_device_path): New structure.
13514         (grub_efi_protocol_device_path_t): New type.
13515         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13516         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13517         (struct grub_efi_bios_device_path): New structure.
13518         (grub_efi_bios_device_path_t): New type.
13519         (struct grub_efi_disk_io): New structure.
13520         (grub_efi_disk_io_t): New type.
13521         (struct grub_efi_block_io_media): New structure.
13522         (grub_efi_block_io_media_t): New type.
13523         (struct grub_efi_block_io): New structure.
13524         (grub_efi_block_io_t): New type.
13526         * include/grub/misc.h (grub_stop): Removed.
13527         (grub_exit): New prototype.
13528         (grub_abort): Likewise.
13530         * include/grub/disk.h (enum grub_disk_dev_id): Added
13531         GRUB_DISK_DEVICE_EFIDISK_ID.
13533         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13534         disk/efi/efidisk.c.
13535         (kernel_syms.lst): Remove the target if an error occurs.
13537 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
13539         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13540         as it was simply too buggy.
13542 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
13544         * kern/misc.c (grub_lltoa): New function.
13545         (grub_vsprintf): Added support for the long long suffix,
13546         i.e. "ll".
13548 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
13550         * Makefile.in (LDFLAGS): Add variable.
13551         (LD): Remove variable.
13552         * configure.ac: Add -m32 to LDFLAGS.
13553         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13554         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13555         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13556         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13557         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13558         variables.
13559         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13560         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13561         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13563 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
13565         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13566         length for unknown glyph.
13568 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13570         Add support for pre-loaded modules into the EFI port.
13572         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13573         completely. Accept one more argument DIR. The caller has changed.
13575         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13577         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13578         (grub_efi_loaded_image_guid): New variable.
13579         (grub_efi_get_loaded_image): New function.
13580         (grub_arch_modules_addr): Likewise.
13582         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13583         prototype.
13585         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13586         (struct grub_efi_loaded_image): New structure.
13587         (grub_efi_loaded_image_t): New type.
13589 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13591         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13592         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13593         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13595 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
13597         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13599 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
13601         * DISTLIST: Added include/grub/efi/console.h,
13602         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13603         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13605         * include/grub/efi/console.h: New file.
13606         * include/grub/efi/time.h: Likewise.
13607         * include/grub/i386/efi/kernel.h: Likewise.
13608         * kern/efi/init.c: Likewise.
13609         * kern/efi/mm.c: Likewise.
13610         * term/efi/console.c: Likewise.
13612         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13613         (grub_stop): Removed.
13614         (grub_get_rtc): Likewise.
13615         (grub_machine_init): Simply call grub_efi_init.
13616         (grub_machine_fini): Call grub_efi_fini.
13618         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13619         (grub_efi_output_string): Removed.
13620         (grub_efi_stall): New function.
13621         (grub_stop): Likewise.
13622         (grub_get_rtc): Likewise.
13624         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13625         (grub_efi_stall): New prototype.
13626         (grub_efi_allocate_pages): Likewise.
13627         (grub_efi_free_pages): Likewise.
13628         (grub_efi_get_memory_map): Likewise.
13629         (grub_efi_mm_init): Likewise.
13630         (grub_efi_mm_fini): Likewise.
13631         (grub_efi_init): Likewise.
13632         (grub_efi_fini): Likewise.
13634         * include/grub/i386/efi/time.h: Do not include
13635         grub/symbol.h. Include grub/efi/time.h.
13636         (GRUB_TICKS_PER_SECOND): Removed.
13637         (grub_get_rtc): Likewise.
13639         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13640         Added padding. The EFI spec is buggy.
13641         (GRUB_EFI_BLACK): New macro.
13642         (GRUB_EFI_BLUE): Likewise.
13643         (GRUB_EFI_GREEN): Likewise.
13644         (GRUB_EFI_CYAN): Likewise.
13645         (GRUB_EFI_RED): Likewise.
13646         (GRUB_EFI_MAGENTA): Likewise.
13647         (GRUB_EFI_BROWN): Likewise.
13648         (GRUB_EFI_LIGHTGRAY): Likewise.
13649         (GRUB_EFI_BRIGHT): Likewise.
13650         (GRUB_EFI_DARKGRAY): Likewise.
13651         (GRUB_EFI_LIGHTBLUE): Likewise.
13652         (GRUB_EFI_LIGHTGREEN): Likewise.
13653         (GRUB_EFI_LIGHTCYAN): Likewise.
13654         (GRUB_EFI_LIGHTRED): Likewise.
13655         (GRUB_EFI_LIGHTMAGENTA): Likewise.
13656         (GRUB_EFI_YELLOW): Likewise.
13657         (GRUB_EFI_WHITE): Likewise.
13658         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13659         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13660         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13661         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13662         (GRUB_EFI_BACKGROUND_RED): Likewise.
13663         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13664         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13665         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13666         (GRUB_EFI_TEXT_ATTR): Likewise.
13668         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13669         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13670         (kernel_mod_HEADERS): Added efi/time.h.
13672 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
13674         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13675         include/grub/efi/api.h, include/grub/efi/console_control.h,
13676         include/grub/efi/efi.h, include/grub/efi/pe32.h,
13677         include/grub/i386/efi/time.h, kern/efi/efi.c,
13678         kern/i386/efi/init.c, kern/i386/efi/startup.S,
13679         and util/i386/efi/grub-mkimage.c.
13681         * Makefile.in (RMKFILES): Added i386-efi.rmk.
13683         * genmk.rb (PModule#rule): Do not export symbols if
13684         #{prefix}_EXPORTS is set to "no".
13686         * conf/i386-efi.mk: New file.
13687         * conf/i386-efi.rmk: Likewise.
13688         * include/grub/efi/api.h: Likewise.
13689         * include/grub/efi/console_control.h: Likewise.
13690         * include/grub/efi/efi.h: Likewise.
13691         * include/grub/efi/pe32.h: Likewise.
13692         * include/grub/i386/efi/time.h: Likewise.
13693         * kern/efi/efi.c: Likewise.
13694         * kern/i386/efi/init.c: Likewise.
13695         * kern/i386/efi/startup.S: Likewise.
13696         * util/i386/efi/grub-mkimage.c: Likewise.
13698 2006-04-17  Marco Gerards  <marco@gnu.org>
13700         * include/grub/script.h: Include <grub/parser.h> and
13701         "grub_script.tab.h".
13702         (struct grub_lexer_param): New struct.
13703         (struct grub_parser_param): Likewise.
13704         (grub_script_create_arglist): Pass the state in an argument.
13705         (grub_script_add_arglist): Likewise.
13706         (grub_script_create_cmdline): Likewise.
13707         (grub_script_create_cmdblock): Likewise.
13708         (grub_script_create_cmdif): Likewise.
13709         (grub_script_create_cmdmenu): Likewise.
13710         (grub_script_add_cmd): Likewise.
13711         (grub_script_arg_add): Likewise.
13712         (grub_script_lexer_ref): Likewise.
13713         (grub_script_lexer_deref): Likewise.
13714         (grub_script_lexer_record_start): Likewise.
13715         (grub_script_lexer_record_stop): Likewise.
13716         (grub_script_mem_record): Likewise.
13717         (grub_script_mem_record_stop): Likewise.
13718         (grub_script_malloc): Likewise.
13719         (grub_script_yylex): Likewise.
13720         (grub_script_yyparse): Likewise.
13721         (grub_script_yyerror): Likewise.
13722         (grub_script_yylex): Likewise.
13723         (grub_script_lexer_init): Return the state.
13725         * normal/lexer.c (grub_script_lexer_state): Removed variable.
13726         (grub_script_lexer_done): Likewise.
13727         (grub_script_lexer_getline): Likewise.
13728         (grub_script_lexer_refs): Likewise.
13729         (script): Likewise.
13730         (newscript): Likewise.
13731         (record): Likewise.
13732         (recording): Likewise.
13733         (recordpos): Likewise.
13734         (recordlen): Likewise.
13735         (grub_script_lexer_init): Return the state instead of setting
13736         global variables.
13737         (grub_script_lexer_ref): Use the newly added argument for state
13738         instead of globals.
13739         (grub_script_lexer_deref): Likewise.
13740         (grub_script_lexer_record_start): Likewise.
13741         (grub_script_lexer_record_stop): Likewise.
13742         (recordchar): Likewise.
13743         (nextchar): Likewise.
13744         (grub_script_yylex2): Likewise.
13745         (grub_script_yylex): Likewise.
13746         (grub_script_yyerror): Likewise.
13748         * normal/parser.y (func_mem): Removed variable.
13749         (menu_entry): Likewise.
13750         (err): Likewise.
13751         (%lex-param): New parser option.
13752         (%parse-param): Likewise.
13753         (script): Always return the AST.
13754         (argument): Pass the state around.
13755         (arguments): Likewise.
13756         (grubcmd): Likewise.
13757         (commands): Likewise.
13758         (function): Likewise.
13759         (menuentry): Likewise.
13760         (if_statement): Likewise.
13761         (if): Likewise.
13763         * normal/script.c (grub_script_memused): Removed variable.
13764         (grub_script_parsed): Likewise.
13765         (grub_script_malloc): Added a state argument.  Use that instead of
13766         global variables.
13767         (grub_script_mem_record): Likewise.
13768         (grub_script_mem_record_stop): Likewise.
13769         (grub_script_arg_add): Likewise.
13770         (grub_script_add_arglist): Likewise.
13771         (grub_script_create_cmdline): Likewise.
13772         (grub_script_create_cmdif): Likewise.
13773         (grub_script_create_cmdmenu): Likewise.
13774         (grub_script_add_cmd): Likewise.
13775         (grub_script_parse): Setup the state before calling the parser.
13777 2006-04-16  Marco Gerards  <marco@gnu.org>
13779         * normal/command.c (grub_command_init): Remove the title command.
13781         * normal/lexer.c (grub_script_yylex): Renamed from this...
13782         (grub_script_yylex2): ... to this.
13783         (grub_script_yylex): New function.  Temporary
13784         introduced to filter some tokens.
13785         (grub_script_yyerror): Print a newline.
13787         * normal/main.c (read_config_file): Output information about the
13788         lines that contain errors.  Wait for a key after all lines have
13789         been processed.  Don't return an empty menu.
13791         * normal/parser.y (func_mem): Don't initialize.
13792         (menu_entry): Likewise.
13793         (err): New variable.
13794         (script): Don't return anything when an error was encountered.
13795         (ws, returns): Removed rules.
13796         (argument): Disabled concatenated variable support.
13797         (arguments): Remove explicit separators.
13798         (grubcmd): Likewise.
13799         (function): Likewise.
13800         (menuentry): Likewise.
13801         (if): Likewise.
13802         (commands): Likewise.  Add error handling.
13804         * normal/script.c (grub_script_create_cmdline): If
13805         `grub_script_parsed' is 0, assume the parser encountered an error.
13807 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
13809         * configure.ac: Add support for EFI. Fix the typo
13810         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13812 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13814         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
13815         foreign multibyte characters should be shown correctly.
13817 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13819         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13820         calculation.
13821         (read_config_file): Made it to close file before returning.
13823 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
13825         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13826         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13827         video/i386/pc/vbefill.c.
13829         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13830         video/i386/pc/vbefill.c.
13832         * include/grub/video.h (grub_video_blit_format): New enum.
13833         (grub_video_mode_info): Added new member blit_format.
13834         (grub_video_get_blit_format): New function prototype.
13836         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13837         function prototype.
13838         (grub_video_vbe_map_rgb): Likewise.
13839         (grub_video_vbe_unmap_color): Likewise.
13841         * include/grub/i386/pc/vbeblit.h: New file.
13843         * include/grub/i386/pc/vbefill.h: New file.
13845         * video/video.c (grub_video_get_blit_format): New function.
13846         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13847         (grub_video_vbe_map_rgb): Likewise.
13848         (grub_video_vbe_unmap_color): Likewise.
13850         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13851         optimized fills.
13852         (grub_video_vbe_blit_render_target): Changed to use more optimized
13853         blits.
13854         (grub_video_vbe_setup): Added detection for optimized settings.
13855         (grub_video_vbe_create_render_target): Likewise.
13857         * video/i386/pc/vbeblit.c: New file.
13859         * video/i386/pc/vbefill.c: New file.
13861 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
13863         * font/manager.c (grub_font_get_glyph): Removed font fixup from
13864         here...
13866         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
13867         parsing to support both hex and dec ranges.  If filename was missing
13868         show usage information.
13870 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
13872         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13873         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
13875         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13876         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
13877         (video_mod_SOURCES): Added.
13878         (video_mod_CFLAGS): Likewise.
13879         (video_mod_LDFLAGS): Likewise.
13880         (gfxterm_mod_SOURCES): Likewise.
13881         (gfxterm_mod_CFLAGS): Likewise.
13882         (gfxterm_mod_LDFLAGS): Likewise.
13883         (videotest_mod_SOURCES): Likewise.
13884         (videotest_mod_CFLAGS): Likewise.
13885         (videotest_mod_LDFLAGS): Likewise.
13886         (vesafb_mod_SOURCES): Removed.
13887         (vesafb_mod_CFLAGS): Likewise.
13888         (vesafb_mod_LDFLAGS): Likewise.
13889         (vga_mod_SOURCES): Likewise.
13890         (vga_mod_CFLAGS): Likewise.
13891         (vga_mod_LDFLAGS): Likewise.
13893         * commands/videotest.c: New file.
13895         * font/manager.c (fill_with_default_glyph): Modified to use
13896         grub_font_glyph.
13897         (grub_font_get_glyph): Likewise.
13898         (fontmanager): Renamed from this...
13899         (font_manager): ... to this.
13901         * include/grub/font.h (grub_font_glyph): Added new structure.
13902         (grub_font_get_glyph): Modified to use grub_font_glyph.
13904         * include/grub/misc.h (grub_abs): Added as inline function.
13906         * include/grub/video.h: New file.
13908         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13909         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13910         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13911         (grub_vbe_get_controller_info): Renamed from this...
13912         (grub_vbe_bios_get_controller_info): ... to this.
13913         (grub_vbe_get_mode_info): Renamed from this...
13914         (grub_vbe_bios_get_mode_info): ... to this.
13915         (grub_vbe_set_mode): Renamed from this...
13916         (grub_vbe_bios_set_mode): ... to this.
13917         (grub_vbe_get_mode): Renamed from this...
13918         (grub_vbe_bios_get_mode): ... to this.
13919         (grub_vbe_set_memory_window): Renamed from this...
13920         (grub_vbe_bios_set_memory_window): ... to this.
13921         (grub_vbe_get_memory_window): Renamed from this...
13922         (grub_vbe_bios_get_memory_window): ... to this.
13923         (grub_vbe_set_scanline_length): Renamed from this...
13924         (grub_vbe_set_scanline_length): ... to this.
13925         (grub_vbe_get_scanline_length): Renamed from this...
13926         (grub_vbe_bios_get_scanline_length): ... to this.
13927         (grub_vbe_set_display_start): Renamed from this...
13928         (grub_vbe_bios_set_display_start): ... to this.
13929         (grub_vbe_get_display_start): Renamed from this...
13930         (grub_vbe_bios_get_display_start): ... to this.
13931         (grub_vbe_set_palette_data): Renamed from this...
13932         (grub_vbe_bios_set_palette_data): ... to this.
13933         (grub_vbe_set_pixel_rgb): Removed.
13934         (grub_vbe_set_pixel_index): Likewise.
13936         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13937         from this...
13938         (grub_vbe_bios_get_controller_info): ... to this.
13939         (grub_vbe_get_mode_info): Renamed from this...
13940         (grub_vbe_bios_get_mode_info): ... to this.
13941         (grub_vbe_set_mode): Renamed from this...
13942         (grub_vbe_bios_set_mode): ... to this.
13943         (grub_vbe_get_mode): Renamed from this...
13944         (grub_vbe_bios_get_mode): ... to this.
13945         (grub_vbe_set_memory_window): Renamed from this...
13946         (grub_vbe_bios_set_memory_window): ... to this.
13947         (grub_vbe_get_memory_window): Renamed from this...
13948         (grub_vbe_bios_get_memory_window): ... to this.
13949         (grub_vbe_set_scanline_length): Renamed from this...
13950         (grub_vbe_set_scanline_length): ... to this.
13951         (grub_vbe_get_scanline_length): Renamed from this...
13952         (grub_vbe_bios_get_scanline_length): ... to this.
13953         (grub_vbe_set_display_start): Renamed from this...
13954         (grub_vbe_bios_set_display_start): ... to this.
13955         (grub_vbe_get_display_start): Renamed from this...
13956         (grub_vbe_bios_get_display_start): ... to this.
13957         (grub_vbe_set_palette_data): Renamed from this...
13958         (grub_vbe_bios_set_palette_data): ... to this.
13959         (grub_vbe_bios_get_controller_info): Fixed problem with registers
13960         getting corrupted after calling it.  Added more pushes and pops.
13961         (grub_vbe_bios_set_mode): Likewise.
13962         (grub_vbe_bios_get_mode): Likewise.
13963         (grub_vbe_bios_get_memory_window): Likewise.
13964         (grub_vbe_bios_set_scanline_length): Likewise.
13965         (grub_vbe_bios_get_scanline_length): Likewise.
13966         (grub_vbe_bios_get_display_start): Likewise.
13967         (grub_vbe_bios_set_palette_data): Likewise.
13969         * normal/cmdline.c (cl_set_pos): Refresh the screen.
13970         (cl_insert): Likewise.
13971         (cl_delete): Likewise.
13973         * term/gfxterm.c: New file.
13975         * term/i386/pc/vesafb.c: Removed file.
13977         * video/video.c: New file.
13979         * video/i386/pc/vbe.c (real2pm): Added new function.
13980         (grub_video_vbe_draw_pixel): Likewise.
13981         (grub_video_vbe_get_video_ptr): Likewise.
13982         (grub_video_vbe_get_pixel): Likewise
13983         (grub_video_vbe_init): Likewise.
13984         (grub_video_vbe_fini): Likewise.
13985         (grub_video_vbe_setup): Likewise.
13986         (grub_video_vbe_get_info): Likewise.
13987         (grub_video_vbe_set_palette): Likewise.
13988         (grub_video_vbe_get_palette): Likewise.
13989         (grub_video_vbe_set_viewport): Likewise.
13990         (grub_video_vbe_get_viewport): Likewise.
13991         (grub_video_vbe_map_color): Likewise.
13992         (grub_video_vbe_map_rgb): Likewise.
13993         (grub_video_vbe_map_rgba): Likewise.
13994         (grub_video_vbe_unmap_color): Likewise.
13995         (grub_video_vbe_fill_rect): Likewise.
13996         (grub_video_vbe_blit_glyph): Likewise.
13997         (grub_video_vbe_blit_bitmap): Likewise.
13998         (grub_video_vbe_blit_render_target): Likewise.
13999         (grub_video_vbe_scroll): Likewise.
14000         (grub_video_vbe_swap_buffers): Likewise.
14001         (grub_video_vbe_create_render_target): Likewise.
14002         (grub_video_vbe_delete_render_target): Likewise.
14003         (grub_video_vbe_set_active_render_target): Likewise.
14004         (grub_vbe_set_pixel_rgb): Remove function.
14005         (grub_vbe_set_pixel_index): Likewise.
14006         (index_color_mode): Remove static variable.
14007         (active_mode): Likewise.
14008         (framebuffer): Likewise.
14009         (bytes_per_scan_line): Likewise.
14010         (grub_video_vbe_adapter): Added new static variable.
14011         (framebuffer): Likewise.
14012         (render_target): Likewise.
14013         (initial_mode): Likewise.
14014         (mode_in_use): Likewise.
14015         (mode_list): Likewise.
14017 2006-03-10  Marco Gerards  <marco@gnu.org>
14019         * configure.ac (AC_INIT): Bumped to 1.93.
14021         * DISTLIST: Added `include/grub/hfs.h'.
14023 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
14025         * boot/i386/pc/boot.S (general_error): Before looping, try INT
14026         18H, which might help the BIOS falling back to next boot media.
14028 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
14030         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
14031         Poe Chen <poe.poechen@gmail.com>.
14033 2006-01-17  Marco Gerards  <marco@gnu.org>
14035         * include/grub/normal.h: Include <grub/script.h>.
14036         (grub_command_list): Removed struct.
14037         (grub_command_list_t): Removed type.
14038         (grub_menu_entry): Remove members `num' and `command_list'.  Add
14039         members `commands' and `sourcecode'.
14040         * include/grub/script.h: Add inclusion guards.
14041         (grub_script_cmd_menuentry): New struct.
14042         (grub_script_execute_menuentry): New prototype.
14043         (grub_script_lexer_record_start): Likewise.
14044         (grub_script_lexer_record_stop): Likewise.
14045         * normal/execute.c (grub_script_execute_menuentry): New function.
14046         * normal/lexer.c (record, recording, recordpos, recordlen): New
14047         variables.
14048         (grub_script_lexer_record_start): New function.
14049         (grub_script_lexer_record_stop): Likewise.
14050         (recordchar): Likewise.
14051         (nextchar): Likewise.
14052         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
14053         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
14054         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
14055         (current_menu): New variable.
14056         (free_menu): Mainly rewritten.
14057         (grub_normal_menu_addentry): New function.
14058         (read_config_file): Rewritten.
14059         * normal/menu.c (run_menu_entry): Mainly rewritten.
14060         * normal/menu_entry.c (make_screen): Rewritten the code to insert
14061         the menu entry.
14062         (run): Mainly rewritten.
14063         * normal/parser.y (menu_entry): New variable.
14064         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
14065         (menuentry): New rule.
14066         (command): Add `menuentry'.
14067         (if_statement): Allow additional returns before `fi'.
14068         * normal/script.c (grub_script_create_cmdmenu): New function.
14070 2006-01-03  Marco Gerards  <marco@gnu.org>
14072         * INSTALL: GNU Bison is required.
14073         * configure.ac: Rewritten the test to detect Bison.
14074         * Makefile.in (YACC): New variable.  Reported by Xun Sun
14075         <xun.sun.cn@gmail.com>.
14077 2006-01-03  Marco Gerards  <marco@gnu.org>
14079         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
14080         the HFS+ filesystem to filesystem blocks.
14081         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
14082         GCC warning is silenced.
14084 2006-01-03  Marco Gerards  <marco@gnu.org>
14086         * partmap/apple.c (apple_partition_map_iterate): Convert the data
14087         read from disk from big endian to host byte order.
14089 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
14091         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
14092         documentation.
14093         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
14094         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
14095         embedded HFS+ filesystem.
14096         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
14097         (grub_hfs_sblock): Move from here...
14098         * include/grub/hfs.h: To here...  New file.
14099         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
14100         documentation.
14101         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
14102         New macros.
14103         (grub_hfsplus_volheader): Change type of member `magic' to
14104         `grub_uint16_t'.
14105         (grub_hfsplus_data): Add new member `embedded_offset'.
14106         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
14107         returned block.
14108         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
14109         Calculate the offset.
14111 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14113         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
14114         Removed.
14115         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
14117 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14119         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
14120         ENV->NAME is NULL after allocating ENV->VALUE.
14122 2005-12-25  Marco Gerards  <marco@gnu.org>
14124         * kern/env.c (grub_env_set): Rewritten the error handling code.
14126 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14128         * geninit.sh: Made more robust, and more portable.
14130 2005-12-25  Marco Gerards  <marco@gnu.org>
14132         Add support for Apple HFS+ filesystems.
14134         * fs/hfsplus.c: New file.
14136         * DISTLIST: Added `fs/hfsplus.c'.
14138         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
14139         (hfsplus_mod_SOURCES): New variable.
14140         (hfsplus_mod_CFLAGS): Likewise.
14141         (hfsplus_mod_LDFLAGS): Likewise.
14142         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
14143         (grub_setup_SOURCES): Likewise.
14144         (grub_mkdevicemap_SOURCES): Likewise.
14145         (grub_emu_SOURCES): Likewise.
14146         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14148         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
14150         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
14152 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14154         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
14155         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
14156         include/grub/parser.h, include/grub/script.h, kern/parser.c,
14157         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
14158         normal/lexer.c, normal/parser.y, normal/script.c, and
14159         partmap/gpt.c.
14160         Removed kern/sparc64/cache.c.
14162         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
14163         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
14164         grub_emu_init.c.
14166         * configure.ac (AC_INIT): Bumped to 1.92.
14168 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
14170         * kern/err.c (grub_error_push): Added new function to support error
14171         stacks.
14172         (grub_error_pop): Likewise.
14173         (grub_error_stack_items): New local variable to support error stacks.
14174         (grub_error_stack_pos): Likewise.
14175         (grub_error_stack_assert): Likewise.
14176         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
14177         stack depth.
14178         (grub_print_error): Added support to print errors from error stack.
14180         * include/grub/err.h (grub_error_push): Added function prototype.
14181         (grub_error_pop): Likewise.
14183 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
14185         * configure.ac: Accept `powerpc64' as host_cpu.
14186         (amd64): Rename to `biarch32'.
14188         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14189         non-cacheline-aligned addresses.
14191         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14192         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
14193         if `size' is non-zero.
14195 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
14197         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14198         and `cd' to make sure the filename is not prefixed with a
14199         directory name.
14200         (pkgdata_MODULES): Add `gpt.mod'.
14201         (gpt_mod_SOURCES): New variable.
14202         (gpt_mod_CFLAGS): Likewise.
14203         (gpt_mod_LDFLAGS): Likewise.
14205         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14207         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14208         New macro.
14210         * partmap/gpt.c: New file.
14212         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14213         GPT partition map is detected.
14215 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
14217         * commands/i386/pc/play.c: New file.
14218         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14219         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14220         macros.
14222 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
14224         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14225         ((unused))' to silence gcc warning.
14227 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
14229         * configure.ac: Correct `AC_PROG_YACC' test.
14231 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14233         * util/powerpc/ieee1275/grub-install.in: Run the mount point
14234         check before installing files.
14236 2005-11-22  Mike Small  <smallm@panix.com>
14238         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14239         number regex so multidigit numbers are recognized correctly.
14241 2005-11-22  Mike Small  <smallm@panix.com>
14243         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14244         debugging message before attempting to claim memory.
14245         (grub_rescue_cmd_initrd): Add a claim debugging message and try
14246         multiple addresses in case of failure.
14248 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14250         * term/tparm.c (get_space): Remove empty `if' statement.
14252         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14254         * kern/parser.c (check_varstate): Rename `state' to 's'.
14256 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14258         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
14259         variable definitions to the beginning of each function.  Sort stack
14260         variables by size.
14261         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
14262         `buf' argument to `char *'.
14264 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14266         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14267         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14268         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14269         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14270         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14271         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14272         configfile.mod, search.mod, gzio.mod and test.mod.
14273         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14274         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14275         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14276         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14277         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14278         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14279         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14280         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14281         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14282         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14283         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14284         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14285         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14286         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14287         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14288         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14289         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14290         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14291         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14292         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14293         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14294         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14295         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14297         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14298         `grep --include'.
14299         (pkgdata_MODULES): Add test.mod.
14301 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14303         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
14304         appending to variables with "+=".
14305         (PModule): Use full pathname to generate *.lst filenames.
14307         * Makefile.in: Fixed list rules moved from genmk.rb.
14308         (.DELETE_ON_ERROR): New special target.
14309         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14311         * conf/i386-pc.rmk: Include conf/common.mk.
14312         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14313         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14314         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14315         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14316         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14317         configfile.mod, search.mod, gzio.mod and test.mod.
14318         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14319         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14320         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14321         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14322         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14323         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14324         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14325         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14326         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14327         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14328         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14329         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14330         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14331         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14332         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14333         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14334         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14335         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14336         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14337         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14338         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14339         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14340         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14341         here...
14342         * conf/common.rmk: ... to here.  New file.
14344         * conf/common.mk: New file.
14346 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
14348         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14349         (grub_script.tab.c): ... here.
14351         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14352         (grub_script.tab.c): ... here.
14354         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14355         (grub_script.tab.c): ... here.
14357         * normal/command.c (grub_command_find): Fixed a memory leak of
14358         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14360 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14362         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14363         "@" which marks the start of a comment on ARM.
14364         (VARIABLE): Likewise.
14366 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14368         Add support for Linux/ADFS partition tables.
14370         * partmap/acorn.c: New file.
14372         * include/grub/acorn_filecore.h: Likewise.
14374         * DISTLIST: Added `partmap/acorn.c' and
14375         `include/grub/acorn_filecore.h'.
14377         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14378         `partmap/acorn.c'.
14379         (pkgdata_MODULES): Add `acorn.mod'.
14380         (acorn_mod_SOURCES): New variable.
14381         (acorn_mod_CFLAGS): Likewise.
14383         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14384         `partmap/acorn.c'.
14385         (pkgdata_MODULES): Add `acorn.mod'.
14386         (acorn_mod_SOURCES): New variable.
14387         (acorn_mod_CFLAGS): Likewise.
14389         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14390         (pkgdata_MODULES): Add `acorn.mod'.
14391         (acorn_mod_SOURCES): New variable.
14392         (acorn_mod_CFLAGS): Likewise.
14393         (acorn_mod_LDFLAGS): Likewise.
14395         * include/types.h (grub_disk_addr_t): New typedef.
14397 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
14399         * geninit.sh: New file.
14401         * geninitheader.sh: Likewise.
14403         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14404         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14405         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14406         * commands/configfile.c (grub_configfile_init)
14407         (grub_configfile_fini): Likewise.
14408         * commands/default.c (grub_default_init, grub_default_fini):
14409         Likewise.
14410         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14411         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14412         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14413         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14414         Likewise.
14415         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14416         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14417         Likewise.
14418         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14419         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14420         Likewise.
14421         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14422         Likewise.
14423         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14424         Likewise.
14425         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14426         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14427         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14428         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14429         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14430         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14431         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14432         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14433         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14434         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14435         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14436         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14437         * partmap/amiga.c (grub_amiga_partition_map_init)
14438         (grub_amiga_partition_map_fini): Likewise.
14439         * partmap/apple.c (grub_apple_partition_map_init)
14440         (grub_apple_partition_map_fini): Likewise.
14441         * partmap/pc.c (grub_pc_partition_map_init)
14442         (grub_pc_partition_map_fini): Likewise.
14443         * partmap/sun.c (grub_sun_partition_map_init,
14444         grub_sun_partition_map_fini): Likewise.
14445         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14446         Likewise.
14448         * util/grub-emu.c: Include <grub_modules_init.h>.
14449         (main): Don't initialize and de-initialize any modules directly,
14450         use `grub_init_all' and `grub_fini_all' instead.
14452         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14453         `grub_vesafb_mod_init'.
14454         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
14455         all users.
14456         * term/i386/pc/vga.c (grub_vga_init): Renamed to
14457         `grub_vga_mod_init'.  Updated all users.
14458         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14460         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14461         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14462         rules.
14464         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14465         Generate a function to initialize the module in utilities.
14466         Updated all callers.
14467         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
14468         initialize the module in utilities.  Updated all callers.
14470 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14472         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14473         escape sequence and a literal ^L to clear the screen.
14475         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14476         when returning from Open Firmware.
14478 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14480         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14481         (grub_ofconsole_height): Likewise.
14482         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14483         manually insert a '\n'.
14484         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14485         `grub_ofconsole_height'.  Return early if these are already set.
14487 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
14489         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14490         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14491         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14492         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14493         and `normal/script.c'.
14494         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14495         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14496         (test_mod_SOURCES): New variable.
14497         (test_mod_CFLAGS): Likewise.
14498         (test_mod_LDFLAGS): Likewise.
14499         (pkgdata_MODULES): Add `test.mod'.
14500         (grub_script.tab.c): New rule.
14501         (grub_script.tab.h): Likewise.
14503 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
14505         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14506         `commands/test.c', `normal/execute.c', `normal/lexer.c',
14507         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14508         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14509         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14510         (test_mod_SOURCES): New variable.
14511         (test_mod_CFLAGS): Likewise.
14512         (pkgdata_MODULES): Add `test.mod'.
14513         (grub_script.tab.c): New rule.
14514         (grub_script.tab.h): Likewise.
14516 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
14518         Add initial scripting support.
14520         * commands/test.c: New file.
14521         * include/grub/script.h: Likewise.
14522         * normal/execute.c: Likewise.
14523         * normal/function.c: Likewise.
14524         * normal/lexer.c: Likewise.
14525         * normal/parser.y: Likewise.
14526         * normal/script.c: Likewise.
14528         * configure.ac: Add `AC_PROG_YACC' test.
14530         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14531         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14532         `normal/function.c' and `normal/script.c'.
14533         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14534         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14535         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14536         variables.
14537         (pkgdata_MODULES): Add `test.mod'.
14538         (grub_script.tab.c): New rule.
14539         (grub_script.tab.h): Likewise.
14541         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14543         * include/grub/normal.h (grub_test_init): New prototype.
14544         (grub_test_fini): Likewise.
14546         * normal/command.c: Include <grub/script.h>.
14547         (grub_command_execute): Rewritten.
14549         * util/grub-emu.c (main): Call `grub_test_init' and
14550         `grub_test_fini'.
14552 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14554         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14555         to 0.
14556         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14557         there are no pending characters.
14559 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14561         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14562         `grub_strndup' to drop device arguments. Replace unnecessary
14563         `grub_strndup' with `grub_strdup'.
14565 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14567         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14568         `debug' environment variable has been set.
14570 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
14572         * Makefile.in (install-local): Use $(DATA).
14573         (uninstall): Likewise.
14574         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14575         (sbin_UTILITIES): ... to here.
14576         (sbin_SCRIPTS): New variable.
14577         (grub_install_SOURCES): New variable.
14578         * util/powerpc/ieee1275/grub-install.in: New file.
14579         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14580         variable.
14581         (add_segments): Call `grub_util_get_path'.
14583 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
14585         From Timothy Baldwin:
14586         * commands/ls.c (grub_ls_list_files): Close FILE with
14587         grub_file_close.
14588         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14590 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
14592         * include/grub/parser.h: New file.
14594         * kern/parser.c: Likewise.
14596         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14597         (grub_setup_SOURCES): Likewise.
14598         (grub_probefs_SOURCES): Likewise.
14599         (grub_emu_SOURCES): Likewise.
14600         (kernel_img_HEADERS): Add `parser.h'.
14602         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14603         (grub_emu_SOURCES): Add `kern/parser.c'.
14604         (grubof_SOURCES): Likewise.
14606         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14607         (grubof_SOURCES): Add `kern/parser.c'.
14609         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14611         * kern/misc.c (grub_split_cmdline): Removed function.
14613         * kern/rescue.c: Include <grub/parser.h>.
14614         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14615         of `grub_split_cmdline'.
14617         * normal/command.c: Include <grub/parser.h>.
14618         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
14619         of `grub_split_cmdline'.
14621         * normal/completion.c: Include <grub/parser.h>.
14622         (cmdline_state): New variable.
14623         (iterate_dir): End the filename with a quote depending on the
14624         command line state.
14625         (get_state): new function.
14626         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14627         split the arguments and determine the current argument.  When the
14628         argument string is not quoted, escape all spaces.
14630 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14632         * normal/sparc64/setjmp.S: New file.
14634 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14636         * include/grub/sparc64/libgcc.h: New file.
14637         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14638         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14639         normal/sparc64/setjmp.c.
14641 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14643         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14644         * kern/sparc64/cache.S: New file.
14645         * kern/sparc64/cache.c: Removed.
14646         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14647         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
14648         -mtune=ultrasparc.
14649         (COMMON_LDFLAGS): Add -melf64_sparc.
14650         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14651         (grubof_SOURCES): Use cache.S instead of cache.c.
14652         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
14653         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14654         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14655         commented though.
14656         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14657         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14658         (linux_mod_CFLAGS): Commented out.
14659         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14660         out because module isn't built.
14661         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14662         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14663         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14664         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14665         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14666         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14667         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14668         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14669         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14670         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14671         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14672         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14673         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14674         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14676 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
14678         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14679         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14680         longer, because HFS should not be used on PC.
14682 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14684         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14685         consistently within the loop.
14687 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
14689         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14690         directory can not be read.
14692 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14694         * configure.ac (AC_INIT): Increase the version number to 1.91.
14696         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14697         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14698         term/i386/pc/serial.c.
14700 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14702         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14703         file size must be permitted.
14705         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14706         between %ah and %al.
14708 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14710         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14711         grub_uint64_t.
14712         Call the hook with a NUL-terminated filename.
14713         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14714         grub_cpu_to_be32.
14716         * kern/term.c (cursor_state): New variable.
14717         (grub_term_set_current): Reset the cursor state on a new
14718         terminal.
14719         (grub_setcursor): Rewritten to use CURSOR_STATE.
14720         (grub_getcursor): New function.
14722         * include/grub/term.h (grub_getcursor): New prototype.
14724         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14725         integers on ARM. Reported by Timothy Baldwin
14726         <T.E.Baldwin99@members.leeds.ac.uk>.
14728 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
14730         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14731         allocated.
14732         (grub_sfs_dir): Likewise.
14734 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
14736         Add support for the SFS filesystem.
14738         * fs/sfs.c: New file.
14740         * DISTLIST: Added `fs/sfs.c'.
14742         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14743         (grub_probefs_SOURCES): Likewise.
14744         (grub_emu_SOURCES): Likewise.
14745         (pkgdata_MODULES): Add `sfs.mod'.
14746         (sfs_mod_SOURCES): New variable.
14747         (sfs_mod_CFLAGS): Likewise.
14748         (sfs_mod_LDFLAGS): Likewise.
14750         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14751         (pkgdata_MODULES): Add `sfs.mod'.
14752         (sfs_mod_SOURCES): New variable.
14753         (sfs_mod_CFLAGS): Likewise.
14755         * util/grub-emu.c (main): Call `grub_sfs_init' and
14756         `grub_sfs_fini'.
14758         * include/grub/fs.h (grub_sfs_init): New prototype.
14759         (grub_sfs_fini): Likewise.
14761 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
14763         Add support for the AFFS filesystem.
14765         * fs/affs.c: New file.
14767         * DISTLIST: Added `fs/affs.c'.
14769         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14770         (grub_probefs_SOURCES): Likewise.
14771         (grub_emu_SOURCES): Likewise.
14772         (pkgdata_MODULES): Add `affs.mod'.
14773         (affs_mod_SOURCES): New variable.
14774         (affs_mod_CFLAGS): Likewise.
14775         (affs_mod_LDFLAGS): Likewise.
14777         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14778         (pkgdata_MODULES): Add `affs.mod'.
14779         (affs_mod_SOURCES): New variable.
14780         (affs_mod_CFLAGS): Likewise.
14782         * util/grub-emu.c (main): Call `grub_affs_init' and
14783         `grub_affs_fini'.
14785         * include/grub/fs.h (grub_affs_init): New prototype.
14786         (grub_affs_fini): Likewise.
14788 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14790         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14792 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14794         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
14795         `-m32' to CFLAGS.
14797         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14798         linking.
14800         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14801         (COMMON_LDFLAGS): New variable.
14802         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14803         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14804         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14805         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14806         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14807         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14808         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14809         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14810         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14811         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14812         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14813         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14814         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14815         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14816         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14817         variables.
14818         (normal_mod_ASFLAGS): Add `-m32'.
14820         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14821         (grub_host_size_t, grub_host_ssize_t): New types.
14822         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14823         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14824         `GRUB_HOST_SIZEOF_VOID_P'.
14826         * include/grub/kernel.h (struct grub_module_header): Type of
14827         member offset changed to `grub_host_off_t'.  Type of member size
14828         changed to `grub_host_size_t'.
14829         (struct grub_module_info): Type of member offset changed to
14830         `grub_host_off_t'.  Type of member size changed to
14831         `grub_host_size_t'.
14833 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
14835         Make GRUB's kernel compliant to Multiboot Specification.
14837         * kern/i386/pc/startup.S (multiboot_header): New label.
14838         (multiboot_entry): Likewise.
14839         (multiboot_trampoline): Likewise.
14841         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14842         Increased to 0x4A0.
14844         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14845         put parentheses after a question mark.
14846         [!GRUB_UTIL] (my_mod): New variable.
14848         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14850 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
14852         Adds support for the XFS filesystem.  Btrees are not supported
14853         yet.
14855         * fs/xfs.c: New file.
14857         * DISTLIST: Added `fs/xfs.c'.
14859         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14860         (grub_probefs_SOURCES): Likewise.
14861         (grub_emu_SOURCES): Likewise.
14862         (pkgdata_MODULES): Add `xfs.mod'.
14863         (xfs_mod_SOURCES): New variable.
14864         (xfs_mod_CFLAGS): Likewise.
14866         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14867         (pkgdata_MODULES): Add `xfs.mod'.
14868         (xfs_mod_SOURCES): New variable.
14869         (xfs_mod_CFLAGS): Likewise.
14871         * util/grub-emu.c (main): Call `grub_xfs_init' and
14872         `grub_xfs_fini'.
14874         * include/grub/fs.h (grub_xfs_init): New prototype.
14875         (grub_xfs_fini): Likewise.
14878 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
14880         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14881         color modes, allow greater than 16 colors to be configured as
14882         a default palette.
14884 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
14886         * normal/completion.c (complete_arguments): Add the qualifier
14887         const into OPTIONS.
14889         From Omniflux <omniflux+lists@omniflux.com>:
14890         * include/grub/terminfo.h: New file.
14891         * include/grub/tparm.h: Likewise.
14892         * include/grub/i386/pc/serial.h: Likewise.
14893         * term/terminfo.c: Likewise.
14894         * term/tparm.c: Likewise.
14895         * term/i386/pc/serial.c: Likewise.
14896         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14897         serial.mod.
14898         (terminfo_mod_SOURCES): New variable.
14899         (terminfo_mod_CFLAGS): Likewise.
14900         (serial_mod_SOURCES): Likewise.
14901         (serial_mod_CFLAGS): Likewise.
14903 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
14905         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14906         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14907         and kern/powerpc/ieee1275/cmain.c, respectively.
14909         * boot/powerpc/ieee1275/crt0.S: Moved to ...
14910         * kern/powerpc/ieee1275/crt0.S: ... here.
14912         * boot/powerpc/ieee1275/cmain.c: Moved to ...
14913         * kern/powerpc/ieee1275/cmain.c: ... here.
14915         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14916         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14917         instead of boot/powerpc/ieee1275/crt0.S and
14918         boot/powerpc/ieee1275/cmain.c, respectively.
14920         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14921         sectors. It was not used anyway.
14923 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14925         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14926         `unused parameter' warning.
14928 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14930         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14931         function.
14932         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14933         getcharwidth.
14935 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
14937         * include/grub/normal.h (enum grub_completion_type): Added
14938         `GRUB_COMPLETION_TYPE_ARGUMENT'.
14940         * normal/cmdline.c (print_completion): Handle
14941         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14942         * normal/menu_entry.c (store_completion): Likewise.
14944         * normal/completion.c (complete_arguments): New function.
14945         (grub_normal_do_completion): Call `complete_arguments' when the
14946         current words start with a dash.
14948 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
14950         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14951         `gzio.mod' instead of `io.mod').
14953 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
14955         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14956         (DISTDIRS): Added io and video.
14957         Rewrite the search routine to make an output consistently.
14959         * DISTLIST: Added conf/sparc64-ieee1275.mk,
14960         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14961         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14962         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14963         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14964         util/powerpc/ieee1275/misc.c.
14966         * include/grub/gzio.h: New file.
14967         * io/gzio.c: Likewise.
14969         * kern/file.c (grub_file_close): Call grub_device_close only if
14970         FILE->DEVICE is not NULL.
14972         * include/grub/mm.h [!NULL] (NULL): New macro.
14974         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14976         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14977         (pkgdata_MODULES): Added gzio.mod.
14978         (gzio_mod_SOURCES): New variable.
14979         (gzio_mod_CFLAGS): Likewise.
14981         * conf/i386-pc.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         * commands/cat.c: Include grub/gzio.h.
14987         (grub_cmd_cat): Use grub_gzfile_open instead of
14988         grub_file_open.
14990         * commands/cmp.c: Include grub/gzio.h.
14991         (grub_cmd_cmp): Use grub_gzfile_open instead of
14992         grub_file_open.
14994         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14995         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14996         grub_file_open.
14997         (grub_rescue_cmd_module): Likewise.
14999 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15001         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
15002         kern/sparc64/ieee1275/init.c because it contains _start.
15003         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
15005 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15007         * configure.ac: Add support for sparc64 host with ieee1275
15008         firmware.
15009         * configure: Generated from configure.ac.
15010         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
15011         instead of int.
15012         (grub_ofdisk_read): Likewise.
15013         (grub_ofdisk_open): Use %p to print pointer values, and cast the
15014         pointers as (void *) to remove a warning.
15015         (grub_ofdisk_close): Likewise.
15016         (grub_ofdisk_read): Likewise.
15017         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
15018         returns, so make it return void to remove a warning.
15019         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
15020         Corresponding prototype change.
15021         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
15022         values, and cast the pointers as (void *) to remove a warning.
15023         (grub_mm_dump): Likewise.
15024         * conf/sparc64-ieee1275.mk: New file.
15025         * conf/sparc64-ieee1275.rmk: Likewise.
15026         * include/grub/sparc64/setjmp.h: Likewise.
15027         * include/grub/sparc64/types.h: Likewise.
15028         * include/grub/sparc64/ieee1275/console.h: Likewise.
15029         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
15030         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
15031         * include/grub/sparc64/ieee1275/time.h: Likewise.
15032         * kern/sparc64/cache.c: Likewise.
15033         * kern/sparc64/dl.c: Likewise.
15034         * kern/sparc64/ieee1275/init.c: Likewise.
15035         * kern/sparc64/ieee1275/openfw.c: Likewise.
15037 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
15039         * util/console.c (grub_ncurses_putchar): If C is greater than
15040         0x7f, set C to a question mark.
15041         (grub_ncurses_getcharwidth): New function.
15042         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
15043         getcharwidth.
15045         * normal/menu.c (print_entry): Made aware of Unicode. First,
15046         convert TITLE to UCS-4, and predict the cursor position by
15047         grub_getcharwidth.
15049         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
15050         const to SRC.
15051         * kern/misc.c (grub_utf16_to_utf8): Likewise.
15053 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
15055         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
15056         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15057         grub_strcat.
15059         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
15060         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15061         grub_strcpy and grub_strlen. Take it into account that a space
15062         character is inserted as a delimiter.
15064 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
15066         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
15067         invalid magic in the error.
15069         * commands/search.c: New file.
15071         * util/grub-emu.c (main): Call grub_search_init and
15072         grub_search_fini.
15074         * kern/rescue.c (grub_rescue_print_disks): Removed.
15075         (grub_rescue_print_devices): New function.
15076         (grub_rescue_cmd_ls): Use grub_device_iterate with
15077         grub_rescue_print_devices instead of grub_disk_dev_iterate with
15078         grub_rescue_print_disks.
15080         * kern/partition.c (grub_partition_iterate): Return the result of
15081         PARTMAP->ITERATE instead of GRUB_ERRNO.
15083         * kern/device.c: Include grub/partition.h.
15084         (grub_device_iterate): New function.
15086         * include/grub/partition.h (grub_partition_iterate): Return int
15087         instead of grub_err_t.
15089         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
15090         prototype.
15091         [GRUB_UTIL] (grub_search_fini): Likewise.
15093         * include/grub/device.h (grub_device_iterate): New prototype.
15095         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15096         commands/search.c.
15097         (pkgdata_MODULES): Added search.mod.
15098         (search_mod_SOURCES): New variable.
15099         (search_mod_CFLAGS): Likewise.
15101         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
15102         (pkgdata_MODULES): Added search.mod.
15103         (search_mod_SOURCES): New variable.
15104         (search_mod_CFLAGS): Likewise.
15106         * commands/ls.c (grub_ls_list_disks): Renamed to ...
15107         (grub_ls_list_devices): ... this, and use grub_device_iterate.
15108         All callers changed.
15110         * DISTLIST: Added commands/search.c.
15112 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
15114         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
15115         conversion.
15116         (grub_getcharwidth): New function.
15118         * kern/misc.c (grub_utf8_to_ucs4): New function.
15120         * include/grub/term.h (struct grub_term): Added a new member
15121         "getcharwidth".
15122         (grub_getcharwidth): New prototype.
15124         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
15126         * term/i386/pc/console.c (map_char): New function. Segregated from
15127         grub_console_putchar.
15128         (grub_console_putchar): Use map_char.
15129         (grub_console_getcharwidth): New function.
15130         (grub_console_term): Specified grub_console_getcharwidth as
15131         getcharwidth.
15133         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
15134         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
15136         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
15137         GRUB_ERRNO.
15138         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
15139         on grub_strtoul completely.
15140         (write_char): Declare local variables in the beginning of the
15141         function.
15142         (grub_vesafb_getcharwidth): New function.
15143         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
15144         getcharwidth.
15146 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
15148         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
15149         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
15150         commands/i386/pc/vbetest.c.
15152         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
15153         call grub_vbe_get_controller_info again, because the returned
15154         information is volatile.
15155         (grub_vbe_set_video_mode): Mostly rewritten.
15156         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
15157         grub_vbe_status_t correctly.
15158         (grub_vbe_get_video_mode_info): Likewise.
15159         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
15160         several if statements.
15162         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
15163         * commands/i386/pc/vbeinfo.c: ... this.
15165         * commands/i386/pc/vbe_test.c: Renamed to ...
15166         * commands/i386/pc/vbetest.c: ... this.
15168         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
15169         ...
15170         (grub_cmd_vbeinfo): ... this. Save video modes before
15171         iterating. Skip a video mode, if it is not available, not enough
15172         information is given or it is monochrome. Show the memory
15173         model. Leave the interpretation of MODEVAR to grub_strtoul
15174         completely.
15175         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
15176         (GRUB_MOD_FINI): Likewise.
15178         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15179         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15180         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15181         duplicated grub_env_get. Leave the interpretation of MODEVAR to
15182         grub_strtoul completely.
15183         (real2pm): Removed.
15184         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15185         (GRUB_MOD_FINI): Likewise.
15187         * normal/misc.c: Include grub/mm.h.
15189         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15190         vbe_list_modes with vbetest.mod and vbeinfo.mod.
15191         (vbe_list_modes_mod_SOURCES): Removed.
15192         (vbe_list_modes_mod_CFLAGS): Likewise.
15193         (vbe_test_mod_SOURCES): Likewise.
15194         (vbe_test_mod_CFLAGS): Likewise.
15195         (vbeinfo_mod_SOURCES): New variable.
15196         (vbeinfo_mod_CFLAGS): Likewise.
15197         (vbetest_mod_SOURCES): Likewise.
15198         (vbetest_mod_CFLAGS): Likewise.
15200 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
15202         * normal/misc.c: New file.
15204         * DISTLIST: Added normal/misc.c.
15206         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15207         DISK to HOOK. Call HOOK with DISK.
15208         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15209         * partmap/pc.c (pc_partition_map_iterate): Likewise.
15210         * partmap/sun.c (sun_partition_map_iterate): Likewise.
15212         * normal/menu_entry.c (struct screen): Added a new member
15213         "completion_shown".
15214         (completion_buffer): New global variable.
15215         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15216         (store_completion): New function.
15217         (complete): Likewise.
15218         (clear_completions): Likewise.
15219         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15220         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15221         a tab, call complete.
15223         * normal/completion.c (disk_dev): Removed.
15224         (print_simple_completion): Likewise.
15225         (print_partition_completion): Likewise.
15226         (print_func): New global variable.
15227         (add_completion): Do not take the arguments WHAT or PRINT any
15228         longer. Added a new argument TYPE. Instead of printing directly,
15229         call PRINT_FUNC if not NULL.
15230         All callers changed.
15231         (complete_device): Use a local variable DEV instead of
15232         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15233         (grub_normal_do_completion): Take a new argument HOOK. Do not
15234         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15235         empty string, return NULL instead.
15236         All callers changed.
15238         * normal/cmdline.c (print_completion): New function.
15240         * kern/partition.c (grub_partition_iterate): Add an argument DISK
15241         to HOOK.
15242         All callers changed.
15244         * kern/disk.c (grub_print_partinfo): Removed.
15246         * include/grub/partition.h (struct grub_partition_map): Add a new
15247         argument DISK into HOOK of ITERATE.
15248         (grub_partition_iterate): Add a new argument DISK to HOOK.
15250         * include/grub/normal.h (enum grub_completion_type): New enum.
15251         (grub_completion_type_t): New type.
15252         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15253         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15254         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15255         (GRUB_COMPLETION_TYPE_FILE): Likewise.
15256         (grub_normal_do_completion): Added a new argument HOOK.
15257         (grub_normal_print_device_info): New prototype.
15259         * include/grub/disk.h (grub_print_partinfo): Removed.
15261         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15262         (normal_mod_SOURCES): Likewise.
15263         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15264         (normal_mod_SOURCES): Likewise.
15266         * commands/ls.c (grub_ls_list_disks): Use
15267         grub_normal_print_device_info instead of grub_print_partinfo. Free
15268         PNAME.
15269         (grub_ls_list_files): Use grub_normal_print_device_info instead of
15270         duplicating the code.
15272 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
15274         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
15275         follow GCS more precisely.
15276         * commands/i386/pc/vbe_test.c: Likewise.
15277         * include/grub/i386/pc/vbe.h: Likewise.
15278         * term/i386/pc/vesafb.c: Likewise.
15279         * video/i386/pc/vbe.c: Likewise.
15281 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
15283         * DISTLIST: Added term/i386/pc/vesafb.c
15284         DISTLIST: Added video/i386/pc/vbe.c
15285         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15286         DISTLIST: Added commands/i386/pc/vbe_test.c.
15287         * commands/i386/pc/vbe_list_modes.c: New file.
15288         * commands/i386/pc/vbe_test.c: Likewise.
15289         * term/i386/pc/vesafb.c: Likewise.
15290         * video/i386/pc/vbe.c: Likewise.
15291         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15292         (grub_vbe_probe) Added prototype.
15293         (grub_vbe_set_video_mode) Likewise.
15294         (grub_vbe_get_video_mode) Likewise.
15295         (grub_vbe_get_video_mode_info) Likewise.
15296         (grub_vbe_set_pixel_rgb) Likewise.
15297         (grub_vbe_set_pixel_index) Likewise.
15298         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15299         (pkgdata_MODULES): Added vesafb.mod.
15300         (pkgdata_MODULES): Added vbe_list_modes.mod.
15301         (pkgdata_MODULES): Added vbe_test.mod.
15302         (vbe_mod_SOURCES): Added.
15303         (vbe_mod_CFLAGS): Likewise.
15304         (vesafb_mod_SOURCES): Likewise.
15305         (vesafb_mod_CFLAGS): Likewise.
15306         (vbe_list_modes_mod_SOURCES): Likewise.
15307         (vbe_list_modes_mod_CFLAGS): Likewise.
15308         (vbe_test_mod_SOURCES): Likewise.
15309         (vbe_test_mod_CFLAGS): Likewise.
15311 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
15313         * normal/command.c (grub_command_execute): If INTERACTIVE is
15314         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15315         CMDLINE. Disable the pager if INTERACTIVE is true.
15316         All callers are changed.
15318         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15319         before reading a config file.
15320         * normal/main.c (read_config_file): Even if a command is not
15321         found, register it if it is within an entry.
15323         * util/grub-emu.c: Include sys/types.h and unistd.h.
15324         (options): Added --hold.
15325         (struct arguments): Added a new member "hold".
15326         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15327         missing.
15328         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15329         cleared by a debugger, if it is not zero.
15331         * include/grub/normal.h (grub_command_execute): Add an argument
15332         INTERACTIVE.
15334 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
15336         * DISTLIST: Added include/grub/i386/pc/vbe.h.
15338 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
15340         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15341         program with another one, because the old one didn't detect a bug
15342         in gcc-3.4. Always use regparm 2, because the new test is still
15343         not enough for gcc-4.0. Someone must investigate a simple test
15344         case which detects a bug in gcc-4.0.
15346 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
15348         * DISTLIST: Added normal/completion.c.
15350         * normal/completion.c: New file.
15352         * term/i386/pc/console.c (grub_console_getwh): New function.
15353         (grub_console_term): Assign grub_console_getwh to getwh.
15355         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15356         function is defined in normal/completion.c as
15357         grub_normal_do_completion.
15358         (grub_cmdline_get): Use grub_normal_do_completion instead of
15359         grub_tab_complete.
15361         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15362         returns non-zero, otherwise return 0.
15363         (grub_partition_iterate): First, probe the partition map. Then,
15364         call ITERATE only for this partition map.
15366         * kern/misc.c (grub_strncmp): Rewritten.
15368         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15369         returns non-zero. Otherwise return 0.
15371         * include/grub/partition.h (grub_partition_map_iterate): Return
15372         int instead of void.
15374         * include/grub/normal.h (grub_normal_do_completion): New prototype.
15376         * include/grub/misc.h (grub_strncmp): Change the type of N to
15377         grub_size_t.
15379         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15380         of void.
15382         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
15383         unsigned explicitly before comparing it with I.
15385         * kern/main.c (grub_env_write_root): Add the attribute unused into
15386         VAR.
15388         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15389         normal/completion.c.
15390         (normal_mod_SOURCES): Likewise.
15391         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15392         (normal_mod_SOURCES): Likewise.
15394         * normal/command.c (grub_iterate_commands): If ITERATE returns
15395         non-zero, return one immediately.
15397 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
15399         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15400         * kern/i386/pc/startup.S: Updated Global Descriptor table's
15401         descriptions.
15402         (grub_vbe_get_controller_info): New function.
15403         (grub_vbe_get_mode_info): Likewise.
15404         (grub_vbe_set_mode): Likewise.
15405         (grub_vbe_get_mode): Likewise.
15406         (grub_vbe_set_memory_window): Likewise.
15407         (grub_vbe_get_memory_window): Likewise.
15408         (grub_vbe_set_scanline_length): Likewise.
15409         (grub_vbe_get_scanline_length): Likewise.
15410         (grub_vbe_set_display_start): Likewise.
15411         (grub_vbe_get_display_start): Likewise.
15412         (grub_vbe_set_palette_data): Likewise.
15413         * include/grub/i386/pc/vbe.h: New file.
15415 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15417         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15418         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15419         * DISTLIST: Likewise.
15420         * kern/ieee1275/of.c: Moved to ...
15421         * kern/ieee1275/ieee1275.c: ... here.
15423 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15425         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15426         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15427         Pass 0 as `end' parameter to grub_strtoul().
15429 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15431         * include/grub/powerpc/ieee1275/console.h: Do not include
15432         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
15433         ifdef.
15434         (grub_console_cur_color): Remove i386-specific prototype.
15435         (grub_console_real_putchar): Likewise.
15436         (grub_console_checkkey): Likewise.
15437         (grub_console_getkey): Likewise.
15438         (grub_console_getxy): Likewise.
15439         (grub_console_gotoxy): Likewise.
15440         (grub_console_cls): Likewise.
15441         (grub_console_setcursor): Likewise.
15442         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15443         Include <grub/machine/console.h>.
15444         * term/ieee1275/ofconsole.c: Likewise.
15446 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
15448         * Makefile.in (LIBLZO): New variable.
15450         * configure.ac: Check for LZO version 2.
15452         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15453         lzo/lzo1x.h instead of lzo1x.h.
15455         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15456         of -llzo.
15458         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15459         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15461         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15462         copying the data from PARTITION to P.
15464 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15466         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15467         negative, unload the module.
15469         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15470         map is "pc_partition_map" but not "pc".
15471         (usage): Fix the description. The options are --boot-image and
15472         --core-image but not --boot-file or --core-file.
15473         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15474         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15475         DEFAULT_DIRECTORY.
15477         * util/i386/pc/grub-install.in: Do not specify --boot-file or
15478         --core-file. Specify INSTALL_DEVICE as an argument.
15480         * util/console.c: Include config.h.
15481         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15482         [HAVE_NCURSES_H]: Include ncurses.h.
15483         [HAVE_CURSES_H]: Include curses.h.
15484         [!A_NORMAL] (A_NORMAL): Defined as zero.
15485         [!A_STANDOUT] (A_STANDOUT): Likewise.
15487         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15488         -lncurses.
15489         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15491         * configure.ac: Check for curses libraries and headers.
15493         * Makefile.in (LIBCURSES): New variable.
15495         * genmk.rb (Script::rule): Set the executable bits.
15497         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15498         name of the PC partition map is "pc_partition_map" but not "pc".
15500 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15502         * util/i386/pc/grub-install.in (grub_probefs): New variable.
15503         (modules): Likewise.
15504         (usage): Added descriptions for --modules and --grub-probefs.
15505         Handle --modules and --grub-probefs. Save the arguments in MODULES
15506         and GRUB_PROBEFS, respectively.
15507         Auto-detect a filesystem module against GRUBDIR. If the result is
15508         empty and modules are not specified explicitly, abort the
15509         installation. Add the result to MODULES.
15511         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15512         disk/powerpc/ieee1275/ofdisk.c,
15513         include/grub/powerpc/ieee1275/init.h and
15514         term/powerpc/ieee1275/ofconsole.c.
15515         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15516         term/ieee1275/ofconsole.c.
15518         * include/grub/powerpc/ieee1275/console.h: Resurrected.
15520         * COPYING: Upgraded to the latest version. Only the address of the
15521         FSF office has changed.
15523 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15525         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15526         kern/ieee1275.c with kern/ieee1275/of.c.
15528         * kern/ieee1275.c: Moved to ...
15529         * kern/ieee1275/of.c: ... here.
15531 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
15533         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15534         readability.
15536         * config.guess: Updated to the latest version from gnulib.
15537         * config.sub: Likewise.
15538         * install.sh: Likewise.
15539         * mkinstalldirs: Likewise.
15541         * include/grub/console.h: Removed. This file is arch-specific. Do
15542         not put this in include/grub.
15544         * include/grub/i386/pc/console.h: Resurrected.
15546         * util/console.c: Include grub/machine/console.h instead of
15547         grub/console.h.
15548         * util/grub-emu.c: Likewise.
15550 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
15552         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15553         hardcoded value.
15555         From Vincent Pelletier  <subdino2004@yahoo.fr>
15556         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15557         Redefined to use grub_getwh.
15558         (grub_term): New member named getwh.
15559         (grub_getwh): New prototype.
15560         * kern/term.c (grub_getwh): New function.
15561         * term/i386/pc/console.c (grub_console_getwh): New function.
15562         (grub_console_term): New member `getwh'.
15563         * term/i386/pc/vga.c (grub_vga_getwh): New function.
15564         (grub_vga_term): New member `getwh'.
15565         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15566         grub_ssize_t.
15567         (grub_ofconsole_getw): New function.
15568         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15569         (grub_ofconsole_term): New field named getwh and new initial
15570         value.
15572 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
15574         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15575         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
15576         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15577         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15578         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15579         of <grub/machine/ieee1275.h>.
15580         * commands/ieee1275/reboot.c: Likewise.
15581         * boot/powerpc/ieee1275/ieee1275.c: Move ...
15582         * kern/ieee1275.c: ... to here.  All users updated.  Change all
15583         parameter structs to use new type `grub_ieee1275_cell_t'.
15584         * term/powerpc/ieee1275/ofconsole.c: Move ...
15585         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
15586         * disk/powerpc/ieee1275/ofdisk.c: Move ...
15587         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
15588         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15589         to return int.
15590         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15591         Remove unused prototypes.  All users updated.
15592         * include/grub/powerpc/ieee1275/console.h: Removed.
15593         * include/grub/powerpc/ieee1275/ieee1275.h: Define
15594         `grub_ieee1275_cell_t'.
15595         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15596         Cast comparisons with -1 to the correct type.
15597         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15598         type to match `grub_ieee1275_entry_fn'.
15600 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
15602         * DISTLIST: Added util/i386/pc/grub-probefs.c.
15604         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15605         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15606         partmap/sun.c.
15607         (grub_probefs_SOURCES): New variable.
15609         * util/i386/pc/grub-probefs.c: New file.
15611         * util/i386/pc/grub-setup.c (main): Call
15612         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15613         grub_hfs_init and grub_jfs_init to initialize the system. Call
15614         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15615         grub_pc_partition_map_fini to finish the system.
15617 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
15619         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15620         function.
15621         (grub_multiboot_load_elf32): Likewise.
15622         (grub_multiboot_is_elf64): Likewise.
15623         (grub_multiboot_load_elf64): Likewise.
15624         (grub_multiboot_load_elf): Likewise.
15625         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15626         an ELF32 or ELF64 file.
15627         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15629         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15630         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15631         NULL before calling FS->LABEL.
15632         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15633         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15634         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15635         before calling FS->LABEL.
15637 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
15639         * util/i386/pc/grub-install.in (datadir): New variable.
15640         (libdir): Removed.
15641         (pkgdatadir): New variable.
15642         (pkglibdir): Removed.
15644 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
15646         * DISTLIST: Added util/i386/pc/grub-install.in.
15648         * util/i386/pc/grub-install.in: New file.
15650         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15651         (grub_install_SOURCES): Likewise.
15653         * genmk.rb: Added support for scripts.
15654         (Script): New class.
15655         (scripts): New variable.
15657         * Makefile.in (install-local): Install sbin_SCRIPTS by
15658         INSTALL_SCRIPT.
15659         (uninstall): Remove sbin_SCRIPTS.
15661         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15662         device, try to get a GRUB device by
15663         grub_util_biosdisk_get_grub_dev.
15664         Free DEST_DEV.
15666         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15667         description for --device-map.
15669 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15671         Change the semantics of variable hooks. They now return strings
15672         instead of error values.
15674         * util/i386/pc/grub-setup.c: Include grub/env.h.
15675         (setup): Use grub_device_set_root instead of grub_env_set.
15677         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15678         grub_env_get instead of grub_device_set_root and
15679         grub_device_get_root, respectively.
15681         * kern/main.c (grub_env_write_root): New function.
15682         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15683         grub_env_set instead of grub_device_set_root.
15685         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15686         many variables.
15687         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15688         rather than calling ENV->WRITE_HOOK afterwards.
15689         (grub_env_get): Return the result of ENV->READ_HOOK rather than
15690         passing a pointer of a pointer.
15691         (grub_register_variable_hook): Change the types of "read_hook" and
15692         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15693         respectively.
15694         Allocate the default empty string on the heap, because this string
15695         may be freed later.
15697         * kern/device.c: Include grub/env.h.
15698         (grub_device_set_root): Removed.
15699         (grub_device_get_root): Likewise.
15700         (grub_device_open): Use grub_env_get instead of
15701         grub_device_get_root.
15703         * include/grub/env.h (grub_env_read_hook_t): New type.
15704         (grub_env_write_hook_t): Likewise.
15705         (grub_env_var): Change the types of "read_hook" and "write_hook"
15706         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15707         (grub_register_variable_hook): Likewise.
15709         * include/grub/device.h (grub_device_set_root): Removed.
15710         (grub_device_set_root): Likewise.
15712         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15713         make sure that DIRNAME terminates with '/', so that
15714         grub_fat_find_dir will fail if PATH is not a directory.
15716         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15717         from DIRNAME.
15718         Use the qualifier auto for print_files and print_files_long.
15719         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15720         as a regular file.
15721         Put a newline only if there is no error.
15722         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15723         used.
15725 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15727         * kern/partition.c (grub_partition_probe): Initialize PART to
15728         NULL. Otherwise, when no partition map is registered, this returns
15729         a garbage.
15731 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
15733         * partmap/apple.c (apple_partition_map_iterate): Check if POS
15734         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15735         valid.
15737 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
15739         * commands/ls.c (grub_ls_list_disks): Print the filesystem
15740         information on each device, if it does not have partitions. Print
15741         "Device" instead of "Disk", because this function is not specific
15742         to disk devices.
15744         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15745         static to ensure that it is put on the memory rather than a
15746         register.
15748 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15750         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15751         (grub_cat_init): Likewise.
15752         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15753         (options): Likewise.
15754         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15755         (grub_configfile_init): Likewise.
15756         * font/manager.c (GRUB_MOD_INIT): Likewise.
15757         * commands/help.c (GRUB_MOD_INIT): Likewise.
15758         (grub_help_init): Likewise.
15759         * normal/command.c (grub_command_init): Likewise.
15760         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15761         * disk/loopback.c (grub_loop_init): Likewise.
15762         (GRUB_MOD_INIT): Likewise.
15763         * commands/ls.c (grub_ls_init): Likewise.
15764         (GRUB_MOD_INIT): Likewise.
15765         (options): Likewise.
15766         * commands/boot.c (grub_boot_init): Likewise.
15767         (GRUB_MOD_INIT): Likewise.
15768         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15769         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15770         (GRUB_MOD_INIT): Likewise.
15771         * commands/cmp.c (grub_cmp_init): Likewise.
15772         (GRUB_MOD_INIT): Likewise.
15774         * normal/arg.c: Use <> instead of "" to include header files.
15775         (SHORT_ARG_HELP): New macro.
15776         (SHORT_ARG_USAGE): Likewise.
15777         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15778         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15779         descriptions.
15780         (find_short): Check if C is 'h' or 'u' explicitly.
15781         (grub_arg_show_help): Use space characters instead of tabs. Treat
15782         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15783         are shown with --help and --usage only if they are not used for
15784         the command itself.
15785         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15786         'h' and 'u'.
15788         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15789         const into "longarg". Change the type of "shortarg" to int.
15791 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15793         * boot/i386/pc/boot.S (boot_drive_check): New label.
15795         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15796         macro.
15798         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15799         which do not pass a boot drive correctly. Copied from GRUB Legacy.
15801 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15803         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15804         When turning off Gate A20, skip the check and return immediately,
15805         because this is not fatal usually.
15807 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15809         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15810         be 0x7C00 instead of 0x8000.
15812         * boot/i386/pc/pxeboot.S: Rewritten.
15814         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15815         EXT_C.
15816         (gate_a20_check_state): Read a byte from 0x108000. Invert the
15817         result.
15819 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
15821         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15822         robustness. This routine now supports a BIOS call and System
15823         Control Port A to modify the gate A20.
15825         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15826         Increased to 0x440.
15828 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
15830         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15831         device path and resulting ihandle.
15832         (grub_ofdisk_close): dprintf the ihandle being closed.
15833         (grub_ofdisk_read): dprintf function parameters.
15834         * kern/mm.c (grub_mm_init_region): Likewise.
15835         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15836         (grub_linux_boot): dprintf the Linux entry point, initrd address and
15837         size, and boot arguments.
15838         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15839         before loading into memory.
15840         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15841         before loading into memory.
15843 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
15845         * kern/mm.c: Added much documentation.
15846         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15847         8, set to 5 instead of 8.
15849 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15851         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15853         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15854         (grub_mkdevicemap_SOURCES): New variable.
15856         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15857         lib/device.c of GRUB Legacy.
15859 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15861         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15862         instead of PATH is NULL.
15864 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
15866         * commands/cmp.c (BUFFER_SIZE): New macro.
15867         (grub_cmd_cmp): Close the right file at the right time.  Compare
15868         only data just read.  Don't report files of different  size as
15869         identical.  Dynamically allocate buffers.  Move variable
15870         declarations at the beginning of function.
15872 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
15874         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15875         reverse.
15877 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
15879         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15880         when backspace is pressed at beginning of line.
15882 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
15884         * DISTLIST: Added genfslist.sh.
15886         * normal/main.c (fs_module_list): New variable.
15887         (autoload_fs_module): New function.
15888         (read_fs_list): Likewise.
15889         (grub_normal_execute): Call read_fs_list.
15891         * kern/fs.c (grub_fs_autoload_hook): New variable.
15892         (grub_fs_probe): Added support for auto-loading.
15894         * include/grub/normal.h (struct grub_fs_module_list): New struct.
15895         (grub_fs_module_list_t): New type.
15897         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15898         (grub_fs_autoload_hook): New prototype.
15900         * genfslist.sh: New file.
15902         * genmk.rb: Added a rule to generate a filesystem list.
15904 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
15906         * configure.ac: Fix the test for cross-compiling.
15908         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
15909         define GRUB_UTIL anymore.
15911         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15912         so this function works on other systems than just big endian.
15913         (load_modules): Likewise.
15914         (add_segments): Likewise.
15916 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
15918         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
15919         contains `l' modifier, get a long from va_arg().
15921 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
15923         * kern/mm.c (grub_free): If the next free block which is being
15924         merged is the first free block, set the first block to the block
15925         being freed.
15926         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15928 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15930         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15931         `grub_ieee1275_chosen'.
15933 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15935         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15936         (grub_ieee1275_chosen): New variable.
15937         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15938         `chosen'.
15939         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15940         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15941         Rename first argument to `phandle' for consistency.
15942         (grub_ieee1275_get_property_length): Likewise.
15943         (grub_ieee1275_next_property): Likewise.  Change type of first argument
15944         to grub_ieee1275_phandle_t.
15945         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15946         Move export next to declaration.
15947         (grub_ieee1275_chosen): New variable.
15948         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15949         Correct cosmetic typo.
15950         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15951         `grub_ieee1275_chosen'.
15952         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15953         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15954         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15955         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15956         `grub_ieee1275_chosen'.
15958 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
15960         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15961         /chosen/bootargs.
15962         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15963         /chosen/bootargs as "variable=value" pairs.
15965 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
15967         * include/grub/misc.h (grub_dprintf): New macro.
15968         (grub_real_dprintf): New prototype.
15969         (grub_strword): Likewise.
15970         (grub_iswordseparator): Likewise.
15971         * kern/misc.c (grub_real_dprintf): New function.
15972         (grub_strword): Likewise.
15973         (grub_iswordseparator): Likewise.
15975 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
15977         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15978         (roundup): Remove macro.
15979         (grub_ieee1275_flags): Make static.
15980         (grub_ieee1275_realmode): Remove.
15981         (grub_ieee1275_test_flag): New function.
15982         (grub_ieee1275_set_flag): Likewise.
15983         (find_options): Rename to `grub_ieee1275_find_options'; update
15984         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15985         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15986         (cmain): New prototype.
15987         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15988         `grub_ieee1275_flags' directly.
15989         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15990         machine/biosdisk.h.
15991         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15992         Don't include grub/machine/init.h.
15993         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15994         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15995         Remove prototype.
15996         (grub_ieee1275_realmode): Likewise.
15997         (grub_ieee1275_flag): New enum.
15998         (grub_ieee1275_test_flag): New prototype.
15999         (grub_ieee1275_set_flag): New prototype.
16000         * include/grub/powerpc/ieee1275/init.h: Remove file.
16001         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
16002         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
16003         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
16004         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
16005         comment.
16006         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
16007         `grub_ieee1275_test_flag'.
16008         (grub_ieee1275_encode_devname): Likewise.
16010 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
16012         * include/grub/powerpc/ieee1275/ieee1275.h
16013         (grub_ieee1275_encode_devname): New prototype.
16014         (grub_ieee1275_get_filename): Likewise.
16015         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
16016         function.
16017         (grub_set_prefix): Likewise.
16018         (grub_machine_init): Call grub_set_prefix.
16019         * kern/powerpc/ieee1275/openfw.c: Fix typos.
16020         (grub_parse_type): New enum.
16021         (grub_ieee1275_get_devargs): New function.
16022         (grub_ieee1275_get_devname): Likewise.
16023         (grub_ieee1275_parse_args): Likewise.
16024         (grub_ieee1275_get_filename): Likewise.
16025         (grub_ieee1275_encode_devname): Likewise.
16027 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
16029         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
16030         `grub_loader_unset'.
16032 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
16034         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
16035         instead of grub_ieee1275_interpret.
16036         (grub_halt_init): New function.
16037         (grub_halt_fini): Likewise.
16038         (GRUB_MOD_INIT): Correct message grammar.
16039         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
16040         instead of grub_ieee1275_interpret.
16041         (grub_reboot_init): New function.
16042         (grub_reboot_fini): Likewise.
16043         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
16044         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
16045         util/i386/pc/misc.c with commands/ieee1275/halt.c,
16046         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
16047         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
16048         function.
16049         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
16050         Add prototype.
16051         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
16052         prototype.
16053         (grub_halt): Likewise.
16054         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
16055         (cmain): Remove __attribute__((unused)).
16056         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
16057         (grub_heap_len): Likewise.
16058         (grub_machine_fini): New function.
16059         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
16060         (grub_halt): Likewise.
16061         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
16062         function.
16063         * util/powerpc/ieee1275/misc.c: New file.
16065 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
16067         * DISTLIST: New file.
16068         * gendistlist.sh: Likewise.
16070         * Makefile.in (COMMON_DISTFILES): Removed.
16071         (BOOT_DISTFILES): Likewise.
16072         (CONF_DISTFILES): Likewise.
16073         (DISK_DISTFILES): Likewise.
16074         (FS_DISTFILES): Likewise.
16075         (INCLUDE_DISTFILES): Likewise.
16076         (KERN_DISTFILES): Likewise.
16077         (LOADER_DISTFILES): Likewise.
16078         (TERM_DISTFILES): Likewise.
16079         (UTIL_DISTFILES): Likewise.
16080         (DISTFILES): Likewise.
16081         (uninstall): Uninstall files in $(pkgdata_DATA).
16082         (DISTLIST): New target.
16083         (distdir): Use the contents of the file DISTLIST to get a list of
16084         distributed files.
16086 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
16088         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
16089         descriptor. This is ported from GRUB Legacy.
16091         * gencmdlist.sh: Added an extra semicolon to make it work with
16092         old sed versions. Reported by Robert Bihlmeyer
16093         <robbe@orcus.priv.at>.
16095 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
16097         Automatic loading of commands is supported.
16099         * normal/main.c (read_command_list): New function.
16100         (grub_normal_execute): Call read_command_list.
16102         * normal/command.c (grub_register_command): Return zero or CMD.
16103         Allocate CMD->NAME from the heap.
16104         Initialize CMD->MODULE_NAME to zero.
16105         Find the same name as well. If the same command is found and it is
16106         a dummy command, overwrite members. If it is not a dummy command,
16107         return zero.
16108         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
16109         (grub_command_find): If a dummy command is found, load a module
16110         and retry to find a command only once.
16112         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
16113         make sure that each command is loaded.
16115         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
16116         macro.
16117         (struct grub_command): Remove const from the member `name'.
16118         Add a new member `module_name'.
16119         (grub_register_command): Return grub_command_t.
16121         * commands/help.c (grub_cmd_help): Call grub_command_find to make
16122         sure that each command is loaded.
16124         * genmk.rb (PModule::rule): Specify a module name without the
16125         suffix ".mod" to gencmdlist.sh.
16127 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
16129         * gencmdlist.sh: New file.
16131         * genmk.rb (PModule::rule): Generate a rule for a command list.
16132         Clean command.lst.
16133         Generate command.lst from $(COMMANDFILES).
16135         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
16136         (DATA): Added $(pkgdata_DATA).
16137         (install-local): Install files in $(pkgdata_DATA).
16139 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
16141         * term/i386/pc/vga.c (debug_command): Removed.
16142         (GRUB_MOD_INIT): Do not register the command "debug".
16144         From Hollis Blanchard:
16145         * commands/configfile.c: New file.
16146         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16147         commands/configfile.c.
16148         (pkgdata_MODULES): Added configfile.mod.
16149         (configfile_mod_SOURCES): New variable.
16150         (configfile_mod_CFLAGS): Likewise.
16151         * conf/powerpc-ieee1275.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         * util/grub-emu.c (main): Call grub_configfile_init and
16157         grub_configfile_fini.
16158         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
16159         prototype.
16160         [GRUB_UTIL] (grub_configfile_fini): Likewise.
16162 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
16164         * normal/arg.c (grub_arg_show_help): Do not show the bug report
16165         address.
16167         * commands/help.c (grub_cmd_help): Do not print newlines after
16168         the last command in print_command_help.
16170 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
16172         * commands/default.h: New file.
16173         * commands/timeout.h: Likewise.
16174         * normal/context.c: Likewise.
16176         * util/misc.c: Do not include sys/times.h.
16177         Include sys/time.h and grub/machine/time.h.
16178         (grub_get_rtc): Rewritten with gettimeofday.
16180         * util/grub-emu.c (main): Call grub_default_init and
16181         grub_timeout_init before grub_normal_init, and call
16182         grub_timeout_fini and grub_default_fini after grub_main.
16184         * util/console.c (grub_ncurses_checkkey): Return the read
16185         character or -1.
16187         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16188         timeouts.
16190         * normal/main.c (read_config_file): Push MENU. If this fails,
16191         print an error and wait for a user input.
16192         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16193         If a menu is empty or an error occurs, pop MENU.
16194         (grub_normal_execute): Pop and free MENU after grub_menu_run
16195         returns.
16197         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16199         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16200         include time.h.
16201         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16202         without GRUB_UTIL.
16203         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16204         time.h.
16205         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16206         without GRUB_UTIL.
16208         * include/grub/normal.h (struct grub_menu_list): New struct.
16209         (grub_menu_list_t): New type.
16210         (struct grub_context): New struct.
16211         (grub_context_t): New type.
16212         (grub_register_command): Got rid of EXPORT_FUNC.
16213         (grub_unregister_command): Likewise.
16214         (grub_context_get): New prototype.
16215         (grub_context_get_current_menu): Likewise.
16216         (grub_context_push_menu): Likewise.
16217         (grub_context_pop_menu): Likewise.
16218         [GRUB_UTIL] (grub_default_init): Likewise.
16219         [GRUB_UTIL] (grub_default_fini): Likewise.
16220         [GRUB_UTIL] (grub_timeout_init): Likewise.
16221         [GRUB_UTIL] (grub_timeout_fini): Likewise.
16223         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16224         commands/timeout.c and normal/context.c.
16225         (pkgdata_MODULES): Added default.mod and timeout.mod.
16226         (normal_mod_SOURCES): Added normal/context.c.
16227         (default_mod_SOURCES): New variable.
16228         (default_mod_CFLAGS): Likewise.
16229         (timeout_mod_SOURCES): Likewise.
16230         (timeout_mod_CFLAGS): Likewise.
16231         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16232         conf/i386-pc.rmk.
16233         (pkgdata_MODULES): Added default.mod and timeout.mod.
16234         (normal_mod_SOURCES): Added normal/context.c.
16235         (default_mod_SOURCES): New variable.
16236         (default_mod_CFLAGS): Likewise.
16237         (timeout_mod_SOURCES): Likewise.
16238         (timeout_mod_CFLAGS): Likewise.
16240         * Makefile.in (all-local): Added $(MKFILES).
16242 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16244         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16245         (grub_emu_SOURCES): Likewise.
16246         (pkgdata_MODULES): Add `sun.mod'.
16247         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16248         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16249         `partmap/sun.c'.
16250         (pkgdata_MODULES): Add `sun.mod'.
16251         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16252         * include/grub/partition.h (grub_sun_partition_map_init): New
16253         prototype.
16254         (grub_sun_partition_map_fini): Likewise.
16255         * partmap/sun.c: New file.
16256         * util/grub-emu.c (main): Initialize and de-initialize the sun
16257         partitionmap support.
16259 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
16261         This implements an Emacs-like menu entry editor.
16263         * normal/menu_entry.c: New file.
16265         * util/console.c (grub_ncurses_putchar): Translate some Unicode
16266         characters to ASCII.
16267         (saved_char): New variable.
16268         (grub_ncurses_checkkey): Rewritten completely.
16269         (grub_ncurses_getkey): Likewise.
16270         (grub_ncurses_init): Call raw instead of cbreak.
16272         * normal/menu.c (print_entry): Do not put a space.
16273         (init_page): Renamed to ...
16274         (grub_menu_init_page): ... this. All callers changed.
16275         (edit_menu_entry): Removed.
16276         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16278         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16280         * kern/misc.c (grub_vprintf): Call grub_refresh.
16282         * normal/menu.c (DISP_LEFT): Renamed to ...
16283         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16284         * normal/menu.c (DISP_UP): Renamed to ...
16285         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16286         * normal/menu.c (DISP_RIGHT): Renamed to ...
16287         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16288         * normal/menu.c (DISP_DOWN): Renamed to ...
16289         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16290         * normal/menu.c (DISP_HLINE): Renamed to ...
16291         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16292         * normal/menu.c (DISP_VLINE): Renamed to ...
16293         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16294         * normal/menu.c (DISP_UL): Renamed to ...
16295         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16296         * normal/menu.c (DISP_UR): Renamed to ...
16297         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16298         * normal/menu.c (DISP_LL): Renamed to ...
16299         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16300         * normal/menu.c (DISP_LR): Renamed to ...
16301         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16302         * normal/menu.c (TERM_WIDTH): Renamed to ...
16303         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16304         * normal/menu.c (TERM_HEIGHT): Renamed to ...
16305         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16306         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16307         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16308         * normal/menu.c (TERM_MARGIN): Renamed to ...
16309         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16310         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16311         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16312         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16313         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16314         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16315         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16316         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16317         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16318         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16319         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16320         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16321         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16322         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16323         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16324         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16325         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16326         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16327         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16328         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16329         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16330         All callers changed.
16332         * include/grub/normal.h: New prototype.
16334         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16335         normal/menu_entry.c.
16336         (normal_mod_SOURCES): Likewise.
16337         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16338         (normal_mod_SOURCES): Likewise.
16340 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
16342         * include/grub/normal.h (grub_halt_init): New prototype.
16343         (grub_halt_fini): Likewise.
16344         (grub_reboot_init): Likewise.
16345         (grub_reboot_fini): Likewise.
16347         * util/grub-emu.c: Include signal.h.
16348         (main_env): New global variable.
16349         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16350         catch C-c.
16351         (grub_machine_fini): New function.
16352         (main): Call grub_halt_init and grub_reboot_init before
16353         grub_main, and grub_reboot_fini and grub_halt_fini after it.
16354         Call setjmp with MAIN_ENV to go back afterwards.
16355         Call grub_machine_fini right before return.
16357         * include/grub/util/misc.h: Include setjmp.h.
16358         (main_env): New prototype.
16360         * include/grub/kernel.h (grub_machine_fini): New prototype.
16361         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16362         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16364         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16365         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16366         * term/i386/pc/console.c (grub_console_fini): Likewise.
16368         * util/i386/pc/misc.c: New file.
16370         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16371         util/i386/pc/misc.c, commands/i386/pc/halt.c and
16372         commands/i386/pc/reboot.c.
16374 2005-02-14  Guillem Jover  <guillem@hadrons.org>
16376         * include/grub/dl.h (grub_dl_check_header): New prototype.
16377         (grub_arch_dl_check_header): Change return type to grub_err_t,
16378         remove size parameter and export function.  Update all callers.
16379         * kern/dl.c (grub_dl_check_header): New function.
16380         (grub_dl_load_core): Use `grub_dl_check_header' instead of
16381         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
16382         are inside the core.
16383         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16384         independent ELF header checks.
16385         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16386         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16387         `grub_dl_check_header' instead of explicit checks.  Check for the
16388         ELF type.
16389         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16390         `grub_dl_check_header' instead of explicit checks.  Remove arch
16391         specific ELF header checks.
16393         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16394         argument SIZE.
16396 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
16398         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16399         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16401 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
16403         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16404         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16405         (part_map_iterate): Clear `grub_errno' and return 0 if
16406         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16407         * partmap/amiga.c (amiga_partition_map_iterate): Return
16408         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16409         * partmap/apple.c (apple_partition_map_iterate): Likewise.
16411 2005-02-01  Guillem Jover  <guillem@hadrons.org>
16413         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16414         help info.
16416 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16418         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16419         Removed prototype.
16420         (grub_rescue_cmd_linux): New prototype.
16421         (grub_rescue_cmd_initrd): Likewise.
16422         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16423         `bi_rec'.
16424         (grub_linux_release_mem): Release the memory for the initrd.
16425         (grub_load_linux): Renamed from this...
16426         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
16427         Changed `entry' not to be static.  Loop over memory regions to
16428         find another one when the default fails.
16429         (grub_rescue_cmd_initrd): New function.
16430         (grub_linux_init): Remove function.
16431         (grub_linux_fini): Likewise.
16432         (GRUB_MOD_INIT): Register `initrd'.
16433         (GRUB_MOD_FINI): Unregister `initrd'.
16434         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16435         Function removed.
16436         (grub_linux_normal_fini): Likewise.
16437         (GRUB_MOD_INIT): Register `initrd'.
16438         (GRUB_MOD_FINI): Unregister `initrd'.
16440 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16442         * commands/help.c: New file.
16443         * normal/arg.c (show_help): Renamed to...
16444         (grub_arg_show_help): ... this.
16445         * commands/i386/pc/halt.c: New file.
16446         * commands/i386/pc/reboot.c: Likewise.
16447         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16448         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16449         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16450         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16451         variables.
16452         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16453         `commands/help.c'.
16454         (pkgdata_MODULES): Add `help.mod'.
16455         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16456         * grub/i386/pc/init.h (grub_reboot): New prototype.
16457         (grub_halt): Likewise.
16458         * include/grub/normal.h (grub_arg_show_help): New prototype.
16459         (grub_help_init): Likewise.
16460         (grub_help_fini): Likewise.
16461         * util/grub-emu.c (main): Initialize and deinitialize the help
16462         command.
16464         * normal/cmdline.c (grub_cmdline_get): Doc fix.
16466         * normal/command.c (grub_command_init): Fixed the description of
16467         the `set' and `unset' commands.
16469 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16471         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16472         function.
16473         * commands/ieee1275/halt.c: New file.
16474         * commands/ieee1275/reboot.c: Likewise.
16475         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16476         `__attribute__ ((unused))'.  Some GCS related fixed.
16477         (grub_suspend_init) [GRUB_UTIL]: Function removed.
16478         (grub_suspend_fini): Likewise.
16479         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16480         and `halt.mod'.
16481         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16482         (halt_mod_CFLAGS): New variables.
16483         * include/grub/powerpc/ieee1275/ieee1275.h
16484         (grub_ieee1275_interpret): New prototype.
16486 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
16488         * include/grub/misc.h (memmove): New prototype.
16489         (memcpy): Likewise.
16491 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
16493         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16494         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
16496 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
16498         * kern/misc.c (grub_strndup): Function rewritten.
16500 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
16502         * normal/menu.c (TERM_WIDTH): Macro redefined.
16503         (TERM_TOP_BORDER_Y): Likewise.
16504         (draw_border): Replaced while-loop by a for-loop.  Make the number
16505         of lines consistent with the number of lines displayed in
16506         print_entries.  Added a margin below the rectangle.
16507         (print_entry): Make the entry fit in the rectangle.
16508         (print_entries): Display the scroll arrows next to the right
16509         border.
16511 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16513         * fs/minix.c (grub_minix_find_file): Reserve more space for
16514         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
16515         `grub_strncpy' to copy `path' into it.
16517 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16519         Add the loopback device, a device via which files can be accessed
16520         as devices.
16522         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16523         (pkgdata_MODULES): Add loopback.mod.
16524         (loopback_mod_SOURCES): New variable.
16525         (loopback_mod_CFLAGS): Likewise.
16526         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16527         `disk/loopback.c'.
16528         (pkgdata_MODULES): Add loopback.mod.
16529         (loopback_mod_SOURCES): New variable.
16530         (loopback_mod_CFLAGS): Likewise.
16531         * disk/loopback.c: new file.
16532         * include/grub/normal.h (grub_loop_init): New prototype.
16533         (grub_loop_fini): New prototype.
16534         * util/grub-emu.c (main): Initialize and de-initialize loopback
16535         support.
16536         * include/grub/disk.h (grub_disk_dev_id): Add
16537         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16539 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
16541         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16542         function.
16543         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16544         (suspend_mod_SOURCES): New variable.
16545         (suspend_mod_CFLAGS): Likewise.
16546         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16547         New prototype.
16548         * commands/ieee1275/suspend.c: New file.
16550 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16552         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16553         ((unused))' to `__attribute__ ((used))'.
16554         (GRUB_MOD_FINI): Likewise.
16555         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16556         * genmk.rb (PModule): Assign space to common symbols when linking
16557         modules.
16559 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
16561         * include/grub/mm.h (grub_mm_init_region): Change the type of the
16562         `unsigned' arguments to `grub_size_t'.
16563         (grub_malloc): Likewise.
16564         (grub_realloc): Likewise.
16565         (grub_memalign): Likewise.
16566         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16567         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16568         * util/misc.c (grub_malloc): Likewise.
16569         (grub_realloc): Likewise.
16570         * kern/mm.c (get_header_from_pointer): Change the casts to
16571         `unsigned' into a cast to `grub_size_t'.
16573         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16574         point to `currnode' when `currnode' is changed.
16576         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
16577         Schottelius <nico-linux@schottelius.org>.
16579 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
16581         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16582         (note_path): Remove variable.
16583         (GRUB_IEEE1275_NOTE_NAME): New macro.
16584         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16585         (grub_ieee1275_note_hdr): New structure.
16586         (grub_ieee1275_note_desc): Likewise.
16587         (grub_ieee1275_note): Likewise.
16588         (load_note): Remove `dir' argument.  All callers updated.  Remove
16589         `note_img' and `path'.  Do not load a file from `note_path'.
16590         Initialize a struct grub_ieee1275_note and write that to `out'.
16591         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16593 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
16595         * util/misc.c (grub_util_read_image): Revert last change.  It
16596         called `grub_util_read_at', which seeks from the beginning of the
16597         file.
16599 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
16601         * TODO: Add note about endianness in grub-mkimage.
16602         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16603         section.
16604         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16605         (grub_mkimage_SOURCES): New target.
16606         * include/grub/kernel.h (grub_start_addr): Remove variable.
16607         (grub_end_addr): Likewise.
16608         (grub_total_module_size): Likewise.
16609         (grub_kernel_image_size): Likewise.
16610         (GRUB_MODULE_MAGIC): New constant.
16611         (grub_module_info): New structure.
16612         (grub_arch_modules_addr): New prototype.
16613         (grub_get_end_addr): Remove prototype.
16614         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16615         * include/grub/powerpc/ieee1275/kernel.h: New file.
16616         * include/grub/util/misc.h (grub_util_get_fp_size): New
16617         prototype.
16618         (grub_util_read_at): Likewise.
16619         (grub_util_write_image_at): Likewise.
16620         * kern/main.c (grub_get_end_addr): Remove function.
16621         (grub_load_modules): Call grub_arch_modules_addr instead of using
16622         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
16623         the grub_module_info fields instead of calling grub_get_end_addr
16624         as loop conditions.  Move grub_add_unused_region code here.
16625         (grub_add_unused_region): Remove function.
16626         * kern/i386/pc/init.c: Include grub/cache.h.
16627         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
16628         one call to add_mem_region.
16629         (grub_arch_modules_addr): New function.
16630         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16631         (grub_total_module_size): Likewise.
16632         Include grub/machine/kernel.h.
16633         (grub_arch_modules_addr): New function.
16634         * util/grub-emu.c (grub_end_addr): Remove variable.
16635         (grub_total_module_size): Likewise.
16636         (grub_arch_modules_addr): New function.
16637         * util/misc.c: Include unistd.h.
16638         (grub_util_get_fp_size): New function.
16639         (grub_util_read_at): Likewise.
16640         (grub_util_write_image_at): Likewise.
16641         (grub_util_read_image): Call grub_util_read_at.
16642         (grub_util_write_image): Call grub_util_write_image_at.
16643         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16644         additional memory in kernel_img for a struct grub_module_info.
16645         Fill in that grub_module_info.
16646         * util/powerpc/ieee1275/grub-mkimage.c: New file.
16648 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16650         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16651         New function.
16652         * include/grub/powerpc/ieee1275/ieee1275.h
16653         (grub_ieee1275_milliseconds): New prototype.
16654         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16655         Change to 1000.
16656         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16657         grub_ieee1275_milliseconds.
16659 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16661         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16662         variable.
16663         (find_options): New function.
16664         (cmain): Call find_options.
16665         * include/grub/powerpc/ieee1275/ieee1275.h
16666         (grub_ieee1275_realmode): New extern variable.
16667         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16668         grub_map if grub_ieee1275_realmode is false.
16670 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
16672         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16673         lines are inserted and make it work like readline.  Reported by
16674         Vincent Pelletier <subdino2004@yahoo.fr>.
16676 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
16678         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16680         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16681         `kern/powerpc/cache.S'.
16683 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
16685         * genmk.rb: Handle the `Program' class in the main loop.  Written
16686         by Johan Rydberg <jrydberg@gnu.org>.
16687         (Program): New class.
16688         (programs): New variable.
16689         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16690         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
16691         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
16692         (help_arch): Function removed.
16693         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16694         `powerpc/libgcc.h' and `loader.h'.
16695         (pkgdata_PROGRAMS): New variable.
16696         (sbin_UTILITIES): Variable removed.
16697         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16698         (grubof_SOURCES): Variable re-defined so it only includes the
16699         core functionality.
16700         (grubof_CFLAGS): Remove `-DGRUBOF'.
16701         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16702         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16703         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16704         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16705         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16706         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16707         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16708         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16709         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16710         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16711         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16712         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16713         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16714         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16715         (pc_mod_CFLAGS): New variables.
16716         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16717         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16718         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16719         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16720         Moved from here...
16721         * include/grub/i386/pc/init.h (grub_os_area_addr)
16722         (rub_os_area_size): ... to here.
16723         * include/grub/powerpc/ieee1275/ieee1275.h
16724         (grub_ieee1275_entry_fn): Export symbol.
16725         * include/grub/powerpc/ieee1275/init.h: New file.
16726         * include/grub/powerpc/libgcc.h: Likewise.
16727         * include/grub/cache.h: Likewise.
16728         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
16729         <hollis@penguinppc.org>.
16730         * kern/dl.c: Include <grub/cache.h>.
16731         (grub_dl_flush_cache): New function.
16732         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16733         for this module.
16734         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16735         (grub_console_init): Removed prototypes.
16736         (grub_machine_init): Don't initialize the modules anymore.
16737         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16738         static.
16739         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16740         Macro undef removed.
16741         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16742         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16743         relocation `R_PPC_REL32'.  Return an error when the relocation is
16744         unknown.
16745         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16746         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16747         * util/misc.c (grub_arch_sync_caches): Likewise.
16749 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
16751         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16752         `symlist.c', add `grubof_symlist.c'.
16753         (symlist.c): Variable removed.
16754         (grubof_HEADERS): Variable added.
16755         (grubof_symlist.c): New target.
16756         (kernel_syms.lst): Use `grubof_HEADERS' instead of
16757         `kernel_img_HEADERS'.
16758         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16759         * kern/powerpc/dl.c: New file.
16760         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16761         Function removed.
16762         (grub_arch_dl_relocate_symbols): Likewise.
16763         (grub_register_exported_symbols): Likewise.
16765 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
16767         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16768         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
16769         to fail instead.  Reported by Vincent Pelletier
16770         <subdino2004@yahoo.fr>.
16772         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16773         it is not allocated.  Reported by Vincent Pelletier
16774         <subdino2004@yahoo.fr>.
16776         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16777         output so the output looks better.
16779 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
16781         Modulize the partition map support and add support for the amiga
16782         partition map.
16784         * commands/ls.c: Include <grub/partition.h> instead of
16785         <grub/machine/partition.h>.
16786         * kern/disk.c: Likewise.
16787         * kern/rescue.c: Likewise.
16788         * loader/i386/pc/chainloader.c: Likewise.
16789         * normal/cmdline.c: Likewise.
16790         * kern/powerpc/ieee1275/init.c: Likewise.
16791         (grub_machine_init): Call `grub_pc_partition_map_init',
16792         `grub_amiga_partition_map_init' and
16793         `grub_apple_partition_map_init'.
16794         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16795         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
16796         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
16797         `partition.h' and `pc_partition.h'.
16798         (grub_setup_SOURCES): Remove
16799         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
16800         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16801         (grub_emu_SOURCES): Likewise.
16802         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16803         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16804         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16805         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16806         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
16807         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16808         (grubof_SOURCES): Likewise.
16809         * disk/i386/pc/partition.c: File removed.
16810         * disk/powerpc/ieee1275/partition.c: Likewise.
16811         * include/grub/powerpc/ieee1275/partition.h: Likewise.
16812         * include/grub/i386/pc/partition.h: Likewise.
16813         * kern/partition.c: New file.
16814         * partmap/amiga.c: Likewise.
16815         * partmap/apple.c: Likewise.
16816         * partmap/pc.c: Likewise.
16817         * include/grub/partition.h: Likewise..
16818         * include/grub/pc_partition.h: Likewise.
16819         * util/grub-emu.c: Include <grub/partition.h> instead of
16820         <grub/machine/partition.h>.
16821         (main): Call `grub_pc_partition_map_init',
16822         `grub_amiga_partition_map_init' and
16823         `grub_apple_partition_map_init' and deinitialize afterwards.
16824         * util/i386/pc/biosdisk.c: Include `#include
16825         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16826         `<grub/machine/partition.h>'.
16827         * util/i386/pc/grub-setup.c: Likewise.
16828         * util/i386/pc/biosdisk.c: Likewise.
16829         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16830         partition information in case of a PC partition.
16831         * util/i386/pc/grub-setup.c: Include `#include
16832         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16833         `<grub/machine/partition.h>'.
16834         (setup): Only access the PC specific partition information in case
16835         of a PC partition.
16837 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
16839         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16840         (grub_longjmp): Likewise.
16841         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16842         20.
16843         * normal/powerpc/setjmp.S: New file.
16844         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16845         `normal/powerpc/setjmp.S'.
16846         (grubof_CFLAGS): Add `-DGRUBOF'.
16847         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16848         [GRUB_UTIL && !GRUBOF].
16850 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
16852         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16853         property named `name'.  Correctly handle the error returned by
16854         `grub_ieee1275_finddevice' if a device can not be opened.
16856 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16858         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16859         `actual' for negativity.
16860         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16861         kern/fshelp.c.
16863 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16865         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16866         (PAGE_OFFSET): New macro.
16867         (CRTC_ADDR_PORT): Likewise.
16868         (CRTC_DATA_PORT): Likewise.
16869         (START_ADDR_HIGH_REGISTER): Likewise.
16870         (START_ADDR_LOW_REGISTER): Likewise.
16871         (GRAPHICS_ADDR_PORT): Likewise.
16872         (GRAPHICS_DATA_PORT): Likewise.
16873         (READ_MAP_REGISTER): Likewise.
16874         (INPUT_STATUS1_REGISTER): Likewise.
16875         (INPUT_STATUS1_VERTR_BIT): Likewise.
16876         (page): New variable.
16877         (wait_vretrace): New function.
16878         (set_read_map): Likewise.
16879         (set_start_address): Likewise.
16880         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
16881         the right page.
16882         (check_vga_mem): Take the page into account.
16883         (write_char): Likewise.
16884         (write_cursor): Likewise.
16885         (scroll_up): Likewise.  Copy the page to the page that is not
16886         shown and switch between both pages.
16887         (grub_vga_putchar): Fix off by one error.
16888         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
16889         account.
16891 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16893         Add support for iso9660 (including rockridge).
16895         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16896         (iso9660_mod_SOURCES): New variable.
16897         (iso9660_mod_CFLAGS): Likewise.
16898         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16899         * include/grub/fs.h (grub_iso9660_init): New prototype.
16900         * util/grub-emu.c (main): Call `grub_iso9660_init'.
16901         * fs/iso9660.c: New file.
16903         * include/grub/misc.h (grub_strncat): New prototype.
16904         * kern/misc.c (grub_strncat): New function.
16906         * fs/hfs.c (grub_hfs_mount): Translate the error
16907         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16908         * fs/jfs.c (grub_jfs_mount): Likewise.
16909         * fs/ufs.c (grub_ufs_mount): Likewise.
16911 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
16913         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16914         which initialized BAT registers.
16915         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16916         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16917         Move from here...
16918         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16919         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16920         ... to here.
16921         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16922         (grub_mapclaim): Likewise.
16923         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16924         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
16925         hand.
16927 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
16929         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16930         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16931         -ffreestanding and -msoft-float.
16933 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
16935         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16936         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16937         set in grub_ieee1275_flags.
16939 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
16941         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16942         prototype.
16943         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16944         grub_console_init first.
16945         Change the memory range used for grub_ieee1275_claim and
16946         grub_mm_init_region.
16947         Print an error message if the claim fails.
16948         Include <grub/misc.h>.
16950 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
16952         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16953         Call grub_children_iterate for device nodes of type `scsi',
16954         `ide', or `ata'.
16955         (grub_ofdisk_open): Remove manual device alias resolution.
16956         Fix memory leak when device cannot be opened.
16957         * include/grub/powerpc/ieee1275/ieee1275.h
16958         (grub_children_iterate): New prototype.
16959         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16960         New function.
16961         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16962         Return -1 if args.size was -1.
16964 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16966         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16967         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16968         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16969         Open Firmware's memory for it; claim memory from _start to _end.
16970         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16971         (_end): New extern.
16972         (_start): Zero BSS from __bss_start to _end.
16973         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16974         New extern.
16975         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16977 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16979         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16980         -1 if args.base was -1.
16982 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
16984         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16985         escape sequence instead of a literal ^L. Also call
16986         grub_ofconsole_gotoxy.
16988 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
16990         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16991         void *  arguments to grub_addr_t.  All callers updated.  Also make
16992         the `result' argument optional.
16993         (grub_ieee1275_release): change void * arguments to grub_addr_t.
16994         All callers updated.
16996 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
16998         * commands/ls.c (grub_ls_list_files): Use the string following the
16999         initial ')', if present, as the filesystem path.
17000         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
17002         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
17004 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
17006         Make the source code of the menu interface more readable.
17008         * normal/menu.c: Include grub/mm.h.
17009         (TERM_WIDTH): New macro.
17010         (TERM_HEIGHT): Likewise.
17011         (TERM_INFO_HEIGHT): Likewise.
17012         (TERM_MARGIN): Likewise.
17013         (TERM_SCROLL_WIDTH): Likewise.
17014         (TERM_TOP_BORDER_Y): Likewise.
17015         (TERM_LEFT_BORDER_X): Likewise.
17016         (TERM_BORDER_WIDTH): Likewise.
17017         (TERM_MESSAGE_HEIGHT): Likewise.
17018         (TERM_BORDER_HEIGHT): Likewise.
17019         (TERM_NUM_ENTRIES): Likewise.
17020         (TERM_FIRST_ENTRY_Y): Likewise.
17021         (TERM_ENTRY_WIDTH): Likewise.
17022         (TERM_CURSOR_X): Likewise.
17023         (draw_border): Use macros instead of magic numbers.
17024         (print_entry): Likewise.
17025         (print_entries): Likewise.
17026         (run_menu): Likewise. Also, handle the key 'e'.
17027         (run_menu_entry): Ignore empty command lines.
17028         (print_message): Added a new argument EDIT. If EDIT is true,
17029         print a different message.
17030         (init_page): Likewise.
17031         (edit_menu_entry): New function. Not implemented yet.
17033 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
17035         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
17036         can be loaded from normal mode.
17038         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
17039         `multiboot.mod'.
17040         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
17041         (multiboot_mod_CFLAGS): New variables.
17042         * loader/i386/pc/linux_normal.c: New file.
17043         * loader/i386/pc/multiboot_normal.c: Likewise.
17045         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
17046         attribute `unused'.
17048         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
17049         `fdiro' to read the mode information from instead of `diro'.
17051         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
17052         looking up a symlink.
17054         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
17055         macro.
17056         * normal/command.c (grub_command_execute): Don't parse the
17057         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
17058         flags of the command.
17060         * normal/menu.c (grub_menu_run): Fix typo.
17062 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
17064         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
17066         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
17067         `y + 1' instead of `y - 1'.
17069         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
17071 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
17073         From Hollis Blanchard <hollis@penguinppc.org>:
17074         * kern/misc.c (memmove): New alias for grub_memmove.
17075         (memcmp): New alias for grub_memcmp.
17076         (memset): New alias for grub_memset.
17077         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17078         Change "int handle" to "grub_ieee1275_phandle_t handle".
17079         * include/grub/powerpc/ieee1275/ieee1275.h
17080         (grub_ieee1275_get_property): Likewise.
17082 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
17084         Added normal mode command `chainloader' as module chain.mod, which
17085         depends on normal.mod and _chain.mod.
17087         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
17088         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
17089         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
17090         Deleted prototype.
17091         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
17092         but arguments parsing moved to ...
17093         (grub_chainloader_cmd): ... here.  New function.
17094         * include/grub/i386/pc/chainloader.h: New file.
17095         * loader/i386/pc/chainloader_normal.c: Likewise.
17097 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
17099         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
17100         (grub_mkimage_LDFLAGS): Likewise.
17101         (grub_emu_SOURCES): Likewise.
17102         (kernel_img_HEADERS): Added fshelp.h.
17103         * fs/ext2.c: Include <grub/fshelp.h>.
17104         (FILETYPE_REG): New macro.
17105         (FILETYPE_INO_REG): Likewise.
17106         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
17107         Changed all users.
17108         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
17109         all users.
17110         (grub_fshelp_node): New struct.
17111         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
17112         to a pointer.
17113         (grub_ext2_get_file_block): Removed function.
17114         (grub_ext2_read_block): New function.
17115         (grub_ext2_read_file): Replaced parameter `data' by `node'.
17116         This function was written.
17117         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
17118         (grub_ext2_find_file): Removed function.
17119         (grub_ext2_read_symlink): New function.
17120         (grub_ext2_iterate_dir): Likewise.
17121         (grub_ext2_open): Rewritten.
17122         (grub_ext2_dir): Rewritten.
17123         * include/grub/fshelp.h: New file.
17124         * fs/fshelp.c: Likewise.
17126 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
17128         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
17129         (print_message): Add a missing newline.
17130         (run_menu): Added timeout support.
17131         (run_menu_entry): New local function.
17132         (grub_menu_run): Added support for booting.
17134         * kern/loader.c (grub_loader_is_loaded): New function.
17136         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
17137         (grub_get_rtc): Exported.
17139         * include/grub/i386/pc/time.h: Include grub/symbol.h.
17140         (grub_get_rtc): Exported.
17142         * include/grub/normal.h (struct grub_command_list): Remove
17143         constant from the member `command'.
17145         * include/grub/loader.h (grub_loader_is_loaded): Declared.
17147         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
17149         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
17151 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
17153         Add support for the JFS filesystem.
17155         * fs/jfs.c: New file.
17156         * include/grub/fs.h (grub_jfs_init): New prototype.
17157         (grub_jfs_fini): New prototype.
17158         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
17159         (grub_emu_SOURCES): Likewise.
17160         (pkgdata_MODULES): Add jfs.mod.
17161         (jfs_mod_SOURCES): New variable.
17162         (jfs_mod_CFLAGS): Likewise.
17163         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
17164         (grubof_SOURCES): Likewise.
17165         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
17167         * fs/fat.c (grub_fat_find_dir): Convert the filename little
17168         endian to the host endian.
17169         (grub_fat_utf16_to_utf8): Move function from there...
17170         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
17171         the endianness of the source string anymore.
17172         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
17174 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
17176         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
17177         (grub_boot_fini) [GRUB_UTIL]: Likewise.
17178         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17179         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
17181         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17182         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
17183         for `node_found' and `it_dir'.
17184         (grub_hfs_dir): Add prototype for `dir_hook'.
17186         * fs/minix.c (grub_minix_get_file_block): Add prototype for
17187         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
17188         and `indir32' to silence a gcc warning.
17190         * include/grub/fs.h (grub_hfs_init): New prototype.
17191         (grub_hfs_fini): Likewise.
17194 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
17196         Each disk device has its own id now. This is useful to make use
17197         of multiple disk devices.
17199         * include/grub/disk.h (grub_disk_dev_id): New enum.
17200         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17201         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17203         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17204         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17206         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17207         GRUB_DISK_DEVICE_OFDISK_ID as an id.
17209         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17210         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17212         * include/grub/disk.h (struct grub_disk_dev): Added a new member
17213         "id" which is used by the cache manager.
17215         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17216         of just "GRUB".
17218 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
17220         * fs/hfs.c: New file.
17221         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17222         (grub_emu_SOURCES): Likewise.
17223         (pkgdata_MODULES): Add hfs.mod.
17224         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17225         (grubof_SOURCES): Likewise.
17226         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17228         * include/grub/misc.h (grub_strncasecmp): Add prototype.
17229         * kern/misc.c (grub_strncasecmp): Add function.
17231 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
17233         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17234         with parentheses.
17236         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17237         (grub_ext2_dir): In case the directory entry type is unknown, read
17238         it from the inode.
17240 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
17242         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17243         grub_load_linux instead of grub_rescue_cmd_linux as second
17244         argument of grub_rescue_register_command.
17246         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17248 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
17250         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17251         function.
17252         * commands/boot.c: Remove the check for `GRUB_UTIL'.
17253         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17254         `loader/powerpc/ieee1275/linux.c',
17255         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17256         * include/grub/powerpc/ieee1275/ieee1275.h
17257         (grub_ieee1275_release): New prototype.
17258         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17259         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17260         normal, boot, linux and linux_normal.
17261         * loader/powerpc/ieee1275/linux.c: New file.
17262         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17264 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
17266         * normal/arg.c (grub_arg_parse): Correct error handling after
17267         reallocating the argumentlist (check if `argl' is not null instead
17268         of checking if `args' is not null).
17269         * kern/mm.c (grub_realloc): Return the same pointer when using the
17270         same region, instead of returning the header address.
17272 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
17274         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17275         one block instead of two when looking for the initial partition.
17276         (grub_partition_probe): Initialize the local variable `p' with 0.
17277         Use base 10 for the grub_strtoul call.
17278         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
17279         need for one local variable.
17280         (grub_strtoul): Don't add the new value to `num', instead of that
17281         just assign it.
17283 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
17285         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17286         (pxeboot_img_SOURCES): New variable.
17287         (pxeboot_img_ASFLAGS): Likewise.
17288         (pxeboot_img_LDFLAGS): Likewise.
17289         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
17290         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
17291         <lode_leroy@hotmail.com>.
17293 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17295         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17296         there was no input.
17298 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17300         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
17301         the history buffer logic.
17303 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17305         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17306         (FILETYPE_INO_SYMLINK): New macros.
17307         (grub_ext2_find_file): Check if the node is a directory using the
17308         inode stat information instead of using the filetype in the
17309         dirent.  Exclude the first character of an absolute symlink.
17310         (grub_ext2_dir): Mask out the filetype part of the mode member of
17311         the inode.
17313 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
17315         Add support for UFS version 1 and 2.  Add support for the minix
17316         filesystem version 1 and 2, both the variants with 14 and 30 long
17317         filenames.
17319         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17320         fs/minix.c.
17321         (grub_emu_SOURCES): Likewise.
17322         (pkgdata_MODULES): Add ufs.mod and minix.mod.
17323         (ufs_mod_SOURCES): New variable.
17324         (ufs_mod_CFLAGS): Likewise.
17325         (minix_mod_SOURCES): Likewise.
17326         (minix_mod_CFLAGS): Likewise.
17327         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17328         fs/minix.c.
17329         (grubof_SOURCES): Likewise.
17330         * fs/ufs.c: New file.
17331         * fs/minix.c: New file.
17332         * include/grub/fs.h (grub_ufs_init): New prototype.
17333         (grub_ufs_fini): Likewise.
17334         (grub_minix_init): Likewise.
17335         (grub_minix_fini): Likewise.
17336         * util/grub-emu.c (main): Initialize and deinitialize UFS and
17337         minix fs.
17339 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
17341         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17342         commands/ls.c, commands/terminal.c, commands/boot.c,
17343         commands/cmp.c and commands/cat.c.
17344         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17346         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17347         "env.h"
17349 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17351         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17352         and grub_, respectively. Because the conversion is trivial and
17353         mechanical, I omit the details here. Please refer to the CVS
17354         if you need more information.
17356 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17358         * include/pupa: Renamed to ...
17359         * include/grub: ... this.
17360         * util/i386/pc/pupa-mkimage.c: Renamed to ...
17361         * util/i386/pc/grub-mkimage.c: ... this.
17362         * util/i386/pc/pupa-setup.c: Renamed to ...
17363         * util/i386/pc/grub-setup.c: ... this.
17364         * util/pupa-emu.c: Renamed to ...
17365         * util/grub-emu.c: ... this.
17367 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
17369         Add support for the newworld apple macintosh (PPC).  This has been
17370         tested on the powerbook 2000 only.  It only adds support for
17371         generic ieee1275 functions, console and disk support.  This should
17372         be easy to port to other architectures with support for Open
17373         Firmware.
17375         * configure.ac: Accept the powerpc as host_cpu.  In the case of
17376         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
17377         specific tests are only executed while building for the i386.
17378         Inverse test for crosscompile.
17379         * genmk.rb (Utility): Allow assembler files.
17380         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17381         * conf/powerpc-ieee1275.rmk: New file.
17382         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17383         * disk/powerpc/ieee1275/partition.c: Likewise.
17384         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17385         * include/pupa/powerpc/ieee1275/console.h: Likewise.
17386         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17387         * include/pupa/powerpc/ieee1275/time.h: Likewise.
17388         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17389         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17390         * include/pupa/powerpc/ieee1275/loader.h
17391         * include/pupa/powerpc/setjmp.h: Likewise.
17392         * include/pupa/powerpc/types.h: Likewise.
17393         * kern/powerpc/ieee1275/init.c: Likewise.
17394         * kern/powerpc/ieee1275/openfw.c: Likewise.
17395         * term/powerpc/ieee1275/ofconsole.c: Likewise.
17397         These files were written by Johan Rydberg
17398         (jrydberg@night.trouble.net) and I only modified them slightly.
17400         * boot/powerpc/ieee1275/cmain.c: New file.
17401         * boot/powerpc/ieee1275/crt0.S: Likewise.
17402         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17403         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17405 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
17407         * Makefile.in: Update copyright.
17408         * genmodsrc.sh: Likewise.
17409         * gensymlist.sh: Likewise.
17410         * term/i386/pc/vga.c: Indent correctly.
17412         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17413         bugreporting address.
17414         * util/i386/pc/pupa-setup.c (usage): Likewise,
17415         (main): Call pupa_ext2_init and pupa_ext2_fini.
17417         * fs/fat.c (log2): Renamed to ...
17418         (fat_log2): ... this.
17419         All callers changed.
17420         * kern/misc.c (memcpy): Alias to pupa_memmove.
17421         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17422         lvalue cast.
17423         * util/console.c (pupa_ncurses_fini): Return 0.
17425         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17426         Move fail label here.
17427         [__GNU__]: Don't warn when using stat.
17428         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17429         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17430         long int. Use strtol instead of strtoul.
17432 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
17434         * commands/boot.c: New file.
17435         * commands/cat.c: Likewise.
17436         * commands/cmp.c: Likewise.
17437         * commands/ls.c: Likewise.
17438         * commands/terminal.c: Likewise.
17439         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17440         (pupa_register_command): Changed interface to match the new
17441         argument parser.
17442         (pupa_command_execute): Changed (almost rewritten) so it uses
17443         pupa_split_command.  Added support for setting variables using the
17444         syntax `foo=bar'.
17445         (rescue_command): Changed to work with the new argument parser.
17446         (terminal_command): Moved from here to commands/terminal.c.
17447         (set_command): New function.
17448         (unset_command): New function.
17449         (insmod_command): New function.
17450         (rmmod_command): New function.
17451         (lsmod_command): New function.
17452         (pupa_command_init): Don't initialize the command terminal
17453         anymore.  Initialize the commands set, unset, insmod, rmmod and
17454         lsmod.
17455         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17456         (kernel_img_HEADERS): Add arg.h and env.h.
17457         (pupa_mkimage_LDFLAGS): Add kern/env.c.
17458         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17459         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17460         normal/arg.c.
17461         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17462         terminal.mod.
17463         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17464         (boot_mod_SOURCES): New variable.
17465         (terminal_mod_SOURCES): Likewise.
17466         (ls_mod_SOURCES): Likewise.
17467         (cmp_mod_SOURCES): Likewise.
17468         (cat_mod_SOURCES): Likewise.
17470         * normal/arg.c: New file.
17471         * kern/env.c: Likewise.
17472         * include/pupa/arg.h: Likewise.
17473         * include/pupa/env.h: Likewise.
17474         * font/manager.c (font_command): Changed to match argument parsing
17475         interface changes.
17476         (PUPA_MOD_INIT): Likewise.
17477         * hello/hello.c (pupa_cmd_hello): Likewise.
17478         (PUPA_MOD_INIT): Likewise.
17479         * include/pupa/disk.h: Include <pupa/device.h>.
17480         (pupa_print_partinfo): New prototype.
17481         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17482         (pupa_dl_get_prefix): Likewise.
17483         * include/pupa/misc.h: Include <pupa/err.h>.
17484         (pupa_isgraph): New prototype.
17485         (pupa_isdigit): Likewise.
17486         (pupa_split_cmdline): Likewise.
17487         * include/pupa/normal.h: Include <pupa/arg.h>.
17488         (pupa_command): Changed the prototype of the member `func' to
17489         match the argument parsing interface.  Added member `options'.
17490         (pupa_register_command): Updated to match function.
17491         (pupa_arg_parse): New prototype.
17492         (pupa_hello_init) [PUPA_UTIL]: New prototype.
17493         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17494         (pupa_ls_init) [PUPA_UTIL]: Likewise.
17495         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17496         (pupa_cat_init) [PUPA_UTIL]: Likewise.
17497         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17498         (pupa_boot_init) [PUPA_UTIL]: Likewise.
17499         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17500         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17501         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17502         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17503         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17504         * kern/disk.c: Include <pupa/file.h>.
17505         (pupa_print_partinfo): New function.
17506         * kern/dl.c: Include <pupa/env.h>.
17507         (pupa_dl_dir): Variable removed.
17508         (pupa_dl_load): Use the environment variable `prefix' instead of
17509         the variable pupa_dl_dir.
17510         (pupa_dl_set_prefix): Function removed.
17511         (pupa_dl_get_prefix): Likewise.
17512         * kern/i386/pc/init.c: Include <pupa/env.h>.
17513         (pupa_machine_init): Use the environment variable `prefix' instead of
17514         using pupa_dl_set_prefix to set the prefix.
17515         * kern/main.c: Include <pupa/env.h>.
17516         (pupa_set_root_dev): Use the environment variable `prefix' instead of
17517         using pupa_dl_get_prefix to get the prefix.
17518         * kern/misc.c: Include <pupa/env.h>.
17519         (pupa_isdigit): New function.
17520         (pupa_isgraph): Likewise.
17521         (pupa_ftoa): Likewise.
17522         (pupa_vsprintf): Added support for printing values of the type
17523         `double'.  Make it possible to format variable output when using
17524         formatting like `%1.2%f'.
17525         (pupa_split_cmdline): New function.
17526         * kern/rescue.c: Include <pupa/env.h>.
17527         (next_word): Removed function.
17528         (pupa_rescue_cmd_prefix): Likewise.
17529         (pupa_rescue_cmd_set): New function.
17530         (pupa_rescue_cmd_unset): New function.
17531         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17532         split the command line instead of splitting it here.  Added
17533         support for setting variables using the syntax `foo=bar'.  Don't
17534         initialize the prefix command anymore.  Initialized the set and
17535         unset commands.
17536         * normal/cmdline.c: Include <pupa/env.h>.
17537         (pupa_tab_complete): Added prototypes for print_simple_completion,
17538         print_partition_completion, add_completion, iterate_commands,
17539         iterate_dev, iterate_part and iterate_dir. Moved code to print
17540         partition information from here to kern/disk.c.
17541         (pupa_cmdline_run): Don't check if the function exists anymore.
17542         * normal/main.c: Include <pupa/env.h>.
17543         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17544         instead of using pupa_dl_get_prefix to get the prefix.
17545         * term/i386/pc/vga.c: Include <pupa/arg.h>.
17546         (check_vga_mem): Cast pointers to `void *' to silence a gcc
17547         warning.
17548         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17549         (pupa_vga_setcolor): Declare unused variables with `__attribute__
17550         ((unused))' to silence a gcc warning.
17551         (pupa_vga_setcolor): Likewise.
17552         (debug_command): Changed to match argument parsing
17553         interface changes.
17554         * util/pupa-emu.c: Include <pupa/env.h>.
17555         (options): Added 0's for unused fields to silence a gcc warning.
17556         (argp): Likewise.
17557         (main): Use the environment variable `prefix' instead of using
17558         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
17559         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
17560         and terminal.
17562         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17563         * util/misc.c: Include <malloc.h>.
17564         (pupa_malloc): Rewritten so errors are correctly reported.
17565         (pupa_realloc): Likewise.
17566         (pupa_memalign): Likewise.
17567         (pupa_mm_init_region): Declare unused variables with
17568         `__attribute__ ((unused))' to silence a gcc warning.
17569         * normal/i386/setjmp.S: Remove tab at the end of the file to
17570         silence a gcc warning.
17571         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17572         variables with `__attribute__ ((unused))' to silence a gcc
17573         warning.
17574         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17575         local variable i unsigned to silence a gcc warning.
17577         * kern/term.c: Include <pupa/misc.h>.
17578         (pupa_more_lines): New variable.
17579         (pupa_more): Likewise.
17580         (pupa_putcode): When the pager is active pause at the end of every
17581         screen.
17582         (pupa_set_more): New function.
17583         * include/pupa/term.h (pupa_set_more): New prototype.
17586 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
17588         Now this project is GRUB 2 rather than PUPA. The location of
17589         the CVS repository was moved to GRUB's.
17591         * configure.ac: Use bug-grub as the reporting address.
17592         Use GRUB instead of PUPA.
17593         Change the version number to 1.90.
17595 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
17597         * genkernsyms.sh: Updated copyright information.
17598         * genmk.rb: Likewise.
17599         * genmodsrc.sh: Likewise.
17600         * gensymlist.sh: Likewise.
17601         * boot/i386/pc/boot.S: Likewise.
17602         * boot/i386/pc/diskboot.S: Likewise.
17603         * disk/i386/pc/biosdisk.c: Likewise.
17604         * disk/i386/pc/partition.c: Likewise.
17605         * font/manager.c: Likewise.
17606         * fs/ext2.c: Likewise.
17607         * fs/fat.c: Likewise.
17608         * include/pupa/boot.h: Likewise.
17609         * include/pupa/device.h: Likewise.
17610         * include/pupa/disk.h: Likewise.
17611         * include/pupa/dl.h: Likewise.
17612         * include/pupa/elf.h: Likewise.
17613         * include/pupa/err.h: Likewise.
17614         * include/pupa/file.h: Likewise.
17615         * include/pupa/font.h: Likewise.
17616         * include/pupa/fs.h: Likewise.
17617         * include/pupa/kernel.h: Likewise.
17618         * include/pupa/loader.h: Likewise.
17619         * include/pupa/misc.h: Likewise.
17620         * include/pupa/mm.h: Likewise.
17621         * include/pupa/net.h: Likewise.
17622         * include/pupa/normal.h: Likewise.
17623         * include/pupa/rescue.h: Likewise.
17624         * include/pupa/setjmp.h: Likewise.
17625         * include/pupa/symbol.h: Likewise.
17626         * include/pupa/term.h: Likewise.
17627         * include/pupa/types.h: Likewise.
17628         * include/pupa/i386/setjmp.h: Likewise.
17629         * include/pupa/i386/types.h: Likewise.
17630         * include/pupa/i386/pc/biosdisk.h: Likewise.
17631         * include/pupa/i386/pc/boot.h: Likewise.
17632         * include/pupa/i386/pc/console.h: Likewise.
17633         * include/pupa/i386/pc/init.h: Likewise.
17634         * include/pupa/i386/pc/kernel.h: Likewise.
17635         * include/pupa/i386/pc/linux.h: Likewise.
17636         * include/pupa/i386/pc/loader.h: Likewise.
17637         * include/pupa/i386/pc/memory.h: Likewise.
17638         * include/pupa/i386/pc/multiboot.h: Likewise.
17639         * include/pupa/i386/pc/partition.h: Likewise.
17640         * include/pupa/i386/pc/time.h: Likewise.
17641         * include/pupa/i386/pc/vga.h: Likewise.
17642         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17643         * include/pupa/util/getroot.h: Likewise.
17644         * include/pupa/util/misc.h: Likewise.
17645         * include/pupa/util/resolve.h: Likewise.
17646         * kern/device.c: Likewise.
17647         * kern/disk.c: Likewise.
17648         * kern/dl.c: Likewise.
17649         * kern/err.c: Likewise.
17650         * kern/file.c: Likewise.
17651         * kern/fs.c: Likewise.
17652         * kern/loader.c: Likewise.
17653         * kern/main.c: Likewise.
17654         * kern/misc.c: Likewise.
17655         * kern/mm.c: Likewise.
17656         * kern/rescue.c: Likewise.
17657         * kern/term.c: Likewise.
17658         * kern/i386/dl.c: Likewise.
17659         * kern/i386/pc/init.c: Likewise.
17660         * kern/i386/pc/lzo1x.S: Likewise.
17661         * kern/i386/pc/startup.S: Likewise.
17662         * loader/i386/pc/chainloader.c: Likewise.
17663         * loader/i386/pc/linux.c: Likewise.
17664         * loader/i386/pc/multiboot.c: Likewise.
17665         * normal/cmdline.c: Likewise.
17666         * normal/command.c: Likewise.
17667         * normal/main.c: Likewise.
17668         * normal/menu.c: Likewise.
17669         * normal/i386/setjmp.S: Likewise.
17670         * term/i386/pc/console.c: Likewise.
17671         * term/i386/pc/vga.c: Likewise.
17672         * util/console.c: Likewise.
17673         * util/genmoddep.c: Likewise.
17674         * util/misc.c: Likewise.
17675         * util/pupa-emu.c: Likewise.
17676         * util/resolve.c: Likewise.
17677         * util/unifont2pff.rb: Likewise.
17678         * util/i386/pc/biosdisk.c: Likewise.
17679         * util/i386/pc/getroot.c: Likewise.
17680         * util/i386/pc/pupa-mkimage.c: Likewise.
17681         * util/i386/pc/pupa-setup.c: Likewise.
17683 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
17685         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17686         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
17687         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
17688         reading and reset it after reading.
17689         (pupa_ext2_close): Return PUPA_ERR_NONE.
17691         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17692         Correct value.
17693         (struct linux_kernel_header): Add kernel_version and
17694         initrd_addr_max.
17695         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17696         pupa_file_read succeeds.
17697         (pupa_rescue_cmd_initrd): Implement.
17699 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
17701         * fs/ext2.c (pupa_ext2_label): New function.
17702         (pupa_ext2_fs): Added label.
17703         * fs/fat.c (pupa_fat_label): New function.
17704         (pupa_fat_fs): Added label.
17705         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17707         * kern/misc.c (pupa_strndup): New function.
17708         * include/pupa/misc.h (pupa_strndup): New prototype.
17710         * include/pupa/normal.h: Include <pupa/err.h>.
17711         (pupa_set_history): New prototype.
17712         (pupa_iterate_commands): New prototype.
17713         * normal/cmdline.c: Include <pupa/machine/partition.h>,
17714         <pupa/disk.h>, <pupa/file.h>.
17715         (hist_size): New variable.
17716         (hist_lines): Likewise.
17717         (hist_end): Likewise.
17718         (hist_used): Likewise.
17719         (pupa_set_history): New function.
17720         (pupa_history_get): Likewise.
17721         (pupa_history_add): Likewise.
17722         (pupa_history_replace): Likewise.
17723         (pupa_tab_complete): Likewise.
17724         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
17725         completion shows partitionnames while completing partitions, this
17726         feature was suggested by Jeff Bailey.
17727         * normal/command.c (pupa_iterate_commands): New function.
17728         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17729         (pupa_normal_init): Initialize history buffer.
17730         (PUPA_MOD_INIT): Likewise.
17731         (pupa_normal_fini): Free the history buffer.
17732         (PUPA_MOD_FINI): Likewise.
17734         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17735         key.
17737         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17738         * configure.ac [i386]: Check for regparam bug.
17739         (NESTED_FUNC_ATTR) [! i386]: Defined.
17741 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
17743         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17744         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17745         (pupa_emu_SOURCES): New variable.
17746         (pupa_emu_LDFLAGS): Likewise.
17747         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17748         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17749         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17750         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17751         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17752         (pupa_jmp_buf): New typedef.
17753         (pupa_setjmp) [PUPA_UTIL]: New macro.
17754         (pupa_longjmp) [PUPA_UTIL]: Likewise.
17755         * include/pupa/term.h (struct pupa_term): New member `refresh'.
17756         (pupa_refresh): New prototype.
17757         * include/pupa/util/getroot.h: New file.
17758         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17759         it.
17760         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17761         (pupa_rescue_cmd_cat): Likewise.
17762         (pupa_rescue_cmd_ls): Likewise.
17763         (pupa_rescue_cmd_testload): Likewise.
17764         (pupa_rescue_cmd_lsmod): Likewise.
17765         * normal/cmdline.c (pupa_cmdline_get): Likewise.
17766         * normal/menu.c (run_menu): Likewise.
17767         * kern/term.c (pupa_cls): Likewise.
17768         (pupa_refresh): New function.
17769         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17770         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17771         * util/console.c: New file.
17773         * util/i386/pc/getroot.c: New file.
17774         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17775         (pupa_putchar): New function.
17776         (pupa_refresh): Likewise.
17777         (xgetcwd): Function moved to ...
17778         (strip_extra_slashes): Likewise.
17779         (get_prefix): Likewise.
17780         * util/i386/pc/getroot.c: ... here.
17781         (find_root_device): Function moved and renamed to...
17782         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17783         Changed all callers.
17784         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17785         and renamed to...
17786         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17787         Changed all callers.
17788         * util/misc.c (pupa_memalign): New function.
17789         (pupa_mm_init_region): Likewise.
17790         (pupa_register_exported_symbols): Likewise.
17791         (pupa_putchar): Function removed.
17792         * util/pupa-emu.c: New file.
17794 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
17796         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17797         (_multiboot_mod_SOURCES): New variable.
17798         (_multiboot_mod_CFLAGS): Likewise.
17799         * loader/i386/pc/multiboot.c: New file.
17800         * include/pupa/i386/pc/multiboot.h: Likewise.
17801         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17802         (pupa_multiboot_real_boot): New function.
17803         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17804         (pupa_multiboot_real_boot): New prototype.
17805         (pupa_rescue_cmd_multiboot): Likewise
17806         (pupa_rescue_cmd_module): Likewise.
17808         * kern/loader.c (pupa_loader_set): Continue when
17809         pupa_loader_unload_func() fails.
17810         (pupa_loader_unset): New function.
17811         * include/pupa/loader.h (pupa_loader_unset): New prototype.
17813         * kern/misc.c (pupa_stpcpy): New function.
17814         * include/pupa/misc.h (pupa_stpcpy): New prototype.
17816 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
17818         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17819         for available extensions.
17821         * include/pupa/i386/pc/time.h: New file.
17822         * kern/disk.c: Include <pupa/machine/time.h>.
17823         (PUPA_CACHE_TIMEOUT): New macro.
17824         (pupa_last_time): New variable.
17825         (pupa_disk_open): Flush the cache when there was a timeout.
17826         (pupa_disk_close): Reset the timer.
17827         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17828         pupa_currticks.
17829         * util/misc.c: Include <sys/times.h>
17830         (pupa_get_rtc): New function.
17832 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
17834         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17835         as blocks.
17836         (pupa_ext2_get_file_block): Use blocks member.
17838         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17839         first block. Return -1 instead of pupa_errno on error.
17841 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
17843         * README: In the pupa-mkimage example use _chain instead of chain
17844         and ext2 instead of fat.
17845         * TODO: Replace ext2fs with jfs as an example.  Add an item for
17846         adding journal playback for ext2fs.
17847         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17848         (pkgdata_MODULES): Added ext2.mod.
17849         (ext2_mod_SOURCES): New variable.
17850         (ext2_mod_CFLAGS): Likewise.
17851         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17852         * include/pupa/misc.h (pupa_strncpy): New prototype.
17853         (pupa_strcat): Likewise.
17854         (pupa_strncmp): Likewise.
17855         * kern/misc.c (pupa_strcat): Enable function.
17856         (pupa_strncpy): New function.
17857         (pupa_strncmp): Likewise.
17858         * fs/ext2.c: New file.
17860         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17861         when the read failed before retrying.
17862         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17863         (_FILE_OFFSET_BITS): Likewise.
17864         * configure.ac: Added AC_SYS_LARGEFILE.
17866 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17868         * genmk.rb (PModule#rule): Make sure to get only symbol names
17869         from the output of nm.
17870         Reported by Robert Millan <zeratul2@wanadoo.es>.
17872 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17874         I forgot to check in these changes for a long time. This adds
17875         incomplete support for VGA console, and this is still very
17876         buggy. Also, a lot of consideration is required for I18N,
17877         UNICODE, and VGA font issues. Therefore, assume that this is
17878         such that "better than nothing".
17880         * font/manager.c: New file.
17881         * include/pupa/font.h: Likewise.
17882         * include/pupa/i386/pc/vga.h: Likewise.
17883         * term/i386/pc/vga.c: Likewise.
17884         * util/unifont2pff.rb: Likewise.
17886         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17887         (pkgdata_MODULES): Added vga.mod and font.mod.
17888         (vga_mod_SOURCES): New variables.
17889         (vga_mod_CFLAGS): Likewise.
17890         (font_mod_SOURCES): Likewise.
17891         (font_mod_CFLAGS): Likewise.
17893         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17895         * include/pupa/term.h: Include pupa/err.h.
17896         (struct pupa_term): Added init and fini.
17897         Changed the argument of putchar to pupa_uint32_t.
17899         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17900         (pupa_console_real_putchar): New prototype.
17901         (pupa_console_putchar): Removed.
17902         (pupa_console_checkkey): Exported.
17903         (pupa_console_getkey): Likewise.
17905         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17906         characters.
17908         * kern/term.c (pupa_term_set_current): Rewritten.
17909         (pupa_putchar): Likewise.
17910         (pupa_putcode): New function.
17912         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17913         (pupa_console_real_putchar): ... this.
17914         (pupa_vga_set_mode): New function.
17915         (pupa_vga_get_font): Likewise.
17917         * normal/command.c: Include pupa/term.h.
17918         (terminal_command): New function.
17919         (pupa_command_init): Register the command "terminal".
17921         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17922         (DISP_UP): Likewise.
17923         (DISP_RIGHT): Likewise.
17924         (DISP_DOWN): Likewise.
17925         (DISP_HLINE): Likewise.
17926         (DISP_VLINE): Likewise.
17927         (DISP_UL): Likewise.
17928         (DISP_UR): Likewise.
17929         (DISP_LL): Likewise.
17930         (DISP_LR): Likewise.
17932         * term/i386/pc/console.c (pupa_console_putchar): New function.
17934 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
17936         * util/resolve.c (pupa_util_resolve_dependencies): BUG
17937         FIX. Reverse the path_list.
17939         * include/pupa/normal.h: Export pupa_register_command and
17940         pupa_unregister_command.
17942         * hello/hello.c (pupa_cmd_hello): New module.
17943         * conf/i386-pc.rmk: Added hello.mod.
17945 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
17947         * kern/i386/pc/lzo1x.S: New file.
17949         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17950         (compress_kernel): New variable.
17951         (generate_image): Heavily modified to support compressing a
17952         large part of the core image.
17954         * util/misc.c (pupa_util_read_image): Fix a file descriptor
17955         leak.
17956         (pupa_util_load_image): New function.
17958         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17959         (pupa_compressed_size): New variable.
17960         (codestart): Enable Gate A20 here.
17961         Decompress the compressed part of the core image.
17962         Rearrange the code to put functions and variables which are
17963         required for initialization in the non-compressed part.
17964         Include lzo1x.S.
17966         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17967         here.
17969         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17971         * include/pupa/i386/pc/kernel.h
17972         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17973         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17974         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17975         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17976         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17978         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17980         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17981         (Utility#rule): Likewise.
17983         * configure.ac: Check if LZO is available.
17985 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
17987         * include/pupa/normal.h: New file.
17988         * include/pupa/setjmp.h: Likewise.
17989         * include/pupa/i386/setjmp.h: Likewise.
17990         * normal/cmdline.c: Likewise.
17991         * normal/command.c: Likewise.
17992         * normal/main.c: Likewise.
17993         * normal/menu.c: Likewise.
17994         * normal/i386/setjmp.S: Likewise.
17996         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17997         (pupa_rescue_cmd_initrd): Likewise.
17999         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
18000         Likewise.
18002         * kern/i386/pc/startup.S (translation_table): New variable.
18003         (translate_keycode): New function.
18004         (pupa_console_getkey): Call translate_keycode.
18006         * kern/rescue.c (attempt_normal_mode): New function.
18007         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
18008         it failed, print a message.
18010         * kern/mm.c (pupa_real_malloc): Print more information when a
18011         free magic is broken.
18012         (pupa_free): If the first free header is not free actually, set
18013         it to P.
18015         * kern/main.c (pupa_load_normal_mode): Just load the module
18016         "normal".
18017         (pupa_main): Don't print the message
18018         "Entering into rescue mode..." here.
18020         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
18021         Declared.
18022         (pupa_rescue_cmd_initrd): Likewise.
18023         (pupa_rescue_cmd_initrd): Likewise.
18025         * include/pupa/symbol.h (FUNCTION): Specify the type.
18026         (VARIABLE): Likewise.
18028         * include/pupa/err.h (pupa_err_t): Added
18029         PUPA_ERR_UNKNOWN_COMMAND.
18031         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
18032         (pupa_dl_get_prefix): Likewise.
18034         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
18035         Added _chain.mod and _linux.mod instead of chain.mod and
18036         linux.mod.
18037         (chain_mod_SOURCES): Renamed to ...
18038         (_chain_mod_SOURCES): ... this.
18039         (chain_mod_CFLAGS): Renamed to ...
18040         (_chain_mod_CFLAGS): ... this.
18041         (linux_mod_SOURCES): Renamed to ...
18042         (_linux_mod_SOURCES): ... this.
18043         (linux_mod_CFLAGS): Renamed to ...
18044         (_linux_mod_CFLAGS): ... this.
18045         (normal_mod_SOURCES): New variable.
18046         (normal_mod_CFLAGS): Likewise.
18047         (normal_mod_ASFLAGS): Likewise.
18049 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
18051         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
18052         possible.
18054         * kern/dl.c (pupa_dl_ref): Refer depending modules
18055         recursively.
18056         (pupa_dl_unref): Unrefer depending modules recursively.
18057         Don't call pupa_dl_unload implicitly, because PUPA can crash if
18058         a module is unloaded before one depending on that module is
18059         unloaded.
18060         (pupa_dl_unload): Unload depending modules explicitly,
18061         if possible.
18063 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
18065         * include/pupa/i386/pc/linux.h: New file.
18066         * loader/i386/pc/linux.c: Likewise.
18068         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
18069         Removed.
18070         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
18071         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
18072         of PUPA_CHAINLOADER_BOOT_SECTOR.
18074         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
18075         (pupa_linux_prot_size): New variable.
18076         (pupa_linux_tmp_addr): Likewise.
18077         (pupa_linux_real_addr): Likewise.
18078         (pupa_linux_boot_zimage): New function.
18079         (pupa_linux_boot_bzimage): Likewise.
18081         * kern/i386/pc/init.c (struct mem_region): New structure.
18082         (MAX_REGIONS): New macro.
18083         (mem_regions): New variable.
18084         (num_regions): Likewise.
18085         (pupa_os_area_addr): Likewise.
18086         (pupa_os_area_size): Likewise.
18087         (pupa_lower_mem): Likewise.
18088         (pupa_upper_mem): Likewise.
18089         (add_mem_region): New function.
18090         (compact_mem_regions): Likewise.
18091         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
18092         the size of the conventional memory and that of so-called upper
18093         memory (before the first memory hole).
18094         Instead of adding each found region to free memory, use
18095         add_mem_region and add them after removing overlaps.
18096         Also, add only 1/4 of the upper memory to free memory. The rest
18097         is used for loading OS images. Maybe this is ad hoc, but this
18098         makes it much easier to relocate OS images when booting.
18100         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
18101         (pupa_enter_rescue_mode): Don't register initrd and module.
18103         * kern/mm.c: Include pupa/dl.h.
18105         * kern/main.c: Include pupa/file.h and pupa/device.h.
18107         * kern/loader.c (pupa_loader_load_module_func): Removed.
18108         (pupa_loader_load_module): Likewise.
18110         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
18111         ``.o''.
18113         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
18114         (pupa_linux_tmp_addr): Likewise.
18115         (pupa_linux_real_addr): Likewise.
18116         (pupa_linux_boot_zimage): Likewise.
18117         (pupa_linux_boot_bzimage): Likewise.
18119         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
18120         (pupa_upper_mem): Likewise.
18121         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
18122         module is too dangerous.
18124         * include/pupa/loader.h (pupa_os_area_addr): Declared.
18125         (pupa_os_area_size): Likewise.
18126         (pupa_loader_set): Remove the first argument. Loader doesn't
18127         manage modules or initrd any longer.
18128         (pupa_loader_load_module): Removed.
18130         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
18131         (linux_mod_SOURCES): New variable.
18132         (linux_mod_CFLAGS): Likewise.
18134 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
18136         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
18137         the length of a blocklist correctly.
18139         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
18140         Use ioctl only if the OS file is a block device.
18141         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
18142         not very useful for normal files.
18144         * kern/main.c (pupa_set_root_dev): New function.
18145         (pupa_load_normal_mode): Likewise.
18146         (pupa_main): Call those above.
18148         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
18149         pupa_uint16_t.
18151         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
18153 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
18155         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
18156         (setup): Configure the installed partition information and the
18157         dl prefix.
18159         * loader/i386/pc/chainloader.c (my_mod): New variable.
18160         (pupa_chainloader_unload): New function.
18161         (pupa_rescue_cmd_chainloader): Refer itself.
18162         (PUPA_MOD_INIT): Save its own module in MY_MOD.
18164         * kern/i386/pc/startup.S (install_partition): Removed.
18165         (version_string): Likewise.
18166         (config_file): Likewise.
18167         (pupa_install_dos_part): New variable.
18168         (pupa_install_bsd_part): Likewise.
18169         (pupa_prefix): Likewise.
18170         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
18172         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
18173         and pupa/misc.h.
18174         (make_install_device): New function.
18175         (pupa_machine_init): Set the dl prefix.
18177         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18178         (buf): Renamed to ...
18179         (linebuf): ... this.
18180         (pupa_rescue_cmd_prefix): New function.
18181         (pupa_rescue_cmd_insmod): Likewise.
18182         (pupa_rescue_cmd_rmmod): Likewise.
18183         (pupa_rescue_cmd_lsmod): Likewise.
18184         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18185         rmmod and lsmod.
18187         * kern/mm.c (pupa_memalign): If failed even after invalidating
18188         disk caches, unload unneeded modules and retry.
18190         * kern/misc.c (pupa_memmove): New function.
18191         (pupa_memcpy): Removed.
18192         (pupa_strcpy): New function.
18193         (pupa_itoa): Made static.
18195         * kern/dl.c (pupa_dl_iterate): New function.
18196         (pupa_dl_ref): Likewise.
18197         (pupa_dl_unref): Likewise.
18198         (pupa_dl_unload): Return if succeeded or not.
18199         (pupa_dl_unload_unneeded): New function.
18200         (pupa_dl_unload_all): Likewise.
18201         (pupa_dl_init): Renamed to ...
18202         (pupa_dl_set_prefix): ... this.
18203         (pupa_dl_get_prefix): New function.
18205         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18206         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18207         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18208         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18209         (pupa_install_dos_part): Declared.
18210         (pupa_install_bsd_part): Likewise.
18211         (pupa_prefix): Likewise.
18212         (pupa_boot_drive): Likewise.
18214         * include/pupa/types.h: Fix a typo.
18216         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18217         pupa_memmove.
18218         (pupa_memmove): Declared.
18219         (pupa_strcpy): Likewise.
18221         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18222         pupa_mod_init takes one argument, its own module.
18223         (pupa_dl_unload_unneeded): Declared.
18224         (pupa_dl_unload_all): Likewise.
18225         (pupa_dl_ref): Likewise.
18226         (pupa_dl_unref): Likewise.
18227         (pupa_dl_iterate): Likewise.
18228         (pupa_dl_init): Renamed to ...
18229         (pupa_dl_set_prefix): ... this.
18230         (pupa_dl_get_prefix): Declared.
18232         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
18233         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
18234         unloaded.
18235         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18236         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18238         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18239         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18241 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
18243         * util/i386/pc/pupa-setup.c (setup): Define the internal
18244         function find_first_partition_start at the top level, because GCC
18245         3.0.x cannot compile internal functions in deeper scopes
18246         correctly.
18247         (find_root_device): Use lstat instead of stat.
18248         Don't follow symbolic links.
18249         Fix the path-constructing code.
18251         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18252         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18253         by a BLKGETSIZE ioctl first, because block devices don't fill
18254         the member st_mode of the structure stat on Linux.
18255         [__linux__] (linux_find_partition): Use a temporary buffer
18256         REAL_DEV for the working space. Copy it to DEV before returning.
18257         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18258         buffer cache consistent.
18259         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18260         strncmp. The previous value was merely wrong.
18261         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18263         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18264         FAT size is 12. The previous value was merely wrong.
18266         * kern/main.c (pupa_main): Don't split the starting message from
18267         newlines.
18269         * kern/term.c (pupa_putchar): Put CR after LF instead of before
18270         LF, because BIOS goes crazy about character attributes in this
18271         case.
18273 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
18275         * include/i386/pc/util/biosdisk.h: New file.
18276         * util/i386/pc/biosdisk.c: Likewise.
18277         * util/i386/pc/pupa-setup.c: Likewise.
18279         * Makefile.in (INCLUDE_DISTFILES): Added
18280         include/pupa/i386/pc/util/biosdisk.h.
18281         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18282         directory util/i386/pc.
18283         (install-local): Added a rule for sbin_UTILITIES.
18284         (uninstall): Likewise.
18286         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18288         * util/misc.c (xrealloc): New function.
18289         (pupa_malloc): Likewise.
18290         (pupa_free): Likewise.
18291         (pupa_realloc): Likewise.
18292         (pupa_stop): Likewise.
18293         (pupa_putchar): Likewise.
18295         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18297         * include/pupa/util/misc.h (xrealloc): Declared.
18299         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18300         macro.
18301         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18302         (PUPA_BOOT_MACHINE_BPB_END): ... this.
18304         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18305         [PUPA_UTIL] (pupa_fat_fini): Likewise.
18307         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18308         way should be implemented.
18309         [PUPA_UTIL] (pupa_fat_fini): Likewise.
18311         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18312         the size of NAME for safety.
18313         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18314         0x88.
18316         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18317         (pupa_setup_SOURCES): Likewise.
18319         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18321 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
18323         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18324         bunch of pushl's from pusha, because this destroys the return
18325         value.
18327 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
18329         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18330         This means that any missing prototypes could be fatal. Also, you
18331         must take care when writing assembly code. See the comments at
18332         the beginning of startup.S, for more details.
18334         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18335         compilation mechanism.
18336         (pupa_chainloader_real_boot): Likewise.
18337         (pupa_biosdisk_rw_int13_extensions): Likewise.
18338         (pupa_biosdisk_rw_standard): Likewise.
18339         (pupa_biosdisk_check_int13_extensions): Likewise.
18340         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18341         (pupa_biosdisk_get_diskinfo_standard): Likewise.
18342         (pupa_get_memsize): Likewise.
18343         (pupa_get_mmap_entry): Likewise.
18344         (pupa_console_putchar): Likewise.
18345         (pupa_console_setcursor): Likewise.
18346         (pupa_getrtsecs): Use pushl instead of push.
18348         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18349         memory instead of the stack for a mmap entry, because some
18350         BIOSes may ignore the maximum size and overflow.
18352         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18354         * genmk.rb (PModule#rule): Compile automatically generated
18355         sources with module-specific CFLAGS as well as other sources.
18357 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18359         * configure.ac: Check ld.
18360         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18361         respectively, before checking endianness and sizes.
18363         * Makefile.in (LD): New variable.
18365 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18367         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18369 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18371         * Changelog: New file.